Bug 39800 - Enable DOMWindow::innerWidth to return a value defined by the platform port
Summary: Enable DOMWindow::innerWidth to return a value defined by the platform port
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 17:45 PDT by Grace Kloba
Modified: 2015-08-04 12:06 PDT (History)
2 users (show)

See Also:


Attachments
first patch (5.22 KB, patch)
2010-05-26 17:56 PDT, Grace Kloba
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grace Kloba 2010-05-26 17:45:26 PDT
In mobile platform, visual viewport and layout viewport can be different. Currently DOMWindow::innerWidth() and etc uses the view->width() which is the layout viewport dimension. Add an abstract layer so that the platform can provide their own version. The default is the current version.
Comment 1 Grace Kloba 2010-05-26 17:56:45 PDT
Created attachment 57181 [details]
first patch
Comment 2 Darin Adler 2010-06-12 18:51:34 PDT
Comment on attachment 57181 [details]
first patch

This patch seems like the wrong way to go about things. I understand the need to return the right values at the top level of DOMWindow, but I don't see what this has to do with ScrollView. And this doesn't seem to be a platform-specific issue to me, anyway. Maybe someone can give a more concrete explanation of what's going on here and how it's different for Android and for other platforms like iPhone or other mobile phones.
Comment 3 Grace Kloba 2010-06-13 20:26:23 PDT
As pointed out in http://www.quirksmode.org/mobile/viewports2.html, Android was not reporting window.innerWidth() correctly. We try to fix it. We believe most of the mobile browsers have the similar issue. The content is rendered based on the fixed viewport which is different than the physical screen size. Do you have a suggestion on where we should report this different size?
Comment 4 Adam Barth 2010-07-27 08:42:09 PDT
Comment on attachment 57181 [details]
first patch

This patch appears blocked on getting consensus on the right way to approach this issue.  Please feel free to re-nominate when we've got agreement on what we want to do here.