| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3311 return hasTransformOperations() || hasOffset() || | 3311 return hasTransformOperations() || hasOffset() || |
| 3312 hasCurrentTransformAnimation() || translate() || rotate() || scale(); | 3312 hasCurrentTransformAnimation() || translate() || rotate() || scale(); |
| 3313 } | 3313 } |
| 3314 bool hasTransformOperations() const { | 3314 bool hasTransformOperations() const { |
| 3315 return !m_rareNonInheritedData->m_transform->m_operations.operations() | 3315 return !m_rareNonInheritedData->m_transform->m_operations.operations() |
| 3316 .isEmpty(); | 3316 .isEmpty(); |
| 3317 } | 3317 } |
| 3318 ETransformStyle3D usedTransformStyle3D() const { | 3318 ETransformStyle3D usedTransformStyle3D() const { |
| 3319 return hasGroupingProperty() ? TransformStyle3DFlat : transformStyle3D(); | 3319 return hasGroupingProperty() ? TransformStyle3DFlat : transformStyle3D(); |
| 3320 } | 3320 } |
| 3321 // Returns whether the transform operations for |otherStyle| differ from the |
| 3322 // operations for this style instance. Note that callers may want to also |
| 3323 // check hasTransform(), as it is possible for two styles to have matching |
| 3324 // transform operations but differ in other transform-impacting style |
| 3325 // respects. |
| 3321 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { | 3326 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { |
| 3322 return m_rareNonInheritedData->m_transform == | 3327 return m_rareNonInheritedData->m_transform == |
| 3323 otherStyle.m_rareNonInheritedData->m_transform; | 3328 otherStyle.m_rareNonInheritedData->m_transform; |
| 3324 } | 3329 } |
| 3325 bool preserves3D() const { | 3330 bool preserves3D() const { |
| 3326 return usedTransformStyle3D() != TransformStyle3DFlat; | 3331 return usedTransformStyle3D() != TransformStyle3DFlat; |
| 3327 } | 3332 } |
| 3328 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }; | 3333 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }; |
| 3329 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; | 3334 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; |
| 3330 enum ApplyIndependentTransformProperties { | 3335 enum ApplyIndependentTransformProperties { |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3721 const StyleImage*, | 3726 const StyleImage*, |
| 3722 const ComputedStyle& other) const; | 3727 const ComputedStyle& other) const; |
| 3723 bool diffNeedsPaintInvalidationSelection(const ComputedStyle& other) const; | 3728 bool diffNeedsPaintInvalidationSelection(const ComputedStyle& other) const; |
| 3724 void updatePropertySpecificDifferences(const ComputedStyle& other, | 3729 void updatePropertySpecificDifferences(const ComputedStyle& other, |
| 3725 StyleDifference&) const; | 3730 StyleDifference&) const; |
| 3726 | 3731 |
| 3727 static bool shadowListHasCurrentColor(const ShadowList*); | 3732 static bool shadowListHasCurrentColor(const ShadowList*); |
| 3728 | 3733 |
| 3729 StyleInheritedVariables& mutableInheritedVariables(); | 3734 StyleInheritedVariables& mutableInheritedVariables(); |
| 3730 StyleNonInheritedVariables& mutableNonInheritedVariables(); | 3735 StyleNonInheritedVariables& mutableNonInheritedVariables(); |
| 3736 |
| 3737 FRIEND_TEST_ALL_PREFIXES( |
| 3738 ComputedStyleTest, |
| 3739 UpdatePropertySpecificDifferencesRespectsTransformAnimation); |
| 3731 }; | 3740 }; |
| 3732 | 3741 |
| 3733 // FIXME: Reduce/remove the dependency on zoom adjusted int values. | 3742 // FIXME: Reduce/remove the dependency on zoom adjusted int values. |
| 3734 // The float or LayoutUnit versions of layout values should be used. | 3743 // The float or LayoutUnit versions of layout values should be used. |
| 3735 int adjustForAbsoluteZoom(int value, float zoomFactor); | 3744 int adjustForAbsoluteZoom(int value, float zoomFactor); |
| 3736 | 3745 |
| 3737 inline int adjustForAbsoluteZoom(int value, const ComputedStyle* style) { | 3746 inline int adjustForAbsoluteZoom(int value, const ComputedStyle* style) { |
| 3738 float zoomFactor = style->effectiveZoom(); | 3747 float zoomFactor = style->effectiveZoom(); |
| 3739 if (zoomFactor == 1) | 3748 if (zoomFactor == 1) |
| 3740 return value; | 3749 return value; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3815 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3824 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3816 } | 3825 } |
| 3817 | 3826 |
| 3818 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3827 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3819 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3828 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3820 } | 3829 } |
| 3821 | 3830 |
| 3822 } // namespace blink | 3831 } // namespace blink |
| 3823 | 3832 |
| 3824 #endif // ComputedStyle_h | 3833 #endif // ComputedStyle_h |
| OLD | NEW |