Chromium Code Reviews| Index: Source/core/rendering/style/RenderStyle.h |
| diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h |
| index cd4d83ee04c09f840422195a969b7300f6013f50..2d6be261b436255152437ec27fecd0425def9ad3 100644 |
| --- a/Source/core/rendering/style/RenderStyle.h |
| +++ b/Source/core/rendering/style/RenderStyle.h |
| @@ -258,8 +258,9 @@ protected: |
| unsigned styleType : 6; // PseudoId |
| unsigned pseudoBits : 8; |
| - unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property |
| - unsigned unique : 1; // Style can not be shared. |
| + // FIXME: This should be moved to ElementRateData. |
|
rune
2015/01/29 23:16:32
ElementRareData.
Julien - ping for review
2015/02/10 07:33:19
Done.
|
| + mutable unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property |
| + mutable unsigned unique : 1; // Style can not be shared. |
| unsigned emptyState : 1; |
| @@ -884,12 +885,12 @@ public: |
| bool hasCurrentOpacityAnimation() const { return rareNonInheritedData->m_hasCurrentOpacityAnimation; } |
| bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_hasCurrentTransformAnimation; } |
| bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasCurrentFilterAnimation; } |
| - bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimation() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); } |
| + bool shouldCompositeForCurrentAnimations() const { return hasCurrentOpacityAnimation() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); } |
| bool isRunningOpacityAnimationOnCompositor() const { return rareNonInheritedData->m_runningOpacityAnimationOnCompositor; } |
| bool isRunningTransformAnimationOnCompositor() const { return rareNonInheritedData->m_runningTransformAnimationOnCompositor; } |
| bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedData->m_runningFilterAnimationOnCompositor; } |
| - bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimationOnCompositor(); } |
| + bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimationOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimationOnCompositor(); } |
| LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxContain; } |
| const LineClampValue& lineClamp() const { return rareNonInheritedData->lineClamp; } |
| @@ -1276,7 +1277,7 @@ public: |
| // For valid values of column-break-inside see http://www.w3.org/TR/css3-multicol/#break-before-break-after-break-inside |
| void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); } |
| void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakAfter, p); } |
| - void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData.access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; } |
| + void inheritColumnPropertiesFrom(const RenderStyle& parent) { rareNonInheritedData.access()->m_multiCol = parent.rareNonInheritedData->m_multiCol; } |
| void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInlineTransform, b); } |
| void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_transform, m_operations, ops); } |
| void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrigin(v, transformOriginY(), transformOriginZ())); } |
| @@ -1455,7 +1456,7 @@ public: |
| // A unique style is one that has matches something that makes it impossible to share. |
| bool unique() const { return noninherited_flags.unique; } |
| - void setUnique() { noninherited_flags.unique = true; } |
| + void setUnique() const { noninherited_flags.unique = true; } |
| bool isSharable() const; |
| @@ -1464,7 +1465,7 @@ public: |
| Color visitedDependentColor(int colorProperty) const; |
| - void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInheritance = true; } |
| + void setHasExplicitlyInheritedProperties() const { noninherited_flags.explicitInheritance = true; } |
| bool hasExplicitlyInheritedProperties() const { return noninherited_flags.explicitInheritance; } |
| bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RESIZE_NONE; } |