WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 131821
[iOS] Hook up screen.{availHeight, availWidth, height, width}
https://bugs.webkit.org/show_bug.cgi?id=131821
Summary
[iOS] Hook up screen.{availHeight, availWidth, height, width}
Daniel Bates
Reported
2014-04-17 15:14:16 PDT
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.
Attachments
Patch
(12.34 KB, patch)
2014-04-17 15:38 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(12.43 KB, patch)
2014-04-17 15:45 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(22.40 KB, patch)
2014-04-17 17:54 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(26.35 KB, patch)
2014-04-17 20:15 PDT
,
Daniel Bates
benjamin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2014-04-17 15:14:31 PDT
<
rdar://problem/16413795
>
Daniel Bates
Comment 2
2014-04-17 15:38:16 PDT
Created
attachment 229586
[details]
Patch
Daniel Bates
Comment 3
2014-04-17 15:45:33 PDT
Created
attachment 229587
[details]
Patch
Daniel Bates
Comment 4
2014-04-17 16:12:31 PDT
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.
Daniel Bates
Comment 5
2014-04-17 17:54:02 PDT
Created
attachment 229603
[details]
Patch
Benjamin Poulain
Comment 6
2014-04-17 18:53:52 PDT
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.
Daniel Bates
Comment 7
2014-04-17 20:15:31 PDT
Created
attachment 229617
[details]
Patch Updated patch based on Benjamin Poulain's remarks
Daniel Bates
Comment 8
2014-04-17 20:51:48 PDT
Committed
r167481
: <
http://trac.webkit.org/changeset/167481
>
Daniel Bates
Comment 9
2014-04-18 10:21:11 PDT
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
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug