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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResource.cpp

Issue 197213009: Remove unneeded check in requestPaintingResource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Invert logic :) Created 6 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 if (!svgStyle->hasFill()) 75 if (!svgStyle->hasFill())
76 return 0; 76 return 0;
77 } else { 77 } else {
78 if (!svgStyle->hasStroke() || isRenderingMask) 78 if (!svgStyle->hasStroke() || isRenderingMask)
79 return 0; 79 return 0;
80 } 80 }
81 81
82 bool applyToFill = mode == ApplyToFillMode; 82 bool applyToFill = mode == ApplyToFillMode;
83 SVGPaint::SVGPaintType paintType = applyToFill ? svgStyle->fillPaintType() : svgStyle->strokePaintType(); 83 SVGPaint::SVGPaintType paintType = applyToFill ? svgStyle->fillPaintType() : svgStyle->strokePaintType();
84 if (paintType == SVGPaint::SVG_PAINTTYPE_NONE) 84 ASSERT(paintType != SVGPaint::SVG_PAINTTYPE_NONE);
85 return 0;
86 85
87 Color color; 86 Color color;
88 bool hasColor = false; 87 bool hasColor = false;
89 switch (paintType) { 88 switch (paintType) {
90 case SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR: 89 case SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR:
91 case SVGPaint::SVG_PAINTTYPE_RGBCOLOR: 90 case SVGPaint::SVG_PAINTTYPE_RGBCOLOR:
92 case SVGPaint::SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR: 91 case SVGPaint::SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
93 case SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR: 92 case SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR:
94 case SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR: 93 case SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR:
95 case SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR: 94 case SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // This will process the rest of the ancestors. 212 // This will process the rest of the ancestors.
214 toRenderSVGResourceContainer(current)->removeAllClientsFromCache(); 213 toRenderSVGResourceContainer(current)->removeAllClientsFromCache();
215 break; 214 break;
216 } 215 }
217 216
218 current = current->parent(); 217 current = current->parent();
219 } 218 }
220 } 219 }
221 220
222 } 221 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698