| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 bool hasAtMostPropertySpecificDifferences( | 42 bool hasAtMostPropertySpecificDifferences( |
| 43 unsigned propertyDifferences) const { | 43 unsigned propertyDifferences) const { |
| 44 return !m_paintInvalidationType && !m_layoutType && | 44 return !m_paintInvalidationType && !m_layoutType && |
| 45 !(m_propertySpecificDifferences & ~propertyDifferences); | 45 !(m_propertySpecificDifferences & ~propertyDifferences); |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool needsPaintInvalidation() const { | 48 bool needsPaintInvalidation() const { |
| 49 return m_paintInvalidationType != NoPaintInvalidation; | 49 return m_paintInvalidationType != NoPaintInvalidation; |
| 50 } | 50 } |
| 51 void clearNeedsPaintInvalidation() { | |
| 52 m_paintInvalidationType = NoPaintInvalidation; | |
| 53 } | |
| 54 | 51 |
| 55 // The object just needs to issue paint invalidations. | 52 // The object just needs to issue paint invalidations. |
| 56 bool needsPaintInvalidationObject() const { | 53 bool needsPaintInvalidationObject() const { |
| 57 return m_paintInvalidationType == PaintInvalidationObject; | 54 return m_paintInvalidationType == PaintInvalidationObject; |
| 58 } | 55 } |
| 59 void setNeedsPaintInvalidationObject() { | 56 void setNeedsPaintInvalidationObject() { |
| 60 ASSERT(!needsPaintInvalidationSubtree()); | 57 ASSERT(!needsPaintInvalidationSubtree()); |
| 61 m_paintInvalidationType = PaintInvalidationObject; | 58 m_paintInvalidationType = PaintInvalidationObject; |
| 62 } | 59 } |
| 63 | 60 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; | 138 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; |
| 142 unsigned m_layoutType : 2; | 139 unsigned m_layoutType : 2; |
| 143 unsigned m_recomputeOverflow : 1; | 140 unsigned m_recomputeOverflow : 1; |
| 144 unsigned m_propertySpecificDifferences : 6; | 141 unsigned m_propertySpecificDifferences : 6; |
| 145 unsigned m_scrollAnchorDisablingPropertyChanged : 1; | 142 unsigned m_scrollAnchorDisablingPropertyChanged : 1; |
| 146 }; | 143 }; |
| 147 | 144 |
| 148 } // namespace blink | 145 } // namespace blink |
| 149 | 146 |
| 150 #endif // StyleDifference_h | 147 #endif // StyleDifference_h |
| OLD | NEW |