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 "core/animation/StringKeyframe.h" | 5 #include "core/animation/StringKeyframe.h" |
6 | 6 |
7 #include "core/XLinkNames.h" | 7 #include "core/XLinkNames.h" |
8 #include "core/animation/CSSColorInterpolationType.h" | 8 #include "core/animation/CSSColorInterpolationType.h" |
9 #include "core/animation/CSSImageInterpolationType.h" | 9 #include "core/animation/CSSImageInterpolationType.h" |
10 #include "core/animation/CSSImageListInterpolationType.h" | 10 #include "core/animation/CSSImageListInterpolationType.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 625 |
626 } // namespace | 626 } // namespace |
627 | 627 |
628 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
element, const ComputedStyle* baseStyle) const | 628 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
element, const ComputedStyle* baseStyle) const |
629 { | 629 { |
630 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope
rtyHandle); | 630 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope
rtyHandle); |
631 if (applicableTypes) | 631 if (applicableTypes) |
632 return InvalidatableInterpolation::create(*applicableTypes, *this, end); | 632 return InvalidatableInterpolation::create(*applicableTypes, *this, end); |
633 | 633 |
634 ASSERT(element); | 634 ASSERT(element); |
635 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute = toSVGElement(element
)->propertyFromAttribute(propertyHandle.svgAttribute()); | 635 SVGAnimatedPropertyBase* attribute = toSVGElement(element)->propertyFromAttr
ibute(propertyHandle.svgAttribute()); |
636 ASSERT(attribute); | 636 ASSERT(attribute); |
637 | 637 |
638 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 638 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
639 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 639 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
640 | 640 |
641 if (!fromValue || !toValue) | 641 if (!fromValue || !toValue) |
642 return nullptr; | 642 return nullptr; |
643 | 643 |
644 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 644 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute); |
645 } | 645 } |
646 | 646 |
647 } // namespace blink | 647 } // namespace blink |
OLD | NEW |