From 24bd49ef5bee331f26b0a7bce674028743694313 Mon Sep 17 00:00:00 2001 From: "dglazkov@chromium.org" Date: Thu, 5 Feb 2009 23:40:33 +0000 Subject: [PATCH] 2009-02-05 Scott Violet Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23766 CanvasRenderingContext2D::setShadow needs else for other platforms. Implements the CMYK variant of CanvasRenderingContext2D::setShadow for other platforms using the CMYK color constructor. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setShadow): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40693 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 13 +++++++++++++ WebCore/html/CanvasRenderingContext2D.cpp | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 197b4427da0a..7a1eee2e0a3e 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2009-02-05 Scott Violet + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=23766 + CanvasRenderingContext2D::setShadow needs else for other platforms. + + Implements the CMYK variant of CanvasRenderingContext2D::setShadow for + other platforms using the CMYK color constructor. + + * html/CanvasRenderingContext2D.cpp: + (WebCore::CanvasRenderingContext2D::setShadow): + 2009-02-05 Scott Violet Reviewed by Eric Seidel. diff --git a/WebCore/html/CanvasRenderingContext2D.cpp b/WebCore/html/CanvasRenderingContext2D.cpp index 60c36ddae7e8..f91eb0a4f5cc 100644 --- a/WebCore/html/CanvasRenderingContext2D.cpp +++ b/WebCore/html/CanvasRenderingContext2D.cpp @@ -867,7 +867,6 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur, GraphicsContext* dc = drawingContext(); if (!dc) return; - // FIXME: Do this through platform-independent GraphicsContext API. #if PLATFORM(CG) const CGFloat components[5] = { c, m, y, k, a }; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceCMYK(); @@ -875,6 +874,8 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur, CGColorSpaceRelease(colorSpace); CGContextSetShadowWithColor(dc->platformContext(), adjustedShadowSize(width, -height), blur, shadowColor); CGColorRelease(shadowColor); +#else + dc->setShadow(IntSize(width, -height), blur, Color(c, m, y, k, a)); #endif } -- 2.36.0