Changeset 234608 in webkit
- Timestamp:
- Aug 6, 2018 10:45:41 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r234586 r234608 1 2018-08-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 HTML parser should execute custom element reactions for setting attributes immediately after creating a custom element 4 https://bugs.webkit.org/show_bug.cgi?id=188336 5 6 Reviewed by Frédéric Wang. 7 8 Rebaseline the test now that the relevant test case is passing. 9 10 * web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: 11 1 12 2018-08-05 Yusuke Suzuki <utatane.tea@gmail.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt
r230330 r234608 4 4 PASS HTML parser must set the attributes or append children before calling constructor 5 5 FAIL HTML parser should call connectedCallback before appending child nodes. assert_equals: expected 0 but got 2 6 FAIL HTML parser must enqueue attributeChanged reactions assert_equals: attributeChangedCallback should be called before appending a child expected 0 but got 2 6 PASS HTML parser must enqueue attributeChanged reactions 7 7 hello world -
trunk/Source/WebCore/ChangeLog
r234603 r234608 1 2018-08-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 HTML parser should execute custom element reactions for setting attributes immediately after creating a custom element 4 https://bugs.webkit.org/show_bug.cgi?id=188336 5 6 Reviewed by Frédéric Wang. 7 8 Push and pop an element queue from the custom element reactions stack when constructing a custom element: 9 https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token 10 11 To do this, we instantiate CustomElementReactionStack in HTMLDocumentParser::runScriptsForPausedTreeBuilder 12 where we synchronously construct a custom element. We don't have to worry about whether *will execute script* 13 is set or not since the presence of an element queue should not be observable in the case where we're constructing 14 a fallback element (since it would not enqueue any new custom element reaction). 15 16 Tests: imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html 17 18 * html/parser/HTMLDocumentParser.cpp: 19 (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Instantiate CustomElementReactionStack. Note that we 20 don't insert the custom element into the parser until we finish processing the custom element reactions. 21 1 22 2018-08-06 Charlie Turner <cturner@igalia.com> 2 23 -
trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp
r233891 r234608 28 28 #include "HTMLDocumentParser.h" 29 29 30 #include "CustomElementReactionQueue.h" 30 31 #include "DocumentFragment.h" 31 32 #include "DocumentLoader.h" … … 209 210 210 211 // https://html.spec.whatwg.org/#create-an-element-for-the-token 211 auto& elementInterface = constructionData->elementInterface.get(); 212 auto newElement = elementInterface.constructElementWithFallback(*document(), constructionData->name); 213 m_treeBuilder->didCreateCustomOrFallbackElement(WTFMove(newElement), *constructionData); 212 { 213 CustomElementReactionStack reactionStack(document()->execState()); 214 auto& elementInterface = constructionData->elementInterface.get(); 215 auto newElement = elementInterface.constructElementWithFallback(*document(), constructionData->name); 216 m_treeBuilder->didCreateCustomOrFallbackElement(WTFMove(newElement), *constructionData); 217 } 214 218 return; 215 219 }
Note: See TracChangeset
for help on using the changeset viewer.