An XMLDocument interface should be exposed on the global Window object
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jan 2016 01:11:35 +0000 (01:11 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jan 2016 01:11:35 +0000 (01:11 +0000)
commitb8bd0ac9b63feb795055eb97c658373bfd8e4454
tree9c28aea6d5f02c1a2dbb08576f6ef5a70cf9b8b6
parent012f7da6e338cc928ce7d49f73567a279f28c108
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt
LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js
LayoutTests/fast/dom/Document/clone-node-expected.txt
LayoutTests/fast/dom/Document/clone-node.html
LayoutTests/fast/dom/Document/xml-document-focus-expected.txt
LayoutTests/fast/dom/Document/xml-document-focus.xml
LayoutTests/fast/dom/dom-parse-serialize-display-expected.txt
LayoutTests/fast/dom/dom-parse-serialize-expected.txt
LayoutTests/fast/dom/wrapper-classes-expected.txt
LayoutTests/fast/dom/wrapper-classes.html
LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception-expected.txt
LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype-expected.txt
LayoutTests/http/tests/security/cross-frame-access-put-expected.txt
LayoutTests/http/tests/xmlhttprequest/supported-xml-content-types-expected.txt
LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt
LayoutTests/svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/dom/DOMImplementation.cpp
Source/WebCore/dom/DOMImplementation.h
Source/WebCore/dom/DOMImplementation.idl
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/XMLDocument.h [new file with mode: 0644]
Source/WebCore/dom/XMLDocument.idl [new file with mode: 0644]
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/page/DOMWindow.idl
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/svg/SVGDocument.cpp
Source/WebCore/svg/SVGDocument.h
Source/WebCore/svg/SVGDocument.idl
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XSLTProcessor.cpp