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

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

Issue 2043503002: Add [CEReactions] IDL attributes for Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yukishiino review 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/CustomElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
index 12f220e68a603f372f802a8650c12b72121f9725..774930137779cae47f1be1d92b639009727b0dbb 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
@@ -6,6 +6,8 @@
#include "core/dom/Document.h"
#include "core/dom/QualifiedName.h"
+#include "core/dom/custom/CEReactionsScope.h"
+#include "core/dom/custom/CustomElementUpgradeReaction.h"
#include "core/dom/custom/V0CustomElement.h"
#include "core/dom/custom/V0CustomElementRegistrationContext.h"
#include "core/frame/LocalDOMWindow.h"
@@ -98,4 +100,13 @@ HTMLElement* CustomElement::createCustomElement(Document& document, const Qualif
return element;
}
+void CustomElement::enqueueUpgradeReaction(Element* element, CustomElementDefinition* definition)
+{
+ // 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,
+ new CustomElementUpgradeReaction(definition));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698