The method BitmapImage::getHBITMAPOfSize() in WebCore/platform/graphics/win/ImageCairoWin.cpp seems to flip the bitmap in the vertical direction.
Created attachment 173882 [details] Patch
Comment on attachment 173882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=173882&action=review The code changes seem reasonable, but do you have a test case that can be used to show that it currently doesn't work, and that this change fixes it? > Source/WebCore/platform/graphics/win/ImageCairoWin.cpp:70 > + unsigned char *bmpdata = (unsigned char*)bmpInfo.bmBits + bmpInfo.bmWidthBytes*(bmpInfo.bmHeight-1); This should be declared "unsigned char*"
When I call IWebIconDatabase::iconForURL() to get the HBITMAP of the favicon, and draw it with the StretchBlt() win32 api function, I can see that it's been flipped in the Y direction. With this code change, I can see that it is drawn correctly. Should I attach screenshots, or should I make a new test for this? If so, is there a framework, or guidelines I should follow?
Created attachment 174655 [details] Patch
Comment on attachment 174655 [details] Patch r=me
Comment on attachment 174655 [details] Patch Clearing flags on attachment: 174655 Committed r158292: <http://trac.webkit.org/changeset/158292>
All reviewed patches have been landed. Closing bug.