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 960c8a3a28a5fbb1221c8bacf4be72b22c6b0fcc..42c912f2bf0466bf8ec15e4d1c25448ea61055f0 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -3419,6 +3419,13 @@ CSSStyleDeclaration* Element::style() |
| return &ensureElementRareData().ensureInlineCSSStyleDeclaration(this); |
| } |
| +StylePropertyMap* Element::styleMap() |
| +{ |
| + if (!isStyledElement()) |
| + return nullptr; |
| + return &ensureElementRareData().ensureInlineStylePropertyMap(this); |
| +} |
| + |
| MutableStylePropertySet& Element::ensureMutableInlineStyle() |
| { |
| ASSERT(isStyledElement()); |
| @@ -3514,6 +3521,14 @@ bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& val |
| return changes; |
| } |
| +bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const PassRefPtrWillBeRawPtr<CSSValue> value, bool important) |
|
Timothy Loh
2016/03/23 03:45:09
To save some copy paste and make this patch a litt
meade_UTC10
2016/03/29 06:27:37
Done.
|
| +{ |
| + ASSERT(isStyledElement()); |
| + ensureMutableInlineStyle().setProperty(propertyID, value); |
|
Timothy Loh
2016/03/23 03:45:09
Missing important argument
meade_UTC10
2016/03/29 06:27:37
Done.
|
| + inlineStyleChanged(); |
| + return true; |
| +} |
| + |
| bool Element::removeInlineStyleProperty(CSSPropertyID propertyID) |
| { |
| ASSERT(isStyledElement()); |
| @@ -3543,6 +3558,20 @@ void Element::updatePresentationAttributeStyle() |
| elementData.m_presentationAttributeStyle = computePresentationAttributeStyle(*this); |
| } |
| +void Element::invalidateInlineStylePropertyMap() |
| +{ |
| + if (!hasRareData()) |
| + return; |
| + ElementRareData* rareData = elementRareData(); |
| + InlineStylePropertyMap* inlineStylePropertyMap = rareData->inlineStylePropertyMap(); |
| + if (!inlineStylePropertyMap) { |
| + // If it doesn't exist, it isn't being used, so nothing to do. |
| + return; |
| + } |
| + |
| + inlineStylePropertyMap->invalidate(); |
| +} |
| + |
| void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* style, CSSPropertyID propertyID, CSSValueID identifier) |
| { |
| ASSERT(isStyledElement()); |