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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef NodeRareData_h 22 #ifndef NodeRareData_h
23 #define NodeRareData_h 23 #define NodeRareData_h
24 24
25 #include "core/dom/MutationObserverRegistration.h" 25 #include "core/dom/MutationObserverRegistration.h"
26 #include "core/dom/NodeListsNodeData.h" 26 #include "core/dom/NodeListsNodeData.h"
27 #include "core/style/ComputedStyle.h"
Timothy Loh 2016/06/23 23:58:02 not needed?
27 #include "platform/heap/Handle.h" 28 #include "platform/heap/Handle.h"
28 #include "wtf/HashSet.h" 29 #include "wtf/HashSet.h"
29 30
30 namespace blink { 31 namespace blink {
31 32
32 class NodeMutationObserverData final : public GarbageCollected<NodeMutationObser verData> { 33 class NodeMutationObserverData final : public GarbageCollected<NodeMutationObser verData> {
33 WTF_MAKE_NONCOPYABLE(NodeMutationObserverData); 34 WTF_MAKE_NONCOPYABLE(NodeMutationObserverData);
34 public: 35 public:
35 HeapVector<Member<MutationObserverRegistration>> registry; 36 HeapVector<Member<MutationObserverRegistration>> registry;
36 HeapHashSet<Member<MutationObserverRegistration>> transientRegistry; 37 HeapHashSet<Member<MutationObserverRegistration>> transientRegistry;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 87 }
87 88
88 unsigned connectedSubframeCount() const { return m_connectedFrameCount; } 89 unsigned connectedSubframeCount() const { return m_connectedFrameCount; }
89 void incrementConnectedSubframeCount(); 90 void incrementConnectedSubframeCount();
90 void decrementConnectedSubframeCount() 91 void decrementConnectedSubframeCount()
91 { 92 {
92 DCHECK(m_connectedFrameCount); 93 DCHECK(m_connectedFrameCount);
93 --m_connectedFrameCount; 94 --m_connectedFrameCount;
94 } 95 }
95 96
97 bool isElementRareData() const { return m_isElementRareData; }
98
96 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask; } 99 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask; }
97 void setElementFlag(ElementFlags mask, bool value) { m_elementFlags = (m_ele mentFlags & ~mask) | (-(int32_t)value & mask); } 100 void setElementFlag(ElementFlags mask, bool value) { m_elementFlags = (m_ele mentFlags & ~mask) | (-(int32_t)value & mask); }
98 void clearElementFlag(ElementFlags mask) { m_elementFlags &= ~mask; } 101 void clearElementFlag(ElementFlags mask) { m_elementFlags &= ~mask; }
99 102
100 bool hasRestyleFlag(DynamicRestyleFlags mask) const { return m_restyleFlags & mask; } 103 bool hasRestyleFlag(DynamicRestyleFlags mask) const { return m_restyleFlags & mask; }
101 void setRestyleFlag(DynamicRestyleFlags mask) { m_restyleFlags |= mask; RELE ASE_ASSERT(m_restyleFlags); } 104 void setRestyleFlag(DynamicRestyleFlags mask) { m_restyleFlags |= mask; RELE ASE_ASSERT(m_restyleFlags); }
102 bool hasRestyleFlags() const { return m_restyleFlags; } 105 bool hasRestyleFlags() const { return m_restyleFlags; }
103 void clearRestyleFlags() { m_restyleFlags = 0; } 106 void clearRestyleFlags() { m_restyleFlags = 0; }
104 107
105 enum { 108 enum {
(...skipping 24 matching lines...) Expand all
130 unsigned m_connectedFrameCount : ConnectedFrameCountBits; 133 unsigned m_connectedFrameCount : ConnectedFrameCountBits;
131 unsigned m_elementFlags : NumberOfElementFlags; 134 unsigned m_elementFlags : NumberOfElementFlags;
132 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; 135 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags;
133 protected: 136 protected:
134 unsigned m_isElementRareData : 1; 137 unsigned m_isElementRareData : 1;
135 }; 138 };
136 139
137 } // namespace blink 140 } // namespace blink
138 141
139 #endif // NodeRareData_h 142 #endif // NodeRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698