Bug 101767 - [chromium] Use devicePixelRatio instead of screen DPI for computing viewport attributes
Summary: [chromium] Use devicePixelRatio instead of screen DPI for computing viewport ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sami Kyöstilä
URL:
Keywords:
Depends on:
Blocks: 101769
  Show dependency treegraph
 
Reported: 2012-11-09 08:54 PST by Sami Kyöstilä
Modified: 2012-11-19 06:44 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.03 KB, patch)
2012-11-09 08:59 PST, Sami Kyöstilä
no flags Details | Formatted Diff | Diff
Patch (4.01 KB, patch)
2012-11-09 09:49 PST, Sami Kyöstilä
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.