Favicons are flipped in vertical direction in WinCairo builds.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 18:22:34 +0000 (18:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 18:22:34 +0000 (18:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=102077

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/win/ImageCairoWin.cpp

index db4483c27da26a3fd6bf77b8a95669a748c82c3f..2abc454f4b047ea2444cbd4eccc47c208b15a811 100644 (file)
@@ -1,3 +1,13 @@
+2013-10-30  peavo@outlook.com  <peavo@outlook.com>
+
+        Favicons are flipped in vertical direction in WinCairo builds.
+        https://bugs.webkit.org/show_bug.cgi?id=102077
+
+        Reviewed by Brent Fulgham.
+
+        * platform/graphics/win/ImageCairoWin.cpp:
+        (WebCore::BitmapImage::getHBITMAPOfSize):
+
 2013-10-30  Jer Noble  <jer.noble@apple.com>
 
         [MSE] Add MediaSource compatable loading functions to MediaPlayer
 2013-10-30  Jer Noble  <jer.noble@apple.com>
 
         [MSE] Add MediaSource compatable loading functions to MediaPlayer
index b522532db40596c07267cd35b6653efc127196d7..b0b1b1c20af81116e6cc41edbe745bf8ba686f91 100644 (file)
@@ -68,12 +68,9 @@ bool BitmapImage::getHBITMAPOfSize(HBITMAP bmp, const IntSize* size)
         memset(bmpInfo.bmBits, 255, bufferSize);
     }
 
         memset(bmpInfo.bmBits, 255, bufferSize);
     }
 
-    cairo_surface_t* image = cairo_image_surface_create_for_data((unsigned char*)bmpInfo.bmBits,
-                                               CAIRO_FORMAT_ARGB32,
-                                               bmpInfo.bmWidth,
-                                               bmpInfo.bmHeight,
-                                               bmpInfo.bmWidthBytes);
+    unsigned char* bmpdata = (unsigned char*)bmpInfo.bmBits + bmpInfo.bmWidthBytes*(bmpInfo.bmHeight-1);
 
 
+    cairo_surface_t* image = cairo_image_surface_create_for_data(bmpdata, CAIRO_FORMAT_ARGB32, bmpInfo.bmWidth, bmpInfo.bmHeight, -bmpInfo.bmWidthBytes);
 
     cairo_t* targetRef = cairo_create(image);
     cairo_surface_destroy(image);
 
     cairo_t* targetRef = cairo_create(image);
     cairo_surface_destroy(image);