Chromium Code Reviews| 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/ConstantStyleInterpolation.h" | 9 #include "core/animation/ConstantStyleInterpolation.h" |
| 10 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 10 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 // FIXME: AnimatableShadow incorrectly animates between inset and non-in set values so it will never indicate it needs default interpolation | 239 // FIXME: AnimatableShadow incorrectly animates between inset and non-in set values so it will never indicate it needs default interpolation |
| 240 if (ShadowStyleInterpolation::usesDefaultStyleInterpolation(*fromCSSValu e, *toCSSValue)) { | 240 if (ShadowStyleInterpolation::usesDefaultStyleInterpolation(*fromCSSValu e, *toCSSValue)) { |
| 241 forceDefaultInterpolation = true; | 241 forceDefaultInterpolation = true; |
| 242 break; | 242 break; |
| 243 } | 243 } |
| 244 | 244 |
| 245 // FIXME: Handle interpolation from/to none, unspecified color values | 245 // FIXME: Handle interpolation from/to none, unspecified color values |
| 246 fallBackToLegacy = true; | 246 fallBackToLegacy = true; |
| 247 | 247 |
| 248 break; | 248 break; |
| 249 | |
| 249 } | 250 } |
| 250 | 251 |
| 251 case CSSPropertyWebkitMaskBoxImageSlice: | |
| 252 if (LengthBoxStyleInterpolation::matchingFill(*toCSSValue, *fromCSSValue ) && LengthBoxStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInt erpolation::canCreateFrom(*toCSSValue)) | |
| 253 return LengthBoxStyleInterpolation::createFromBorderImageSlice(*from CSSValue, *toCSSValue, property); | |
| 254 break; | |
| 255 case CSSPropertyTransform: { | 252 case CSSPropertyTransform: { |
| 256 if (TransformStyleInterpolation::fallBackToLegacy(*fromCSSValue, *toCSSV alue)) { | 253 if (TransformStyleInterpolation::fallBackToLegacy(*fromCSSValue, *toCSSV alue)) { |
| 257 // FIXME: Handle matrices and interpolating to/from CSSValueNone fro m/to CSSValueList | 254 // FIXME: Handle matrices and interpolating to/from CSSValueNone fro m/to CSSValueList |
| 258 fallBackToLegacy = true; | 255 fallBackToLegacy = true; |
| 259 break; | 256 break; |
| 260 } | 257 } |
| 261 RefPtrWillBeRawPtr<Interpolation> interpolation = TransformStyleInterpol ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 258 RefPtrWillBeRawPtr<Interpolation> interpolation = TransformStyleInterpol ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
| 262 if (interpolation) | 259 if (interpolation) |
| 263 return interpolation.release(); | 260 return interpolation.release(); |
| 264 break; | 261 break; |
| 265 } | 262 } |
| 266 | 263 |
| 264 | |
| 265 case CSSPropertyClip: | |
| 266 case CSSPropertyBorderImageSlice: | |
| 267 case CSSPropertyWebkitMaskBoxImageSlice: | |
| 268 { | |
|
Eric Willigers
2015/02/11 03:56:32
Move brace to end of previous line.
jadeg
2015/02/12 05:06:00
Done.
| |
| 269 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInte rpolation::maybeCreateFrom(fromCSSValue, toCSSValue, property); | |
| 270 if (interpolation) | |
| 271 return interpolation.release(); | |
| 272 break; | |
| 273 } | |
|
Eric Willigers
2015/02/11 03:56:32
This brace and the preceding lines can be unindent
jadeg
2015/02/12 05:06:00
Done.
| |
| 267 case CSSPropertyStrokeWidth: | 274 case CSSPropertyStrokeWidth: |
| 268 range = RangeNonNegative; | 275 range = RangeNonNegative; |
| 269 // Fall through | 276 // Fall through |
| 270 case CSSPropertyBaselineShift: | 277 case CSSPropertyBaselineShift: |
| 271 case CSSPropertyStrokeDashoffset: { | 278 case CSSPropertyStrokeDashoffset: { |
| 272 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol ation::maybeCreate(*fromCSSValue, *toCSSValue, property, range); | 279 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol ation::maybeCreate(*fromCSSValue, *toCSSValue, property, range); |
| 273 if (interpolation) | 280 if (interpolation) |
| 274 return interpolation.release(); | 281 return interpolation.release(); |
| 275 | 282 |
| 276 // We use default interpolation for | 283 // We use default interpolation for |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 335 } | 342 } |
| 336 | 343 |
| 337 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) | 344 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) |
| 338 { | 345 { |
| 339 visitor->trace(m_value); | 346 visitor->trace(m_value); |
| 340 visitor->trace(m_animatableValueCache); | 347 visitor->trace(m_animatableValueCache); |
| 341 Keyframe::PropertySpecificKeyframe::trace(visitor); | 348 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 342 } | 349 } |
| 343 | 350 |
| 344 } | 351 } |
| OLD | NEW |