Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp

Issue 2067853002: Upgrade custom elements when inserting a node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor editorial Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
index 8da5f43b04b0a562c632977f40902cca1a9dd23c..c807dd30ef8916588ce6bd73dcfaf99bb92f0866 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
@@ -16,7 +16,10 @@ CustomElementUpgradeReaction::CustomElementUpgradeReaction(
void CustomElementUpgradeReaction::invoke(Element* element)
{
- m_definition->upgrade(element);
+ // Multiple upgrade reactions could be enqueued because the state changes in
dominicc (has gone to gerrit) 2016/06/16 05:26:41 This has a step number in the spec; maybe referenc
+ // upgrade(). Don't call upgrade() in such cases.
+ if (element->getCustomElementState() == CustomElementState::Undefined)
+ m_definition->upgrade(element);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698