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

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: merge conflict resolution 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..a9e7d5cd80b3ae9db6a1ff58feab377d277472db 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"
@@ -127,7 +128,7 @@ void CustomElementDefinition::upgrade(Element* element)
return;
}
- element->setCustomElementState(CustomElementState::Custom);
+ element->setCustomElementDefinition(this);
}
bool CustomElementDefinition::hasAttributeChangedCallback(
@@ -159,6 +160,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