From 045c48d80f137869337fcf4cc02a27349bb016da Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Fri, 7 Sep 2018 16:56:10 +0000 Subject: [PATCH] Bug 1489437 - HTML parser should invoke custom element's callbacks before appending child nodes to it; r=smaug Per step 3.3 of https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element Differential Revision: https://phabricator.services.mozilla.com/D5269 --HG-- extra : moz-landing-system : lando --- parser/html/nsHtml5TreeOperation.cpp | 2 ++ .../parser/parser-sets-attributes-and-children.html.ini | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 testing/web-platform/meta/custom-elements/parser/parser-sets-attributes-and-children.html.ini diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index 133c8979d111..d57318f216df 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -178,6 +178,8 @@ nsHtml5TreeOperation::Append(nsIContent* aNode, MOZ_ASSERT(aBuilder->IsInDocUpdate()); nsresult rv = NS_OK; nsHtml5OtherDocUpdate update(aParent->OwnerDoc(), aBuilder->GetDocument()); + dom::AutoCEReaction autoCEReaction( + aParent->OwnerDoc()->GetDocGroup()->CustomElementReactionsStack(), nullptr); rv = aParent->AppendChildTo(aNode, false); if (NS_SUCCEEDED(rv)) { aNode->SetParserHasNotified(); diff --git a/testing/web-platform/meta/custom-elements/parser/parser-sets-attributes-and-children.html.ini b/testing/web-platform/meta/custom-elements/parser/parser-sets-attributes-and-children.html.ini deleted file mode 100644 index 4a18e1fd225f..000000000000 --- a/testing/web-platform/meta/custom-elements/parser/parser-sets-attributes-and-children.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[parser-sets-attributes-and-children.html] - [HTML parser should call connectedCallback before appending child nodes.] - expected: FAIL -