OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef StyleDifference_h | 5 #ifndef StyleDifference_h |
6 #define StyleDifference_h | 6 #define StyleDifference_h |
7 | 7 |
8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 (!m_recomputeOverflow && !m_scrollAnchorDisablingPropertyChanged)); | 44 (!m_recomputeOverflow && !m_scrollAnchorDisablingPropertyChanged)); |
45 return result; | 45 return result; |
46 } | 46 } |
47 | 47 |
48 bool hasAtMostPropertySpecificDifferences( | 48 bool hasAtMostPropertySpecificDifferences( |
49 unsigned propertyDifferences) const { | 49 unsigned propertyDifferences) const { |
50 return !m_paintInvalidationType && !m_layoutType && | 50 return !m_paintInvalidationType && !m_layoutType && |
51 !(m_propertySpecificDifferences & ~propertyDifferences); | 51 !(m_propertySpecificDifferences & ~propertyDifferences); |
52 } | 52 } |
53 | 53 |
54 bool needsPaintInvalidation() const { | 54 bool needsPaintInvalidation() const { |
mstensho (USE GERRIT)
2017/03/02 19:35:26
Shouldn't this be renamed to needsFullPaintInvalid
rune
2017/03/03 09:13:09
Done.
| |
55 return m_paintInvalidationType != NoPaintInvalidation; | 55 return m_paintInvalidationType > PaintInvalidationSelection; |
mstensho (USE GERRIT)
2017/03/02 19:35:26
... and to make it more obvious that selection inv
rune
2017/03/03 09:13:09
Done.
| |
56 } | 56 } |
57 | 57 |
58 // The text selection needs paint invalidation. | 58 // The text selection needs paint invalidation. |
59 bool needsPaintInvalidationSelection() const { | 59 bool needsPaintInvalidationSelection() const { |
60 return m_paintInvalidationType == PaintInvalidationSelection; | 60 return m_paintInvalidationType == PaintInvalidationSelection; |
61 } | 61 } |
62 void setNeedsPaintInvalidationSelection() { | 62 void setNeedsPaintInvalidationSelection() { |
63 if (!needsPaintInvalidation()) | 63 if (!needsPaintInvalidation()) |
64 m_paintInvalidationType = PaintInvalidationSelection; | 64 m_paintInvalidationType = PaintInvalidationSelection; |
65 } | 65 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; | 159 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; |
160 unsigned m_layoutType : 2; | 160 unsigned m_layoutType : 2; |
161 unsigned m_recomputeOverflow : 1; | 161 unsigned m_recomputeOverflow : 1; |
162 unsigned m_propertySpecificDifferences : 7; | 162 unsigned m_propertySpecificDifferences : 7; |
163 unsigned m_scrollAnchorDisablingPropertyChanged : 1; | 163 unsigned m_scrollAnchorDisablingPropertyChanged : 1; |
164 }; | 164 }; |
165 | 165 |
166 } // namespace blink | 166 } // namespace blink |
167 | 167 |
168 #endif // StyleDifference_h | 168 #endif // StyleDifference_h |
OLD | NEW |