Bug 102077 - [WinCairo] Favicons are flipped in vertical direction in WinCairo builds.
Summary: [WinCairo] Favicons are flipped in vertical direction in WinCairo builds.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 06:02 PST by peavo
Modified: 2013-10-30 11:20 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2012-11-13 06:29 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (1.73 KB, patch)
2012-11-16 05:38 PST, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2012-11-13 06:02:35 PST
The method BitmapImage::getHBITMAPOfSize() in WebCore/platform/graphics/win/ImageCairoWin.cpp seems to flip the bitmap in the vertical direction.
Comment 1 peavo 2012-11-13 06:29:37 PST
Created attachment 173882 [details]
Patch
Comment 2 Brent Fulgham 2012-11-15 09:07:39 PST
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*"
Comment 3 peavo 2012-11-15 11:56:19 PST
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?
Comment 4 peavo 2012-11-16 05:38:19 PST
Created attachment 174655 [details]
Patch
Comment 5 Brent Fulgham 2013-10-30 10:42:35 PDT
Comment on attachment 174655 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2013-10-30 11:20:48 PDT
Comment on attachment 174655 [details]
Patch

Clearing flags on attachment: 174655

Committed r158292: <http://trac.webkit.org/changeset/158292>
Comment 7 WebKit Commit Bot 2013-10-30 11:20:50 PDT
All reviewed patches have been landed.  Closing bug.