| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // FIXME: Handle keywords e.g. 'smaller', 'larger'. | 168 // FIXME: Handle keywords e.g. 'smaller', 'larger'. |
| 169 if (property == CSSPropertyFontSize) | 169 if (property == CSSPropertyFontSize) |
| 170 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); | 170 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); |
| 171 | 171 |
| 172 // FIXME: Handle keywords e.g. 'baseline', 'sub'. | 172 // FIXME: Handle keywords e.g. 'baseline', 'sub'. |
| 173 if (property == CSSPropertyBaselineShift) | 173 if (property == CSSPropertyBaselineShift) |
| 174 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); | 174 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); |
| 175 | 175 |
| 176 break; | 176 break; |
| 177 | 177 |
| 178 case CSSPropertyMotionRotation: { | |
| 179 RefPtr<Interpolation> interpolation = DoubleStyleInterpolation::maybeCre
ateFromMotionRotation(*fromCSSValue, *toCSSValue, property); | |
| 180 if (interpolation) | |
| 181 return interpolation.release(); | |
| 182 break; | |
| 183 } | |
| 184 | |
| 185 case CSSPropertyBorderBottomLeftRadius: | 178 case CSSPropertyBorderBottomLeftRadius: |
| 186 case CSSPropertyBorderBottomRightRadius: | 179 case CSSPropertyBorderBottomRightRadius: |
| 187 case CSSPropertyBorderTopLeftRadius: | 180 case CSSPropertyBorderTopLeftRadius: |
| 188 case CSSPropertyBorderTopRightRadius: | 181 case CSSPropertyBorderTopRightRadius: |
| 189 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length
PairStyleInterpolation::canCreateFrom(*toCSSValue)) | 182 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length
PairStyleInterpolation::canCreateFrom(*toCSSValue)) |
| 190 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal
ue, property, RangeNonNegative); | 183 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal
ue, property, RangeNonNegative); |
| 191 break; | 184 break; |
| 192 | 185 |
| 193 case CSSPropertyPerspectiveOrigin: | 186 case CSSPropertyPerspectiveOrigin: |
| 194 case CSSPropertyTransformOrigin: { | 187 case CSSPropertyTransformOrigin: { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 288 } |
| 296 | 289 |
| 297 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const | 290 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const |
| 298 { | 291 { |
| 299 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); | 292 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); |
| 300 ASSERT(applicableTypes); | 293 ASSERT(applicableTypes); |
| 301 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); | 294 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); |
| 302 } | 295 } |
| 303 | 296 |
| 304 } // namespace blink | 297 } // namespace blink |
| OLD | NEW |