WebKit Bugzilla
Attachment 347149 Details for
Bug 183931
: connectedCallback is invoked by the HTML parser after child nodes had been inserted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes the bug
bug-183931-20180814214255.patch (text/plain), 3.92 KB, created by
Ryosuke Niwa
on 2018-08-14 21:42:55 PDT
(
hide
)
Description:
Fixes the bug
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-08-14 21:42:55 PDT
Size:
3.92 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234876) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2018-08-14 Ryosuke Niwa <rniwa@webkit.org> >+ >+ connectedCallback is invoked by the HTML parser after child nodes had been inserted >+ https://bugs.webkit.org/show_bug.cgi?id=183931 >+ <rdar://problem/38843548> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Invoke the custom element reactions after constructing and inserting a custom element as specifed in step 3.3 of: >+ https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element >+ >+ The bug here was that HTMLConstructionSite::insertCustomElement uses attachLater so that even though the task >+ to insert the custom element was created, it didn't get executed until after CustomElementReactionStack in >+ HTMLDocumentParser::runScriptsForPausedTreeBuilder had been popped off of the stack. >+ >+ Test: imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html >+ >+ * html/parser/HTMLConstructionSite.cpp: >+ (WebCore::HTMLConstructionSite::insertCustomElement): Fixed the bug by manually executign the scheduled tasks. >+ This will enqueue any custom element reactions while CustomElementReactionStack in runScriptsForPausedTreeBuilder >+ is still in the stack. >+ > 2018-08-14 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [JSC] Add GPRReg::InvalidGPRReg and FPRReg::InvalidFPRReg >Index: Source/WebCore/html/parser/HTMLConstructionSite.cpp >=================================================================== >--- Source/WebCore/html/parser/HTMLConstructionSite.cpp (revision 234876) >+++ Source/WebCore/html/parser/HTMLConstructionSite.cpp (working copy) >@@ -514,6 +514,7 @@ void HTMLConstructionSite::insertCustomE > setAttributes(element, attributes, m_parserContentPolicy); > attachLater(currentNode(), element.copyRef()); > m_openElements.push(HTMLStackItem::create(WTFMove(element), localName, WTFMove(attributes))); >+ executeQueuedTasks(); > } > > void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken&& token) >Index: LayoutTests/imported/w3c/ChangeLog >=================================================================== >--- LayoutTests/imported/w3c/ChangeLog (revision 234879) >+++ LayoutTests/imported/w3c/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-14 Ryosuke Niwa <rniwa@webkit.org> >+ >+ connectedCallback is invoked by the HTML parser after child nodes had been inserted >+ https://bugs.webkit.org/show_bug.cgi?id=183931 >+ <rdar://problem/38843548> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rebaselined the test now that all test cases pass. >+ >+ * web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: >+ > 2018-08-14 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Unhandled Promise Rejection logging in workers should not emit ErrorEvent to host Worker object >Index: LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt (revision 234876) >+++ LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt (working copy) >@@ -2,6 +2,6 @@ > PASS HTML parser must set the attributes > PASS HTML parser must append child nodes > PASS HTML parser must set the attributes or append children before calling constructor >-FAIL HTML parser should call connectedCallback before appending child nodes. assert_equals: expected 0 but got 2 >+PASS HTML parser should call connectedCallback before appending child nodes. > PASS HTML parser must enqueue attributeChanged reactions > hello world
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
achristensen
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 183931
: 347149