Title: [195520] trunk
Revision
195520
Author
[email protected]
Date
2016-01-24 17:11:35 -0800 (Sun, 24 Jan 2016)

Log 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:
- https://dom.spec.whatwg.org/#xmldocument

DOMImplementation.createDocument() now returns an XMLDocument instead
of a Document, as per:
- https://dom.spec.whatwg.org/#dom-domimplementation-createdocument

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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (195519 => 195520)


--- trunk/LayoutTests/ChangeLog	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/ChangeLog	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,3 +1,28 @@
+2016-01-24  Chris Dumez  <[email protected]>
+
+        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.
+
+        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:
+
 2016-01-24  Simon Fraser  <[email protected]>
 
         New WK1 baselines.

Modified: trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -3,8 +3,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS document.implementation.createDocument().toString() is "[object Document]"
-PASS document.implementation.createDocument("http://www.example.com").toString() is "[object Document]"
+PASS document.implementation.createDocument().toString() is "[object XMLDocument]"
+PASS document.implementation.createDocument("http://www.example.com").toString() is "[object XMLDocument]"
 PASS createDocument(, , null)
 PASS createDocument(null, , null)
 FAIL createDocument(, null, null)

Modified: trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js (195519 => 195520)


--- trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js	2016-01-25 01:11:35 UTC (rev 195520)
@@ -138,7 +138,7 @@
 }
 
 // Moz throws a "Not enough arguments" exception in these, we don't:
-shouldBeEqualToString("document.implementation.createDocument().toString()", "[object Document]");
-shouldBeEqualToString("document.implementation.createDocument(\"http://www.example.com\").toString()", "[object Document]");
+shouldBeEqualToString("document.implementation.createDocument().toString()", "[object XMLDocument]");
+shouldBeEqualToString("document.implementation.createDocument(\"http://www.example.com\").toString()", "[object XMLDocument]");
 
 runNSTests(allNSTests, document.implementation, "createDocument");

Modified: trunk/LayoutTests/fast/dom/Document/clone-node-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/Document/clone-node-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/Document/clone-node-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -3,8 +3,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS doc.cloneNode(false).__proto__ is Document.prototype
-PASS className(doc.cloneNode(false)) is "Document"
+PASS doc.cloneNode(false).__proto__ is XMLDocument.prototype
+PASS className(doc.cloneNode(false)) is "XMLDocument"
 PASS doc.cloneNode(true).documentElement.localName is "root"
 PASS doc.cloneNode(true).contentType is "application/xml"
 PASS document.cloneNode(true).compatMode is "CSS1Compat"

Modified: trunk/LayoutTests/fast/dom/Document/clone-node.html (195519 => 195520)


--- trunk/LayoutTests/fast/dom/Document/clone-node.html	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/Document/clone-node.html	2016-01-25 01:11:35 UTC (rev 195520)
@@ -11,8 +11,8 @@
 
 var doc = document.implementation.createDocument('', 'root', null);
 
-shouldBe('doc.cloneNode(false).__proto__', 'Document.prototype');
-shouldBeEqualToString('className(doc.cloneNode(false))', 'Document');
+shouldBe('doc.cloneNode(false).__proto__', 'XMLDocument.prototype');
+shouldBeEqualToString('className(doc.cloneNode(false))', 'XMLDocument');
 shouldBeEqualToString('doc.cloneNode(true).documentElement.localName', 'root');
 shouldBeEqualToString('doc.cloneNode(true).contentType', 'application/xml');
 shouldBeEqualToString('document.cloneNode(true).compatMode', 'CSS1Compat');

Modified: trunk/LayoutTests/fast/dom/Document/xml-document-focus-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/Document/xml-document-focus-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/Document/xml-document-focus-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -4,7 +4,7 @@
 
 
 PASS document.__proto__ is not HTMLDocument.prototype
-PASS document.__proto__ is Document.prototype
+PASS document.__proto__ is XMLDocument.prototype
 PASS document.hasFocus() is true
 PASS document.activeElement is document.body
 PASS document.activeElement is testElement

Modified: trunk/LayoutTests/fast/dom/Document/xml-document-focus.xml (195519 => 195520)


--- trunk/LayoutTests/fast/dom/Document/xml-document-focus.xml	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/Document/xml-document-focus.xml	2016-01-25 01:11:35 UTC (rev 195520)
@@ -11,7 +11,7 @@
 description("Make sure the focus management API is available to XML documents.");
 
 shouldNotBe("document.__proto__", "HTMLDocument.prototype");
-shouldBe("document.__proto__", "Document.prototype");
+shouldBe("document.__proto__", "XMLDocument.prototype");
 shouldBeTrue("document.hasFocus()");
 shouldBe("document.activeElement", "document.body");
 var testElement = document.getElementById("testElement");

Modified: trunk/LayoutTests/fast/dom/dom-parse-serialize-display-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/dom-parse-serialize-display-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/dom-parse-serialize-display-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -15,7 +15,7 @@
 
 document object
 
-[object Document]
+[object XMLDocument]
 
 document object serialized
 

Modified: trunk/LayoutTests/fast/dom/dom-parse-serialize-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/dom-parse-serialize-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/dom-parse-serialize-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -14,7 +14,7 @@
 
 document object
 
-[object Document]
+[object XMLDocument]
 
 document object serialized
 

Modified: trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -38,9 +38,9 @@
 
 XML
 
-PASS jsWrapperClass(xmlDocument) is 'Document'
-PASS jsWrapperClass(xmlDocument.__proto__) is 'DocumentPrototype'
-PASS jsWrapperClass(xmlDocument.constructor) is 'DocumentConstructor'
+PASS jsWrapperClass(xmlDocument) is 'XMLDocument'
+PASS jsWrapperClass(xmlDocument.__proto__) is 'XMLDocumentPrototype'
+PASS jsWrapperClass(xmlDocument.constructor) is 'XMLDocumentConstructor'
 PASS jsWrapperClass(xmlDocument.createCDATASection()) is 'CDATASection'
 PASS jsWrapperClass(xmlDocument.createCDATASection().__proto__) is 'CDATASectionPrototype'
 PASS jsWrapperClass(xmlDocument.createCDATASection().constructor) is 'CDATASectionConstructor'

Modified: trunk/LayoutTests/fast/dom/wrapper-classes.html (195519 => 195520)


--- trunk/LayoutTests/fast/dom/wrapper-classes.html	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/wrapper-classes.html	2016-01-25 01:11:35 UTC (rev 195520)
@@ -87,7 +87,7 @@
     debug('XML');
     debug('');
 
-    test("xmlDocument", "Document");
+    test("xmlDocument", "XMLDocument");
     test("xmlDocument.createCDATASection()", "CDATASection");
     test("xmlDocument.createElementNS('x', 'x', 'x')", "Element");
     test("xmlDocument.createProcessingInstruction()", "ProcessingInstruction");

Modified: trunk/LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -40,7 +40,7 @@
 12. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object HTMLHtmlElement]
 PASS
 
-13. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object Document]
+13. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object XMLDocument]
 PASS
 
 14. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with node value = [object Element]

Modified: trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt (195519 => 195520)


--- trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -3,7 +3,7 @@
 PASS: No exception.
 readyState: 4 (number)
 responseText: <?xml version="1.0" encoding="UTF-8"?>... (string)
-responseXML: [object Document] (object)
+responseXML: [object XMLDocument] (object)
 status: 0 (number)
 statusText:  (string)
 

Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt (195519 => 195520)


--- trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -82,7 +82,7 @@
 ALERT: PASS: window.Text should be '[object TextConstructor]' and is.
 ALERT: PASS: window.TypeError should be 'function TypeError() {    [native code]}' and is.
 ALERT: PASS: window.URIError should be 'function URIError() {    [native code]}' and is.
-ALERT: PASS: window.XMLDocument should be '[object DocumentConstructor]' and is.
+ALERT: PASS: window.XMLDocument should be '[object XMLDocumentConstructor]' and is.
 ALERT: PASS: window.XMLSerializer should be '[object XMLSerializerConstructor]' and is.
 ALERT: PASS: window.XPathEvaluator should be '[object XPathEvaluatorConstructor]' and is.
 ALERT: PASS: window.XPathResult should be '[object XPathResultConstructor]' and is.

Modified: trunk/LayoutTests/http/tests/xmlhttprequest/supported-xml-content-types-expected.txt (195519 => 195520)


--- trunk/LayoutTests/http/tests/xmlhttprequest/supported-xml-content-types-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/supported-xml-content-types-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,44 +1,44 @@
-PASS -- testing: text/xml -- responseXML: [object Document]
+PASS -- testing: text/xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: image/svg+xml -- responseXML: [object Document]
+PASS -- testing: image/svg+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: application/soap+xml -- responseXML: [object Document]
+PASS -- testing: application/soap+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo/bar+xml -- responseXML: [object Document]
+PASS -- testing: foo/bar+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: 123/BAR+xml -- responseXML: [object Document]
+PASS -- testing: 123/BAR+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo_bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo_bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo-bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo-bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo+bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo+bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo~bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo~bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo!bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo!bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo$bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo$bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo^bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo^bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo{bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo{bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo}bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo}bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo|bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo|bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo%bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo%bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo'bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo'bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo`bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo`bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo#bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo#bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo&bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo&bar/baz+xml -- responseXML: [object XMLDocument]
 
-PASS -- testing: foo*bar/baz+xml -- responseXML: [object Document]
+PASS -- testing: foo*bar/baz+xml -- responseXML: [object XMLDocument]
 
 PASS -- testing: text/html -- responseXML: null
 
@@ -46,7 +46,7 @@
 
 PASS -- testing: invalid -- responseXML: null
 
-FAIL (got document -- response type: foo bar/baz+xml) -- testing: foo bar/baz+xml -- responseXML: [object Document]
+FAIL (got document -- response type: foo bar/baz+xml) -- testing: foo bar/baz+xml -- responseXML: [object XMLDocument]
 
 PASS -- testing: foo[bar/baz+xml -- responseXML: null
 

Modified: trunk/LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt (195519 => 195520)


--- trunk/LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,6 +1,6 @@
 Test to make sure we can use XHR to create usable SVG in dashboard compatibility mode. This cannot be tested manually.
 
-Received doc of type: [object Document]
+Received doc of type: [object XMLDocument]
 PASS: Managed to insert SVG element into tree
 Imported node of type: [object SVGCircleElement]
 

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (195519 => 195520)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,3 +1,18 @@
+2016-01-24  Chris Dumez  <[email protected]>
+
+        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.
+
+        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:
+
 2016-01-20  Ryosuke Niwa  <[email protected]>
 
         HTMLElement::nodeName should not upper case non-ASCII characters

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (195519 => 195520)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -44,10 +44,6 @@
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'firstElementChild' on a non-Document object.
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'lastElementChild' on a non-Document object.
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'childElementCount' on a non-Document object.
-CONSOLE MESSAGE: line 793: Deprecated attempt to access property 'nodeType' on a non-Node object.
-CONSOLE MESSAGE: line 2475: Deprecated attempt to access property 'nodeType' on a non-Node object.
-CONSOLE MESSAGE: line 793: Deprecated attempt to access property 'nodeType' on a non-Node object.
-CONSOLE MESSAGE: line 2475: Deprecated attempt to access property 'nodeType' on a non-Node object.
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'children' on a non-DocumentFragment object.
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'firstElementChild' on a non-DocumentFragment object.
 CONSOLE MESSAGE: line 1151: Deprecated attempt to access property 'lastElementChild' on a non-DocumentFragment object.
@@ -473,13 +469,13 @@
 FAIL Document interface: operation queryAll(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "queryAll" missing
 PASS Document interface: operation querySelector(DOMString) 
 PASS Document interface: operation querySelectorAll(DOMString) 
-FAIL XMLDocument interface: existence and properties of interface object assert_equals: class string of XMLDocument expected "[object Function]" but got "[object DocumentConstructor]"
+FAIL XMLDocument interface: existence and properties of interface object assert_equals: class string of XMLDocument expected "[object Function]" but got "[object XMLDocumentConstructor]"
 PASS XMLDocument interface object length 
-FAIL XMLDocument interface object name assert_equals: wrong value for XMLDocument.name expected "XMLDocument" but got "Document"
-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
+PASS XMLDocument interface object name 
+PASS XMLDocument interface: existence and properties of interface prototype object 
 FAIL XMLDocument interface: existence and properties of interface prototype object's "constructor" property assert_true: XMLDocument.prototype.constructor is not writable expected true got false
 PASS XMLDocument must be primary interface of xmlDoc 
-FAIL Stringification of xmlDoc assert_equals: class string of xmlDoc expected "[object XMLDocument]" but got "[object Document]"
+PASS Stringification of xmlDoc 
 PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0) 
 PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1) 
 PASS Document interface: xmlDoc must inherit property "documentURI" with the proper type (2) 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt (195519 => 195520)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,5 +1,5 @@
 
-FAIL new Document(): interfaces assert_false: Should not be an XMLDocument expected false got true
+PASS new Document(): interfaces 
 PASS new Document(): children 
 PASS new Document(): metadata 
 PASS new Document(): characterSet aliases 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (195519 => 195520)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1254,7 +1254,7 @@
 PASS EventTarget interface: calling dispatchEvent(Event) on iframe.contentDocument with too few arguments must throw TypeError 
 FAIL XMLDocument interface: operation load(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "load" missing
 PASS XMLDocument must be primary interface of document.implementation.createDocument(null, "", null) 
-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]"
+PASS Stringification of document.implementation.createDocument(null, "", null) 
 FAIL 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
 FAIL 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
 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "implementation" with the proper type (0) 

Modified: trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt (195519 => 195520)


--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -294,8 +294,8 @@
 PASS win['UIEvent'] == '[object UIEventConstructor]' is true
 PASS win['WheelEvent'] == '[object WheelEventConstructor]' is true
 PASS win['WheelEvent'] == '[object WheelEventConstructor]' is true
-PASS win['XMLDocument'] == '[object DocumentConstructor]' is true
-PASS win['XMLDocument'] == '[object DocumentConstructor]' is true
+PASS win['XMLDocument'] == '[object XMLDocumentConstructor]' is true
+PASS win['XMLDocument'] == '[object XMLDocumentConstructor]' is true
 PASS win['XMLHttpRequest'] == '[object XMLHttpRequestConstructor]' is true
 PASS win['XMLHttpRequest'] == '[object XMLHttpRequestConstructor]' is true
 PASS win['XMLHttpRequestException'] == '[object XMLHttpRequestExceptionConstructor]' is true

Modified: trunk/LayoutTests/svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt (195519 => 195520)


--- trunk/LayoutTests/svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/LayoutTests/svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,6 +1,6 @@
 This test makes sure we can add manually parsed SVG to the document when in dashboard compatibility mode. It can not be tested manually.
 
-Parsing of the document isn't prevented and produces a [object Document]
+Parsing of the document isn't prevented and produces a [object XMLDocument]
 The circle element is of type [object SVGCircleElement]
 PASS: Managed to insert SVG element into tree
 

Modified: trunk/Source/WebCore/CMakeLists.txt (195519 => 195520)


--- trunk/Source/WebCore/CMakeLists.txt	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/CMakeLists.txt	2016-01-25 01:11:35 UTC (rev 195520)
@@ -418,6 +418,7 @@
     dom/WebKitNamedFlow.idl
     dom/WebKitTransitionEvent.idl
     dom/WheelEvent.idl
+    dom/XMLDocument.idl
 
     fileapi/Blob.idl
     fileapi/File.idl

Modified: trunk/Source/WebCore/ChangeLog (195519 => 195520)


--- trunk/Source/WebCore/ChangeLog	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/ChangeLog	2016-01-25 01:11:35 UTC (rev 195520)
@@ -1,3 +1,66 @@
+2016-01-24  Chris Dumez  <[email protected]>
+
+        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.
+
+        Expose an XMLDocument interface on the global Window object, as per:
+        - https://dom.spec.whatwg.org/#xmldocument
+
+        DOMImplementation.createDocument() now returns an XMLDocument instead
+        of a Document, as per:
+        - https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
+
+        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):
+
 2016-01-24  Brady Eidson  <[email protected]>
 
         Modern IDB: Support IDBObjectStore.createIndex in the SQLite backing store.

Modified: trunk/Source/WebCore/DerivedSources.cpp (195519 => 195520)


--- trunk/Source/WebCore/DerivedSources.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/DerivedSources.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -528,6 +528,7 @@
 #include "JSWorkerGlobalScope.cpp"
 #include "JSWorkerLocation.cpp"
 #include "JSWorkerNavigator.cpp"
+#include "JSXMLDocument.cpp"
 #include "JSXMLHttpRequest.cpp"
 #include "JSXMLHttpRequestException.cpp"
 #include "JSXMLHttpRequestProgressEvent.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (195519 => 195520)


--- trunk/Source/WebCore/DerivedSources.make	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/DerivedSources.make	2016-01-25 01:11:35 UTC (rev 195520)
@@ -325,6 +325,7 @@
     $(WebCore)/dom/WebKitNamedFlow.idl \
     $(WebCore)/dom/WebKitTransitionEvent.idl \
     $(WebCore)/dom/WheelEvent.idl \
+    $(WebCore)/dom/XMLDocument.idl \
     $(WebCore)/fileapi/Blob.idl \
     $(WebCore)/fileapi/File.idl \
     $(WebCore)/fileapi/FileError.idl \

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (195519 => 195520)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2016-01-25 01:11:35 UTC (rev 195520)
@@ -6527,6 +6527,20 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -20238,6 +20252,7 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerGlobalScope.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerLocation.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerNavigator.h" />
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequestException.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequestProgressEvent.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (195519 => 195520)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2016-01-25 01:11:35 UTC (rev 195520)
@@ -6231,6 +6231,9 @@
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWorkerNavigator.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
@@ -13641,6 +13644,9 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLDocument.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (195519 => 195520)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-01-25 01:11:35 UTC (rev 195520)
@@ -2839,12 +2839,15 @@
 		830519951BB0F11000F3772E /* HTMLTimeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 830519921BB0F0E700F3772E /* HTMLTimeElement.cpp */; };
 		830519961BB0F11000F3772E /* HTMLTimeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 830519931BB0F0E700F3772E /* HTMLTimeElement.h */; };
 		8306EFF11B8BCEA50031D032 /* NativeNodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8306EFF01B8BCE7C0031D032 /* NativeNodeFilter.cpp */; };
+		830784B21C52EE2C00104D1D /* XMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 830784B11C52EE1900104D1D /* XMLDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */; };
 		832B843619D8E57400B26055 /* SVGAnimateElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */; };
 		8348BFAB1B85729800912F36 /* ClassCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8348BFA91B85729500912F36 /* ClassCollection.cpp */; };
 		8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8348BFAA1B85729500912F36 /* ClassCollection.h */; };
 		834DD4F41BE08989002C9C3E /* PageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 834DD4F31BE08989002C9C3E /* PageMac.mm */; };
 		83520C7E1A71BFCC006BD2AA /* CSSFontFamily.h in Headers */ = {isa = PBXBuildFile; fileRef = 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */; };
+		8358CB6F1C53277200E0C2D8 /* JSXMLDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */; };
+		8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F570AD1C53268E007FD6CB /* JSXMLDocument.h */; };
 		835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D363619FF6193004C93AB /* StyleBuilderCustom.h */; };
 		836BAD211BD1CA670037356A /* HTMLTableHeaderCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */; };
 		836BAD221BD1CA670037356A /* HTMLTableDataCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836BAD201BD1CA670037356A /* HTMLTableDataCellElement.h */; };
@@ -10385,6 +10388,8 @@
 		830519931BB0F0E700F3772E /* HTMLTimeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTimeElement.h; sourceTree = "<group>"; };
 		830519941BB0F0E700F3772E /* HTMLTimeElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTimeElement.idl; sourceTree = "<group>"; };
 		8306EFF01B8BCE7C0031D032 /* NativeNodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NativeNodeFilter.cpp; sourceTree = "<group>"; };
+		830784B01C52EE1900104D1D /* XMLDocument.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XMLDocument.idl; sourceTree = "<group>"; };
+		830784B11C52EE1900104D1D /* XMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLDocument.h; sourceTree = "<group>"; };
 		832B843319D8E55100B26055 /* SVGAnimateElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimateElementBase.h; sourceTree = "<group>"; };
 		832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = "<group>"; };
 		8348BFA91B85729500912F36 /* ClassCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassCollection.cpp; sourceTree = "<group>"; };
@@ -10434,6 +10439,8 @@
 		83E359A11BB1031D002CEB98 /* JSHTMLTimeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTimeElement.cpp; sourceTree = "<group>"; };
 		83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = "<group>"; };
 		83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
+		83F570AD1C53268E007FD6CB /* JSXMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSXMLDocument.h; sourceTree = "<group>"; };
+		83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLDocument.cpp; sourceTree = "<group>"; };
 		83FE5F1F1BD1C55E0038BEEC /* HTMLTableHeaderCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableHeaderCellElement.idl; sourceTree = "<group>"; };
 		83FE5F201BD1C55E0038BEEC /* HTMLTableDataCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableDataCellElement.idl; sourceTree = "<group>"; };
 		8419D2A4120D92D000141F8F /* SVGPathByteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStream.h; sourceTree = "<group>"; };
@@ -20607,6 +20614,8 @@
 				65DF31F009D1CC60000BE325 /* JSText.h */,
 				D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */,
 				D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */,
+				83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */,
+				83F570AD1C53268E007FD6CB /* JSXMLDocument.h */,
 			);
 			name = Core;
 			sourceTree = "<group>";
@@ -24210,6 +24219,8 @@
 				85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */,
 				85031B3B0A44EFC700F992E0 /* WheelEvent.h */,
 				93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
+				830784B11C52EE1900104D1D /* XMLDocument.h */,
+				830784B01C52EE1900104D1D /* XMLDocument.idl */,
 			);
 			path = dom;
 			sourceTree = "<group>";
@@ -25598,6 +25609,7 @@
 				5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */,
 				7728694F14F8882500F484DC /* EXTTextureFilterAnisotropic.h in Headers */,
 				A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
+				830784B21C52EE2C00104D1D /* XMLDocument.h in Headers */,
 				A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
 				A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
 				A75E8B8F0E1DE2D6007F2481 /* FEComposite.h in Headers */,
@@ -26529,6 +26541,7 @@
 				B2FA3DC90AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticRel.h in Headers */,
 				B2FA3DCB0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothAbs.h in Headers */,
 				B2FA3DCD0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothRel.h in Headers */,
+				8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */,
 				B2FA3DCF0AB75A6F000E5AC4 /* JSSVGPathSegLinetoAbs.h in Headers */,
 				B2FA3DD10AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalAbs.h in Headers */,
 				B2FA3DD30AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalRel.h in Headers */,
@@ -30763,6 +30776,7 @@
 				D06C0D900CFD11460065F43F /* RemoveFormatCommand.cpp in Sources */,
 				93309E04099E64920056E581 /* RemoveNodeCommand.cpp in Sources */,
 				93309E06099E64920056E581 /* RemoveNodePreservingChildrenCommand.cpp in Sources */,
+				8358CB6F1C53277200E0C2D8 /* JSXMLDocument.cpp in Sources */,
 				7CD494CC1A86EB1D000A87EC /* RenderAttachment.cpp in Sources */,
 				BCEA485F097D93020094C9E4 /* RenderBlock.cpp in Sources */,
 				BC10D76717D8EE6E005E2626 /* RenderBlockFlow.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (195519 => 195520)


--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -137,6 +137,7 @@
 #include "JSWorkerCustom.cpp"
 #include "JSWorkerGlobalScopeBase.cpp"
 #include "JSWorkerGlobalScopeCustom.cpp"
+#include "JSXMLDocument.cpp"
 #include "JSXMLHttpRequestCustom.cpp"
 #include "JSXPathResultCustom.cpp"
 #include "JSXSLTProcessorCustom.cpp"

Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (195519 => 195520)


--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -36,6 +36,7 @@
 #include "SVGDocument.h"
 #include "ScriptController.h"
 #include "TouchList.h"
+#include "XMLDocument.h"
 #include <wtf/GetPtr.h>
 
 #if ENABLE(WEBGL)
@@ -58,6 +59,8 @@
         wrapper = CREATE_DOM_WRAPPER(&globalObject, HTMLDocument, &document);
     else if (document.isSVGDocument())
         wrapper = CREATE_DOM_WRAPPER(&globalObject, SVGDocument, &document);
+    else if (document.isXMLDocument())
+        wrapper = CREATE_DOM_WRAPPER(&globalObject, XMLDocument, &document);
     else
         wrapper = CREATE_DOM_WRAPPER(&globalObject, Document, &document);
 

Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (195519 => 195520)


--- trunk/Source/WebCore/dom/DOMImplementation.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -55,6 +55,7 @@
 #include "SubframeLoader.h"
 #include "Text.h"
 #include "TextDocument.h"
+#include "XMLDocument.h"
 #include "XMLNames.h"
 #include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
@@ -220,16 +221,16 @@
     return 0;
 }
 
-RefPtr<Document> DOMImplementation::createDocument(const String& namespaceURI,
+RefPtr<XMLDocument> DOMImplementation::createDocument(const String& namespaceURI,
     const String& qualifiedName, DocumentType* doctype, ExceptionCode& ec)
 {
-    RefPtr<Document> doc;
+    RefPtr<XMLDocument> doc;
     if (namespaceURI == SVGNames::svgNamespaceURI)
         doc = SVGDocument::create(0, URL());
     else if (namespaceURI == HTMLNames::xhtmlNamespaceURI)
-        doc = Document::createXHTML(0, URL());
+        doc = XMLDocument::createXHTML(0, URL());
     else
-        doc = Document::create(0, URL());
+        doc = XMLDocument::create(0, URL());
 
     doc->setSecurityOriginPolicy(m_document.securityOriginPolicy());
 
@@ -320,7 +321,7 @@
     if (type == "text/html")
         return HTMLDocument::create(frame, url);
     if (type == "application/xhtml+xml")
-        return Document::createXHTML(frame, url);
+        return XMLDocument::createXHTML(frame, url);
 
 #if ENABLE(FTPDIR)
     // Plugins cannot take FTP from us either
@@ -371,7 +372,7 @@
         return SVGDocument::create(frame, url);
 
     if (isXMLMIMEType(type))
-        return Document::create(frame, url);
+        return XMLDocument::create(frame, url);
 
     return HTMLDocument::create(frame, url);
 }

Modified: trunk/Source/WebCore/dom/DOMImplementation.h (195519 => 195520)


--- trunk/Source/WebCore/dom/DOMImplementation.h	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/dom/DOMImplementation.h	2016-01-25 01:11:35 UTC (rev 195520)
@@ -26,6 +26,7 @@
 
 #include "Document.h"
 #include "MediaPlayer.h"
+#include "XMLDocument.h"
 #include <memory>
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
@@ -53,7 +54,7 @@
     // DOM methods & attributes for DOMImplementation
     static bool hasFeature(const String& feature, const String& version);
     RefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&);
-    RefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
+    RefPtr<XMLDocument> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
 
     DOMImplementation* getInterface(const String& feature);
 

Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (195519 => 195520)


--- trunk/Source/WebCore/dom/DOMImplementation.idl	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl	2016-01-25 01:11:35 UTC (rev 195520)
@@ -33,10 +33,16 @@
     [ObjCLegacyUnnamedParameters, RaisesException, NewObject] DocumentType createDocumentType([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString qualifiedName,
                                                    [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString publicId,
                                                    [TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString systemId);
-    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] Document createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
-                                           [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName, 
-                                           [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
 
+#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
+    [ObjCLegacyUnnamedParameters, RaisesException] Document createDocument(optional DOMString namespaceURI, optional DOMString qualifiedName,
+        optional DocumentType doctype);
+#else
+    [RaisesException, NewObject] XMLDocument createDocument([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
+        [TreatNullAs=NullString, Default=Undefined] optional DOMString qualifiedName,
+        [TreatNullAs=NullString, Default=Undefined] optional DocumentType doctype);
+#endif
+
     // DOMImplementationCSS interface from DOM Level 2 CSS
 
     [ObjCLegacyUnnamedParameters, RaisesException] CSSStyleSheet createCSSStyleSheet([Default=Undefined] optional DOMString title,

Modified: trunk/Source/WebCore/dom/Document.cpp (195519 => 195520)


--- trunk/Source/WebCore/dom/Document.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/dom/Document.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -167,6 +167,7 @@
 #include "TreeWalker.h"
 #include "VisitedLinkState.h"
 #include "WheelEvent.h"
+#include "XMLDocument.h"
 #include "XMLDocumentParser.h"
 #include "XMLNSNames.h"
 #include "XMLNames.h"
@@ -3510,7 +3511,12 @@
 
 Ref<Document> Document::cloneDocumentWithoutChildren() const
 {
-    return isXHTMLDocument() ? createXHTML(nullptr, url()) : create(nullptr, url());
+    if (isXMLDocument()) {
+        if (isXHTMLDocument())
+            return XMLDocument::createXHTML(nullptr, url());
+        return XMLDocument::create(nullptr, url());
+    }
+    return create(nullptr, url());
 }
 
 void Document::cloneDataFromDocument(const Document& other)

Modified: trunk/Source/WebCore/dom/Document.h (195519 => 195520)


--- trunk/Source/WebCore/dom/Document.h	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/dom/Document.h	2016-01-25 01:11:35 UTC (rev 195520)
@@ -266,7 +266,8 @@
     PluginDocumentClass = 1 << 3,
     MediaDocumentClass = 1 << 4,
     SVGDocumentClass = 1 << 5,
-    TextDocumentClass = 1 << 6
+    TextDocumentClass = 1 << 6,
+    XMLDocumentClass = 1 << 7,
 };
 
 typedef unsigned char DocumentClassFlags;
@@ -301,10 +302,7 @@
     {
         return adoptRef(*new Document(frame, url));
     }
-    static Ref<Document> createXHTML(Frame* frame, const URL& url)
-    {
-        return adoptRef(*new Document(frame, url, XHTMLDocumentClass));
-    }
+
     static Ref<Document> createNonRenderedPlaceholder(Frame* frame, const URL& url)
     {
         return adoptRef(*new Document(frame, url, DefaultDocumentClass, NonRenderedPlaceholder));
@@ -487,6 +485,7 @@
     bool isSynthesized() const { return m_isSynthesized; }
     bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass; }
     bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass; }
+    bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; }
     bool isImageDocument() const { return m_documentClasses & ImageDocumentClass; }
     bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; }
     bool isPluginDocument() const { return m_documentClasses & PluginDocumentClass; }

Added: trunk/Source/WebCore/dom/XMLDocument.h (0 => 195520)


--- trunk/Source/WebCore/dom/XMLDocument.h	                        (rev 0)
+++ trunk/Source/WebCore/dom/XMLDocument.h	2016-01-25 01:11:35 UTC (rev 195520)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef XMLDocument_h
+#define XMLDocument_h
+
+#include "Document.h"
+
+namespace WebCore {
+
+class XMLDocument : public Document {
+public:
+    static Ref<XMLDocument> create(Frame* frame, const URL& url)
+    {
+        return adoptRef(*new XMLDocument(frame, url));
+    }
+
+    static Ref<XMLDocument> createXHTML(Frame* frame, const URL& url)
+    {
+        return adoptRef(*new XMLDocument(frame, url, XHTMLDocumentClass));
+    }
+
+protected:
+    XMLDocument(Frame* frame, const URL& url, unsigned documentClasses = DefaultDocumentClass)
+        : Document(frame, url, XMLDocumentClass | documentClasses)
+    { }
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::XMLDocument)
+    static bool isType(const WebCore::Document& document) { return document.isXMLDocument(); }
+    static bool isType(const WebCore::Node& node) { return is<WebCore::Document>(node) && isType(downcast<WebCore::Document>(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
+
+#endif // XMLDocument_h

Added: trunk/Source/WebCore/dom/XMLDocument.idl (0 => 195520)


--- trunk/Source/WebCore/dom/XMLDocument.idl	                        (rev 0)
+++ trunk/Source/WebCore/dom/XMLDocument.idl	2016-01-25 01:11:35 UTC (rev 195520)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+interface XMLDocument : Document
+{
+};

Modified: trunk/Source/WebCore/inspector/DOMPatchSupport.cpp (195519 => 195520)


--- trunk/Source/WebCore/inspector/DOMPatchSupport.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/inspector/DOMPatchSupport.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -42,6 +42,7 @@
 #include "HTMLNames.h"
 #include "InspectorHistory.h"
 #include "Node.h"
+#include "XMLDocument.h"
 #include "XMLDocumentParser.h"
 
 #include <wtf/Deque.h>
@@ -88,9 +89,9 @@
     if (m_document->isHTMLDocument())
         newDocument = HTMLDocument::create(nullptr, URL());
     else if (m_document->isXHTMLDocument())
-        newDocument = HTMLDocument::createXHTML(nullptr, URL());
+        newDocument = XMLDocument::createXHTML(nullptr, URL());
     else if (m_document->isSVGDocument())
-        newDocument = Document::create(nullptr, URL());
+        newDocument = XMLDocument::create(nullptr, URL());
 
     ASSERT(newDocument);
     RefPtr<DocumentParser> parser;

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (195519 => 195520)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -767,7 +767,7 @@
         return;
 
     Document& document = node->document();
-    if (!document.isHTMLDocument() && !document.isXHTMLDocument() && !document.isSVGDocument()) {
+    if (!document.isHTMLDocument() && !document.isXMLDocument()) {
         errorString = ASCIILiteral("Not an HTML/XML document");
         return;
     }

Modified: trunk/Source/WebCore/page/DOMWindow.idl (195519 => 195520)


--- trunk/Source/WebCore/page/DOMWindow.idl	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2016-01-25 01:11:35 UTC (rev 195520)
@@ -198,10 +198,6 @@
     // Additional constructors.
     [CustomGetter, CustomConstructor] attribute HTMLImageElementNamedConstructor Image; // Usable with new operator
 
-    // Mozilla has a separate XMLDocument object for XML documents.
-    // We just use Document for this.
-    attribute DocumentConstructor XMLDocument;
-
     [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchConstructor Touch; // Usable with the new operator
     [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchListConstructor TouchList; // Usable with the new operator
 

Modified: trunk/Source/WebCore/page/PageSerializer.cpp (195519 => 195520)


--- trunk/Source/WebCore/page/PageSerializer.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/page/PageSerializer.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -116,7 +116,7 @@
     , m_document(document)
 {
     // MarkupAccumulator does not serialize the <?xml ... line, so we add it explicitely to ensure the right encoding is specified.
-    if (m_document.isXHTMLDocument() || m_document.xmlStandalone() || m_document.isSVGDocument())
+    if (m_document.isXMLDocument() || m_document.xmlStandalone())
         appendString("<?xml version=\"" + m_document.xmlVersion() + "\" encoding=\"" + m_document.charset() + "\"?>");
 }
 

Modified: trunk/Source/WebCore/svg/SVGDocument.cpp (195519 => 195520)


--- trunk/Source/WebCore/svg/SVGDocument.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/svg/SVGDocument.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -28,7 +28,7 @@
 namespace WebCore {
 
 SVGDocument::SVGDocument(Frame* frame, const URL& url)
-    : Document(frame, url, SVGDocumentClass)
+    : XMLDocument(frame, url, SVGDocumentClass)
 {
 }
 

Modified: trunk/Source/WebCore/svg/SVGDocument.h (195519 => 195520)


--- trunk/Source/WebCore/svg/SVGDocument.h	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/svg/SVGDocument.h	2016-01-25 01:11:35 UTC (rev 195520)
@@ -22,13 +22,13 @@
 #ifndef SVGDocument_h
 #define SVGDocument_h
 
-#include "Document.h"
+#include "XMLDocument.h"
 
 namespace WebCore {
 
 class SVGSVGElement;
 
-class SVGDocument final : public Document {
+class SVGDocument final : public XMLDocument {
 public:
     static Ref<SVGDocument> create(Frame*, const URL&);
 

Modified: trunk/Source/WebCore/svg/SVGDocument.idl (195519 => 195520)


--- trunk/Source/WebCore/svg/SVGDocument.idl	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/svg/SVGDocument.idl	2016-01-25 01:11:35 UTC (rev 195520)
@@ -19,7 +19,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-interface SVGDocument : Document {
+// FIXME: This interface no longer exists in SVG2.
+interface SVGDocument : XMLDocument {
     readonly attribute SVGSVGElement        rootElement;
 
     // Overwrite the one in events::DocumentEvent

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (195519 => 195520)


--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -216,7 +216,7 @@
             if (isHTML)
                 m_responseDocument = HTMLDocument::create(0, m_url);
             else
-                m_responseDocument = Document::create(0, m_url);
+                m_responseDocument = XMLDocument::create(0, m_url);
             // FIXME: Set Last-Modified.
             m_responseDocument->setContent(m_responseBuilder.toStringPreserveCapacity());
             m_responseDocument->setSecurityOriginPolicy(scriptExecutionContext()->securityOriginPolicy());

Modified: trunk/Source/WebCore/xml/XSLTProcessor.cpp (195519 => 195520)


--- trunk/Source/WebCore/xml/XSLTProcessor.cpp	2016-01-25 00:58:58 UTC (rev 195519)
+++ trunk/Source/WebCore/xml/XSLTProcessor.cpp	2016-01-25 01:11:35 UTC (rev 195520)
@@ -40,6 +40,7 @@
 #include "SecurityOriginPolicy.h"
 #include "Text.h"
 #include "TextResourceDecoder.h"
+#include "XMLDocument.h"
 #include "markup.h"
 
 #include <wtf/Assertions.h>
@@ -77,7 +78,7 @@
 
     RefPtr<Document> result;
     if (sourceMIMEType == "text/plain") {
-        result = Document::createXHTML(frame, sourceIsDocument ? ownerDocument->url() : URL());
+        result = XMLDocument::createXHTML(frame, sourceIsDocument ? ownerDocument->url() : URL());
         transformTextStringToXHTMLDocumentString(documentSource);
     } else
         result = DOMImplementation::createDocument(sourceMIMEType, frame, sourceIsDocument ? ownerDocument->url() : URL());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to