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

Unified Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 25456002: Web Animations CSS: Support animation of fill and stroke (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« Source/core/animation/AnimatableSVGPaint.cpp ('K') | « Source/core/core.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/AnimatedStyleBuilder.cpp
diff --git a/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
index 6414b3d6c4c4086262a30cd152328f4dc6152aed..e93f7ad764a698a08d2e80e9e5ec6900eeb279ac 100644
--- a/Source/core/css/resolver/AnimatedStyleBuilder.cpp
+++ b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -36,6 +36,7 @@
#include "core/animation/AnimatableLengthBox.h"
#include "core/animation/AnimatableLengthSize.h"
#include "core/animation/AnimatableNumber.h"
+#include "core/animation/AnimatableSVGPaint.h"
#include "core/animation/AnimatableTransform.h"
#include "core/animation/AnimatableUnknown.h"
#include "core/animation/AnimatableValue.h"
@@ -163,6 +164,12 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setColor(toAnimatableColor(value)->color());
style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor());
return;
+ case CSSPropertyFill:
+ {
+ const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
+ style->accessSVGStyle()->setFillPaint(svgPaint->paintType(), svgPaint->color(), svgPaint->uri());
+ }
+ return;
case CSSPropertyHeight:
style->setHeight(animatableValueToLength(value, state));
return;
@@ -224,6 +231,12 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
case CSSPropertyRight:
style->setRight(animatableValueToLength(value, state));
return;
+ case CSSPropertyStroke:
+ {
+ const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
+ style->accessSVGStyle()->setStrokePaint(svgPaint->paintType(), svgPaint->color(), svgPaint->uri());
+ }
+ return;
case CSSPropertyTextDecorationColor:
style->setTextDecorationColor(toAnimatableColor(value)->color());
style->setVisitedLinkTextDecorationColor(toAnimatableColor(value)->visitedLinkColor());
« Source/core/animation/AnimatableSVGPaint.cpp ('K') | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698