OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } | 85 } |
86 | 86 |
87 bool applyToFill = mode == ApplyToFillMode; | 87 bool applyToFill = mode == ApplyToFillMode; |
88 SVGPaintType paintType = applyToFill ? svgStyle.fillPaintType() : svgStyle.s
trokePaintType(); | 88 SVGPaintType paintType = applyToFill ? svgStyle.fillPaintType() : svgStyle.s
trokePaintType(); |
89 ASSERT(paintType != SVG_PAINTTYPE_NONE); | 89 ASSERT(paintType != SVG_PAINTTYPE_NONE); |
90 | 90 |
91 Color color; | 91 Color color; |
92 bool hasColor = false; | 92 bool hasColor = false; |
93 switch (paintType) { | 93 switch (paintType) { |
94 case SVG_PAINTTYPE_CURRENTCOLOR: | 94 case SVG_PAINTTYPE_CURRENTCOLOR: |
| 95 case SVG_PAINTTYPE_URI_CURRENTCOLOR: |
| 96 // The keyword `currentcolor` takes its value from the value of the `col
or` property on the same element. |
| 97 color = style.visitedDependentColor(CSSPropertyColor); |
| 98 hasColor = true; |
| 99 break; |
95 case SVG_PAINTTYPE_RGBCOLOR: | 100 case SVG_PAINTTYPE_RGBCOLOR: |
96 case SVG_PAINTTYPE_URI_CURRENTCOLOR: | |
97 case SVG_PAINTTYPE_URI_RGBCOLOR: | 101 case SVG_PAINTTYPE_URI_RGBCOLOR: |
98 color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePaintCo
lor(); | 102 color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePaintCo
lor(); |
99 hasColor = true; | 103 hasColor = true; |
100 default: | 104 default: |
101 break; | 105 break; |
102 } | 106 } |
103 | 107 |
104 if (style.insideLink() == InsideVisitedLink) { | 108 if (style.insideLink() == InsideVisitedLink) { |
105 // FIXME: This code doesn't support the uri component of the visited lin
k paint, https://bugs.webkit.org/show_bug.cgi?id=70006 | 109 // FIXME: This code doesn't support the uri component of the visited lin
k paint, https://bugs.webkit.org/show_bug.cgi?id=70006 |
106 SVGPaintType visitedPaintType = applyToFill ? svgStyle.visitedLinkFillPa
intType() : svgStyle.visitedLinkStrokePaintType(); | 110 SVGPaintType visitedPaintType = applyToFill ? svgStyle.visitedLinkFillPa
intType() : svgStyle.visitedLinkStrokePaintType(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 LayoutSVGResourcePaintServer::~LayoutSVGResourcePaintServer() | 176 LayoutSVGResourcePaintServer::~LayoutSVGResourcePaintServer() |
173 { | 177 { |
174 } | 178 } |
175 | 179 |
176 SVGPaintDescription LayoutSVGResourcePaintServer::requestPaintDescription(const
LayoutObject& layoutObject, const ComputedStyle& style, LayoutSVGResourceMode re
sourceMode) | 180 SVGPaintDescription LayoutSVGResourcePaintServer::requestPaintDescription(const
LayoutObject& layoutObject, const ComputedStyle& style, LayoutSVGResourceMode re
sourceMode) |
177 { | 181 { |
178 return requestPaint(layoutObject, style, resourceMode); | 182 return requestPaint(layoutObject, style, resourceMode); |
179 } | 183 } |
180 | 184 |
181 } | 185 } |
OLD | NEW |