Changeset 195520 in webkit


Ignore:
Timestamp:
Jan 24, 2016 5:11:35 PM (8 years ago)
Author:
Chris Dumez
Message:

An XMLDocument interface should be exposed on the global Window object
https://bugs.webkit.org/show_bug.cgi?id=153378
<rdar://problem/24315465>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C DOM and HTML tests now that more checks are
passing.

  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/nodes/Document-constructor-expected.txt:
  • web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Expose an XMLDocument interface on the global Window object, as per:

DOMImplementation.createDocument() now returns an XMLDocument instead
of a Document, as per:

Previously, WebKit would alias XMLDocument to Document which caused
some W3C tests to fail.

Chrome and Firefox already match the specification here.

No new tests, already covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDocumentCustom.cpp:

(WebCore::createNewDocumentWrapper):

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • dom/DOMImplementation.h:
  • dom/DOMImplementation.idl:
  • dom/Document.cpp:

(WebCore::Document::cloneDocumentWithoutChildren):

  • dom/Document.h:

(WebCore::Document::isXMLDocument):
(WebCore::Document::create): Deleted.
(WebCore::Document::createNonRenderedPlaceholder): Deleted.

  • dom/XMLDocument.h: Added.

(WebCore::XMLDocument::create):
(WebCore::XMLDocument::createXHTML):
(WebCore::XMLDocument::XMLDocument):
(isType):

  • dom/XMLDocument.idl: Added.
  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::patchDocument):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::setOuterHTML):

  • page/DOMWindow.idl:
  • page/PageSerializer.cpp:

(WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):

  • svg/SVGDocument.cpp:

(WebCore::SVGDocument::SVGDocument):

  • svg/SVGDocument.h:
  • svg/SVGDocument.idl:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseXML):

  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::createDocumentFromSource):

LayoutTests:

Rebaseline some layout tests now that XMLDocument is exposed.

  • fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
  • fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
  • fast/dom/Document/clone-node-expected.txt:
  • fast/dom/Document/clone-node.html:
  • fast/dom/Document/xml-document-focus-expected.txt:
  • fast/dom/Document/xml-document-focus.xml:
  • fast/dom/dom-parse-serialize-display-expected.txt:
  • fast/dom/dom-parse-serialize-expected.txt:
  • fast/dom/wrapper-classes-expected.txt:
  • fast/dom/wrapper-classes.html:
  • fast/dom/xmlserializer-serialize-to-string-exception-expected.txt:
  • fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt:
  • http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
  • platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
Location:
trunk
Files:
2 added
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195518 r195520  
     12016-01-24  Chris Dumez  <cdumez@apple.com>
     2
     3        An XMLDocument interface should be exposed on the global Window object
     4        https://bugs.webkit.org/show_bug.cgi?id=153378
     5        <rdar://problem/24315465>
     6
     7        Reviewed by Darin Adler.
     8
     9        Rebaseline some layout tests now that XMLDocument is exposed.
     10
     11        * fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
     12        * fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
     13        * fast/dom/Document/clone-node-expected.txt:
     14        * fast/dom/Document/clone-node.html:
     15        * fast/dom/Document/xml-document-focus-expected.txt:
     16        * fast/dom/Document/xml-document-focus.xml:
     17        * fast/dom/dom-parse-serialize-display-expected.txt:
     18        * fast/dom/dom-parse-serialize-expected.txt:
     19        * fast/dom/wrapper-classes-expected.txt:
     20        * fast/dom/wrapper-classes.html:
     21        * fast/dom/xmlserializer-serialize-to-string-exception-expected.txt:
     22        * fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt:
     23        * http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
     24        * platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
     25
    1262016-01-24  Simon Fraser  <simon.fraser@apple.com>
    227
  • trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt

    r42362 r195520  
    44
    55
    6 PASS document.implementation.createDocument().toString() is "[object Document]"
    7 PASS document.implementation.createDocument("http://www.example.com").toString() is "[object Document]"
     6PASS document.implementation.createDocument().toString() is "[object XMLDocument]"
     7PASS document.implementation.createDocument("http://www.example.com").toString() is "[object XMLDocument]"
    88PASS createDocument(, , null)
    99PASS createDocument(null, , null)
  • trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js

    r98407 r195520  
    139139
    140140// Moz throws a "Not enough arguments" exception in these, we don't:
    141 shouldBeEqualToString("document.implementation.createDocument().toString()", "[object Document]");
    142 shouldBeEqualToString("document.implementation.createDocument(\"http://www.example.com\").toString()", "[object Document]");
     141shouldBeEqualToString("document.implementation.createDocument().toString()", "[object XMLDocument]");
     142shouldBeEqualToString("document.implementation.createDocument(\"http://www.example.com\").toString()", "[object XMLDocument]");
    143143
    144144runNSTests(allNSTests, document.implementation, "createDocument");
  • trunk/LayoutTests/fast/dom/Document/clone-node-expected.txt

    r177366 r195520  
    44
    55
    6 PASS doc.cloneNode(false).__proto__ is Document.prototype
    7 PASS className(doc.cloneNode(false)) is "Document"
     6PASS doc.cloneNode(false).__proto__ is XMLDocument.prototype
     7PASS className(doc.cloneNode(false)) is "XMLDocument"
    88PASS doc.cloneNode(true).documentElement.localName is "root"
    99PASS doc.cloneNode(true).contentType is "application/xml"
  • trunk/LayoutTests/fast/dom/Document/clone-node.html

    r177366 r195520  
    1212var doc = document.implementation.createDocument('', 'root', null);
    1313
    14 shouldBe('doc.cloneNode(false).__proto__', 'Document.prototype');
    15 shouldBeEqualToString('className(doc.cloneNode(false))', 'Document');
     14shouldBe('doc.cloneNode(false).__proto__', 'XMLDocument.prototype');
     15shouldBeEqualToString('className(doc.cloneNode(false))', 'XMLDocument');
    1616shouldBeEqualToString('doc.cloneNode(true).documentElement.localName', 'root');
    1717shouldBeEqualToString('doc.cloneNode(true).contentType', 'application/xml');
  • trunk/LayoutTests/fast/dom/Document/xml-document-focus-expected.txt

    r166668 r195520  
    55
    66PASS document.__proto__ is not HTMLDocument.prototype
    7 PASS document.__proto__ is Document.prototype
     7PASS document.__proto__ is XMLDocument.prototype
    88PASS document.hasFocus() is true
    99PASS document.activeElement is document.body
  • trunk/LayoutTests/fast/dom/Document/xml-document-focus.xml

    r166668 r195520  
    1212
    1313shouldNotBe("document.__proto__", "HTMLDocument.prototype");
    14 shouldBe("document.__proto__", "Document.prototype");
     14shouldBe("document.__proto__", "XMLDocument.prototype");
    1515shouldBeTrue("document.hasFocus()");
    1616shouldBe("document.activeElement", "document.body");
  • trunk/LayoutTests/fast/dom/dom-parse-serialize-display-expected.txt

    r114059 r195520  
    1616document object
    1717
    18 [object Document]
     18[object XMLDocument]
    1919
    2020document object serialized
  • trunk/LayoutTests/fast/dom/dom-parse-serialize-expected.txt

    r114059 r195520  
    1515document object
    1616
    17 [object Document]
     17[object XMLDocument]
    1818
    1919document object serialized
  • trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt

    r191423 r195520  
    3939XML
    4040
    41 PASS jsWrapperClass(xmlDocument) is 'Document'
    42 PASS jsWrapperClass(xmlDocument.__proto__) is 'DocumentPrototype'
    43 PASS jsWrapperClass(xmlDocument.constructor) is 'DocumentConstructor'
     41PASS jsWrapperClass(xmlDocument) is 'XMLDocument'
     42PASS jsWrapperClass(xmlDocument.__proto__) is 'XMLDocumentPrototype'
     43PASS jsWrapperClass(xmlDocument.constructor) is 'XMLDocumentConstructor'
    4444PASS jsWrapperClass(xmlDocument.createCDATASection()) is 'CDATASection'
    4545PASS jsWrapperClass(xmlDocument.createCDATASection().__proto__) is 'CDATASectionPrototype'
  • trunk/LayoutTests/fast/dom/wrapper-classes.html

    r191423 r195520  
    8888    debug('');
    8989
    90     test("xmlDocument", "Document");
     90    test("xmlDocument", "XMLDocument");
    9191    test("xmlDocument.createCDATASection()", "CDATASection");
    9292    test("xmlDocument.createElementNS('x', 'x', 'x')", "Element");
  • trunk/LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception-expected.txt

    r184420 r195520  
    4141PASS
    4242
    43 13. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object Document]
     4313. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object XMLDocument]
    4444PASS
    4545
  • trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt

    r42164 r195520  
    44readyState: 4 (number)
    55responseText: <?xml version="1.0" encoding="UTF-8"?>... (string)
    6 responseXML: [object Document] (object)
     6responseXML: [object XMLDocument] (object)
    77status: 0 (number)
    88statusText:  (string)
  • trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt

    r191423 r195520  
    8383ALERT: PASS: window.TypeError should be 'function TypeError() {    [native code]}' and is.
    8484ALERT: PASS: window.URIError should be 'function URIError() {    [native code]}' and is.
    85 ALERT: PASS: window.XMLDocument should be '[object DocumentConstructor]' and is.
     85ALERT: PASS: window.XMLDocument should be '[object XMLDocumentConstructor]' and is.
    8686ALERT: PASS: window.XMLSerializer should be '[object XMLSerializerConstructor]' and is.
    8787ALERT: PASS: window.XPathEvaluator should be '[object XPathEvaluatorConstructor]' and is.
  • trunk/LayoutTests/http/tests/xmlhttprequest/supported-xml-content-types-expected.txt

    r21687 r195520  
    1 PASS -- testing: text/xml -- responseXML: [object Document]
     1PASS -- testing: text/xml -- responseXML: [object XMLDocument]
    22
    3 PASS -- testing: image/svg+xml -- responseXML: [object Document]
     3PASS -- testing: image/svg+xml -- responseXML: [object XMLDocument]
    44
    5 PASS -- testing: application/soap+xml -- responseXML: [object Document]
     5PASS -- testing: application/soap+xml -- responseXML: [object XMLDocument]
    66
    7 PASS -- testing: foo/bar+xml -- responseXML: [object Document]
     7PASS -- testing: foo/bar+xml -- responseXML: [object XMLDocument]
    88
    9 PASS -- testing: 123/BAR+xml -- responseXML: [object Document]
     9PASS -- testing: 123/BAR+xml -- responseXML: [object XMLDocument]
    1010
    11 PASS -- testing: foo_bar/baz+xml -- responseXML: [object Document]
     11PASS -- testing: foo_bar/baz+xml -- responseXML: [object XMLDocument]
    1212
    13 PASS -- testing: foo-bar/baz+xml -- responseXML: [object Document]
     13PASS -- testing: foo-bar/baz+xml -- responseXML: [object XMLDocument]
    1414
    15 PASS -- testing: foo+bar/baz+xml -- responseXML: [object Document]
     15PASS -- testing: foo+bar/baz+xml -- responseXML: [object XMLDocument]
    1616
    17 PASS -- testing: foo~bar/baz+xml -- responseXML: [object Document]
     17PASS -- testing: foo~bar/baz+xml -- responseXML: [object XMLDocument]
    1818
    19 PASS -- testing: foo!bar/baz+xml -- responseXML: [object Document]
     19PASS -- testing: foo!bar/baz+xml -- responseXML: [object XMLDocument]
    2020
    21 PASS -- testing: foo$bar/baz+xml -- responseXML: [object Document]
     21PASS -- testing: foo$bar/baz+xml -- responseXML: [object XMLDocument]
    2222
    23 PASS -- testing: foo^bar/baz+xml -- responseXML: [object Document]
     23PASS -- testing: foo^bar/baz+xml -- responseXML: [object XMLDocument]
    2424
    25 PASS -- testing: foo{bar/baz+xml -- responseXML: [object Document]
     25PASS -- testing: foo{bar/baz+xml -- responseXML: [object XMLDocument]
    2626
    27 PASS -- testing: foo}bar/baz+xml -- responseXML: [object Document]
     27PASS -- testing: foo}bar/baz+xml -- responseXML: [object XMLDocument]
    2828
    29 PASS -- testing: foo|bar/baz+xml -- responseXML: [object Document]
     29PASS -- testing: foo|bar/baz+xml -- responseXML: [object XMLDocument]
    3030
    31 PASS -- testing: foo%bar/baz+xml -- responseXML: [object Document]
     31PASS -- testing: foo%bar/baz+xml -- responseXML: [object XMLDocument]
    3232
    33 PASS -- testing: foo'bar/baz+xml -- responseXML: [object Document]
     33PASS -- testing: foo'bar/baz+xml -- responseXML: [object XMLDocument]
    3434
    35 PASS -- testing: foo`bar/baz+xml -- responseXML: [object Document]
     35PASS -- testing: foo`bar/baz+xml -- responseXML: [object XMLDocument]
    3636
    37 PASS -- testing: foo#bar/baz+xml -- responseXML: [object Document]
     37PASS -- testing: foo#bar/baz+xml -- responseXML: [object XMLDocument]
    3838
    39 PASS -- testing: foo&bar/baz+xml -- responseXML: [object Document]
     39PASS -- testing: foo&bar/baz+xml -- responseXML: [object XMLDocument]
    4040
    41 PASS -- testing: foo*bar/baz+xml -- responseXML: [object Document]
     41PASS -- testing: foo*bar/baz+xml -- responseXML: [object XMLDocument]
    4242
    4343PASS -- testing: text/html -- responseXML: null
     
    4747PASS -- testing: invalid -- responseXML: null
    4848
    49 FAIL (got document -- response type: foo bar/baz+xml) -- testing: foo bar/baz+xml -- responseXML: [object Document]
     49FAIL (got document -- response type: foo bar/baz+xml) -- testing: foo bar/baz+xml -- responseXML: [object XMLDocument]
    5050
    5151PASS -- testing: foo[bar/baz+xml -- responseXML: null
  • trunk/LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt

    r108832 r195520  
    11Test to make sure we can use XHR to create usable SVG in dashboard compatibility mode. This cannot be tested manually.
    22
    3 Received doc of type: [object Document]
     3Received doc of type: [object XMLDocument]
    44PASS: Managed to insert SVG element into tree
    55Imported node of type: [object SVGCircleElement]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r195501 r195520  
     12016-01-24  Chris Dumez  <cdumez@apple.com>
     2
     3        An XMLDocument interface should be exposed on the global Window object
     4        https://bugs.webkit.org/show_bug.cgi?id=153378
     5        <rdar://problem/24315465>
     6
     7        Reviewed by Darin Adler.
     8
     9        Rebaseline several W3C DOM and HTML tests now that more checks are
     10        passing.
     11
     12        * web-platform-tests/dom/interfaces-expected.txt:
     13        * web-platform-tests/dom/nodes/Document-constructor-expected.txt:
     14        * web-platform-tests/html/dom/interfaces-expected.txt:
     15
    1162016-01-20  Ryosuke Niwa  <rniwa@webkit.org>
    217
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt

    r195497 r195520  
    4545CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'lastElementChild' on a non-Document object.
    4646CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'childElementCount' on a non-Document object.
    47 CONSOLE MESSAGE: line 793: Deprecated attempt to access property 'nodeType' on a non-Node object.
    48 CONSOLE MESSAGE: line 2475: Deprecated attempt to access property 'nodeType' on a non-Node object.
    49 CONSOLE MESSAGE: line 793: Deprecated attempt to access property 'nodeType' on a non-Node object.
    50 CONSOLE MESSAGE: line 2475: Deprecated attempt to access property 'nodeType' on a non-Node object.
    5147CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'children' on a non-DocumentFragment object.
    5248CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'firstElementChild' on a non-DocumentFragment object.
     
    474470PASS Document interface: operation querySelector(DOMString)
    475471PASS Document interface: operation querySelectorAll(DOMString)
    476 FAIL XMLDocument interface: existence and properties of interface object assert_equals: class string of XMLDocument expected "[object Function]" but got "[object DocumentConstructor]"
     472FAIL XMLDocument interface: existence and properties of interface object assert_equals: class string of XMLDocument expected "[object Function]" but got "[object XMLDocumentConstructor]"
    477473PASS XMLDocument interface object length
    478 FAIL XMLDocument interface object name assert_equals: wrong value for XMLDocument.name expected "XMLDocument" but got "Document"
    479 FAIL XMLDocument interface: existence and properties of interface prototype object assert_equals: prototype of XMLDocument.prototype is not Document.prototype expected Node object of unknown type but got Node object of unknown type
     474PASS XMLDocument interface object name
     475PASS XMLDocument interface: existence and properties of interface prototype object
    480476FAIL XMLDocument interface: existence and properties of interface prototype object's "constructor" property assert_true: XMLDocument.prototype.constructor is not writable expected true got false
    481477PASS XMLDocument must be primary interface of xmlDoc
    482 FAIL Stringification of xmlDoc assert_equals: class string of xmlDoc expected "[object XMLDocument]" but got "[object Document]"
     478PASS Stringification of xmlDoc
    483479PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0)
    484480PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt

    r195497 r195520  
    11
    2 FAIL new Document(): interfaces assert_false: Should not be an XMLDocument expected false got true
     2PASS new Document(): interfaces
    33PASS new Document(): children
    44PASS new Document(): metadata
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r195497 r195520  
    12551255FAIL XMLDocument interface: operation load(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "load" missing
    12561256PASS XMLDocument must be primary interface of document.implementation.createDocument(null, "", null)
    1257 FAIL Stringification of document.implementation.createDocument(null, "", null) assert_equals: class string of document.implementation.createDocument(null, "", null) expected "[object XMLDocument]" but got "[object Document]"
     1257PASS Stringification of document.implementation.createDocument(null, "", null)
    12581258FAIL XMLDocument interface: document.implementation.createDocument(null, "", null) must inherit property "load" with the proper type (0) assert_inherits: property "load" not found in prototype chain
    12591259FAIL XMLDocument interface: calling load(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_inherits: property "load" not found in prototype chain
  • trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt

    r191423 r195520  
    295295PASS win['WheelEvent'] == '[object WheelEventConstructor]' is true
    296296PASS win['WheelEvent'] == '[object WheelEventConstructor]' is true
    297 PASS win['XMLDocument'] == '[object DocumentConstructor]' is true
    298 PASS win['XMLDocument'] == '[object DocumentConstructor]' is true
     297PASS win['XMLDocument'] == '[object XMLDocumentConstructor]' is true
     298PASS win['XMLDocument'] == '[object XMLDocumentConstructor]' is true
    299299PASS win['XMLHttpRequest'] == '[object XMLHttpRequestConstructor]' is true
    300300PASS win['XMLHttpRequest'] == '[object XMLHttpRequestConstructor]' is true
  • trunk/LayoutTests/svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt

    r108832 r195520  
    11This test makes sure we can add manually parsed SVG to the document when in dashboard compatibility mode. It can not be tested manually.
    22
    3 Parsing of the document isn't prevented and produces a [object Document]
     3Parsing of the document isn't prevented and produces a [object XMLDocument]
    44The circle element is of type [object SVGCircleElement]
    55PASS: Managed to insert SVG element into tree
  • trunk/Source/WebCore/CMakeLists.txt

    r195443 r195520  
    419419    dom/WebKitTransitionEvent.idl
    420420    dom/WheelEvent.idl
     421    dom/XMLDocument.idl
    421422
    422423    fileapi/Blob.idl
  • trunk/Source/WebCore/ChangeLog

    r195517 r195520  
     12016-01-24  Chris Dumez  <cdumez@apple.com>
     2
     3        An XMLDocument interface should be exposed on the global Window object
     4        https://bugs.webkit.org/show_bug.cgi?id=153378
     5        <rdar://problem/24315465>
     6
     7        Reviewed by Darin Adler.
     8
     9        Expose an XMLDocument interface on the global Window object, as per:
     10        - https://dom.spec.whatwg.org/#xmldocument
     11
     12        DOMImplementation.createDocument() now returns an XMLDocument instead
     13        of a Document, as per:
     14        - https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
     15
     16        Previously, WebKit would alias XMLDocument to Document which caused
     17        some W3C tests to fail.
     18
     19        Chrome and Firefox already match the specification here.
     20
     21        No new tests, already covered by existing tests.
     22
     23        * CMakeLists.txt:
     24        * DerivedSources.cpp:
     25        * DerivedSources.make:
     26        * WebCore.vcxproj/WebCore.vcxproj:
     27        * WebCore.vcxproj/WebCore.vcxproj.filters:
     28        * WebCore.xcodeproj/project.pbxproj:
     29        * bindings/js/JSBindingsAllInOne.cpp:
     30        * bindings/js/JSDocumentCustom.cpp:
     31        (WebCore::createNewDocumentWrapper):
     32        * dom/DOMImplementation.cpp:
     33        (WebCore::DOMImplementation::createDocument):
     34        * dom/DOMImplementation.h:
     35        * dom/DOMImplementation.idl:
     36        * dom/Document.cpp:
     37        (WebCore::Document::cloneDocumentWithoutChildren):
     38        * dom/Document.h:
     39        (WebCore::Document::isXMLDocument):
     40        (WebCore::Document::create): Deleted.
     41        (WebCore::Document::createNonRenderedPlaceholder): Deleted.
     42        * dom/XMLDocument.h: Added.
     43        (WebCore::XMLDocument::create):
     44        (WebCore::XMLDocument::createXHTML):
     45        (WebCore::XMLDocument::XMLDocument):
     46        (isType):
     47        * dom/XMLDocument.idl: Added.
     48        * inspector/DOMPatchSupport.cpp:
     49        (WebCore::DOMPatchSupport::patchDocument):
     50        * inspector/InspectorDOMAgent.cpp:
     51        (WebCore::InspectorDOMAgent::setOuterHTML):
     52        * page/DOMWindow.idl:
     53        * page/PageSerializer.cpp:
     54        (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
     55        * svg/SVGDocument.cpp:
     56        (WebCore::SVGDocument::SVGDocument):
     57        * svg/SVGDocument.h:
     58        * svg/SVGDocument.idl:
     59        * xml/XMLHttpRequest.cpp:
     60        (WebCore::XMLHttpRequest::responseXML):
     61        * xml/XSLTProcessor.cpp:
     62        (WebCore::XSLTProcessor::createDocumentFromSource):
     63
    1642016-01-24  Brady Eidson  <beidson@apple.com>
    265
  • trunk/Source/WebCore/DerivedSources.cpp

    r191423 r195520  
    529529#include "JSWorkerLocation.cpp"
    530530#include "JSWorkerNavigator.cpp"
     531#include "JSXMLDocument.cpp"
    531532#include "JSXMLHttpRequest.cpp"
    532533#include "JSXMLHttpRequestException.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r194117 r195520  
    326326    $(WebCore)/dom/WebKitTransitionEvent.idl \
    327327    $(WebCore)/dom/WheelEvent.idl \
     328    $(WebCore)/dom/XMLDocument.idl \
    328329    $(WebCore)/fileapi/Blob.idl \
    329330    $(WebCore)/fileapi/File.idl \
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r194960 r195520  
    65156515    </ClCompile>
    65166516    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerNavigator.cpp">
     6517      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     6518      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     6519      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     6520      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     6521      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     6522      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     6523      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     6524      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     6525      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     6526      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     6527      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     6528      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     6529    </ClCompile>
     6530    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.cpp">
    65176531      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    65186532      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     
    2023920253    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerLocation.h" />
    2024020254    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerNavigator.h" />
     20255    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.h" />
    2024120256    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.h" />
    2024220257    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequestException.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r194447 r195520  
    62326232      <Filter>DerivedSources</Filter>
    62336233    </ClCompile>
     6234    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.cpp">
     6235      <Filter>DerivedSources</Filter>
     6236    </ClCompile>
    62346237    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.cpp">
    62356238      <Filter>DerivedSources</Filter>
     
    1364013643    </ClInclude>
    1364113644    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.h">
     13645      <Filter>DerivedSources</Filter>
     13646    </ClInclude>
     13647    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.h">
    1364213648      <Filter>DerivedSources</Filter>
    1364313649    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r195496 r195520  
    28402840                830519961BB0F11000F3772E /* HTMLTimeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 830519931BB0F0E700F3772E /* HTMLTimeElement.h */; };
    28412841                8306EFF11B8BCEA50031D032 /* NativeNodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8306EFF01B8BCE7C0031D032 /* NativeNodeFilter.cpp */; };
     2842                830784B21C52EE2C00104D1D /* XMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 830784B11C52EE1900104D1D /* XMLDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
    28422843                832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */; };
    28432844                832B843619D8E57400B26055 /* SVGAnimateElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */; };
     
    28462847                834DD4F41BE08989002C9C3E /* PageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 834DD4F31BE08989002C9C3E /* PageMac.mm */; };
    28472848                83520C7E1A71BFCC006BD2AA /* CSSFontFamily.h in Headers */ = {isa = PBXBuildFile; fileRef = 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */; };
     2849                8358CB6F1C53277200E0C2D8 /* JSXMLDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */; };
     2850                8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F570AD1C53268E007FD6CB /* JSXMLDocument.h */; };
    28482851                835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D363619FF6193004C93AB /* StyleBuilderCustom.h */; };
    28492852                836BAD211BD1CA670037356A /* HTMLTableHeaderCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */; };
     
    1038610389                830519941BB0F0E700F3772E /* HTMLTimeElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTimeElement.idl; sourceTree = "<group>"; };
    1038710390                8306EFF01B8BCE7C0031D032 /* NativeNodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NativeNodeFilter.cpp; sourceTree = "<group>"; };
     10391                830784B01C52EE1900104D1D /* XMLDocument.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XMLDocument.idl; sourceTree = "<group>"; };
     10392                830784B11C52EE1900104D1D /* XMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLDocument.h; sourceTree = "<group>"; };
    1038810393                832B843319D8E55100B26055 /* SVGAnimateElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimateElementBase.h; sourceTree = "<group>"; };
    1038910394                832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = "<group>"; };
     
    1043510440                83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = "<group>"; };
    1043610441                83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
     10442                83F570AD1C53268E007FD6CB /* JSXMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSXMLDocument.h; sourceTree = "<group>"; };
     10443                83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLDocument.cpp; sourceTree = "<group>"; };
    1043710444                83FE5F1F1BD1C55E0038BEEC /* HTMLTableHeaderCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableHeaderCellElement.idl; sourceTree = "<group>"; };
    1043810445                83FE5F201BD1C55E0038BEEC /* HTMLTableDataCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableDataCellElement.idl; sourceTree = "<group>"; };
     
    2060820615                                D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */,
    2060920616                                D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */,
     20617                                83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */,
     20618                                83F570AD1C53268E007FD6CB /* JSXMLDocument.h */,
    2061020619                        );
    2061120620                        name = Core;
     
    2421124220                                85031B3B0A44EFC700F992E0 /* WheelEvent.h */,
    2421224221                                93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
     24222                                830784B11C52EE1900104D1D /* XMLDocument.h */,
     24223                                830784B01C52EE1900104D1D /* XMLDocument.idl */,
    2421324224                        );
    2421424225                        path = dom;
     
    2559925610                                7728694F14F8882500F484DC /* EXTTextureFilterAnisotropic.h in Headers */,
    2560025611                                A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
     25612                                830784B21C52EE2C00104D1D /* XMLDocument.h in Headers */,
    2560125613                                A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
    2560225614                                A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
     
    2653026542                                B2FA3DCB0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothAbs.h in Headers */,
    2653126543                                B2FA3DCD0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothRel.h in Headers */,
     26544                                8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */,
    2653226545                                B2FA3DCF0AB75A6F000E5AC4 /* JSSVGPathSegLinetoAbs.h in Headers */,
    2653326546                                B2FA3DD10AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalAbs.h in Headers */,
     
    3076430777                                93309E04099E64920056E581 /* RemoveNodeCommand.cpp in Sources */,
    3076530778                                93309E06099E64920056E581 /* RemoveNodePreservingChildrenCommand.cpp in Sources */,
     30779                                8358CB6F1C53277200E0C2D8 /* JSXMLDocument.cpp in Sources */,
    3076630780                                7CD494CC1A86EB1D000A87EC /* RenderAttachment.cpp in Sources */,
    3076730781                                BCEA485F097D93020094C9E4 /* RenderBlock.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r193426 r195520  
    138138#include "JSWorkerGlobalScopeBase.cpp"
    139139#include "JSWorkerGlobalScopeCustom.cpp"
     140#include "JSXMLDocument.cpp"
    140141#include "JSXMLHttpRequestCustom.cpp"
    141142#include "JSXPathResultCustom.cpp"
  • trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp

    r195087 r195520  
    3737#include "ScriptController.h"
    3838#include "TouchList.h"
     39#include "XMLDocument.h"
    3940#include <wtf/GetPtr.h>
    4041
     
    5960    else if (document.isSVGDocument())
    6061        wrapper = CREATE_DOM_WRAPPER(&globalObject, SVGDocument, &document);
     62    else if (document.isXMLDocument())
     63        wrapper = CREATE_DOM_WRAPPER(&globalObject, XMLDocument, &document);
    6164    else
    6265        wrapper = CREATE_DOM_WRAPPER(&globalObject, Document, &document);
  • trunk/Source/WebCore/dom/DOMImplementation.cpp

    r195491 r195520  
    5656#include "Text.h"
    5757#include "TextDocument.h"
     58#include "XMLDocument.h"
    5859#include "XMLNames.h"
    5960#include <wtf/NeverDestroyed.h>
     
    221222}
    222223
    223 RefPtr<Document> DOMImplementation::createDocument(const String& namespaceURI,
     224RefPtr<XMLDocument> DOMImplementation::createDocument(const String& namespaceURI,
    224225    const String& qualifiedName, DocumentType* doctype, ExceptionCode& ec)
    225226{
    226     RefPtr<Document> doc;
     227    RefPtr<XMLDocument> doc;
    227228    if (namespaceURI == SVGNames::svgNamespaceURI)
    228229        doc = SVGDocument::create(0, URL());
    229230    else if (namespaceURI == HTMLNames::xhtmlNamespaceURI)
    230         doc = Document::createXHTML(0, URL());
     231        doc = XMLDocument::createXHTML(0, URL());
    231232    else
    232         doc = Document::create(0, URL());
     233        doc = XMLDocument::create(0, URL());
    233234
    234235    doc->setSecurityOriginPolicy(m_document.securityOriginPolicy());
     
    321322        return HTMLDocument::create(frame, url);
    322323    if (type == "application/xhtml+xml")
    323         return Document::createXHTML(frame, url);
     324        return XMLDocument::createXHTML(frame, url);
    324325
    325326#if ENABLE(FTPDIR)
     
    372373
    373374    if (isXMLMIMEType(type))
    374         return Document::create(frame, url);
     375        return XMLDocument::create(frame, url);
    375376
    376377    return HTMLDocument::create(frame, url);
  • trunk/Source/WebCore/dom/DOMImplementation.h

    r188193 r195520  
    2727#include "Document.h"
    2828#include "MediaPlayer.h"
     29#include "XMLDocument.h"
    2930#include <memory>
    3031#include <wtf/Forward.h>
     
    5455    static bool hasFeature(const String& feature, const String& version);
    5556    RefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&);
    56     RefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
     57    RefPtr<XMLDocument> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
    5758
    5859    DOMImplementation* getInterface(const String& feature);
  • trunk/Source/WebCore/dom/DOMImplementation.idl

    r195322 r195520  
    3434                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString publicId,
    3535                                                   [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString systemId);
    36     [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
    37                                            [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName,
    38                                            [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
     36
     37#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
     38    [ObjCLegacyUnnamedParameters, RaisesException] Document createDocument(optional DOMString namespaceURI, optional DOMString qualifiedName,
     39        optional DocumentType doctype);
     40#else
     41    [RaisesException, NewObject] XMLDocument createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
     42        [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName,
     43        [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
     44#endif
    3945
    4046    // DOMImplementationCSS interface from DOM Level 2 CSS
  • trunk/Source/WebCore/dom/Document.cpp

    r195496 r195520  
    168168#include "VisitedLinkState.h"
    169169#include "WheelEvent.h"
     170#include "XMLDocument.h"
    170171#include "XMLDocumentParser.h"
    171172#include "XMLNSNames.h"
     
    35113512Ref<Document> Document::cloneDocumentWithoutChildren() const
    35123513{
    3513     return isXHTMLDocument() ? createXHTML(nullptr, url()) : create(nullptr, url());
     3514    if (isXMLDocument()) {
     3515        if (isXHTMLDocument())
     3516            return XMLDocument::createXHTML(nullptr, url());
     3517        return XMLDocument::create(nullptr, url());
     3518    }
     3519    return create(nullptr, url());
    35143520}
    35153521
  • trunk/Source/WebCore/dom/Document.h

    r195497 r195520  
    267267    MediaDocumentClass = 1 << 4,
    268268    SVGDocumentClass = 1 << 5,
    269     TextDocumentClass = 1 << 6
     269    TextDocumentClass = 1 << 6,
     270    XMLDocumentClass = 1 << 7,
    270271};
    271272
     
    302303        return adoptRef(*new Document(frame, url));
    303304    }
    304     static Ref<Document> createXHTML(Frame* frame, const URL& url)
    305     {
    306         return adoptRef(*new Document(frame, url, XHTMLDocumentClass));
    307     }
     305
    308306    static Ref<Document> createNonRenderedPlaceholder(Frame* frame, const URL& url)
    309307    {
     
    488486    bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass; }
    489487    bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass; }
     488    bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; }
    490489    bool isImageDocument() const { return m_documentClasses & ImageDocumentClass; }
    491490    bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; }
  • trunk/Source/WebCore/inspector/DOMPatchSupport.cpp

    r194496 r195520  
    4343#include "InspectorHistory.h"
    4444#include "Node.h"
     45#include "XMLDocument.h"
    4546#include "XMLDocumentParser.h"
    4647
     
    8990        newDocument = HTMLDocument::create(nullptr, URL());
    9091    else if (m_document->isXHTMLDocument())
    91         newDocument = HTMLDocument::createXHTML(nullptr, URL());
     92        newDocument = XMLDocument::createXHTML(nullptr, URL());
    9293    else if (m_document->isSVGDocument())
    93         newDocument = Document::create(nullptr, URL());
     94        newDocument = XMLDocument::create(nullptr, URL());
    9495
    9596    ASSERT(newDocument);
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r194496 r195520  
    768768
    769769    Document& document = node->document();
    770     if (!document.isHTMLDocument() && !document.isXHTMLDocument() && !document.isSVGDocument()) {
     770    if (!document.isHTMLDocument() && !document.isXMLDocument()) {
    771771        errorString = ASCIILiteral("Not an HTML/XML document");
    772772        return;
  • trunk/Source/WebCore/page/DOMWindow.idl

    r189873 r195520  
    199199    [CustomGetter, CustomConstructor] attribute HTMLImageElementNamedConstructor Image; // Usable with new operator
    200200
    201     // Mozilla has a separate XMLDocument object for XML documents.
    202     // We just use Document for this.
    203     attribute DocumentConstructor XMLDocument;
    204 
    205201    [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchConstructor Touch; // Usable with the new operator
    206202    [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchListConstructor TouchList; // Usable with the new operator
  • trunk/Source/WebCore/page/PageSerializer.cpp

    r185167 r195520  
    117117{
    118118    // MarkupAccumulator does not serialize the <?xml ... line, so we add it explicitely to ensure the right encoding is specified.
    119     if (m_document.isXHTMLDocument() || m_document.xmlStandalone() || m_document.isSVGDocument())
     119    if (m_document.isXMLDocument() || m_document.xmlStandalone())
    120120        appendString("<?xml version=\"" + m_document.xmlVersion() + "\" encoding=\"" + m_document.charset() + "\"?>");
    121121}
  • trunk/Source/WebCore/svg/SVGDocument.cpp

    r179982 r195520  
    2929
    3030SVGDocument::SVGDocument(Frame* frame, const URL& url)
    31     : Document(frame, url, SVGDocumentClass)
     31    : XMLDocument(frame, url, SVGDocumentClass)
    3232{
    3333}
  • trunk/Source/WebCore/svg/SVGDocument.h

    r179982 r195520  
    2323#define SVGDocument_h
    2424
    25 #include "Document.h"
     25#include "XMLDocument.h"
    2626
    2727namespace WebCore {
     
    2929class SVGSVGElement;
    3030
    31 class SVGDocument final : public Document {
     31class SVGDocument final : public XMLDocument {
    3232public:
    3333    static Ref<SVGDocument> create(Frame*, const URL&);
  • trunk/Source/WebCore/svg/SVGDocument.idl

    r163440 r195520  
    2020 */
    2121
    22 interface SVGDocument : Document {
     22// FIXME: This interface no longer exists in SVG2.
     23interface SVGDocument : XMLDocument {
    2324    readonly attribute SVGSVGElement        rootElement;
    2425
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r195452 r195520  
    217217                m_responseDocument = HTMLDocument::create(0, m_url);
    218218            else
    219                 m_responseDocument = Document::create(0, m_url);
     219                m_responseDocument = XMLDocument::create(0, m_url);
    220220            // FIXME: Set Last-Modified.
    221221            m_responseDocument->setContent(m_responseBuilder.toStringPreserveCapacity());
  • trunk/Source/WebCore/xml/XSLTProcessor.cpp

    r189776 r195520  
    4141#include "Text.h"
    4242#include "TextResourceDecoder.h"
     43#include "XMLDocument.h"
    4344#include "markup.h"
    4445
     
    7879    RefPtr<Document> result;
    7980    if (sourceMIMEType == "text/plain") {
    80         result = Document::createXHTML(frame, sourceIsDocument ? ownerDocument->url() : URL());
     81        result = XMLDocument::createXHTML(frame, sourceIsDocument ? ownerDocument->url() : URL());
    8182        transformTextStringToXHTMLDocumentString(documentSource);
    8283    } else
Note: See TracChangeset for help on using the changeset viewer.