Bug 101767

Summary: [chromium] Use devicePixelRatio instead of screen DPI for computing viewport attributes
Product: WebKit Reporter: Sami Kyöstilä <skyostil>
Component: New BugsAssignee: Sami Kyöstilä <skyostil>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, fsamuel, johnme, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 101769    
Attachments:
Description Flags
Patch
none
Patch none

Description Sami Kyöstilä 2012-11-09 08:54:38 PST
[chromium] Use devicePixelRatio instead of screen DPI for computing viewport attributes
Comment 1 Sami Kyöstilä 2012-11-09 08:59:01 PST
Created attachment 173318 [details]
Patch
Comment 2 Sami Kyöstilä 2012-11-09 09:01:15 PST
Note: this depends on https://codereview.chromium.org/11348033/.
Comment 3 Adam Barth 2012-11-09 09:35:21 PST
Comment on attachment 173318 [details]
Patch

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

> Source/WebKit/chromium/src/ChromeClientImpl.cpp:625
> -    float devicePixelRatio = dpi / ViewportArguments::deprecatedTargetDPI;
> +    float devicePixelRatio = m_webView->client()->screenInfo().deviceScaleFactor;

m_webView->client() -> client

(We already have the client in a local variable.
Comment 4 Sami Kyöstilä 2012-11-09 09:49:50 PST
Created attachment 173330 [details]
Patch

Use existing pointer to client.
Comment 5 John Mellor 2012-11-12 05:56:18 PST
Looks good to me - thanks! Hopefully once the other platforms have done this too we'll be able to get rid of ViewportArguments::deprecatedTargetDPI.
Comment 6 WebKit Review Bot 2012-11-19 06:44:12 PST
Comment on attachment 173330 [details]
Patch

Clearing flags on attachment: 173330

Committed r135150: <http://trac.webkit.org/changeset/135150>
Comment 7 WebKit Review Bot 2012-11-19 06:44:16 PST
All reviewed patches have been landed.  Closing bug.