| 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 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class StyleDifference { | 13 class StyleDifference { |
| 14 STACK_ALLOCATED(); | 14 STACK_ALLOCATED(); |
| 15 | 15 |
| 16 public: | 16 public: |
| 17 enum PropertyDifference { | 17 enum PropertyDifference { |
| 18 TransformChanged = 1 << 0, | 18 TransformChanged = 1 << 0, |
| 19 OpacityChanged = 1 << 1, | 19 OpacityChanged = 1 << 1, |
| 20 ZIndexChanged = 1 << 2, | 20 ZIndexChanged = 1 << 2, |
| 21 FilterChanged = 1 << 3, | 21 FilterChanged = 1 << 3, |
| 22 BackdropFilterChanged = 1 << 4, | 22 BackdropFilterChanged = 1 << 4, |
| 23 // The object needs to issue paint invalidations if it is affected by text d
ecorations or properties dependent on color (e.g., border or outline). | 23 // The object needs to issue paint invalidations if it is affected by text |
| 24 // decorations or properties dependent on color (e.g., border or outline). |
| 24 TextDecorationOrColorChanged = 1 << 5, | 25 TextDecorationOrColorChanged = 1 << 5, |
| 25 // If you add a value here, be sure to update the number of bits on m_proper
tySpecificDifferences. | 26 // If you add a value here, be sure to update the number of bits on |
| 27 // m_propertySpecificDifferences. |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 StyleDifference() | 30 StyleDifference() |
| 29 : m_paintInvalidationType(NoPaintInvalidation), | 31 : m_paintInvalidationType(NoPaintInvalidation), |
| 30 m_layoutType(NoLayout), | 32 m_layoutType(NoLayout), |
| 31 m_recomputeOverflow(false), | 33 m_recomputeOverflow(false), |
| 32 m_propertySpecificDifferences(0), | 34 m_propertySpecificDifferences(0), |
| 33 m_scrollAnchorDisablingPropertyChanged(false) {} | 35 m_scrollAnchorDisablingPropertyChanged(false) {} |
| 34 | 36 |
| 35 bool hasDifference() const { | 37 bool hasDifference() const { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; | 141 enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout }; |
| 140 unsigned m_layoutType : 2; | 142 unsigned m_layoutType : 2; |
| 141 unsigned m_recomputeOverflow : 1; | 143 unsigned m_recomputeOverflow : 1; |
| 142 unsigned m_propertySpecificDifferences : 6; | 144 unsigned m_propertySpecificDifferences : 6; |
| 143 unsigned m_scrollAnchorDisablingPropertyChanged : 1; | 145 unsigned m_scrollAnchorDisablingPropertyChanged : 1; |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 } // namespace blink | 148 } // namespace blink |
| 147 | 149 |
| 148 #endif // StyleDifference_h | 150 #endif // StyleDifference_h |
| OLD | NEW |