| 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" |
| 11 #include "core/animation/FilterStyleInterpolation.h" | 11 #include "core/animation/FilterStyleInterpolation.h" |
| 12 #include "core/animation/ImageSliceStyleInterpolation.h" | 12 #include "core/animation/ImageSliceStyleInterpolation.h" |
| 13 #include "core/animation/InvalidatableInterpolation.h" | 13 #include "core/animation/InvalidatableInterpolation.h" |
| 14 #include "core/animation/LegacyStyleInterpolation.h" | 14 #include "core/animation/LegacyStyleInterpolation.h" |
| 15 #include "core/animation/LengthBoxStyleInterpolation.h" | 15 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 16 #include "core/animation/LengthPairStyleInterpolation.h" |
| 16 #include "core/animation/LengthStyleInterpolation.h" | 17 #include "core/animation/LengthStyleInterpolation.h" |
| 17 #include "core/animation/ListStyleInterpolation.h" | 18 #include "core/animation/ListStyleInterpolation.h" |
| 18 #include "core/animation/PropertyInterpolationTypesMapping.h" | 19 #include "core/animation/PropertyInterpolationTypesMapping.h" |
| 19 #include "core/animation/css/CSSAnimations.h" | 20 #include "core/animation/css/CSSAnimations.h" |
| 20 #include "core/css/CSSPropertyMetadata.h" | 21 #include "core/css/CSSPropertyMetadata.h" |
| 21 #include "core/css/resolver/StyleResolver.h" | 22 #include "core/css/resolver/StyleResolver.h" |
| 22 #include "core/style/ComputedStyle.h" | 23 #include "core/style/ComputedStyle.h" |
| 23 #include "core/svg/SVGElement.h" | 24 #include "core/svg/SVGElement.h" |
| 24 #include "platform/RuntimeEnabledFeatures.h" | 25 #include "platform/RuntimeEnabledFeatures.h" |
| 25 | 26 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // FIXME: Handle keywords e.g. 'smaller', 'larger'. | 168 // FIXME: Handle keywords e.g. 'smaller', 'larger'. |
| 168 if (property == CSSPropertyFontSize) | 169 if (property == CSSPropertyFontSize) |
| 169 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); | 170 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); |
| 170 | 171 |
| 171 // FIXME: Handle keywords e.g. 'baseline', 'sub'. | 172 // FIXME: Handle keywords e.g. 'baseline', 'sub'. |
| 172 if (property == CSSPropertyBaselineShift) | 173 if (property == CSSPropertyBaselineShift) |
| 173 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); | 174 return createLegacyStyleInterpolation(property, end, element, baseSt
yle); |
| 174 | 175 |
| 175 break; | 176 break; |
| 176 | 177 |
| 178 case CSSPropertyBorderBottomLeftRadius: |
| 179 case CSSPropertyBorderBottomRightRadius: |
| 180 case CSSPropertyBorderTopLeftRadius: |
| 181 case CSSPropertyBorderTopRightRadius: |
| 182 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length
PairStyleInterpolation::canCreateFrom(*toCSSValue)) |
| 183 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal
ue, property, RangeNonNegative); |
| 184 break; |
| 185 |
| 177 case CSSPropertyTransformOrigin: { | 186 case CSSPropertyTransformOrigin: { |
| 178 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | 187 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; |
| 179 if (interpolation) | 188 if (interpolation) |
| 180 return interpolation.release(); | 189 return interpolation.release(); |
| 181 | 190 |
| 182 // FIXME: Handle keywords: top, right, left, center, bottom | 191 // FIXME: Handle keywords: top, right, left, center, bottom |
| 183 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 192 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
| 184 } | 193 } |
| 185 | 194 |
| 186 case CSSPropertyClip: { | 195 case CSSPropertyClip: { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 287 } |
| 279 | 288 |
| 280 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 |
| 281 { | 290 { |
| 282 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); | 291 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); |
| 283 ASSERT(applicableTypes); | 292 ASSERT(applicableTypes); |
| 284 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); | 293 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); |
| 285 } | 294 } |
| 286 | 295 |
| 287 } // namespace blink | 296 } // namespace blink |
| OLD | NEW |