| Summary: | Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | mitz | ||||
| Component: | WebKit2 | Assignee: | mitz | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, japhet, thorton | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
mitz
2014-11-14 12:52:18 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. Created attachment 241616 [details]
Record a a navigation snapshot before the current item changes in WebBackForwardList
Fixed in <http://trac.webkit.org/r176136>. |