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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/animation/css/CSSAnimatableValueFactory.h" | 32 #include "core/animation/css/CSSAnimatableValueFactory.h" |
33 | 33 |
34 #include "CSSValueKeywords.h" | 34 #include "CSSValueKeywords.h" |
35 #include "core/animation/AnimatableColor.h" | 35 #include "core/animation/AnimatableColor.h" |
36 #include "core/animation/AnimatableImage.h" | 36 #include "core/animation/AnimatableImage.h" |
37 #include "core/animation/AnimatableLengthBox.h" | 37 #include "core/animation/AnimatableLengthBox.h" |
38 #include "core/animation/AnimatableLengthSize.h" | 38 #include "core/animation/AnimatableLengthSize.h" |
39 #include "core/animation/AnimatableNumber.h" | 39 #include "core/animation/AnimatableNumber.h" |
| 40 #include "core/animation/AnimatableSVGPaint.h" |
40 #include "core/animation/AnimatableTransform.h" | 41 #include "core/animation/AnimatableTransform.h" |
41 #include "core/animation/AnimatableUnknown.h" | 42 #include "core/animation/AnimatableUnknown.h" |
42 #include "core/animation/AnimatableVisibility.h" | 43 #include "core/animation/AnimatableVisibility.h" |
43 #include "core/animation/css/CSSAnimations.h" | 44 #include "core/animation/css/CSSAnimations.h" |
44 #include "core/css/CSSPrimitiveValue.h" | 45 #include "core/css/CSSPrimitiveValue.h" |
45 #include "core/platform/Length.h" | 46 #include "core/platform/Length.h" |
46 #include "core/platform/LengthBox.h" | 47 #include "core/platform/LengthBox.h" |
47 #include "core/rendering/style/RenderStyle.h" | 48 #include "core/rendering/style/RenderStyle.h" |
48 | 49 |
49 | 50 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 case CSSPropertyBorderTopRightRadius: | 166 case CSSPropertyBorderTopRightRadius: |
166 return createFromLengthSize(style->borderTopRightRadius(), style); | 167 return createFromLengthSize(style->borderTopRightRadius(), style); |
167 case CSSPropertyBorderTopWidth: | 168 case CSSPropertyBorderTopWidth: |
168 return createFromDouble(style->borderTopWidth()); | 169 return createFromDouble(style->borderTopWidth()); |
169 case CSSPropertyBottom: | 170 case CSSPropertyBottom: |
170 return createFromLength(style->bottom(), style); | 171 return createFromLength(style->bottom(), style); |
171 case CSSPropertyClip: | 172 case CSSPropertyClip: |
172 return createFromLengthBox(style->clip(), style); | 173 return createFromLengthBox(style->clip(), style); |
173 case CSSPropertyColor: | 174 case CSSPropertyColor: |
174 return createFromColor(property, style); | 175 return createFromColor(property, style); |
| 176 case CSSPropertyFill: |
| 177 return AnimatableSVGPaint::create(style->svgStyle()->fillPaintType(), st
yle->svgStyle()->fillPaintColor(), style->svgStyle()->fillPaintUri()); |
175 case CSSPropertyHeight: | 178 case CSSPropertyHeight: |
176 return createFromLength(style->height(), style); | 179 return createFromLength(style->height(), style); |
177 case CSSPropertyListStyleImage: | 180 case CSSPropertyListStyleImage: |
178 return AnimatableImage::create(style->listStyleImage()); | 181 return AnimatableImage::create(style->listStyleImage()); |
179 case CSSPropertyLeft: | 182 case CSSPropertyLeft: |
180 return createFromLength(style->left(), style); | 183 return createFromLength(style->left(), style); |
181 case CSSPropertyMarginBottom: | 184 case CSSPropertyMarginBottom: |
182 return createFromLength(style->marginBottom(), style); | 185 return createFromLength(style->marginBottom(), style); |
183 case CSSPropertyMarginLeft: | 186 case CSSPropertyMarginLeft: |
184 return createFromLength(style->marginLeft(), style); | 187 return createFromLength(style->marginLeft(), style); |
(...skipping 20 matching lines...) Expand all Loading... |
205 case CSSPropertyPaddingBottom: | 208 case CSSPropertyPaddingBottom: |
206 return createFromLength(style->paddingBottom(), style); | 209 return createFromLength(style->paddingBottom(), style); |
207 case CSSPropertyPaddingLeft: | 210 case CSSPropertyPaddingLeft: |
208 return createFromLength(style->paddingLeft(), style); | 211 return createFromLength(style->paddingLeft(), style); |
209 case CSSPropertyPaddingRight: | 212 case CSSPropertyPaddingRight: |
210 return createFromLength(style->paddingRight(), style); | 213 return createFromLength(style->paddingRight(), style); |
211 case CSSPropertyPaddingTop: | 214 case CSSPropertyPaddingTop: |
212 return createFromLength(style->paddingTop(), style); | 215 return createFromLength(style->paddingTop(), style); |
213 case CSSPropertyRight: | 216 case CSSPropertyRight: |
214 return createFromLength(style->right(), style); | 217 return createFromLength(style->right(), style); |
| 218 case CSSPropertyStroke: |
| 219 return AnimatableSVGPaint::create(style->svgStyle()->strokePaintType(),
style->svgStyle()->strokePaintColor(), style->svgStyle()->strokePaintUri()); |
215 case CSSPropertyTextDecorationColor: | 220 case CSSPropertyTextDecorationColor: |
216 return createFromColor(property, style); | 221 return createFromColor(property, style); |
217 case CSSPropertyTextIndent: | 222 case CSSPropertyTextIndent: |
218 return createFromLength(style->textIndent(), style); | 223 return createFromLength(style->textIndent(), style); |
219 case CSSPropertyTop: | 224 case CSSPropertyTop: |
220 return createFromLength(style->top(), style); | 225 return createFromLength(style->top(), style); |
221 case CSSPropertyWebkitBorderHorizontalSpacing: | 226 case CSSPropertyWebkitBorderHorizontalSpacing: |
222 return createFromDouble(style->horizontalBorderSpacing()); | 227 return createFromDouble(style->horizontalBorderSpacing()); |
223 case CSSPropertyWebkitBorderVerticalSpacing: | 228 case CSSPropertyWebkitBorderVerticalSpacing: |
224 return createFromDouble(style->verticalBorderSpacing()); | 229 return createFromDouble(style->verticalBorderSpacing()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 case CSSPropertyZIndex: | 262 case CSSPropertyZIndex: |
258 return createFromDouble(style->zIndex()); | 263 return createFromDouble(style->zIndex()); |
259 default: | 264 default: |
260 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert
y), "Web Animations not yet implemented: Create AnimatableValue from render styl
e: %s", getPropertyNameString(property).utf8().data()); | 265 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert
y), "Web Animations not yet implemented: Create AnimatableValue from render styl
e: %s", getPropertyNameString(property).utf8().data()); |
261 ASSERT_NOT_REACHED(); | 266 ASSERT_NOT_REACHED(); |
262 return 0; | 267 return 0; |
263 } | 268 } |
264 } | 269 } |
265 | 270 |
266 } // namespace WebCore | 271 } // namespace WebCore |
OLD | NEW |