OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/PropertyInterpolationTypesMapping.h" | 5 #include "core/animation/PropertyInterpolationTypesMapping.h" |
6 | 6 |
7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
8 #include "core/animation/CSSClipInterpolationType.h" | 8 #include "core/animation/CSSClipInterpolationType.h" |
9 #include "core/animation/CSSColorInterpolationType.h" | 9 #include "core/animation/CSSColorInterpolationType.h" |
10 #include "core/animation/CSSFontWeightInterpolationType.h" | 10 #include "core/animation/CSSFontWeightInterpolationType.h" |
11 #include "core/animation/CSSImageInterpolationType.h" | 11 #include "core/animation/CSSImageInterpolationType.h" |
12 #include "core/animation/CSSImageListInterpolationType.h" | 12 #include "core/animation/CSSImageListInterpolationType.h" |
13 #include "core/animation/CSSLengthInterpolationType.h" | 13 #include "core/animation/CSSLengthInterpolationType.h" |
14 #include "core/animation/CSSLengthListInterpolationType.h" | 14 #include "core/animation/CSSLengthListInterpolationType.h" |
15 #include "core/animation/CSSLengthPairInterpolationType.h" | 15 #include "core/animation/CSSLengthPairInterpolationType.h" |
16 #include "core/animation/CSSMotionRotationInterpolationType.h" | 16 #include "core/animation/CSSMotionRotationInterpolationType.h" |
17 #include "core/animation/CSSNumberInterpolationType.h" | 17 #include "core/animation/CSSNumberInterpolationType.h" |
18 #include "core/animation/CSSPaintInterpolationType.h" | 18 #include "core/animation/CSSPaintInterpolationType.h" |
19 #include "core/animation/CSSPathInterpolationType.h" | 19 #include "core/animation/CSSPathInterpolationType.h" |
20 #include "core/animation/CSSPositionAxisListInterpolationType.h" | 20 #include "core/animation/CSSPositionAxisListInterpolationType.h" |
21 #include "core/animation/CSSPositionInterpolationType.h" | 21 #include "core/animation/CSSPositionInterpolationType.h" |
22 #include "core/animation/CSSShadowListInterpolationType.h" | 22 #include "core/animation/CSSShadowListInterpolationType.h" |
| 23 #include "core/animation/CSSSizeListInterpolationType.h" |
23 #include "core/animation/CSSTransformOriginInterpolationType.h" | 24 #include "core/animation/CSSTransformOriginInterpolationType.h" |
24 #include "core/animation/CSSTranslateInterpolationType.h" | 25 #include "core/animation/CSSTranslateInterpolationType.h" |
25 #include "core/animation/CSSValueInterpolationType.h" | 26 #include "core/animation/CSSValueInterpolationType.h" |
26 #include "core/animation/CSSVisibilityInterpolationType.h" | 27 #include "core/animation/CSSVisibilityInterpolationType.h" |
27 #include "core/animation/InterpolationType.h" | 28 #include "core/animation/InterpolationType.h" |
28 #include "core/animation/SVGAngleInterpolationType.h" | 29 #include "core/animation/SVGAngleInterpolationType.h" |
29 #include "core/animation/SVGIntegerInterpolationType.h" | 30 #include "core/animation/SVGIntegerInterpolationType.h" |
30 #include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h" | 31 #include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h" |
31 #include "core/animation/SVGLengthInterpolationType.h" | 32 #include "core/animation/SVGLengthInterpolationType.h" |
32 #include "core/animation/SVGLengthListInterpolationType.h" | 33 #include "core/animation/SVGLengthListInterpolationType.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 case CSSPropertyBorderTopLeftRadius: | 195 case CSSPropertyBorderTopLeftRadius: |
195 case CSSPropertyBorderTopRightRadius: | 196 case CSSPropertyBorderTopRightRadius: |
196 applicableTypes->append(adoptPtr(new CSSLengthPairInterpolationType(
cssProperty))); | 197 applicableTypes->append(adoptPtr(new CSSLengthPairInterpolationType(
cssProperty))); |
197 break; | 198 break; |
198 case CSSPropertyTranslate: | 199 case CSSPropertyTranslate: |
199 applicableTypes->append(adoptPtr(new CSSTranslateInterpolationType(c
ssProperty))); | 200 applicableTypes->append(adoptPtr(new CSSTranslateInterpolationType(c
ssProperty))); |
200 break; | 201 break; |
201 case CSSPropertyTransformOrigin: | 202 case CSSPropertyTransformOrigin: |
202 applicableTypes->append(adoptPtr(new CSSTransformOriginInterpolation
Type(cssProperty))); | 203 applicableTypes->append(adoptPtr(new CSSTransformOriginInterpolation
Type(cssProperty))); |
203 break; | 204 break; |
| 205 case CSSPropertyBackgroundSize: |
| 206 case CSSPropertyWebkitMaskSize: |
| 207 applicableTypes->append(adoptPtr(new CSSSizeListInterpolationType(cs
sProperty))); |
| 208 break; |
204 default: | 209 default: |
205 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. | 210 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. |
206 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) | 211 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) |
207 fallbackToLegacy = true; | 212 fallbackToLegacy = true; |
208 break; | 213 break; |
209 } | 214 } |
210 | 215 |
211 if (!fallbackToLegacy) | 216 if (!fallbackToLegacy) |
212 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); | 217 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); |
213 | 218 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 335 |
331 if (!fallbackToLegacy) | 336 if (!fallbackToLegacy) |
332 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri
bute))); | 337 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri
bute))); |
333 } | 338 } |
334 | 339 |
335 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr
: applicableTypes.release()); | 340 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr
: applicableTypes.release()); |
336 return addResult.storedValue->value.get(); | 341 return addResult.storedValue->value.get(); |
337 } | 342 } |
338 | 343 |
339 } // namespace blink | 344 } // namespace blink |
OLD | NEW |