REGRESSION (r232416): Flickering when going back to Google search results on back...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2018 06:23:53 +0000 (06:23 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2018 06:23:53 +0000 (06:23 +0000)
commit9f32e7a4b9479c51335c5454ece957106e29fe6a
treea0f42ab6d71c265ffefa2e57067bb70d8332da80
parent673fec6a7cf7143607f4716e76c47c543a490ed0
REGRESSION (r232416): Flickering when going back to Google search results on back swipe
https://bugs.webkit.org/show_bug.cgi?id=187506
<rdar://problem/41939594>

Reviewed by Chris Dumez.

Same document navigations won't have a preceding didStartProvisionalLoadForMainFrame,
so the code introduced in r232416 would immediately remove the snapshot
upon any same document navigation.

Instead, adjust r232416 slightly to start tracking snapshot removal events
after didStartProvisionalLoad OR didSameDocumentNavigation. Call the block
that starts tracking, then immediately fire the same-document navigation event.

* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endSwipeGesture):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp
Source/WebKit/UIProcess/Cocoa/ViewGestureController.h
Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm