Chromium Code Reviews| 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 color = style.visitedDependentColor(CSSPropertyColor); | |
| 97 if (!color.alpha()) | |
|
fs
2015/11/25 17:23:00
I don't see why you need this.
hyunjunekim2
2015/11/26 01:07:26
And If don't has color(the color wasn't applied),
fs
2015/11/26 11:30:34
I suspect this is just a side-effect of the change
| |
| 98 color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePai ntColor(); | |
| 99 hasColor = true; | |
| 100 break; | |
| 95 case SVG_PAINTTYPE_RGBCOLOR: | 101 case SVG_PAINTTYPE_RGBCOLOR: |
| 96 case SVG_PAINTTYPE_URI_CURRENTCOLOR: | |
| 97 case SVG_PAINTTYPE_URI_RGBCOLOR: | 102 case SVG_PAINTTYPE_URI_RGBCOLOR: |
| 98 color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePaintCo lor(); | 103 color = applyToFill ? svgStyle.fillPaintColor() : svgStyle.strokePaintCo lor(); |
| 99 hasColor = true; | 104 hasColor = true; |
| 100 default: | 105 default: |
| 101 break; | 106 break; |
| 102 } | 107 } |
| 103 | 108 |
| 104 if (style.insideLink() == InsideVisitedLink) { | 109 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 | 110 // 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(); | 111 SVGPaintType visitedPaintType = applyToFill ? svgStyle.visitedLinkFillPa intType() : svgStyle.visitedLinkStrokePaintType(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 LayoutSVGResourcePaintServer::~LayoutSVGResourcePaintServer() | 177 LayoutSVGResourcePaintServer::~LayoutSVGResourcePaintServer() |
| 173 { | 178 { |
| 174 } | 179 } |
| 175 | 180 |
| 176 SVGPaintDescription LayoutSVGResourcePaintServer::requestPaintDescription(const LayoutObject& layoutObject, const ComputedStyle& style, LayoutSVGResourceMode re sourceMode) | 181 SVGPaintDescription LayoutSVGResourcePaintServer::requestPaintDescription(const LayoutObject& layoutObject, const ComputedStyle& style, LayoutSVGResourceMode re sourceMode) |
| 177 { | 182 { |
| 178 return requestPaint(layoutObject, style, resourceMode); | 183 return requestPaint(layoutObject, style, resourceMode); |
| 179 } | 184 } |
| 180 | 185 |
| 181 } | 186 } |
| OLD | NEW |