[chromium] querying the current HistoryItem during a back/forward
navigation causes loss of scroll offset and other state
which explains bugs like this:
chrome periodically records the current history item for crash
recovery purposes, but that actually causes loss of data if the
page the user is navigating back to is even slightly slow to load.
Created attachment 51131 [details]
The basic fix here is to suppress updating the current history item while we are still loading. I decided to exclude normal, new navigations since a user might start interacting with the page before it is fully loaded. Obviously, this could be the case for other types of navigations as well, so there may be a better overall solution. This patch is however a significant improvement for a pretty nasty data-loss bug.
Comment on attachment 51131 [details]
Can this be regression-proofed with a test?
It would require an API test. I was going to add such a test to Chromium.
Landed as http://trac.webkit.org/changeset/56244