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