Bug 101769 - Use device scale factor instead of physical screen DPI for screen DPI
Summary: Use device scale factor instead of physical screen DPI for screen DPI
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: 101767
Blocks: 102566 101772
  Show dependency treegraph
 
Reported: 2012-11-09 09:05 PST by Sami Kyöstilä
Modified: 2012-11-19 08:42 PST (History)
13 users (show)

See Also:


Attachments
Patch (8.93 KB, patch)
2012-11-09 09:16 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 09:05:04 PST
Use device scale factor instead of physical screen DPI for screen DPI
Comment 1 Sami Kyöstilä 2012-11-09 09:16:32 PST
Created attachment 173322 [details]
Patch
Comment 2 Sami Kyöstilä 2012-11-09 09:36:03 PST
Thanks Adam. I'll land this once all the prerequisites are in place.
Comment 3 WebKit Review Bot 2012-11-09 10:01:31 PST
Comment on attachment 173322 [details]
Patch

Attachment 173322 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14790157
Comment 4 Peter Beverloo (cr-android ews) 2012-11-09 15:41:02 PST
Comment on attachment 173322 [details]
Patch

Attachment 173322 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14785335
Comment 5 John Mellor 2012-11-12 08:50:08 PST
Comment on attachment 173322 [details]
Patch

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

Nice cleanup - looks good!

> Source/WebCore/page/Screen.cpp:NaN
>  unsigned Screen::verticalDPI() const

Screen::horizontalDPI and Screen::verticalDPI are now redundant. Could we remove one of them, and rename the other to Screen::cssDPI (to emphasize that it computes the CSS dpi unit, not the true physical dpi of the screen)?

> Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp:-32
> -    FloatSize currentPPI = BlackBerry::Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(-1);

Seems like blackberry implemented this too. Might want to ping them on the review.
Comment 6 Sami Kyöstilä 2012-11-12 10:06:15 PST
(In reply to comment #5)
> Screen::horizontalDPI and Screen::verticalDPI are now redundant. Could we remove one of them, and rename the other to Screen::cssDPI (to emphasize that it computes the CSS dpi unit, not the true physical dpi of the screen)?

Good idea. Let me try to see how that works out.

> > Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp:-32
> > -    FloatSize currentPPI = BlackBerry::Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(-1);
> 
> Seems like blackberry implemented this too. Might want to ping them on the review.

Antonio, any thoughts about this one?
Comment 7 Jacky Jiang 2012-11-16 15:49:27 PST
(In reply to comment #6)
> (In reply to comment #5)
> > > Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp:-32
> > > -    FloatSize currentPPI = BlackBerry::Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(-1);
> > 
> > Seems like blackberry implemented this too. Might want to ping them on the review.
> 
> Antonio, any thoughts about this one?

Looks good to me.
Comment 8 WebKit Review Bot 2012-11-16 17:21:05 PST
Comment on attachment 173322 [details]
Patch

Rejecting attachment 173322 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
j.target/webkit/Source/WebKit/chromium/src/DatabaseObserver.o
Source/WebKit/chromium/src/ChromeClientImpl.cpp: In member function 'virtual void WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange(const WebCore::ViewportArguments&) const':
Source/WebKit/chromium/src/ChromeClientImpl.cpp:625: error: 'screenHorizontalDPI' was not declared in this scope
make: *** [out/Release/obj.target/webkit/Source/WebKit/chromium/src/ChromeClientImpl.o] Error 1
make: *** Waiting for unfinished jobs....

Full output: http://queues.webkit.org/results/14872336
Comment 9 WebKit Review Bot 2012-11-19 08:42:27 PST
Comment on attachment 173322 [details]
Patch

Clearing flags on attachment: 173322

Committed r135165: <http://trac.webkit.org/changeset/135165>
Comment 10 WebKit Review Bot 2012-11-19 08:42:32 PST
All reviewed patches have been landed.  Closing bug.