Bug 39789 - Change ViewportArguments to use ChromeClient::platformScreenSize instead of ChromeClient::windowRect
Summary: Change ViewportArguments to use ChromeClient::platformScreenSize instead of C...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 15:04 PDT by Daniel Bates
Modified: 2013-10-02 12:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.36 KB, patch)
2010-05-26 15:09 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (4.52 KB, patch)
2010-05-26 15:44 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2010-05-26 15:04:23 PDT
From my understanding of the viewport section of the Apple Safari HTML Reference <http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW6>, device-width and device-height are constants with respect to the width and height of the screen in direction north (e.g. portrait orientation for the iPhone).

And the screen size for the device may not be equivalent to the size of the window rect

We should add methods, say, ChromeClient::platformScreenSize, and ChromeClient::setPlatformScreenSize so that the client can provide the dimensions of the screen in direction north so that ViewportArguments can use these dimensions for the value of device-width and device-height.
Comment 1 Daniel Bates 2010-05-26 15:09:13 PDT
Created attachment 57166 [details]
Patch

By default, platformScreenSize returns an empty IntSize(). Clients should override this is they are implementing support for the viewport meta tag.
Comment 2 Daniel Bates 2010-05-26 15:44:10 PDT
Created attachment 57174 [details]
Patch

Added missing #include ChromeClient.h
Comment 3 Eric Seidel (no email) 2010-05-26 15:45:50 PDT
Attachment 57166 [details] did not build on mac:
Build output: http://webkit-commit-queue.appspot.com/results/2555001
Comment 4 Early Warning System Bot 2010-05-26 15:49:11 PDT
Attachment 57166 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/2504048
Comment 5 Eric Seidel (no email) 2010-06-04 23:05:25 PDT
Comment on attachment 57174 [details]
Patch

How do we test this?
Comment 6 Daniel Bates 2010-06-06 10:13:02 PDT
(In reply to comment #5)
> (From update of attachment 57174 [details])
> How do we test this?

We cannot test this at this time. We need to add DRT support. Notice, this patch is abstracting the platform screen size (which may be different from the dimensions of  the window rectangle) and which will differ on each platform that chooses to implement ViewportArguments support (by implementing method ChromeClient::didReceiveViewportArguments).
Comment 7 Daniel Bates 2010-06-18 11:23:30 PDT
Comment on attachment 57174 [details]
Patch

Clearing review flag to think about this some more.