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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp

Issue 1778413003: Implement PaintRenderingContext2D off BaseRenderingContext2D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
Index: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
index d7f716a57c61e533a4dc748e27aba1a225947de6..709844c16fc21d3474e1ddae4343765184e6ed6a 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
@@ -79,6 +79,22 @@ bool parseColorOrCurrentColor(Color& parsedColor, const String& colorString, HTM
}
}
+bool parseColorOnly(Color& parsedColor, const String& colorString)
Justin Novosad 2016/03/17 18:46:10 You could have continued to used the old parseColo
ikilpatrick 2016/03/17 19:15:41 Ah. That's great. Thanks. Done.
+{
+ ColorParseResult parseResult = parseColor(parsedColor, colorString);
+ switch (parseResult) {
+ case ParsedRGBA:
+ case ParsedSystemColor:
+ return true;
+ case ParsedCurrentColor:
+ case ParseFailed:
+ return false;
+ default:
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+}
+
CanvasStyle::CanvasStyle(RGBA32 rgba)
: m_type(ColorRGBA)
, m_rgba(rgba)

Powered by Google App Engine
This is Rietveld 408576698