2007-12-17 Mark Rowe <mrowe@apple.com>
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 18:21:43 +0000 (18:21 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 18:21:43 +0000 (18:21 +0000)
        Reviewed by Darin Adler.

        Fix incorrect array size and incorrect array index in convertNSColorToColor.

        * rendering/RenderThemeMac.mm:
        (WebCore::convertNSColorToColor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28812 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/rendering/RenderThemeMac.mm

index 3b7877c65e12787e37f7cda09e4d1417d3d4bac4..4b06fff78f31da337bc4fabb93b7fb182257487a 100644 (file)
@@ -1,3 +1,12 @@
+2007-12-17  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Fix incorrect array size and incorrect array index in convertNSColorToColor.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::convertNSColorToColor):
+
 2007-12-17  Darin Adler  <darin@apple.com>
 
         Reviewed by Mark Rowe.
index fbeee143b11de0bcd5a7c5c654a1b7daa9d1c0b3..75f0cd068ee00aecf08bca11dc9bd5b7d9753462 100644 (file)
@@ -226,12 +226,12 @@ static RGBA32 convertNSColorToColor(NSColor *color)
     [color drawSwatchInRect:NSMakeRect(0, 0, 1, 1)];
     [NSGraphicsContext restoreGraphicsState];
 
-    NSUInteger pixel[3];
+    NSUInteger pixel[4];
     [offscreenRep getPixel:pixel atX:0 y:0];
 
     [offscreenRep release];
 
-    return makeRGB(pixel[0], pixel[1], pixel[3]);
+    return makeRGB(pixel[0], pixel[1], pixel[2]);
 }
 
 void RenderThemeMac::platformColorsDidChange()