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/AngleSVGInterpolation.h" | 8 #include "core/animation/AngleSVGInterpolation.h" |
9 #include "core/animation/ColorStyleInterpolation.h" | 9 #include "core/animation/ColorStyleInterpolation.h" |
10 #include "core/animation/CompositorAnimations.h" | 10 #include "core/animation/CompositorAnimations.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 case CSSPropertyWebkitFilter: { | 395 case CSSPropertyWebkitFilter: { |
396 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati
on::maybeCreateList(*fromCSSValue, *toCSSValue, property); | 396 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati
on::maybeCreateList(*fromCSSValue, *toCSSValue, property); |
397 if (interpolation) | 397 if (interpolation) |
398 return interpolation.release(); | 398 return interpolation.release(); |
399 | 399 |
400 // FIXME: Support drop shadow interpolation. | 400 // FIXME: Support drop shadow interpolation. |
401 fallBackToLegacy = true; | 401 fallBackToLegacy = true; |
402 break; | 402 break; |
403 } | 403 } |
404 | 404 |
| 405 case CSSPropertyTranslate: { |
| 406 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation
<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop
erty, range); |
| 407 if (interpolation) |
| 408 return interpolation.release(); |
| 409 |
| 410 fallBackToLegacy = true; |
| 411 break; |
| 412 } |
| 413 |
| 414 case CSSPropertyScale: { |
| 415 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation
<DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop
erty, range); |
| 416 if (interpolation) |
| 417 return interpolation.release(); |
| 418 |
| 419 fallBackToLegacy = true; |
| 420 break; |
| 421 } |
| 422 |
405 default: | 423 default: |
406 // Fall back to LegacyStyleInterpolation. | 424 // Fall back to LegacyStyleInterpolation. |
407 fallBackToLegacy = true; | 425 fallBackToLegacy = true; |
408 break; | 426 break; |
409 } | 427 } |
410 | 428 |
411 if (fromCSSValue == toCSSValue) | 429 if (fromCSSValue == toCSSValue) |
412 return ConstantStyleInterpolation::create(fromCSSValue, property); | 430 return ConstantStyleInterpolation::create(fromCSSValue, property); |
413 | 431 |
414 if (forceDefaultInterpolation) | 432 if (forceDefaultInterpolation) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 567 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 568 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
551 | 569 |
552 if (!fromValue || !toValue) | 570 if (!fromValue || !toValue) |
553 return nullptr; | 571 return nullptr; |
554 | 572 |
555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 573 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
556 } | 574 } |
557 | 575 |
558 } // namespace blink | 576 } // namespace blink |
OLD | NEW |