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 26 matching lines...) Expand all Loading... | |
37 #include "core/animation/animatable/AnimatableDouble.h" | 37 #include "core/animation/animatable/AnimatableDouble.h" |
38 #include "core/animation/animatable/AnimatableDoubleAndBool.h" | 38 #include "core/animation/animatable/AnimatableDoubleAndBool.h" |
39 #include "core/animation/animatable/AnimatableFilterOperations.h" | 39 #include "core/animation/animatable/AnimatableFilterOperations.h" |
40 #include "core/animation/animatable/AnimatableImage.h" | 40 #include "core/animation/animatable/AnimatableImage.h" |
41 #include "core/animation/animatable/AnimatableLength.h" | 41 #include "core/animation/animatable/AnimatableLength.h" |
42 #include "core/animation/animatable/AnimatableLengthBox.h" | 42 #include "core/animation/animatable/AnimatableLengthBox.h" |
43 #include "core/animation/animatable/AnimatableLengthBoxAndBool.h" | 43 #include "core/animation/animatable/AnimatableLengthBoxAndBool.h" |
44 #include "core/animation/animatable/AnimatableLengthPoint.h" | 44 #include "core/animation/animatable/AnimatableLengthPoint.h" |
45 #include "core/animation/animatable/AnimatableLengthPoint3D.h" | 45 #include "core/animation/animatable/AnimatableLengthPoint3D.h" |
46 #include "core/animation/animatable/AnimatableLengthSize.h" | 46 #include "core/animation/animatable/AnimatableLengthSize.h" |
47 #include "core/animation/animatable/AnimatablePath.h" | |
47 #include "core/animation/animatable/AnimatableRepeatable.h" | 48 #include "core/animation/animatable/AnimatableRepeatable.h" |
48 #include "core/animation/animatable/AnimatableSVGPaint.h" | 49 #include "core/animation/animatable/AnimatableSVGPaint.h" |
49 #include "core/animation/animatable/AnimatableShadow.h" | 50 #include "core/animation/animatable/AnimatableShadow.h" |
50 #include "core/animation/animatable/AnimatableShapeValue.h" | 51 #include "core/animation/animatable/AnimatableShapeValue.h" |
51 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" | 52 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" |
52 #include "core/animation/animatable/AnimatableTransform.h" | 53 #include "core/animation/animatable/AnimatableTransform.h" |
53 #include "core/animation/animatable/AnimatableUnknown.h" | 54 #include "core/animation/animatable/AnimatableUnknown.h" |
54 #include "core/animation/animatable/AnimatableVisibility.h" | 55 #include "core/animation/animatable/AnimatableVisibility.h" |
55 #include "core/css/CSSCalculationValue.h" | 56 #include "core/css/CSSCalculationValue.h" |
56 #include "core/css/CSSPrimitiveValue.h" | 57 #include "core/css/CSSPrimitiveValue.h" |
57 #include "core/css/CSSPrimitiveValueMappings.h" | 58 #include "core/css/CSSPrimitiveValueMappings.h" |
58 #include "core/css/CSSPropertyMetadata.h" | 59 #include "core/css/CSSPropertyMetadata.h" |
59 #include "core/style/ComputedStyle.h" | 60 #include "core/style/ComputedStyle.h" |
61 #include "core/svg/SVGPathUtilities.h" | |
fs
2015/12/15 11:52:53
This doesn't appear to be used here?
Eric Willigers
2015/12/15 22:33:55
Removed.
| |
60 #include "platform/Length.h" | 62 #include "platform/Length.h" |
61 #include "platform/LengthBox.h" | 63 #include "platform/LengthBox.h" |
62 #include "wtf/StdLibExtras.h" | 64 #include "wtf/StdLibExtras.h" |
63 | 65 |
64 namespace blink { | 66 namespace blink { |
65 | 67 |
66 static PassRefPtr<AnimatableValue> createFromLengthWithZoom(const Length& length , float zoom) | 68 static PassRefPtr<AnimatableValue> createFromLengthWithZoom(const Length& length , float zoom) |
67 { | 69 { |
68 switch (length.type()) { | 70 switch (length.type()) { |
69 case Fixed: | 71 case Fixed: |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 return AnimatableColor::create(color, visitedLinkColor); | 242 return AnimatableColor::create(color, visitedLinkColor); |
241 } | 243 } |
242 | 244 |
243 inline static PassRefPtr<AnimatableValue> createFromShapeValue(ShapeValue* value ) | 245 inline static PassRefPtr<AnimatableValue> createFromShapeValue(ShapeValue* value ) |
244 { | 246 { |
245 if (value) | 247 if (value) |
246 return AnimatableShapeValue::create(value); | 248 return AnimatableShapeValue::create(value); |
247 return AnimatableUnknown::create(CSSValueNone); | 249 return AnimatableUnknown::create(CSSValueNone); |
248 } | 250 } |
249 | 251 |
252 static PassRefPtr<AnimatableValue> createFromPath(CSSPathValue* pathValue) | |
253 { | |
254 return AnimatablePath::create(pathValue); | |
255 } | |
256 | |
250 static double fontStretchToDouble(FontStretch fontStretch) | 257 static double fontStretchToDouble(FontStretch fontStretch) |
251 { | 258 { |
252 return static_cast<unsigned>(fontStretch); | 259 return static_cast<unsigned>(fontStretch); |
253 } | 260 } |
254 | 261 |
255 static PassRefPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch ) | 262 static PassRefPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch ) |
256 { | 263 { |
257 return createFromDouble(fontStretchToDouble(fontStretch)); | 264 return createFromDouble(fontStretchToDouble(fontStretch)); |
258 } | 265 } |
259 | 266 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 case CSSPropertyWidth: | 573 case CSSPropertyWidth: |
567 return createFromLength(style.width(), style); | 574 return createFromLength(style.width(), style); |
568 case CSSPropertyWordSpacing: | 575 case CSSPropertyWordSpacing: |
569 return createFromDouble(style.wordSpacing()); | 576 return createFromDouble(style.wordSpacing()); |
570 case CSSPropertyVerticalAlign: | 577 case CSSPropertyVerticalAlign: |
571 if (style.verticalAlign() == LENGTH) | 578 if (style.verticalAlign() == LENGTH) |
572 return createFromLength(style.verticalAlignLength(), style); | 579 return createFromLength(style.verticalAlignLength(), style); |
573 return AnimatableUnknown::create(CSSPrimitiveValue::create(style.vertica lAlign())); | 580 return AnimatableUnknown::create(CSSPrimitiveValue::create(style.vertica lAlign())); |
574 case CSSPropertyVisibility: | 581 case CSSPropertyVisibility: |
575 return AnimatableVisibility::create(style.visibility()); | 582 return AnimatableVisibility::create(style.visibility()); |
583 case CSSPropertyD: | |
584 return createFromPath(style.svgStyle().d()); | |
576 case CSSPropertyCx: | 585 case CSSPropertyCx: |
577 return createFromLength(style.svgStyle().cx(), style); | 586 return createFromLength(style.svgStyle().cx(), style); |
578 case CSSPropertyCy: | 587 case CSSPropertyCy: |
579 return createFromLength(style.svgStyle().cy(), style); | 588 return createFromLength(style.svgStyle().cy(), style); |
580 case CSSPropertyX: | 589 case CSSPropertyX: |
581 return createFromLength(style.svgStyle().x(), style); | 590 return createFromLength(style.svgStyle().x(), style); |
582 case CSSPropertyY: | 591 case CSSPropertyY: |
583 return createFromLength(style.svgStyle().y(), style); | 592 return createFromLength(style.svgStyle().y(), style); |
584 case CSSPropertyR: | 593 case CSSPropertyR: |
585 return createFromLength(style.svgStyle().r(), style); | 594 return createFromLength(style.svgStyle().r(), style); |
586 case CSSPropertyRx: | 595 case CSSPropertyRx: |
587 return createFromLength(style.svgStyle().rx(), style); | 596 return createFromLength(style.svgStyle().rx(), style); |
588 case CSSPropertyRy: | 597 case CSSPropertyRy: |
589 return createFromLength(style.svgStyle().ry(), style); | 598 return createFromLength(style.svgStyle().ry(), style); |
590 case CSSPropertyZIndex: | 599 case CSSPropertyZIndex: |
591 if (style.hasAutoZIndex()) | 600 if (style.hasAutoZIndex()) |
592 return AnimatableUnknown::create(CSSValueAuto); | 601 return AnimatableUnknown::create(CSSValueAuto); |
593 return createFromDouble(style.zIndex()); | 602 return createFromDouble(style.zIndex()); |
594 default: | 603 default: |
595 ASSERT_NOT_REACHED(); | 604 ASSERT_NOT_REACHED(); |
596 return nullptr; | 605 return nullptr; |
597 } | 606 } |
598 } | 607 } |
599 | 608 |
600 } // namespace blink | 609 } // namespace blink |
OLD | NEW |