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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 1455153003: Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 a9e843e75f2aa8d532c229747e44b76177f2e420..4af60e88dd7da6ee0e5090053d6350da9d51d411 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -170,6 +170,14 @@ void StyleBuilderFunctions::applyValueCSSPropertyColor(StyleResolverState& state
return;
}
+ bool isFillCurrentColorByParent = state.parentStyle()->svgStyle().isFillColorCurrentColor();
+ bool isStrokeCurrentColorByParent = state.parentStyle()->svgStyle().isStrokeColorCurrentColor();
+
+ if (value->isPrimitiveValue() && (isFillCurrentColorByParent || isStrokeCurrentColorByParent)) {
fs 2015/12/15 11:36:24 I still don't think that this is something that yo
+ applyInheritCSSPropertyColor(state);
+ return;
+ }
+
if (state.applyPropertyToRegularStyle())
state.style()->setColor(StyleBuilderConverter::convertColor(state, *value));
if (state.applyPropertyToVisitedLinkStyle())

Powered by Google App Engine
This is Rietveld 408576698