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/CSSTransformOriginInterpolationType.h" |
23 #include "core/animation/CSSTranslateInterpolationType.h" | 24 #include "core/animation/CSSTranslateInterpolationType.h" |
24 #include "core/animation/CSSValueInterpolationType.h" | 25 #include "core/animation/CSSValueInterpolationType.h" |
25 #include "core/animation/CSSVisibilityInterpolationType.h" | 26 #include "core/animation/CSSVisibilityInterpolationType.h" |
26 #include "core/animation/InterpolationType.h" | 27 #include "core/animation/InterpolationType.h" |
27 #include "core/animation/SVGAngleInterpolationType.h" | 28 #include "core/animation/SVGAngleInterpolationType.h" |
28 #include "core/animation/SVGIntegerInterpolationType.h" | 29 #include "core/animation/SVGIntegerInterpolationType.h" |
29 #include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h" | 30 #include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h" |
30 #include "core/animation/SVGLengthInterpolationType.h" | 31 #include "core/animation/SVGLengthInterpolationType.h" |
31 #include "core/animation/SVGLengthListInterpolationType.h" | 32 #include "core/animation/SVGLengthListInterpolationType.h" |
32 #include "core/animation/SVGNumberInterpolationType.h" | 33 #include "core/animation/SVGNumberInterpolationType.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 break; | 191 break; |
191 case CSSPropertyBorderBottomLeftRadius: | 192 case CSSPropertyBorderBottomLeftRadius: |
192 case CSSPropertyBorderBottomRightRadius: | 193 case CSSPropertyBorderBottomRightRadius: |
193 case CSSPropertyBorderTopLeftRadius: | 194 case CSSPropertyBorderTopLeftRadius: |
194 case CSSPropertyBorderTopRightRadius: | 195 case CSSPropertyBorderTopRightRadius: |
195 applicableTypes->append(adoptPtr(new CSSLengthPairInterpolationType(
cssProperty))); | 196 applicableTypes->append(adoptPtr(new CSSLengthPairInterpolationType(
cssProperty))); |
196 break; | 197 break; |
197 case CSSPropertyTranslate: | 198 case CSSPropertyTranslate: |
198 applicableTypes->append(adoptPtr(new CSSTranslateInterpolationType(c
ssProperty))); | 199 applicableTypes->append(adoptPtr(new CSSTranslateInterpolationType(c
ssProperty))); |
199 break; | 200 break; |
| 201 case CSSPropertyTransformOrigin: |
| 202 applicableTypes->append(adoptPtr(new CSSTransformOriginInterpolation
Type(cssProperty))); |
| 203 break; |
200 default: | 204 default: |
201 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. | 205 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. |
202 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) | 206 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) |
203 fallbackToLegacy = true; | 207 fallbackToLegacy = true; |
204 break; | 208 break; |
205 } | 209 } |
206 | 210 |
207 if (!fallbackToLegacy) | 211 if (!fallbackToLegacy) |
208 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); | 212 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); |
209 | 213 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 330 |
327 if (!fallbackToLegacy) | 331 if (!fallbackToLegacy) |
328 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri
bute))); | 332 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri
bute))); |
329 } | 333 } |
330 | 334 |
331 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr
: applicableTypes.release()); | 335 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr
: applicableTypes.release()); |
332 return addResult.storedValue->value.get(); | 336 return addResult.storedValue->value.get(); |
333 } | 337 } |
334 | 338 |
335 } // namespace blink | 339 } // namespace blink |
OLD | NEW |