Chromium Code Reviews| 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..b48f3ee7fef0a20505367aa6c88401ee2b245e68 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -1941,15 +1941,31 @@ 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) |
|
davaajav
2016/08/03 11:31:14
I am not sure about not allowing setting the defin
|
| { |
| if (!hasRareData() && !definition) |
| return; |
| DCHECK(!customElementDefinition()); |
| ensureElementRareData().setCustomElementDefinition(definition); |
| + this->setCustomElementState(CustomElementState::Custom); |
| } |
| -V0CustomElementDefinition* Element::customElementDefinition() const |
| +CustomElementDefinition* Element::customElementDefinition() const |
| { |
| if (hasRareData()) |
| return elementRareData()->customElementDefinition(); |