Chromium Code Reviews| 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 |