Title: [203189] trunk/Source/WebKit2
Revision
203189
Author
[email protected]
Date
2016-07-13 14:33:12 -0700 (Wed, 13 Jul 2016)

Log Message

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]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (203188 => 203189)


--- trunk/Source/WebKit2/ChangeLog	2016-07-13 21:14:28 UTC (rev 203188)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-13 21:33:12 UTC (rev 203189)
@@ -1,3 +1,18 @@
+2016-07-13  Zalan Bujtas  <[email protected]>
+
+        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  <[email protected]>
 
         WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (203188 => 203189)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-07-13 21:14:28 UTC (rev 203188)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-07-13 21:33:12 UTC (rev 203189)
@@ -948,6 +948,12 @@
         [self _frameOrBoundsChanged];
 }
 
+- (void)layoutSubviews
+{
+    [super layoutSubviews];
+    [self _frameOrBoundsChanged];
+}
+
 - (UIScrollView *)scrollView
 {
     return _scrollView.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to