RESOLVED FIXED138753
Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=138753
Summary Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button...
mitz
Reported 2014-11-14 12:52:18 PST
<rdar://problem/18978497> * STEPS TO REPRODUCE 1. In a new tab, navigate to <data:text/html,1> 2. In the same tab, navigate to <data:text/html,2> 3. In the same tab, navigate to <data:text/html,3> 4. Swipe to navigate back to 2 5. Swipe to navigate back to 1 6. Click or tap the Forward button to navigate forward to 2 7. Click or tap the Forward button to navigate forward to 3 8. Swipe back to 2 * RESULTS In step 8, the 1 snapshot is revealed, instead of the 2 snapshot.
Attachments
Record a a navigation snapshot before the current item changes in WebBackForwardList (10.26 KB, patch)
2014-11-14 13:08 PST, mitz
thorton: review+
mitz
Comment 1 2014-11-14 12:54:25 PST
It looks like when using the button to navigate, by the time WebPageProxy::willChangeCurrentHistoryItemForMainFrame() is called, the current item has already changed. In particular, WebPageProxy::backForwardGoToItem() is called before WebPageProxy::willChangeCurrentHistoryItemForMainFrame(). This call ordering happens not only in the button navigation case, but also in the navigation gesture case, but in the latter we are protected by the early return in ViewSnapshotStore::recordSnapshot() as we are still showing a snapshot. I think we can simply make it WebBackForwardList’s job to record a snapshot right before it changes what currentItem() would return.
mitz
Comment 2 2014-11-14 13:08:47 PST
Created attachment 241616 [details] Record a a navigation snapshot before the current item changes in WebBackForwardList
mitz
Comment 3 2014-11-14 13:29:05 PST
Note You need to log in before you can comment on or make changes to this bug.