Currently querying properties window.screen.{availHeight, availWidth, height, width} always returns 0 in WebKit2 on iOS. We should hook up the platform-specific logic so that these properties return the actual screen size and available screen size dimensions.
<rdar://problem/16413795>
Created attachment 229586 [details] Patch
Created attachment 229587 [details] Patch
Comment on attachment 229587 [details] Patch After talking with Tim Horton in-person today, it's sufficient to use WKGetViewportScreenSize() and the associated WebKit2 logic for the screen size. We can take a similar approach for exposing the available screen size.
Created attachment 229603 [details] Patch
Comment on attachment 229603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229603&action=review Why does the code use the name "viewportAvailableScreenSize"? The screen size is completely orthogonal to the viewport? > Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm:182 > + return FloatSize(WKGetViewportAvailableScreenSize()); Probably ASSERT_NOT_REACHED here. > Source/WebKit2/UIProcess/WebPageProxy.cpp:4151 > parameters.viewportScreenSize = viewportScreenSize(); > + parameters.viewportAvailableScreenSize = viewportAvailableScreenSize(); Let's unify this, name it screenSize, and push it to the viewport.
Created attachment 229617 [details] Patch Updated patch based on Benjamin Poulain's remarks
Committed r167481: <http://trac.webkit.org/changeset/167481>
Sorted added entries to WebCore.exp.in and substituted _wkGetAvailableScreenSize for _wkGetViewportAvailableScreenSize in the ChangeLog entry for <http://trac.webkit.org/changeset/167481> and committed this fix in <http://trac.webkit.org/changeset/167493>.