Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
index de1b88ab94adc02521bf8571a43feb6f6f5f4aaf..c341b31cbe84bbbac916c4ea38c93299e300977d 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
@@ -168,10 +168,28 @@ void StyleBuilderFunctions::applyValueCSSPropertyColor(StyleResolverState& state |
return; |
} |
- if (state.applyPropertyToRegularStyle()) |
- state.style()->setColor(StyleBuilderConverter::convertColor(state, *value)); |
- if (state.applyPropertyToVisitedLinkStyle()) |
- state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(state, *value, true)); |
+ bool isFillCurrentColor = state.style()->svgStyle().isFillColorCurrentColor(); |
+ bool isStrokeCurrentColor = state.style()->svgStyle().isStrokeColorCurrentColor(); |
+ |
+ if (state.applyPropertyToRegularStyle()) { |
+ if (!isFillCurrentColor && !isStrokeCurrentColor) |
+ state.style()->setColor(StyleBuilderConverter::convertColor(state, *value)); |
+ |
+ if (isFillCurrentColor) |
+ state.style()->setColor(state.style()->svgStyle().fillPaintColor()); |
fs
2015/11/27 08:50:25
You shouldn't be overriding the value of 'color' l
|
+ if (isStrokeCurrentColor) |
+ state.style()->setColor(state.style()->svgStyle().strokePaintColor()); |
+ } |
+ |
+ if (state.applyPropertyToVisitedLinkStyle()) { |
+ if (!isFillCurrentColor && !isStrokeCurrentColor) |
+ state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(state, *value, true)); |
+ |
+ if (isFillCurrentColor) |
+ state.style()->setColor(state.style()->svgStyle().visitedLinkFillPaintColor()); |
+ if (isStrokeCurrentColor) |
+ state.style()->setColor(state.style()->svgStyle().visitedLinkStrokePaintColor()); |
+ } |
} |
void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolverState& state) |