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

Side by Side Diff: Source/core/css/SVGCSSParser.cpp

Issue 108303009: Handle "url(...) none" and "url(...) currentColor" SVG paint specs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added TC for 'none' fallback w/ failing url(...). Created 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 2008 Eric Seidel <eric@webkit.org> 2 Copyright (C) 2008 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 2004, 2005, 2007, 2010 Rob Buis <buis@kde.org> 4 2004, 2005, 2007, 2010 Rob Buis <buis@kde.org>
5 Copyright (C) 2005, 2006 Apple Computer, Inc. 5 Copyright (C) 2005, 2006 Apple Computer, Inc.
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 parsedValue = SVGPaint::createCurrentColor(); 190 parsedValue = SVGPaint::createCurrentColor();
191 else if (isSystemColor(id)) 191 else if (isSystemColor(id))
192 parsedValue = SVGPaint::createColor(RenderTheme::theme().systemC olor(id)); 192 parsedValue = SVGPaint::createColor(RenderTheme::theme().systemC olor(id));
193 else if (value->unit == CSSPrimitiveValue::CSS_URI) { 193 else if (value->unit == CSSPrimitiveValue::CSS_URI) {
194 RGBA32 c = Color::transparent; 194 RGBA32 c = Color::transparent;
195 if (m_valueList->next()) { 195 if (m_valueList->next()) {
196 if (parseColorFromValue(m_valueList->current(), c)) 196 if (parseColorFromValue(m_valueList->current(), c))
197 parsedValue = SVGPaint::createURIAndColor(value->string, c); 197 parsedValue = SVGPaint::createURIAndColor(value->string, c);
198 else if (m_valueList->current()->id == CSSValueNone) 198 else if (m_valueList->current()->id == CSSValueNone)
199 parsedValue = SVGPaint::createURIAndNone(value->string); 199 parsedValue = SVGPaint::createURIAndNone(value->string);
200 else if (m_valueList->current()->id == CSSValueCurrentcolor)
201 parsedValue = SVGPaint::createURIAndCurrentColor(value-> string);
200 } 202 }
201 if (!parsedValue) 203 if (!parsedValue)
202 parsedValue = SVGPaint::createURI(value->string); 204 parsedValue = SVGPaint::createURI(value->string);
203 } else 205 } else
204 parsedValue = parseSVGPaint(); 206 parsedValue = parseSVGPaint();
205 207
206 if (parsedValue) 208 if (parsedValue)
207 m_valueList->next(); 209 m_valueList->next();
208 } 210 }
209 break; 211 break;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 420 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
419 if (!seenStroke) 421 if (!seenStroke)
420 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 422 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
421 if (!seenMarkers) 423 if (!seenMarkers)
422 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 424 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
423 425
424 return parsedValues.release(); 426 return parsedValues.release();
425 } 427 }
426 428
427 } 429 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/fill-fallback-none-2-expected.svg ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698