Bug 69874

Summary: WebKit2 snapshot APIs should take the device scale factor into account
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit APIAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.7   
Attachments:
Description Flags
Patch darin: review+

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.