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 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 6 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
7 | 7 |
8 #include "core/animation/ElementAnimations.h" | 8 #include "core/animation/ElementAnimations.h" |
9 #include "core/animation/css/CSSAnimatableValueFactory.h" | 9 #include "core/animation/css/CSSAnimatableValueFactory.h" |
10 #include "core/css/CSSBasicShapes.h" | 10 #include "core/css/CSSBasicShapes.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 || lengthArray[CSSPrimitiveValue::UnitTypeFontXSize] != 0 | 78 || lengthArray[CSSPrimitiveValue::UnitTypeFontXSize] != 0 |
79 || lengthArray[CSSPrimitiveValue::UnitTypeRootFontSize] != 0 | 79 || lengthArray[CSSPrimitiveValue::UnitTypeRootFontSize] != 0 |
80 || lengthArray[CSSPrimitiveValue::UnitTypeZeroCharacterWidth] != 0 | 80 || lengthArray[CSSPrimitiveValue::UnitTypeZeroCharacterWidth] != 0 |
81 || lengthArray[CSSPrimitiveValue::UnitTypeViewportWidth] != 0 | 81 || lengthArray[CSSPrimitiveValue::UnitTypeViewportWidth] != 0 |
82 || lengthArray[CSSPrimitiveValue::UnitTypeViewportHeight] != 0 | 82 || lengthArray[CSSPrimitiveValue::UnitTypeViewportHeight] != 0 |
83 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMin] != 0 | 83 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMin] != 0 |
84 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMax] != 0; | 84 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMax] != 0; |
85 } | 85 } |
86 | 86 |
87 if (Pair* pair = primitiveValue.getPairValue()) { | 87 if (Pair* pair = primitiveValue.getPairValue()) { |
88 return interpolationRequiresStyleResolve(*pair->first()) | 88 return interpolationRequiresStyleResolve(pair->first()) |
89 || interpolationRequiresStyleResolve(*pair->second()); | 89 || interpolationRequiresStyleResolve(pair->second()); |
90 } | 90 } |
91 | 91 |
92 if (Rect* rect = primitiveValue.getRectValue()) { | 92 if (Rect* rect = primitiveValue.getRectValue()) { |
93 return interpolationRequiresStyleResolve(*rect->top()) | 93 return interpolationRequiresStyleResolve(rect->top()) |
94 || interpolationRequiresStyleResolve(*rect->right()) | 94 || interpolationRequiresStyleResolve(rect->right()) |
95 || interpolationRequiresStyleResolve(*rect->bottom()) | 95 || interpolationRequiresStyleResolve(rect->bottom()) |
96 || interpolationRequiresStyleResolve(*rect->left()); | 96 || interpolationRequiresStyleResolve(rect->left()); |
97 } | 97 } |
98 | 98 |
99 if (Quad* quad = primitiveValue.getQuadValue()) { | 99 if (Quad* quad = primitiveValue.getQuadValue()) { |
100 return interpolationRequiresStyleResolve(*quad->top()) | 100 return interpolationRequiresStyleResolve(quad->top()) |
101 || interpolationRequiresStyleResolve(*quad->right()) | 101 || interpolationRequiresStyleResolve(quad->right()) |
102 || interpolationRequiresStyleResolve(*quad->bottom()) | 102 || interpolationRequiresStyleResolve(quad->bottom()) |
103 || interpolationRequiresStyleResolve(*quad->left()); | 103 || interpolationRequiresStyleResolve(quad->left()); |
104 } | 104 } |
105 | 105 |
106 if (primitiveValue.isShape()) | 106 if (primitiveValue.isShape()) |
107 return interpolationRequiresStyleResolve(*primitiveValue.getShapeValue()
); | 107 return interpolationRequiresStyleResolve(*primitiveValue.getShapeValue()
); |
108 | 108 |
109 CSSValueID id = primitiveValue.getValueID(); | 109 CSSValueID id = primitiveValue.getValueID(); |
110 bool isColor = ((id >= CSSValueAqua && id <= CSSValueTransparent) | 110 bool isColor = ((id >= CSSValueAqua && id <= CSSValueTransparent) |
111 || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) | 111 || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) |
112 || id == CSSValueGrey); | 112 || id == CSSValueGrey); |
113 return (id != CSSValueNone) && !isColor; | 113 return (id != CSSValueNone) && !isColor; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 DEFINE_TRACE(DeferredLegacyStyleInterpolation) | 152 DEFINE_TRACE(DeferredLegacyStyleInterpolation) |
153 { | 153 { |
154 visitor->trace(m_startCSSValue); | 154 visitor->trace(m_startCSSValue); |
155 visitor->trace(m_endCSSValue); | 155 visitor->trace(m_endCSSValue); |
156 visitor->trace(m_innerInterpolation); | 156 visitor->trace(m_innerInterpolation); |
157 StyleInterpolation::trace(visitor); | 157 StyleInterpolation::trace(visitor); |
158 } | 158 } |
159 | 159 |
160 } | 160 } |
OLD | NEW |