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

Unified Diff: Source/core/html/canvas/CanvasStyle.cpp

Issue 196093002: Remove document param from parseSystemColor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/canvas/CanvasStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasStyle.cpp
diff --git a/Source/core/html/canvas/CanvasStyle.cpp b/Source/core/html/canvas/CanvasStyle.cpp
index 8d7f26eb095a78ab11ff18770456ec50c6a64b9c..28877cd99ef4debd23e9d4d7ee2e606db7cac509 100644
--- a/Source/core/html/canvas/CanvasStyle.cpp
+++ b/Source/core/html/canvas/CanvasStyle.cpp
@@ -42,13 +42,13 @@ namespace WebCore {
enum ColorParseResult { ParsedRGBA, ParsedCurrentColor, ParsedSystemColor, ParseFailed };
-static ColorParseResult parseColor(RGBA32& parsedColor, const String& colorString, Document* document = 0)
+static ColorParseResult parseColor(RGBA32& parsedColor, const String& colorString)
{
if (equalIgnoringCase(colorString, "currentcolor"))
return ParsedCurrentColor;
if (BisonCSSParser::parseColor(parsedColor, colorString))
return ParsedRGBA;
- if (BisonCSSParser::parseSystemColor(parsedColor, colorString, document))
+ if (BisonCSSParser::parseSystemColor(parsedColor, colorString))
return ParsedSystemColor;
return ParseFailed;
}
@@ -64,7 +64,7 @@ RGBA32 currentColor(HTMLCanvasElement* canvas)
bool parseColorOrCurrentColor(RGBA32& parsedColor, const String& colorString, HTMLCanvasElement* canvas)
{
- ColorParseResult parseResult = parseColor(parsedColor, colorString, canvas ? &canvas->document() : 0);
+ ColorParseResult parseResult = parseColor(parsedColor, colorString);
switch (parseResult) {
case ParsedRGBA:
case ParsedSystemColor:
@@ -123,10 +123,10 @@ CanvasStyle::CanvasStyle(PassRefPtr<CanvasPattern> pattern)
{
}
-PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color, Document* document)
+PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color)
{
RGBA32 rgba;
- ColorParseResult parseResult = parseColor(rgba, color, document);
+ ColorParseResult parseResult = parseColor(rgba, color);
switch (parseResult) {
case ParsedRGBA:
case ParsedSystemColor:
« no previous file with comments | « Source/core/html/canvas/CanvasStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698