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/CSSValueInterpolationType.h" | 9 #include "core/animation/CSSValueInterpolationType.h" |
10 #include "core/animation/ColorInterpolationType.h" | 10 #include "core/animation/ColorInterpolationType.h" |
(...skipping 264 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,
toCSSPropertySpecificKeyframe(end)); | 285 return InvalidatableStyleInterpolation::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 |