Title: [173583] branches/safari-600.1-branch/Source/WebKit2
Revision
173583
Author
[email protected]
Date
2014-09-12 15:48:06 -0700 (Fri, 12 Sep 2014)

Log Message

Merged r173573.  <rdar://problem/18314597>

Modified Paths

Diff

Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (173582 => 173583)


--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-09-12 22:41:09 UTC (rev 173582)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-09-12 22:48:06 UTC (rev 173583)
@@ -1,3 +1,26 @@
+2014-09-12  Lucas Forschler  <[email protected]>
+
+        Merge r173573
+
+    2014-09-12  Tim Horton  <[email protected]>
+
+            Flash of page scrolled to wrong origin before restoring scroll position after swiping back to CNN front page from an article
+            https://bugs.webkit.org/show_bug.cgi?id=136788
+            <rdar://problem/18314597>
+
+            Reviewed by Sam Weinig.
+
+            * UIProcess/mac/ViewGestureControllerMac.mm:
+            (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
+            (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
+            Always wait until didFinishLoadForMainFrame or didSameDocumentNavigationForMainFrame
+            before removing the snapshot, because otherwise we don't know if the scroll
+            position has been restored yet.
+
+            We should revisit this at some point, because it should be possible to
+            determine if the scroll position has been restored appropriately, but for
+            now it is safest to restore the antique behavior.
+
 2014-08-29  Lucas Forschler  <[email protected]>
 
         Merge r173121

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (173582 => 173583)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm	2014-09-12 22:41:09 UTC (rev 173582)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm	2014-09-12 22:48:06 UTC (rev 173583)
@@ -691,8 +691,10 @@
 
     m_swipeWaitingForRenderTreeSizeThreshold = false;
 
-    if (!m_swipeWaitingForVisuallyNonEmptyLayout)
-        removeSwipeSnapshotAfterRepaint();
+    if (!m_swipeWaitingForVisuallyNonEmptyLayout) {
+        // FIXME: Ideally we would call removeSwipeSnapshotAfterRepaint() here, but sometimes
+        // scroll position isn't done restoring until didFinishLoadForFrame, so we flash the wrong content.
+    }
 }
 
 void ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame()
@@ -702,9 +704,10 @@
 
     m_swipeWaitingForVisuallyNonEmptyLayout = false;
 
-    if (!m_swipeWaitingForRenderTreeSizeThreshold)
-        removeSwipeSnapshotAfterRepaint();
-    else {
+    if (!m_swipeWaitingForRenderTreeSizeThreshold) {
+        // FIXME: Ideally we would call removeSwipeSnapshotAfterRepaint() here, but sometimes
+        // scroll position isn't done restoring until didFinishLoadForFrame, so we flash the wrong content.
+    } else {
         m_swipeWatchdogAfterFirstVisuallyNonEmptyLayoutTimer.startOneShot(swipeSnapshotRemovalWatchdogAfterFirstVisuallyNonEmptyLayoutDuration.count());
         m_swipeWatchdogTimer.stop();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to