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

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: 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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 9cce24f6a0f58afd4ba5c6ec0704733e4ab0c8db..f24eff86edf8c2be8df5160278b3683793cb811e 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1941,7 +1941,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)
dominicc (has gone to gerrit) 2016/08/03 07:56:56 I don't think we should allow setting the definiti
{
if (!hasRareData() && !definition)
return;
@@ -1949,7 +1964,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