| Index: third_party/WebKit/Source/core/dom/NodeRareData.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/NodeRareData.cpp b/third_party/WebKit/Source/core/dom/NodeRareData.cpp
|
| index 9b60294078ea8b616eea30788713dc43b17fbd64..5ce83ba0df7ad16f4fe8555dbc0467efd57a8219 100644
|
| --- a/third_party/WebKit/Source/core/dom/NodeRareData.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/NodeRareData.cpp
|
| @@ -34,12 +34,14 @@
|
| #include "core/dom/Element.h"
|
| #include "core/dom/ElementRareData.h"
|
| #include "core/frame/FrameHost.h"
|
| +#include "core/layout/LayoutObject.h"
|
| #include "platform/heap/Handle.h"
|
|
|
| namespace blink {
|
|
|
| struct SameSizeAsNodeRareData {
|
| void* m_pointer;
|
| + RefPtr<void*> m_refPtr;
|
| Member<void*> m_willbeMember[2];
|
| unsigned m_bitfields;
|
| };
|
| @@ -78,9 +80,25 @@ DEFINE_TRACE_WRAPPERS_AFTER_DISPATCH(NodeRareData)
|
| visitor->traceWrappers(m_mutationObserverData);
|
| }
|
|
|
| +ComputedStyle* NodeRareData::computedStyle() const
|
| +{
|
| + if (m_layoutObject)
|
| + return m_layoutObject->mutableStyle();
|
| + return m_computedStyle.get();
|
| +}
|
| +
|
| +void NodeRareData::setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
|
| +{
|
| + if (m_layoutObject)
|
| + m_layoutObject->setStyleInternal(computedStyle);
|
| + else
|
| + m_computedStyle = computedStyle;
|
| +}
|
| +
|
| void NodeRareData::finalizeGarbageCollectedObject()
|
| {
|
| RELEASE_ASSERT(!layoutObject());
|
| + CHECK(!computedStyle());
|
| if (m_isElementRareData)
|
| static_cast<ElementRareData*>(this)->~ElementRareData();
|
| else
|
|
|