Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: third_party/WebKit/Source/core/dom/NodeRareData.cpp

Issue 1962953002: Storage of ComputedStyle separate from LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed ComputedStyle from NodeRareData, instead use existing ComputedStyle from ElementRareData Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a3df69a1c7b1289dcaa74647e2809621e1b9394a 100644
--- a/third_party/WebKit/Source/core/dom/NodeRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/NodeRareData.cpp
@@ -34,6 +34,7 @@
#include "core/dom/Element.h"
#include "core/dom/ElementRareData.h"
#include "core/frame/FrameHost.h"
+#include "core/layout/LayoutObject.h"
Timothy Loh 2016/06/23 23:58:02 not needed?
#include "platform/heap/Handle.h"
namespace blink {
@@ -58,7 +59,7 @@ DEFINE_TRACE_AFTER_DISPATCH(NodeRareData)
DEFINE_TRACE(NodeRareData)
{
- if (m_isElementRareData)
+ if (isElementRareData())
static_cast<ElementRareData*>(this)->traceAfterDispatch(visitor);
else
traceAfterDispatch(visitor);
@@ -66,7 +67,7 @@ DEFINE_TRACE(NodeRareData)
DEFINE_TRACE_WRAPPERS(NodeRareData)
{
- if (m_isElementRareData)
+ if (isElementRareData())
static_cast<const ElementRareData*>(this)->traceWrappersAfterDispatch(visitor);
else
traceWrappersAfterDispatch(visitor);
@@ -81,7 +82,7 @@ DEFINE_TRACE_WRAPPERS_AFTER_DISPATCH(NodeRareData)
void NodeRareData::finalizeGarbageCollectedObject()
{
RELEASE_ASSERT(!layoutObject());
- if (m_isElementRareData)
+ if (isElementRareData())
static_cast<ElementRareData*>(this)->~ElementRareData();
else
this->~NodeRareData();

Powered by Google App Engine
This is Rietveld 408576698