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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp

Issue 1545673002: Inherit 'currentColor' as 'currentColor' for 'fill'/'stroke' properties (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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/css/currentColor-inheritance-about-fill-color-expected.svg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
index 485a5949f6b297a428df78f45ea6d01e2999d02f..df85799b29ec320417254aba1c7cc3adf880032b 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
@@ -91,8 +91,12 @@ static SVGPaintDescription requestPaint(const LayoutObject& object, const Comput
bool hasColor = false;
switch (paintType) {
case SVG_PAINTTYPE_CURRENTCOLOR:
- case SVG_PAINTTYPE_RGBCOLOR:
case SVG_PAINTTYPE_URI_CURRENTCOLOR:
+ // The keyword `currentcolor` takes its value from the value of the `color` property on the same element.
+ color = style.visitedDependentColor(CSSPropertyColor);
+ hasColor = true;
+ break;
+ case SVG_PAINTTYPE_RGBCOLOR:
case SVG_PAINTTYPE_URI_RGBCOLOR:
color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePaintColor();
hasColor = true;
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/css/currentColor-inheritance-about-fill-color-expected.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698