Title: [165033] trunk/Source/WebKit2
Revision
165033
Author
benja...@webkit.org
Date
2014-03-03 19:23:58 -0800 (Mon, 03 Mar 2014)

Log Message

[iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
https://bugs.webkit.org/show_bug.cgi?id=129641

Patch by Benjamin Poulain <bpoul...@apple.com> on 2014-03-03
Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
did not match the actual WKContentView's area on screen.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (165032 => 165033)


--- trunk/Source/WebKit2/ChangeLog	2014-03-04 02:22:13 UTC (rev 165032)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-04 03:23:58 UTC (rev 165033)
@@ -1,3 +1,16 @@
+2014-03-03  Benjamin Poulain  <bpoul...@apple.com>
+
+        [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
+        https://bugs.webkit.org/show_bug.cgi?id=129641
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _didCommitLayerTree:WebKit::]):
+        Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
+        In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
+        did not match the actual WKContentView's area on screen.
+
 2014-03-03  Jeremy Jones  <jere...@apple.com>
 
         Forward application suspend resume notifications to the web process.

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


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-03-04 02:22:13 UTC (rev 165032)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-03-04 03:23:58 UTC (rev 165033)
@@ -322,6 +322,7 @@
 
 - (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction
 {
+    [_scrollView setContentSize:[_contentView frame].size];
     [_scrollView setMinimumZoomScale:layerTreeTransaction.minimumScaleFactor()];
     [_scrollView setMaximumZoomScale:layerTreeTransaction.maximumScaleFactor()];
     [_scrollView setZoomEnabled:layerTreeTransaction.allowsUserScaling()];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to