OLD | NEW |
---|---|
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, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 NodeMutationObserverData& ensureMutationObserverData() | 77 NodeMutationObserverData& ensureMutationObserverData() |
78 { | 78 { |
79 if (!m_mutationObserverData) | 79 if (!m_mutationObserverData) |
80 m_mutationObserverData = NodeMutationObserverData::create(); | 80 m_mutationObserverData = NodeMutationObserverData::create(); |
81 return *m_mutationObserverData; | 81 return *m_mutationObserverData; |
82 } | 82 } |
83 | 83 |
84 unsigned connectedSubframeCount() const { return m_connectedFrameCount; } | 84 unsigned connectedSubframeCount() const { return m_connectedFrameCount; } |
85 void incrementConnectedSubframeCount(unsigned amount) | 85 void incrementConnectedSubframeCount(unsigned amount) |
86 { | 86 { |
87 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION((m_connectedFrameCount + amount ) < (1 << ConnectedFrameCountBits)); | |
dcheng
2015/06/10 22:08:05
Would it make sense to use maxNumberOfFrames here
Nate Chapin
2015/06/10 22:13:47
I don't feel strongly, though this impl would need
| |
87 m_connectedFrameCount += amount; | 88 m_connectedFrameCount += amount; |
88 } | 89 } |
89 void decrementConnectedSubframeCount(unsigned amount) | 90 void decrementConnectedSubframeCount(unsigned amount) |
90 { | 91 { |
91 ASSERT(m_connectedFrameCount); | 92 ASSERT(m_connectedFrameCount); |
92 ASSERT(amount <= m_connectedFrameCount); | 93 ASSERT(amount <= m_connectedFrameCount); |
93 m_connectedFrameCount -= amount; | 94 m_connectedFrameCount -= amount; |
94 } | 95 } |
95 | 96 |
96 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask; } | 97 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask; } |
(...skipping 30 matching lines...) Expand all Loading... | |
127 unsigned m_connectedFrameCount : ConnectedFrameCountBits; | 128 unsigned m_connectedFrameCount : ConnectedFrameCountBits; |
128 unsigned m_elementFlags : NumberOfElementFlags; | 129 unsigned m_elementFlags : NumberOfElementFlags; |
129 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; | 130 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; |
130 protected: | 131 protected: |
131 unsigned m_isElementRareData : 1; | 132 unsigned m_isElementRareData : 1; |
132 }; | 133 }; |
133 | 134 |
134 } // namespace blink | 135 } // namespace blink |
135 | 136 |
136 #endif // NodeRareData_h | 137 #endif // NodeRareData_h |
OLD | NEW |