2009-02-05 Scott Violet <sky@google.com>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Feb 2009 23:40:33 +0000 (23:40 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Feb 2009 23:40:33 +0000 (23:40 +0000)
        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
WebCore/html/CanvasRenderingContext2D.cpp

index 197b4427da0aa27a02c6c81ebebf45fbcd77598f..7a1eee2e0a3e2800e0cc1b4d95e37b29f18e9644 100644 (file)
@@ -1,3 +1,16 @@
+2009-02-05  Scott Violet  <sky@google.com>
+
+        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  <sky@google.com>
 
         Reviewed by Eric Seidel.
index 60c36ddae7e8318f63dfb8d4a241c03141b7e418..f91eb0a4f5cc1dbec8ad777423f55fa9438604e8 100644 (file)
@@ -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
 }