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

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

Issue 177063004: Move custom element definitions into ElementRareData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index dc3066d7e1756d94713b403295dd8cfd205745fd..64ffccbb1f09028f001688cc46a6cbfa598ad079 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1735,6 +1735,20 @@ void Element::setNeedsAnimationStyleRecalc()
setAnimationStyleChange(true);
}
+void Element::setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definition)
+{
+ if (!hasRareData() && !definition)
+ return;
+ ensureElementRareData().setCustomElementDefinition(definition);
dominicc (has gone to gerrit) 2014/03/03 04:32:23 We should assert that there isn't a definition alr
+}
+
+CustomElementDefinition* Element::customElementDefinition() const
+{
+ if (hasRareData())
+ return elementRareData()->customElementDefinition();
+ return 0;
+}
+
PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState)
{
if (alwaysCreateUserAgentShadowRoot())

Powered by Google App Engine
This is Rietveld 408576698