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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch update Created 4 years, 5 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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index c45d0f8d8fa2cd4d9168851b0167eba458b3be1f..5764a1c3bcf862f8b254a5ab49db2f662a807de5 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1915,7 +1915,22 @@ void Element::setNeedsCompositingUpdate()
layoutObject->layer()->updateSelfPaintingLayer();
}
-void Element::setCustomElementDefinition(V0CustomElementDefinition* definition)
+void Element::V0setCustomElementDefinition(V0CustomElementDefinition* definition)
+{
+ if (!hasRareData() && !definition)
+ return;
+ DCHECK(!V0customElementDefinition());
+ ensureElementRareData().V0setCustomElementDefinition(definition);
+}
+
+V0CustomElementDefinition* Element::V0customElementDefinition() const
+{
+ if (hasRareData())
+ return elementRareData()->V0customElementDefinition();
+ return nullptr;
+}
+
+void Element::setCustomElementDefinition(CustomElementDefinition* definition)
{
if (!hasRareData() && !definition)
return;
@@ -1923,7 +1938,7 @@ void Element::setCustomElementDefinition(V0CustomElementDefinition* definition)
ensureElementRareData().setCustomElementDefinition(definition);
}
-V0CustomElementDefinition* Element::customElementDefinition() const
+CustomElementDefinition* Element::customElementDefinition() const
{
if (hasRareData())
return elementRareData()->customElementDefinition();

Powered by Google App Engine
This is Rietveld 408576698