Bug 39800

Summary: Enable DOMWindow::innerWidth to return a value defined by the platform port
Product: WebKit Reporter: Grace Kloba <klobag>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: android-webkit-unforking, tsmiley3
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
first patch none

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.