WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
134228
Implement WebPageProxy::windowAndViewFramesChanged
https://bugs.webkit.org/show_bug.cgi?id=134228
Summary
Implement WebPageProxy::windowAndViewFramesChanged
Martin Hock
Reported
2014-06-23 17:03:45 PDT
Implement WebPageProxy::windowAndViewFramesChanged.
Attachments
patch
(3.69 KB, patch)
2014-06-23 17:12 PDT
,
Martin Hock
benjamin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Martin Hock
Comment 1
2014-06-23 17:12:50 PDT
Created
attachment 233656
[details]
patch
Tim Horton
Comment 2
2014-06-23 17:23:55 PDT
Comment on
attachment 233656
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233656&action=review
> Source/WebKit2/UIProcess/ios/WKContentView.mm:260 > + [self.window addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:nullptr];
I don't think this works, did you test this?
Benjamin Poulain
Comment 3
2014-06-23 17:27:14 PDT
Comment on
attachment 233656
[details]
patch lgtm. What was the initial size bug?
Benjamin Poulain
Comment 4
2014-06-23 17:28:29 PDT
Comment on
attachment 233656
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233656&action=review
> Source/WebKit2/UIProcess/ios/WKContentView.mm:253 > + // All observations are for bounds changes. > + _page->windowAndViewFramesChanged(self.window.bounds, self.window.bounds.origin);
It would be best to assert the keyPath. You may want to call self.window.bounds only once since obj-c dispatch is not cheap.
Ian Henderson
Comment 5
2014-06-23 17:32:02 PDT
Why do web pages care about the window frame? Could we give them the WKWebView size instead?
Benjamin Poulain
Comment 6
2014-06-23 17:57:03 PDT
(In reply to
comment #5
)
> Why do web pages care about the window frame? Could we give them the WKWebView size instead?
There is no clear specification of what window.outerWidth/height should be on mobile. This matches the usage. One of the problem with reporting WKWebView's size is that some people use outerWidth/height to detect the screen orientation.
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