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

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

Issue 1962953002: Storage of ComputedStyle separate from LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs to remove redundant ComputedStyle members Created 4 years, 7 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.h
diff --git a/third_party/WebKit/Source/core/dom/NodeRareData.h b/third_party/WebKit/Source/core/dom/NodeRareData.h
index f8d77595b6bbc7ad4f264b86e39a6d563dd6cf80..764e8d2d8e2d7b78b88fb58acf1cc35ad1b178e5 100644
--- a/third_party/WebKit/Source/core/dom/NodeRareData.h
+++ b/third_party/WebKit/Source/core/dom/NodeRareData.h
@@ -24,6 +24,7 @@
#include "core/dom/MutationObserverRegistration.h"
#include "core/dom/NodeListsNodeData.h"
+#include "core/style/ComputedStyle.h"
#include "platform/heap/Handle.h"
#include "wtf/HashSet.h"
#include "wtf/OwnPtr.h"
@@ -104,6 +105,9 @@ public:
bool hasRestyleFlags() const { return m_restyleFlags; }
void clearRestyleFlags() { m_restyleFlags = 0; }
+ CORE_EXPORT ComputedStyle* computedStyle() const;
+ void setComputedStyle(PassRefPtr<ComputedStyle>);
+
enum {
ConnectedFrameCountBits = 10, // Must fit Page::maxNumberOfFrames.
};
@@ -119,6 +123,7 @@ public:
protected:
explicit NodeRareData(LayoutObject* layoutObject)
: NodeRareDataBase(layoutObject)
+ , m_computedStyle(nullptr)
, m_connectedFrameCount(0)
, m_elementFlags(0)
, m_restyleFlags(0)
@@ -128,6 +133,7 @@ protected:
private:
Member<NodeListsNodeData> m_nodeLists;
Member<NodeMutationObserverData> m_mutationObserverData;
+ RefPtr<ComputedStyle> m_computedStyle;
unsigned m_connectedFrameCount : ConnectedFrameCountBits;
unsigned m_elementFlags : NumberOfElementFlags;

Powered by Google App Engine
This is Rietveld 408576698