Title: [170277] trunk/Source/WebKit2
Revision
170277
Author
[email protected]
Date
2014-06-22 18:32:06 -0700 (Sun, 22 Jun 2014)

Log Message

[iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
https://bugs.webkit.org/show_bug.cgi?id=134181

Reviewed by Benjamin Poulain.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureController.h:
Make it explicit that we should only remove the swipe snapshot when a
big-enough render tree size arrives *after the swipe ends*.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (170276 => 170277)


--- trunk/Source/WebKit2/ChangeLog	2014-06-23 01:19:57 UTC (rev 170276)
+++ trunk/Source/WebKit2/ChangeLog	2014-06-23 01:32:06 UTC (rev 170277)
@@ -1,5 +1,21 @@
 2014-06-22  Tim Horton  <[email protected]>
 
+        [iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
+        https://bugs.webkit.org/show_bug.cgi?id=134181
+
+        Reviewed by Benjamin Poulain.
+
+        * UIProcess/ios/ViewGestureControllerIOS.mm:
+        (WebKit::ViewGestureController::ViewGestureController):
+        (WebKit::ViewGestureController::endSwipeGesture):
+        (WebKit::ViewGestureController::setRenderTreeSize):
+        (WebKit::ViewGestureController::removeSwipeSnapshot):
+        * UIProcess/mac/ViewGestureController.h:
+        Make it explicit that we should only remove the swipe snapshot when a
+        big-enough render tree size arrives *after the swipe ends*.
+
+2014-06-22  Tim Horton  <[email protected]>
+
         Thread some references through the remote layer tree code
         https://bugs.webkit.org/show_bug.cgi?id=134177
 

Modified: trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm (170276 => 170277)


--- trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm	2014-06-23 01:19:57 UTC (rev 170276)
+++ trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm	2014-06-23 01:32:06 UTC (rev 170277)
@@ -128,6 +128,7 @@
     , m_activeGestureType(ViewGestureType::None)
     , m_swipeWatchdogTimer(this, &ViewGestureController::swipeSnapshotWatchdogTimerFired)
     , m_snapshotRemovalTargetRenderTreeSize(0)
+    , m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit(false)
 {
 }
 
@@ -238,6 +239,8 @@
     ViewSnapshotStore::shared().enableSnapshotting();
 
     m_swipeWatchdogTimer.startOneShot(swipeSnapshotRemovalWatchdogDuration.count());
+
+    m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit = true;
 }
     
 void ViewGestureController::setRenderTreeSize(uint64_t renderTreeSize)
@@ -245,6 +248,9 @@
     if (m_activeGestureType != ViewGestureType::Swipe)
         return;
 
+    if (!m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit)
+        return;
+
     // Don't remove the swipe snapshot until we get a drawing area transaction more recent than the navigation,
     // and we hit the render tree size threshold. This avoids potentially removing the snapshot early,
     // when receiving commits from the previous (pre-navigation) page.
@@ -259,6 +265,8 @@
 
 void ViewGestureController::removeSwipeSnapshot()
 {
+    m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit = false;
+
     m_swipeWatchdogTimer.stop();
 
     if (m_activeGestureType != ViewGestureType::Swipe)

Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h (170276 => 170277)


--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h	2014-06-23 01:19:57 UTC (rev 170276)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h	2014-06-23 01:32:06 UTC (rev 170277)
@@ -185,6 +185,7 @@
     RetainPtr<WKSwipeTransitionController> m_swipeInteractiveTransitionDelegate;
     uint64_t m_snapshotRemovalTargetRenderTreeSize;
     uint64_t m_snapshotRemovalTargetTransactionID;
+    bool m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit;
 #endif
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to