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

Unified Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.h

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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('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/style/SVGComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/SVGComputedStyle.h b/third_party/WebKit/Source/core/style/SVGComputedStyle.h
index 443f1783758c6d964dd87bed89396f3c3efd6d07..9db42be21bd6d257bef465902df76a3c02970e62 100644
--- a/third_party/WebKit/Source/core/style/SVGComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/SVGComputedStyle.h
@@ -363,6 +363,22 @@ public:
const Color& visitedLinkStrokePaintColor() const { return stroke->visitedLinkPaintColor; }
const String& visitedLinkStrokePaintUri() const { return stroke->visitedLinkPaintUri; }
+ bool isFillColorCurrentColor() const
+ {
+ return fillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR
+ || visitedLinkFillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR
+ || fillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR
+ || visitedLinkFillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR;
+ }
+
+ bool isStrokeColorCurrentColor() const
+ {
+ return strokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
+ || visitedLinkStrokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
+ || strokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR
+ || visitedLinkStrokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR;
+ }
+
// convenience
bool hasClipper() const { return !clipperResource().isEmpty(); }
bool hasMasker() const { return !maskerResource().isEmpty(); }
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698