Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Blank news article on kottke.org
https://bugs.webkit.org/show_bug.cgi?id=159733
<rdar://problem/26743065>

Reviewed by Simon Fraser.

This patch ensures that we update the visible content rect, when Auto Layout moves the WKWebView around.
We normally expect setFrameRect to be called to position WKWebView. However Auto Layout relies on layoutSubviews,
and in order to always have up-to-date visible content rect, we need to override layoutSubviews in WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView layoutSubviews]):


Canonical link: https://commits.webkit.org/177881@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
alanbaradlay committed Jul 13, 2016
1 parent 009e996 commit 60d3a3c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
2016-07-13 Zalan Bujtas <zalan@apple.com>

Blank news article on kottke.org
https://bugs.webkit.org/show_bug.cgi?id=159733
<rdar://problem/26743065>

Reviewed by Simon Fraser.

This patch ensures that we update the visible content rect, when Auto Layout moves the WKWebView around.
We normally expect setFrameRect to be called to position WKWebView. However Auto Layout relies on layoutSubviews,
and in order to always have up-to-date visible content rect, we need to override layoutSubviews in WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView layoutSubviews]):

2016-07-13 Chris Dumez <cdumez@apple.com>

WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.
Expand Down
6 changes: 6 additions & 0 deletions Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Expand Up @@ -948,6 +948,12 @@ - (void)setBounds:(CGRect)bounds
[self _frameOrBoundsChanged];
}

- (void)layoutSubviews
{
[super layoutSubviews];
[self _frameOrBoundsChanged];
}

- (UIScrollView *)scrollView
{
return _scrollView.get();
Expand Down

0 comments on commit 60d3a3c

Please sign in to comment.