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

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

Issue 2299033005: Pass the old and new owner documents to the adoptedCallback. (Closed)
Patch Set: WTF_ARRAY_LENGTH Created 4 years, 3 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 45edde7230ed1e41fc0ba651933153f9436918fc..8b0f9156afcf1b20276a5b4d5d8c35c56f2b5527 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -11,6 +11,7 @@
#include "core/dom/custom/CustomElementAttributeChangedCallbackReaction.h"
#include "core/dom/custom/CustomElementConnectedCallbackReaction.h"
#include "core/dom/custom/CustomElementDisconnectedCallbackReaction.h"
+#include "core/dom/custom/CustomElementReaction.h"
#include "core/dom/custom/CustomElementUpgradeReaction.h"
#include "core/html/HTMLElement.h"
@@ -189,10 +190,12 @@ void CustomElementDefinition::enqueueDisconnectedCallback(Element* element)
new CustomElementDisconnectedCallbackReaction(this));
}
-void CustomElementDefinition::enqueueAdoptedCallback(Element* element)
+void CustomElementDefinition::enqueueAdoptedCallback(
+ Element* element, Document* oldDocument, Document* newDocument)
{
- CustomElement::enqueue(element,
- new CustomElementAdoptedCallbackReaction(this));
+ CustomElementReaction* reaction =
+ new CustomElementAdoptedCallbackReaction(this, oldDocument, newDocument);
+ CustomElement::enqueue(element, reaction);
}
void CustomElementDefinition::enqueueAttributeChangedCallback(Element* element,

Powered by Google App Engine
This is Rietveld 408576698