Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: Source/core/animation/css/CSSAnimatableValueFactory.cpp

Issue 38823002: Web Animations CSS: Support animation of {text,box,-webkit-box}-shadow and fix blur clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
37 #include "core/animation/AnimatableDouble.h" 37 #include "core/animation/AnimatableDouble.h"
38 #include "core/animation/AnimatableImage.h" 38 #include "core/animation/AnimatableImage.h"
39 #include "core/animation/AnimatableLength.h" 39 #include "core/animation/AnimatableLength.h"
40 #include "core/animation/AnimatableLengthBox.h" 40 #include "core/animation/AnimatableLengthBox.h"
41 #include "core/animation/AnimatableLengthBoxAndBool.h" 41 #include "core/animation/AnimatableLengthBoxAndBool.h"
42 #include "core/animation/AnimatableLengthPoint.h" 42 #include "core/animation/AnimatableLengthPoint.h"
43 #include "core/animation/AnimatableLengthSize.h" 43 #include "core/animation/AnimatableLengthSize.h"
44 #include "core/animation/AnimatableRepeatable.h" 44 #include "core/animation/AnimatableRepeatable.h"
45 #include "core/animation/AnimatableSVGLength.h" 45 #include "core/animation/AnimatableSVGLength.h"
46 #include "core/animation/AnimatableSVGPaint.h" 46 #include "core/animation/AnimatableSVGPaint.h"
47 #include "core/animation/AnimatableShadow.h"
47 #include "core/animation/AnimatableShapeValue.h" 48 #include "core/animation/AnimatableShapeValue.h"
48 #include "core/animation/AnimatableStrokeDasharrayList.h" 49 #include "core/animation/AnimatableStrokeDasharrayList.h"
49 #include "core/animation/AnimatableTransform.h" 50 #include "core/animation/AnimatableTransform.h"
50 #include "core/animation/AnimatableUnknown.h" 51 #include "core/animation/AnimatableUnknown.h"
51 #include "core/animation/AnimatableVisibility.h" 52 #include "core/animation/AnimatableVisibility.h"
52 #include "core/animation/css/CSSAnimations.h" 53 #include "core/animation/css/CSSAnimations.h"
53 #include "core/css/CSSCalculationValue.h" 54 #include "core/css/CSSCalculationValue.h"
54 #include "core/css/CSSPrimitiveValue.h" 55 #include "core/css/CSSPrimitiveValue.h"
55 #include "core/css/CSSPrimitiveValueMappings.h" 56 #include "core/css/CSSPrimitiveValueMappings.h"
56 #include "core/rendering/style/RenderStyle.h" 57 #include "core/rendering/style/RenderStyle.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 case CSSPropertyBorderTopColor: 243 case CSSPropertyBorderTopColor:
243 return createFromColor(property, style); 244 return createFromColor(property, style);
244 case CSSPropertyBorderTopLeftRadius: 245 case CSSPropertyBorderTopLeftRadius:
245 return createFromLengthSize(style->borderTopLeftRadius(), style); 246 return createFromLengthSize(style->borderTopLeftRadius(), style);
246 case CSSPropertyBorderTopRightRadius: 247 case CSSPropertyBorderTopRightRadius:
247 return createFromLengthSize(style->borderTopRightRadius(), style); 248 return createFromLengthSize(style->borderTopRightRadius(), style);
248 case CSSPropertyBorderTopWidth: 249 case CSSPropertyBorderTopWidth:
249 return createFromDouble(style->borderTopWidth()); 250 return createFromDouble(style->borderTopWidth());
250 case CSSPropertyBottom: 251 case CSSPropertyBottom:
251 return createFromLength(style->bottom(), style); 252 return createFromLength(style->bottom(), style);
253 case CSSPropertyBoxShadow:
254 return AnimatableShadow::create(style->boxShadow());
252 case CSSPropertyClip: 255 case CSSPropertyClip:
253 if (style->hasClip()) 256 if (style->hasClip())
254 return createFromLengthBox(style->clip(), style); 257 return createFromLengthBox(style->clip(), style);
255 return AnimatableUnknown::create(CSSPrimitiveValue::create(CSSValueAuto) ); 258 return AnimatableUnknown::create(CSSPrimitiveValue::create(CSSValueAuto) );
256 case CSSPropertyColor: 259 case CSSPropertyColor:
257 return createFromColor(property, style); 260 return createFromColor(property, style);
258 case CSSPropertyFillOpacity: 261 case CSSPropertyFillOpacity:
259 return createFromDouble(style->fillOpacity()); 262 return createFromDouble(style->fillOpacity());
260 case CSSPropertyFill: 263 case CSSPropertyFill:
261 return AnimatableSVGPaint::create(style->svgStyle()->fillPaintType(), st yle->svgStyle()->fillPaintColor(), style->svgStyle()->fillPaintUri()); 264 return AnimatableSVGPaint::create(style->svgStyle()->fillPaintType(), st yle->svgStyle()->fillPaintColor(), style->svgStyle()->fillPaintUri());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 case CSSPropertyStrokeMiterlimit: 341 case CSSPropertyStrokeMiterlimit:
339 return createFromDouble(style->strokeMiterLimit()); 342 return createFromDouble(style->strokeMiterLimit());
340 case CSSPropertyStrokeOpacity: 343 case CSSPropertyStrokeOpacity:
341 return createFromDouble(style->strokeOpacity()); 344 return createFromDouble(style->strokeOpacity());
342 case CSSPropertyStroke: 345 case CSSPropertyStroke:
343 return AnimatableSVGPaint::create(style->svgStyle()->strokePaintType(), style->svgStyle()->strokePaintColor(), style->svgStyle()->strokePaintUri()); 346 return AnimatableSVGPaint::create(style->svgStyle()->strokePaintType(), style->svgStyle()->strokePaintColor(), style->svgStyle()->strokePaintUri());
344 case CSSPropertyTextDecorationColor: 347 case CSSPropertyTextDecorationColor:
345 return createFromColor(property, style); 348 return createFromColor(property, style);
346 case CSSPropertyTextIndent: 349 case CSSPropertyTextIndent:
347 return createFromLength(style->textIndent(), style); 350 return createFromLength(style->textIndent(), style);
351 case CSSPropertyTextShadow:
352 return AnimatableShadow::create(style->textShadow());
348 case CSSPropertyTop: 353 case CSSPropertyTop:
349 return createFromLength(style->top(), style); 354 return createFromLength(style->top(), style);
350 case CSSPropertyWebkitBorderHorizontalSpacing: 355 case CSSPropertyWebkitBorderHorizontalSpacing:
351 return createFromDouble(style->horizontalBorderSpacing()); 356 return createFromDouble(style->horizontalBorderSpacing());
352 case CSSPropertyWebkitBorderVerticalSpacing: 357 case CSSPropertyWebkitBorderVerticalSpacing:
353 return createFromDouble(style->verticalBorderSpacing()); 358 return createFromDouble(style->verticalBorderSpacing());
359 case CSSPropertyWebkitBoxShadow:
360 return AnimatableShadow::create(style->boxShadow());
354 case CSSPropertyWebkitClipPath: 361 case CSSPropertyWebkitClipPath:
355 return AnimatableClipPathOperation::create(style->clipPath()); 362 return AnimatableClipPathOperation::create(style->clipPath());
356 case CSSPropertyWebkitColumnCount: 363 case CSSPropertyWebkitColumnCount:
357 return createFromDouble(style->columnCount()); 364 return createFromDouble(style->columnCount());
358 case CSSPropertyWebkitColumnGap: 365 case CSSPropertyWebkitColumnGap:
359 return createFromDouble(style->columnGap()); 366 return createFromDouble(style->columnGap());
360 case CSSPropertyWebkitColumnRuleColor: 367 case CSSPropertyWebkitColumnRuleColor:
361 return createFromColor(property, style); 368 return createFromColor(property, style);
362 case CSSPropertyWebkitColumnRuleWidth: 369 case CSSPropertyWebkitColumnRuleWidth:
363 return createFromDouble(style->columnRuleWidth()); 370 return createFromDouble(style->columnRuleWidth());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 case CSSPropertyZoom: 423 case CSSPropertyZoom:
417 return createFromDouble(style->zoom()); 424 return createFromDouble(style->zoom());
418 default: 425 default:
419 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Create AnimatableValue from render styl e: %s", getPropertyNameString(property).utf8().data()); 426 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Create AnimatableValue from render styl e: %s", getPropertyNameString(property).utf8().data());
420 ASSERT_NOT_REACHED(); 427 ASSERT_NOT_REACHED();
421 return 0; 428 return 0;
422 } 429 }
423 } 430 }
424 431
425 } // namespace WebCore 432 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698