OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "core/animation/animatable/AnimatableLengthSize.h" | 45 #include "core/animation/animatable/AnimatableLengthSize.h" |
46 #include "core/animation/animatable/AnimatableRepeatable.h" | 46 #include "core/animation/animatable/AnimatableRepeatable.h" |
47 #include "core/animation/animatable/AnimatableSVGLength.h" | 47 #include "core/animation/animatable/AnimatableSVGLength.h" |
48 #include "core/animation/animatable/AnimatableSVGPaint.h" | 48 #include "core/animation/animatable/AnimatableSVGPaint.h" |
49 #include "core/animation/animatable/AnimatableShadow.h" | 49 #include "core/animation/animatable/AnimatableShadow.h" |
50 #include "core/animation/animatable/AnimatableShapeValue.h" | 50 #include "core/animation/animatable/AnimatableShapeValue.h" |
51 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" | 51 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" |
52 #include "core/animation/animatable/AnimatableTransform.h" | 52 #include "core/animation/animatable/AnimatableTransform.h" |
53 #include "core/animation/animatable/AnimatableUnknown.h" | 53 #include "core/animation/animatable/AnimatableUnknown.h" |
54 #include "core/animation/animatable/AnimatableVisibility.h" | 54 #include "core/animation/animatable/AnimatableVisibility.h" |
55 #include "core/animation/css/CSSAnimations.h" | |
56 #include "core/css/CSSCalculationValue.h" | 55 #include "core/css/CSSCalculationValue.h" |
57 #include "core/css/CSSPrimitiveValue.h" | 56 #include "core/css/CSSPrimitiveValue.h" |
58 #include "core/css/CSSPrimitiveValueMappings.h" | 57 #include "core/css/CSSPrimitiveValueMappings.h" |
| 58 #include "core/css/CSSPropertyMetadata.h" |
59 #include "core/rendering/style/RenderStyle.h" | 59 #include "core/rendering/style/RenderStyle.h" |
60 #include "platform/Length.h" | 60 #include "platform/Length.h" |
61 #include "platform/LengthBox.h" | 61 #include "platform/LengthBox.h" |
62 | 62 |
63 namespace blink { | 63 namespace blink { |
64 | 64 |
65 static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLength(const Length& le
ngth, const RenderStyle& style) | 65 static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLength(const Length& le
ngth, const RenderStyle& style) |
66 { | 66 { |
67 switch (length.type()) { | 67 switch (length.type()) { |
68 case Fixed: | 68 case Fixed: |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontWeight(FontWeight f
ontWeight) | 265 static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontWeight(FontWeight f
ontWeight) |
266 { | 266 { |
267 return createFromDouble(fontWeightToDouble(fontWeight)); | 267 return createFromDouble(fontWeightToDouble(fontWeight)); |
268 } | 268 } |
269 | 269 |
270 // FIXME: Generate this function. | 270 // FIXME: Generate this function. |
271 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
pertyID property, const RenderStyle& style) | 271 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
pertyID property, const RenderStyle& style) |
272 { | 272 { |
273 ASSERT(CSSAnimations::isAnimatableProperty(property)); | 273 ASSERT(CSSPropertyMetadata::isAnimatableProperty(property)); |
274 switch (property) { | 274 switch (property) { |
275 case CSSPropertyBackgroundColor: | 275 case CSSPropertyBackgroundColor: |
276 return createFromColor(property, style); | 276 return createFromColor(property, style); |
277 case CSSPropertyBackgroundImage: | 277 case CSSPropertyBackgroundImage: |
278 return createFromFillLayers<CSSPropertyBackgroundImage>(style.background
Layers(), style); | 278 return createFromFillLayers<CSSPropertyBackgroundImage>(style.background
Layers(), style); |
279 case CSSPropertyBackgroundPositionX: | 279 case CSSPropertyBackgroundPositionX: |
280 return createFromFillLayers<CSSPropertyBackgroundPositionX>(style.backgr
oundLayers(), style); | 280 return createFromFillLayers<CSSPropertyBackgroundPositionX>(style.backgr
oundLayers(), style); |
281 case CSSPropertyBackgroundPositionY: | 281 case CSSPropertyBackgroundPositionY: |
282 return createFromFillLayers<CSSPropertyBackgroundPositionY>(style.backgr
oundLayers(), style); | 282 return createFromFillLayers<CSSPropertyBackgroundPositionY>(style.backgr
oundLayers(), style); |
283 case CSSPropertyBackgroundSize: | 283 case CSSPropertyBackgroundSize: |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 case CSSPropertyZoom: | 506 case CSSPropertyZoom: |
507 return createFromDouble(style.zoom()); | 507 return createFromDouble(style.zoom()); |
508 default: | 508 default: |
509 ASSERT_NOT_REACHED(); | 509 ASSERT_NOT_REACHED(); |
510 // This return value is to avoid a release crash if possible. | 510 // This return value is to avoid a release crash if possible. |
511 return AnimatableUnknown::create(nullptr); | 511 return AnimatableUnknown::create(nullptr); |
512 } | 512 } |
513 } | 513 } |
514 | 514 |
515 } // namespace blink | 515 } // namespace blink |
OLD | NEW |