| 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/StringKeyframe.h" | 6 #include "core/animation/StringKeyframe.h" |
| 7 | 7 |
| 8 #include "core/animation/ColorStyleInterpolation.h" | 8 #include "core/animation/ColorStyleInterpolation.h" |
| 9 #include "core/animation/CompositorAnimations.h" | 9 #include "core/animation/CompositorAnimations.h" |
| 10 #include "core/animation/ConstantStyleInterpolation.h" | 10 #include "core/animation/ConstantStyleInterpolation.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 case CSSPropertyFloodOpacity: | 104 case CSSPropertyFloodOpacity: |
| 105 case CSSPropertyStopOpacity: | 105 case CSSPropertyStopOpacity: |
| 106 case CSSPropertyStrokeOpacity: | 106 case CSSPropertyStrokeOpacity: |
| 107 case CSSPropertyShapeImageThreshold: | 107 case CSSPropertyShapeImageThreshold: |
| 108 return RangeZeroToOne; | 108 return RangeZeroToOne; |
| 109 case CSSPropertyFillOpacity: | 109 case CSSPropertyFillOpacity: |
| 110 case CSSPropertyOpacity: | 110 case CSSPropertyOpacity: |
| 111 return RangeOpacityFIXME; | 111 return RangeOpacityFIXME; |
| 112 case CSSPropertyStrokeMiterlimit: | 112 case CSSPropertyStrokeMiterlimit: |
| 113 return RangeGreaterThanOrEqualToOne; | 113 return RangeGreaterThanOrEqualToOne; |
| 114 case CSSPropertyFontSizeAdjust: |
| 115 return RangeNonNegative; |
| 114 default: | 116 default: |
| 115 ASSERT_NOT_REACHED(); | 117 ASSERT_NOT_REACHED(); |
| 116 return RangeAll; | 118 return RangeAll; |
| 117 } | 119 } |
| 118 } | 120 } |
| 119 | 121 |
| 120 } // namespace | 122 } // namespace |
| 121 | 123 |
| 122 // FIXME: Refactor this into a generic piece that lives in InterpolationEffect,
and a template parameter specific converter. | 124 // FIXME: Refactor this into a generic piece that lives in InterpolationEffect,
and a template parameter specific converter. |
| 123 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::
maybeCreateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyfr
ame& end, Element* element) const | 125 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::
maybeCreateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyfr
ame& end, Element* element) const |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 fallBackToLegacy = true; | 208 fallBackToLegacy = true; |
| 207 | 209 |
| 208 break; | 210 break; |
| 209 case CSSPropertyOrphans: | 211 case CSSPropertyOrphans: |
| 210 case CSSPropertyWidows: | 212 case CSSPropertyWidows: |
| 211 case CSSPropertyZIndex: | 213 case CSSPropertyZIndex: |
| 212 case CSSPropertyWebkitColumnCount: | 214 case CSSPropertyWebkitColumnCount: |
| 213 case CSSPropertyShapeImageThreshold: | 215 case CSSPropertyShapeImageThreshold: |
| 214 case CSSPropertyFillOpacity: | 216 case CSSPropertyFillOpacity: |
| 215 case CSSPropertyFloodOpacity: | 217 case CSSPropertyFloodOpacity: |
| 218 case CSSPropertyFontSizeAdjust: |
| 216 case CSSPropertyOpacity: | 219 case CSSPropertyOpacity: |
| 217 case CSSPropertyStopOpacity: | 220 case CSSPropertyStopOpacity: |
| 218 case CSSPropertyStrokeOpacity: | 221 case CSSPropertyStrokeOpacity: |
| 219 case CSSPropertyStrokeMiterlimit: | 222 case CSSPropertyStrokeMiterlimit: |
| 220 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl
eInterpolation::canCreateFrom(*toCSSValue)) | 223 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl
eInterpolation::canCreateFrom(*toCSSValue)) |
| 221 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property)
); | 224 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property)
); |
| 222 break; | 225 break; |
| 223 | 226 |
| 224 case CSSPropertyMotionRotation: { | 227 case CSSPropertyMotionRotation: { |
| 225 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati
on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property); | 228 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati
on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 390 } |
| 388 | 391 |
| 389 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 392 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 390 { | 393 { |
| 391 visitor->trace(m_value); | 394 visitor->trace(m_value); |
| 392 visitor->trace(m_animatableValueCache); | 395 visitor->trace(m_animatableValueCache); |
| 393 Keyframe::PropertySpecificKeyframe::trace(visitor); | 396 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 394 } | 397 } |
| 395 | 398 |
| 396 } | 399 } |
| OLD | NEW |