https://bugs.webkit.org/show_bug.cgi?id=133891
Reviewed by Simon Fraser.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
If we don't know the target render tree size, wait until the first layer tree commit
that comes in, instead of removing the snapshot when the gesture ends.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170036
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-06-16 Timothy Horton <timothy_horton@apple.com>
+
+ [iOS][wk2] Swipe snapshots are removed too quickly if there is no saved render tree size
+ https://bugs.webkit.org/show_bug.cgi?id=133891
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/ios/ViewGestureControllerIOS.mm:
+ (WebKit::ViewGestureController::endSwipeGesture):
+ (WebKit::ViewGestureController::setRenderTreeSize):
+ If we don't know the target render tree size, wait until the first layer tree commit
+ that comes in, instead of removing the snapshot when the gesture ends.
+
2014-06-16 Timothy Horton <timothy_horton@apple.com>
[iOS][wk2] Swiping back briefly shows the previous page before loading the new one
ViewSnapshotStore::shared().disableSnapshotting();
m_webPageProxy.goToBackForwardItem(targetItem);
ViewSnapshotStore::shared().enableSnapshotting();
-
- if (!m_snapshotRemovalTargetRenderTreeSize) {
- removeSwipeSnapshot();
- return;
- }
m_swipeWatchdogTimer.startOneShot(swipeSnapshotRemovalWatchdogDuration.count());
}
// 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.
- if (m_snapshotRemovalTargetRenderTreeSize && renderTreeSize > m_snapshotRemovalTargetRenderTreeSize && m_webPageProxy.drawingArea()->lastVisibleTransactionID() >= m_snapshotRemovalTargetTransactionID)
+ if ((!m_snapshotRemovalTargetRenderTreeSize || renderTreeSize > m_snapshotRemovalTargetRenderTreeSize) && m_webPageProxy.drawingArea()->lastVisibleTransactionID() >= m_snapshotRemovalTargetTransactionID)
removeSwipeSnapshot();
}