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

Side by Side Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 26292004: Web Animations CSS: Support animation of stroke-dasharray property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21 matching lines...) Expand all
32 #include "core/css/resolver/AnimatedStyleBuilder.h" 32 #include "core/css/resolver/AnimatedStyleBuilder.h"
33 33
34 #include "core/animation/AnimatableClipPathOperation.h" 34 #include "core/animation/AnimatableClipPathOperation.h"
35 #include "core/animation/AnimatableColor.h" 35 #include "core/animation/AnimatableColor.h"
36 #include "core/animation/AnimatableDouble.h" 36 #include "core/animation/AnimatableDouble.h"
37 #include "core/animation/AnimatableImage.h" 37 #include "core/animation/AnimatableImage.h"
38 #include "core/animation/AnimatableLength.h" 38 #include "core/animation/AnimatableLength.h"
39 #include "core/animation/AnimatableLengthBox.h" 39 #include "core/animation/AnimatableLengthBox.h"
40 #include "core/animation/AnimatableLengthSize.h" 40 #include "core/animation/AnimatableLengthSize.h"
41 #include "core/animation/AnimatableSVGLength.h" 41 #include "core/animation/AnimatableSVGLength.h"
42 #include "core/animation/AnimatableSVGLengthVector.h"
42 #include "core/animation/AnimatableSVGPaint.h" 43 #include "core/animation/AnimatableSVGPaint.h"
43 #include "core/animation/AnimatableShapeValue.h" 44 #include "core/animation/AnimatableShapeValue.h"
44 #include "core/animation/AnimatableTransform.h" 45 #include "core/animation/AnimatableTransform.h"
45 #include "core/animation/AnimatableUnknown.h" 46 #include "core/animation/AnimatableUnknown.h"
46 #include "core/animation/AnimatableValue.h" 47 #include "core/animation/AnimatableValue.h"
47 #include "core/animation/AnimatableVisibility.h" 48 #include "core/animation/AnimatableVisibility.h"
48 #include "core/animation/css/CSSAnimations.h" 49 #include "core/animation/css/CSSAnimations.h"
49 #include "core/css/CSSPrimitiveValueMappings.h" 50 #include "core/css/CSSPrimitiveValueMappings.h"
50 #include "core/css/resolver/StyleBuilder.h" 51 #include "core/css/resolver/StyleBuilder.h"
51 #include "core/css/resolver/StyleResolverState.h" 52 #include "core/css/resolver/StyleResolverState.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return; 256 return;
256 case CSSPropertyPaddingTop: 257 case CSSPropertyPaddingTop:
257 style->setPaddingTop(animatableValueToLength(value, state)); 258 style->setPaddingTop(animatableValueToLength(value, state));
258 return; 259 return;
259 case CSSPropertyRight: 260 case CSSPropertyRight:
260 style->setRight(animatableValueToLength(value, state)); 261 style->setRight(animatableValueToLength(value, state));
261 return; 262 return;
262 case CSSPropertyStopOpacity: 263 case CSSPropertyStopOpacity:
263 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); 264 style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1));
264 return; 265 return;
266 case CSSPropertyStrokeDasharray:
267 style->setStrokeDashArray(toAnimatableSVGLengthVector(value)->toSVGLengt hVector());
268 return;
265 case CSSPropertyStrokeDashoffset: 269 case CSSPropertyStrokeDashoffset:
266 style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength()); 270 style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength());
267 return; 271 return;
268 case CSSPropertyStrokeOpacity: 272 case CSSPropertyStrokeOpacity:
269 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1)); 273 style->setStrokeOpacity(clampTo<float>(toAnimatableDouble(value)->toDoub le(), 0, 1));
270 return; 274 return;
271 case CSSPropertyStroke: 275 case CSSPropertyStroke:
272 { 276 {
273 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 277 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
274 style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPa int->color(), svgPaint->uri()); 278 style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPa int->color(), svgPaint->uri());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 case CSSPropertyZoom: 370 case CSSPropertyZoom:
367 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble())); 371 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble()));
368 return; 372 return;
369 default: 373 default:
370 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data()); 374 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data());
371 ASSERT_NOT_REACHED(); 375 ASSERT_NOT_REACHED();
372 } 376 }
373 } 377 }
374 378
375 } // namespace WebCore 379 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698