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

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

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout test went from bad to good, deleting failure expectation Created 4 years, 4 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 0b9b6f652cc9f76ac06c4fac59e5a568f75817d4..49aaa9873a385dff352d0c3e20d0dc768c0dd432 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -7,6 +7,7 @@
#include "core/dom/Attr.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/custom/CustomElement.h"
+#include "core/dom/custom/CustomElementAdoptedCallbackReaction.h"
#include "core/dom/custom/CustomElementAttributeChangedCallbackReaction.h"
#include "core/dom/custom/CustomElementConnectedCallbackReaction.h"
#include "core/dom/custom/CustomElementDisconnectedCallbackReaction.h"
@@ -128,6 +129,7 @@ void CustomElementDefinition::upgrade(Element* element)
}
element->setCustomElementState(CustomElementState::Custom);
+ element->setCustomElementDefinition(this);
}
bool CustomElementDefinition::hasAttributeChangedCallback(
@@ -159,6 +161,12 @@ void CustomElementDefinition::enqueueDisconnectedCallback(Element* element)
new CustomElementDisconnectedCallbackReaction(this));
}
+void CustomElementDefinition::enqueueAdoptedCallback(Element* element)
+{
+ CustomElement::enqueue(element,
+ new CustomElementAdoptedCallbackReaction(this));
+}
+
void CustomElementDefinition::enqueueAttributeChangedCallback(Element* element,
const QualifiedName& name,
const AtomicString& oldValue, const AtomicString& newValue)

Powered by Google App Engine
This is Rietveld 408576698