Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
| diff --git a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
| index dde8e17743f67a8c20026d210dda62fe83e42953..286ae2b279b4ac93210c8e4015c9f9c1a35ef2dc 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
| @@ -374,8 +374,20 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt |
| style->setClip(animatableValueToLengthBox(value, state)); |
| return; |
| case CSSPropertyColor: |
| - style->setColor(toAnimatableColor(value)->color()); |
| - style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor()); |
| + { |
| + style->setColor(toAnimatableColor(value)->color()); |
| + style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor()); |
| + if (state.element()->isSVGElement()) { |
|
fs
2015/11/20 16:27:14
I think it might be a better idea to just resolve
hyunjunekim2
2015/11/24 08:07:36
fs, Hi, I have a question and want a advice. I tri
|
| + SVGComputedStyle& svgStyle = style->accessSVGStyle(); |
| + if (svgStyle.isFillColorCurrentColor()) { |
| + svgStyle.setFillPaint(svgStyle.fillPaintType(), toAnimatableColor(value)->color(), svgStyle.fillPaintUri(), true, false); |
| + svgStyle.setFillPaint(svgStyle.visitedLinkFillPaintType(), toAnimatableColor(value)->visitedLinkColor(), svgStyle.visitedLinkFillPaintUri(), false, true); |
| + } else if (svgStyle.isStrokeColorCurrentColor()) { |
| + svgStyle.setStrokePaint(svgStyle.strokePaintType(), toAnimatableColor(value)->color(), svgStyle.strokePaintUri(), true, false); |
| + svgStyle.setStrokePaint(svgStyle.visitedLinkStrokePaintType(), toAnimatableColor(value)->visitedLinkColor(), svgStyle.visitedLinkStrokePaintUri(), false, true); |
| + } |
| + } |
| + } |
| return; |
| case CSSPropertyFillOpacity: |
| style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, 1)); |