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/CSSColorInterpolationType.h" | 9 #include "core/animation/CSSColorInterpolationType.h" |
10 #include "core/animation/CSSImageInterpolationType.h" | 10 #include "core/animation/CSSImageInterpolationType.h" |
11 #include "core/animation/CSSImageListInterpolationType.h" | 11 #include "core/animation/CSSImageListInterpolationType.h" |
12 #include "core/animation/CSSLengthInterpolationType.h" | 12 #include "core/animation/CSSLengthInterpolationType.h" |
13 #include "core/animation/CSSNumberInterpolationType.h" | 13 #include "core/animation/CSSNumberInterpolationType.h" |
14 #include "core/animation/CSSPaintInterpolationType.h" | 14 #include "core/animation/CSSPaintInterpolationType.h" |
15 #include "core/animation/CSSShadowListInterpolationType.h" | 15 #include "core/animation/CSSShadowListInterpolationType.h" |
16 #include "core/animation/CSSValueInterpolationType.h" | 16 #include "core/animation/CSSValueInterpolationType.h" |
17 #include "core/animation/CompositorAnimations.h" | 17 #include "core/animation/CompositorAnimations.h" |
18 #include "core/animation/ConstantStyleInterpolation.h" | 18 #include "core/animation/ConstantStyleInterpolation.h" |
19 #include "core/animation/DefaultSVGInterpolation.h" | 19 #include "core/animation/DefaultSVGInterpolation.h" |
20 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 20 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
21 #include "core/animation/DoubleStyleInterpolation.h" | 21 #include "core/animation/DoubleStyleInterpolation.h" |
22 #include "core/animation/FilterStyleInterpolation.h" | 22 #include "core/animation/FilterStyleInterpolation.h" |
23 #include "core/animation/ImageSliceStyleInterpolation.h" | 23 #include "core/animation/ImageSliceStyleInterpolation.h" |
24 #include "core/animation/IntegerOptionalIntegerSVGInterpolation.h" | 24 #include "core/animation/IntegerOptionalIntegerSVGInterpolation.h" |
25 #include "core/animation/IntegerSVGInterpolation.h" | 25 #include "core/animation/IntegerSVGInterpolation.h" |
26 #include "core/animation/InterpolationType.h" | 26 #include "core/animation/InterpolationType.h" |
27 #include "core/animation/InvalidatableStyleInterpolation.h" | 27 #include "core/animation/InvalidatableInterpolation.h" |
28 #include "core/animation/LegacyStyleInterpolation.h" | 28 #include "core/animation/LegacyStyleInterpolation.h" |
29 #include "core/animation/LengthBoxStyleInterpolation.h" | 29 #include "core/animation/LengthBoxStyleInterpolation.h" |
30 #include "core/animation/LengthPairStyleInterpolation.h" | 30 #include "core/animation/LengthPairStyleInterpolation.h" |
31 #include "core/animation/LengthSVGInterpolation.h" | 31 #include "core/animation/LengthSVGInterpolation.h" |
32 #include "core/animation/LengthStyleInterpolation.h" | 32 #include "core/animation/LengthStyleInterpolation.h" |
33 #include "core/animation/ListSVGInterpolation.h" | 33 #include "core/animation/ListSVGInterpolation.h" |
34 #include "core/animation/ListStyleInterpolation.h" | 34 #include "core/animation/ListStyleInterpolation.h" |
35 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" | 35 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" |
36 #include "core/animation/NumberSVGInterpolation.h" | 36 #include "core/animation/NumberSVGInterpolation.h" |
37 #include "core/animation/PathSVGInterpolation.h" | 37 #include "core/animation/PathSVGInterpolation.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 populateAnimatableValue(property, *element, baseStyle, false); | 275 populateAnimatableValue(property, *element, baseStyle, false); |
276 end.populateAnimatableValue(property, *element, baseStyle, false); | 276 end.populateAnimatableValue(property, *element, baseStyle, false); |
277 return LegacyStyleInterpolation::create(getAnimatableValue(), end.getAnimata
bleValue(), property); | 277 return LegacyStyleInterpolation::create(getAnimatableValue(), end.getAnimata
bleValue(), property); |
278 } | 278 } |
279 | 279 |
280 PassRefPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::maybeCrea
teInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyfram
e& end, Element* element, const ComputedStyle* baseStyle) const | 280 PassRefPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::maybeCrea
teInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyfram
e& end, Element* element, const ComputedStyle* baseStyle) const |
281 { | 281 { |
282 CSSPropertyID property = propertyHandle.cssProperty(); | 282 CSSPropertyID property = propertyHandle.cssProperty(); |
283 const Vector<const InterpolationType*>* applicableTypes = applicableTypesFor
Property(property); | 283 const Vector<const InterpolationType*>* applicableTypes = applicableTypesFor
Property(property); |
284 if (applicableTypes) | 284 if (applicableTypes) |
285 return InvalidatableStyleInterpolation::create(*applicableTypes, *this,
end); | 285 return InvalidatableInterpolation::create(*applicableTypes, *this, end); |
286 | 286 |
287 // TODO(alancutter): Remove the remainder of this function. | 287 // TODO(alancutter): Remove the remainder of this function. |
288 | 288 |
289 // FIXME: Refactor this into a generic piece that lives in InterpolationEffe
ct, and a template parameter specific converter. | 289 // FIXME: Refactor this into a generic piece that lives in InterpolationEffe
ct, and a template parameter specific converter. |
290 CSSValue* fromCSSValue = m_value.get(); | 290 CSSValue* fromCSSValue = m_value.get(); |
291 CSSValue* toCSSValue = toCSSPropertySpecificKeyframe(end).value(); | 291 CSSValue* toCSSValue = toCSSPropertySpecificKeyframe(end).value(); |
292 InterpolationRange range = RangeAll; | 292 InterpolationRange range = RangeAll; |
293 | 293 |
294 // FIXME: Remove this flag once we can rely on legacy's behaviour being corr
ect. | 294 // FIXME: Remove this flag once we can rely on legacy's behaviour being corr
ect. |
295 bool forceDefaultInterpolation = false; | 295 bool forceDefaultInterpolation = false; |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 534 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
535 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 535 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
536 | 536 |
537 if (!fromValue || !toValue) | 537 if (!fromValue || !toValue) |
538 return nullptr; | 538 return nullptr; |
539 | 539 |
540 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 540 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
541 } | 541 } |
542 | 542 |
543 } // namespace blink | 543 } // namespace blink |
OLD | NEW |