Chromium Code Reviews| 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()) |