| Index: third_party/WebKit/Source/core/dom/ElementRareData.h
|
| diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.h b/third_party/WebKit/Source/core/dom/ElementRareData.h
|
| index fe196fb89ed539bba4cafc5fc5375e87f58407c6..2ebc908a0cf68b19186a48cb28123a5228ec366b 100644
|
| --- a/third_party/WebKit/Source/core/dom/ElementRareData.h
|
| +++ b/third_party/WebKit/Source/core/dom/ElementRareData.h
|
| @@ -91,9 +91,21 @@ public:
|
| NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
|
| void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attributeMap; }
|
|
|
| - ComputedStyle* computedStyle() const { return m_computedStyle.get(); }
|
| - void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedStyle = computedStyle; }
|
| - void clearComputedStyle() { m_computedStyle = nullptr; }
|
| + ComputedStyle* computedStyle() const
|
| + {
|
| + DCHECK(!(layoutObject() && m_computedStyle));
|
| + if (layoutObject())
|
| + return layoutObject()->mutableStyle();
|
| + return m_computedStyle.get();
|
| + }
|
| + void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
|
| + {
|
| + if (layoutObject())
|
| + layoutObject()->setStyleInternal(computedStyle);
|
| + else
|
| + m_computedStyle = computedStyle;
|
| + }
|
| + void clearComputedStyle() { setComputedStyle(nullptr); }
|
|
|
| ClassList* classList() const { return m_classList.get(); }
|
| void setClassList(ClassList* classList) { m_classList = classList; }
|
|
|