[Webkit-unassigned] [Bug 88114] New: Don't hardcode target dpi of 160 (it should be 96 on desktop)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 1 11:35:58 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=88114
Summary: Don't hardcode target dpi of 160 (it should be 96 on
desktop)
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Enhancement
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: johnme at chromium.org
CC: mjs at apple.com, bdakin at apple.com, abarth at webkit.org,
simon.fraser at apple.com, dino at apple.com,
kenneth at webkit.org, fsamuel at chromium.org,
aelias at chromium.org
Since bug 87407 (and bug 88047) the deviceScaleFactor is computed as deviceDPI/160, where deviceDPI is supposedly the true dpi of the device.
This works on phones, but is incorrect on laptops/desktops. The definition of a CSS pixel (http://www.w3.org/TR/css3-values/#reference-pixel) requires a pixel density of 96dpi on devices used at arms length (the reason that 160 works well on phones is because they're held at about 60% of an arm length).
It's also common to discretize deviceScaleFactor to the nearest 0.25 or so.
So laptop/desktop ports that are considering turning on ENABLE(VIEWPORT) should consider factoring out 160 into a value passed by the embedding port (e.g. in ChromeClient.h) based on it's knowledge of the device's typical distance from the viewer.
Alternatively, instead of passing a value for the target dpi (e.g. 160), have the embedder provide the deviceScaleFactor directly (for example Android would probably provide DisplayMetrics.density[1], while iOS would just return 2 if retina else 1). This might be more flexible than having WebCore decide how to discretize fractional values.
ChromeOS folks, this might be of interest since afaik you plan to ship ENABLE(VIEWPORT).
Apple MacBook folks might also be interested, given rumors of high resolution displays which will require appropriate deviceScaleFactor.
[1]: http://developer.android.com/reference/android/util/DisplayMetrics.html#density
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list