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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 880593003: Move the CustomElementDefinition from ElementRareData to Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix compile assert Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/ElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index 70c4676387b3f0d3ba15489807b3a87d9dcdc472..0815b4c8dfca466ae6d76da7504b7d93ee334cef 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -1025,17 +1025,13 @@ void Element::setNeedsAnimationStyleRecalc()
void Element::setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definition)
{
- if (!hasRareData() && !definition)
- return;
- ASSERT(!customElementDefinition());
- ensureElementRareData().setCustomElementDefinition(definition);
+ ASSERT(!m_customElementDefinition);
+ m_customElementDefinition = definition;
}
CustomElementDefinition* Element::customElementDefinition() const
{
- if (hasRareData())
- return elementRareData()->customElementDefinition();
- return 0;
+ return m_customElementDefinition.get();
}
// TODO(esprehn): Implement the sky spec where shadow roots are a custom
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698