Bug 69874 - WebKit2 snapshot APIs should take the device scale factor into account
Summary: WebKit2 snapshot APIs should take the device scale factor into account
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.7
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 15:27 PDT by Beth Dakin
Modified: 2011-10-11 16:04 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.83 KB, patch)
2011-10-11 15:42 PDT, Beth Dakin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2011-10-11 15:27:10 PDT
WebKit2 snapshot APIs should take the device scale factor into account to create snapshots at the appropriate resolution.
Comment 1 Beth Dakin 2011-10-11 15:42:14 PDT
Created attachment 110591 [details]
Patch
Comment 2 Darin Adler 2011-10-11 15:45:31 PDT
Comment on attachment 110591 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=110591&action=review

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:945
> +    float deviceScaleFactor = corePage()->deviceScaleFactor();

Given that the code below repeatedly multiplies this by the scale factor and never uses the device scale factor alone, I’d suggest instead:

    float combinedScaleFactor = scaleFactor * corePage()->deviceScaleFactor();
Comment 3 Beth Dakin 2011-10-11 16:04:51 PDT
(In reply to comment #2)
> (From update of attachment 110591 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=110591&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:945
> > +    float deviceScaleFactor = corePage()->deviceScaleFactor();
> 
> Given that the code below repeatedly multiplies this by the scale factor and never uses the device scale factor alone, I’d suggest instead:
> 
>     float combinedScaleFactor = scaleFactor * corePage()->deviceScaleFactor();

Fixed!

Thanks!

Change committed with revision 97191.