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

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

Issue 2097463002: Add backup element queue to CustomElementReactionStack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dominicc nits 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/CustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
index 3c950fd707b4ea66a9a89f7ea875688a1f562fc8..72245da7b33fedbfa0c30e88044881ded386ef5e 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -6,7 +6,6 @@
#include "core/dom/Attr.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/custom/CEReactionsScope.h"
#include "core/dom/custom/CustomElement.h"
#include "core/dom/custom/CustomElementAttributeChangedCallbackReaction.h"
#include "core/dom/custom/CustomElementConnectedCallbackReaction.h"
@@ -133,34 +132,31 @@ bool CustomElementDefinition::hasAttributeChangedCallback(
return m_observedAttributes.contains(name.localName());
}
-static void enqueueReaction(Element* element, CustomElementReaction* reaction)
-{
- // CEReactionsScope must be created by [CEReactions] in IDL,
- // or callers must setup explicitly if it does not go through bindings.
- DCHECK(CEReactionsScope::current());
- CEReactionsScope::current()->enqueue(element, reaction);
-}
-
void CustomElementDefinition::enqueueUpgradeReaction(Element* element)
{
- enqueueReaction(element, new CustomElementUpgradeReaction(this));
+ CustomElement::enqueue(element,
+ new CustomElementUpgradeReaction(this));
}
void CustomElementDefinition::enqueueConnectedCallback(Element* element)
{
- enqueueReaction(element, new CustomElementConnectedCallbackReaction(this));
+ CustomElement::enqueue(element,
+ new CustomElementConnectedCallbackReaction(this));
}
void CustomElementDefinition::enqueueDisconnectedCallback(Element* element)
{
- enqueueReaction(element, new CustomElementDisconnectedCallbackReaction(this));
+ CustomElement::enqueue(element,
+ new CustomElementDisconnectedCallbackReaction(this));
}
void CustomElementDefinition::enqueueAttributeChangedCallback(Element* element,
const QualifiedName& name,
const AtomicString& oldValue, const AtomicString& newValue)
{
- enqueueReaction(element, new CustomElementAttributeChangedCallbackReaction(this, name, oldValue, newValue));
+ CustomElement::enqueue(element,
+ new CustomElementAttributeChangedCallbackReaction(this, name,
+ oldValue, newValue));
}
void CustomElementDefinition::enqueueAttributeChangedCallbackForAllAttributes(

Powered by Google App Engine
This is Rietveld 408576698