Title: [192448] trunk/Source/WebKit2
Revision
192448
Author
wenson_hs...@apple.com
Date
2015-11-13 16:05:04 -0800 (Fri, 13 Nov 2015)

Log Message

WK2 iOS interaction tests in LayoutTests/fast/events/ios are flaky
https://bugs.webkit.org/show_bug.cgi?id=151199
<rdar://problem/23518459>

Reviewed by Tim Horton.

While transforming touch positions from document to global coordinates, HIDEventGenerator
sometimes uses an old scale of the webview in computing the transformed position. This happens
in spite of how we force the UI script to run after the UI process receives a layer tree commit
because we invoke the callback before calling WebPageProxy::didCommitLayerTree, which is where
we actually use the layer transaction information to update the WKWebView.

To fix this, we run the drawing-ensured callbacks after committing the layer tree, so the
callbacks will have updated information about the web view's scale and dimensions.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (192447 => 192448)


--- trunk/Source/WebKit2/ChangeLog	2015-11-14 00:00:56 UTC (rev 192447)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-14 00:05:04 UTC (rev 192448)
@@ -1,3 +1,23 @@
+2015-11-13  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        WK2 iOS interaction tests in LayoutTests/fast/events/ios are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=151199
+        <rdar://problem/23518459>
+
+        Reviewed by Tim Horton.
+
+        While transforming touch positions from document to global coordinates, HIDEventGenerator
+        sometimes uses an old scale of the webview in computing the transformed position. This happens
+        in spite of how we force the UI script to run after the UI process receives a layer tree commit
+        because we invoke the callback before calling WebPageProxy::didCommitLayerTree, which is where
+        we actually use the layer transaction information to update the WKWebView.
+
+        To fix this, we run the drawing-ensured callbacks after committing the layer tree, so the
+        callbacks will have updated information about the web view's scale and dimensions.
+
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+
 2015-11-13  Tim Horton  <timothy_hor...@apple.com>
 
         Support printing in WKWebView

Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (192447 => 192448)


--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2015-11-14 00:00:56 UTC (rev 192447)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2015-11-14 00:05:04 UTC (rev 192448)
@@ -188,11 +188,6 @@
     ASSERT(layerTreeTransaction.transactionID() == m_lastVisibleTransactionID + 1);
     m_transactionIDForPendingCACommit = layerTreeTransaction.transactionID();
 
-    for (auto& callbackID : layerTreeTransaction.callbackIDs()) {
-        if (auto callback = m_callbacks.take<VoidCallback>(callbackID))
-            callback->performCallback();
-    }
-
     if (m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction)) {
         if (layerTreeTransaction.transactionID() >= m_transactionIDForUnhidingContent)
             m_webPageProxy.setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
@@ -241,6 +236,11 @@
 
     if (auto milestones = layerTreeTransaction.newlyReachedLayoutMilestones())
         m_webPageProxy.didLayout(milestones);
+
+    for (auto& callbackID : layerTreeTransaction.callbackIDs()) {
+        if (auto callback = m_callbacks.take<VoidCallback>(callbackID))
+            callback->performCallback();
+    }
 }
 
 void RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart(uint64_t layerID, const String& key, double startTime)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to