[WebIDL] Remove custom bindings for HTMLDocument
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jun 2017 01:19:28 +0000 (01:19 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jun 2017 01:19:28 +0000 (01:19 +0000)
commit0d8548d08d4f6ab6db2488487a1b78b235ec1df4
treebc9fc6209b2557022d4e4ae78c5cf48fc3e84142
parentb6f33de227c217e37c61be2b1f01f97784dab893
[WebIDL] Remove custom bindings for HTMLDocument
https://bugs.webkit.org/show_bug.cgi?id=173444

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/dynamic-markup-insertion/closing-the-input-stream/document.close-01-expected.txt:
* web-platform-tests/html/dom/dynamic-markup-insertion/document-write/document.write-01-expected.txt:
* web-platform-tests/html/dom/dynamic-markup-insertion/document-writeln/document.writeln-01-expected.txt:
* web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-01-expected.txt:
* web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-02-expected.txt:
Update now passing results.

Source/WebCore:

* bindings/js/JSDOMBindingSecurity.cpp:
(WebCore::canAccessDocument):
(WebCore::BindingSecurity::shouldAllowAccessToFrame):
(WebCore::BindingSecurity::shouldAllowAccessToDOMWindow):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::showModalDialog):
Pass ExecState by reference to window accessors.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::incumbentDOMWindow):
(WebCore::activeDOMWindow):
(WebCore::firstDOMWindow):
(WebCore::callerDocument):
* bindings/js/JSDOMWindowBase.h:
Pass ExecState by reference to window accessors and add callerDocument.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot): Deleted.
(WebCore::JSHTMLDocument::all): Deleted.
(WebCore::JSHTMLDocument::setAll): Deleted.
(WebCore::findCallingDocument): Deleted.
(WebCore::JSHTMLDocument::open): Deleted.
(WebCore::documentWrite): Deleted.
(WebCore::JSHTMLDocument::write): Deleted.
Remove custom bindings.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallWith):
Add support CallWith=CallerDocument

* bindings/scripts/IDLAttributes.json:
Remove CallerWindow, which has not been supported for a while. CallerDocument, despite
having it's support removed in the past, was still listed, so keep it.

* bindings/scripts/test/JS/JSTestObj.cpp:
Update test results.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):
Update for new signature of Document.write().

* dom/Document.h:
* dom/Document.idl:
* dom/Document.cpp:
(WebCore::Document::open):
Add DOMWindow returning overload that calls through to the DOMWindow.
Add return value and currently not utilized parameters to the Document returning overload.
Update to return exceptions as specified.

(WebCore::Document::close):
Update to return exceptions as specified.

(WebCore::Document::write):
(WebCore::Document::writeln):
Update to take a Vector<String> argument and the caller Document first
as per convention and return exceptions as specified.

(WebCore::Document::bgColor):
(WebCore::Document::setBgColor):
(WebCore::Document::fgColor):
(WebCore::Document::setFgColor):
(WebCore::Document::alinkColor):
(WebCore::Document::setAlinkColor):
(WebCore::Document::linkColorForBindings):
(WebCore::Document::setLinkColorForBindings):
(WebCore::Document::vlinkColor):
(WebCore::Document::setVlinkColor):
(WebCore::Document::clear):
(WebCore::Document::captureEvents):
(WebCore::Document::releaseEvents):
Move from HTMLDocument.

* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::bgColor): Deleted.
(WebCore::HTMLDocument::setBgColor): Deleted.
(WebCore::HTMLDocument::fgColor): Deleted.
(WebCore::HTMLDocument::setFgColor): Deleted.
(WebCore::HTMLDocument::alinkColor): Deleted.
(WebCore::HTMLDocument::setAlinkColor): Deleted.
(WebCore::HTMLDocument::linkColor): Deleted.
(WebCore::HTMLDocument::setLinkColor): Deleted.
(WebCore::HTMLDocument::vlinkColor): Deleted.
(WebCore::HTMLDocument::setVlinkColor): Deleted.
(WebCore::HTMLDocument::clear): Deleted.
(WebCore::HTMLDocument::captureEvents): Deleted.
(WebCore::HTMLDocument::releaseEvents): Deleted.
* html/HTMLDocument.h:
* html/HTMLDocument.idl:
Moved operations and attributes to Document.

* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
Update for new signature of Document.write().

* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
(WebCore::DOMWindow::focus):
* page/DOMWindow.h:
Use the term incumbentWindow, matching IDL, and so not to be confused
with the callerWindow, which is slightly different.

Source/WebKit/mac:

* DOM/DOMHTMLDocument.mm:
(-[DOMHTMLDocument linkColor]):
(-[DOMHTMLDocument setLinkColor:]):
(-[DOMHTMLDocument write:]):
(-[DOMHTMLDocument writeln:]):
Update for new signature of write/writeln and rename of linkColor to linkColorForBindings.

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::write):
(DOMHTMLDocument::writeln):
Update for new signature of write/writeln.

Source/WebKit2:

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
(webkit_dom_html_document_get_link_color):
(webkit_dom_html_document_set_link_color):
Update for rename of linkColor to linkColorForBindings.

LayoutTests:

* dom/xhtml/level2/html/HTMLDocument17-expected.txt:
* dom/xhtml/level2/html/HTMLDocument18-expected.txt:
* dom/xhtml/level2/html/HTMLDocument19-expected.txt:
* dom/xhtml/level2/html/HTMLDocument20-expected.txt:
* dom/xhtml/level2/html/HTMLDocument21-expected.txt:
Update test results for correct exception being thrown.

* fast/dom/frame-deleted-in-document-open-expected.txt: Removed.
* fast/dom/frame-deleted-in-document-open.html: Removed.
* http/tests/security/isolatedWorld/document-open-expected.txt: Removed.
* http/tests/security/isolatedWorld/document-open.html: Removed.
Remove two tests that were testing the behavior of document.open using javascript
to call the window.open operation. This is not how it is specified and no
longer how it is implemented.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level2/html/HTMLDocument17-expected.txt
LayoutTests/dom/xhtml/level2/html/HTMLDocument18-expected.txt
LayoutTests/dom/xhtml/level2/html/HTMLDocument19-expected.txt
LayoutTests/dom/xhtml/level2/html/HTMLDocument20-expected.txt
LayoutTests/dom/xhtml/level2/html/HTMLDocument21-expected.txt
LayoutTests/fast/dom/frame-deleted-in-document-open-expected.txt [deleted file]
LayoutTests/fast/dom/frame-deleted-in-document-open.html [deleted file]
LayoutTests/http/tests/security/isolatedWorld/document-open-expected.txt [deleted file]
LayoutTests/http/tests/security/isolatedWorld/document-open.html [deleted file]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/closing-the-input-stream/document.close-01-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-write/document.write-01-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-writeln/document.writeln-01-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-01-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-02-expected.txt
LayoutTests/js/dom/dom-attributes-on-mismatch-type-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.json
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/dom/DOMImplementation.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/html/HTMLDocument.cpp
Source/WebCore/html/HTMLDocument.h
Source/WebCore/html/HTMLDocument.idl
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/DOMHTMLDocument.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp