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/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
8 #include "core/animation/ConstantStyleInterpolation.h" | 8 #include "core/animation/ConstantStyleInterpolation.h" |
9 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 9 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
10 #include "core/animation/DoubleStyleInterpolation.h" | 10 #include "core/animation/DoubleStyleInterpolation.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 break; | 176 break; |
177 | 177 |
178 case CSSPropertyBorderBottomLeftRadius: | 178 case CSSPropertyBorderBottomLeftRadius: |
179 case CSSPropertyBorderBottomRightRadius: | 179 case CSSPropertyBorderBottomRightRadius: |
180 case CSSPropertyBorderTopLeftRadius: | 180 case CSSPropertyBorderTopLeftRadius: |
181 case CSSPropertyBorderTopRightRadius: | 181 case CSSPropertyBorderTopRightRadius: |
182 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length
PairStyleInterpolation::canCreateFrom(*toCSSValue)) | 182 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length
PairStyleInterpolation::canCreateFrom(*toCSSValue)) |
183 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal
ue, property, RangeNonNegative); | 183 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal
ue, property, RangeNonNegative); |
184 break; | 184 break; |
185 | 185 |
186 case CSSPropertyPerspectiveOrigin: | |
187 case CSSPropertyTransformOrigin: { | 186 case CSSPropertyTransformOrigin: { |
188 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | 187 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; |
189 if (interpolation) | 188 if (interpolation) |
190 return interpolation.release(); | 189 return interpolation.release(); |
191 | 190 |
192 // FIXME: Handle keywords: top, right, left, center, bottom | 191 // FIXME: Handle keywords: top, right, left, center, bottom |
193 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 192 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
194 } | 193 } |
195 | 194 |
196 case CSSPropertyClip: { | 195 case CSSPropertyClip: { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 287 } |
289 | 288 |
290 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const | 289 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const |
291 { | 290 { |
292 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); | 291 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); |
293 ASSERT(applicableTypes); | 292 ASSERT(applicableTypes); |
294 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); | 293 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); |
295 } | 294 } |
296 | 295 |
297 } // namespace blink | 296 } // namespace blink |
OLD | NEW |