Index: Source/core/dom/Node.h |
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h |
index dc0b0f822e42ab36d19932514ce099a62915f44f..12e86142295fef1993c0eff9c131e6c1288e32c5 100644 |
--- a/Source/core/dom/Node.h |
+++ b/Source/core/dom/Node.h |
@@ -101,6 +101,12 @@ enum StyleChangeType { |
NeedsReattachStyleChange = 3 << nodeStyleChangeShift, |
}; |
+#if ENABLE(OILPAN) && USE_4BYTE_HEADER_PADDING |
+#define NODE_FLAGS reinterpret_cast<HeapObjectHeader*>(reinterpret_cast<uint8_t*>(static_cast<EventTarget*>(const_cast<Node*>(this))) - sizeof(HeapObjectHeader))->m_padding |
+#else |
+#define NODE_FLAGS m_nodeFlags |
+#endif |
+ |
class NodeRareDataBase { |
public: |
LayoutObject* layoutObject() const { return m_layoutObject; } |
@@ -354,7 +360,7 @@ public: |
bool needsAttach() const { return styleChangeType() == NeedsReattachStyleChange; } |
bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; } |
- StyleChangeType styleChangeType() const { return static_cast<StyleChangeType>(m_nodeFlags & StyleChangeMask); } |
+ StyleChangeType styleChangeType() const { return static_cast<StyleChangeType>(NODE_FLAGS & StyleChangeMask); } |
bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFlag); } |
bool isLink() const { return getFlag(IsLinkFlag); } |
bool isEditingText() const { ASSERT(isTextNode()); return getFlag(HasNameOrIsEditingTextFlag); } |
@@ -725,10 +731,10 @@ private: |
// 3 bits remaining. |
- bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } |
- void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); } |
- void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } |
- void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } |
+ bool getFlag(NodeFlags mask) const { return NODE_FLAGS & mask; } |
+ void setFlag(bool f, NodeFlags mask) { NODE_FLAGS = (NODE_FLAGS & ~mask) | (-(int32_t)f & mask); } |
+ void setFlag(NodeFlags mask) { NODE_FLAGS |= mask; } |
+ void clearFlag(NodeFlags mask) { NODE_FLAGS &= ~mask; } |
protected: |
enum ConstructionType { |
@@ -810,7 +816,9 @@ private: |
WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration>>* mutationObserverRegistry(); |
WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration>>* transientMutationObserverRegistry(); |
+#if !(ENABLE(OILPAN) && USE_4BYTE_HEADER_PADDING) |
uint32_t m_nodeFlags; |
+#endif |
RawPtrWillBeMember<ContainerNode> m_parentOrShadowHostNode; |
RawPtrWillBeMember<TreeScope> m_treeScope; |
RawPtrWillBeMember<Node> m_previous; |