DescriptionMove attributes and methods from HTMLDocument to Document
Move open, close, write, writeln from HTMLDocument to
Document.
Open method is defined as custom and was previously
implemented for HTMLDocument, it is moved to V8DocumentCustom.
Dynamic insertion, open/write/writeln/close is not supported
for non-HTML document:
https://html.spec.whatwg.org/#dynamic-markup-insertion.
Code has been updated in Document::open, Document::write and
Document::close to throw DOMException InvalidStateError. The
LayoutTests which was previosuly throwing has been updated
accordingly and it matches with Firefox functionality
parseFromString uses Document::setContent and this internally
calls Document::open and Document::close. Since open and close,
now throw exception, parseString for the non-HTML document needs
two internal function Document::open and Document::close. Old
open method will be initiated via bindings and new functions are
to be used for internal purpose. The new method does not pass
any argument and that's how two functions are differentiated.
The existing open and close function includes two DOM exceptions
as listed here:
http://w3c.github.io/webcomponents/spec/imports/#interface-document
In write it throws an exception if it is not HTML document. It
is inconsistent with specification but matches behavior of open
and close. A bug has been raised to correct the spec:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28864
BUG=496376
R=philipj
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198491
Patch Set 1 #Patch Set 2 : Removed changes in window.idl #Patch Set 3 : #Patch Set 4 : Introduced open and close methods without arguments to handle internal calls. #
Total comments: 22
Patch Set 5 : Updated as per review comments #Patch Set 6 : Switch importLoader check #
Total comments: 4
Patch Set 7 : Moved the order of open and close function #
Total comments: 6
Patch Set 8 : #
Total comments: 1
Patch Set 9 : Updated comment #Patch Set 10 : Updated to latest master #Messages
Total messages: 50 (19 generated)
|