| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 465 |
| 466 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKe
yframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const | 466 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKe
yframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const |
| 467 { | 467 { |
| 468 return adoptPtrWillBeNoop(new SVGPropertySpecificKeyframe(offset, easing, ""
, AnimationEffect::CompositeAdd)); | 468 return adoptPtrWillBeNoop(new SVGPropertySpecificKeyframe(offset, easing, ""
, AnimationEffect::CompositeAdd)); |
| 469 } | 469 } |
| 470 | 470 |
| 471 namespace { | 471 namespace { |
| 472 | 472 |
| 473 PassRefPtrWillBeRawPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fr
omValue, SVGPropertyBase* toValue, SVGAnimatedPropertyBase* attribute) | 473 PassRefPtrWillBeRawPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fr
omValue, SVGPropertyBase* toValue, SVGAnimatedPropertyBase* attribute) |
| 474 { | 474 { |
| 475 RefPtrWillBeRawPtr<Interpolation> interpolation; | 475 RefPtrWillBeRawPtr<Interpolation> interpolation = nullptr; |
| 476 ASSERT(fromValue->type() == toValue->type()); | 476 ASSERT(fromValue->type() == toValue->type()); |
| 477 switch (fromValue->type()) { | 477 switch (fromValue->type()) { |
| 478 case AnimatedAngle: | 478 case AnimatedAngle: |
| 479 if (AngleSVGInterpolation::canCreateFrom(fromValue) && AngleSVGInterpola
tion::canCreateFrom(toValue)) | 479 if (AngleSVGInterpolation::canCreateFrom(fromValue) && AngleSVGInterpola
tion::canCreateFrom(toValue)) |
| 480 return AngleSVGInterpolation::create(fromValue, toValue, attribute); | 480 return AngleSVGInterpolation::create(fromValue, toValue, attribute); |
| 481 break; | 481 break; |
| 482 case AnimatedPoints: | 482 case AnimatedPoints: |
| 483 interpolation = ListSVGInterpolation<PointSVGInterpolation>::maybeCreate
(fromValue, toValue, attribute); | 483 interpolation = ListSVGInterpolation<PointSVGInterpolation>::maybeCreate
(fromValue, toValue, attribute); |
| 484 break; | 484 break; |
| 485 | 485 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 504 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 504 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
| 505 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 505 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 506 | 506 |
| 507 if (!fromValue || !toValue) | 507 if (!fromValue || !toValue) |
| 508 return nullptr; | 508 return nullptr; |
| 509 | 509 |
| 510 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 510 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
| 511 } | 511 } |
| 512 | 512 |
| 513 } | 513 } |
| OLD | NEW |