Summary: | [iOS] Hook up screen.{availHeight, availWidth, height, width} | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||
Component: | WebKit2 | Assignee: | Daniel Bates <dbates> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | andersca, commit-queue, ddkilzer, esprehn+autocc, kangil.han, sam, simon.fraser, thorton | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | iPhone / iPad | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Daniel Bates
2014-04-17 15:14:16 PDT
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>. |