RESOLVED FIXED 36347
[chromium] querying the current HistoryItem during a back/forward navigation causes loss of scroll offset and other state
https://bugs.webkit.org/show_bug.cgi?id=36347
Summary [chromium] querying the current HistoryItem during a back/forward navigation ...
Darin Fisher (:fishd, Google)
Reported 2010-03-19 00:12:57 PDT
[chromium] querying the current HistoryItem during a back/forward navigation causes loss of scroll offset and other state which explains bugs like this: http://code.google.com/p/chromium/issues/detail?id=12084 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.
Attachments
v1 patch (1.76 KB, patch)
2010-03-19 00:23 PDT, Darin Fisher (:fishd, Google)
dglazkov: review+
Darin Fisher (:fishd, Google)
Comment 1 2010-03-19 00:23:59 PDT
Created attachment 51131 [details] v1 patch 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.
Dimitri Glazkov (Google)
Comment 2 2010-03-19 08:43:16 PDT
Comment on attachment 51131 [details] v1 patch nice find! Can this be regression-proofed with a test?
Darin Fisher (:fishd, Google)
Comment 3 2010-03-19 09:46:31 PDT
It would require an API test. I was going to add such a test to Chromium.
Dimitri Glazkov (Google)
Comment 4 2010-03-19 09:56:16 PDT
Sounds good.
Darin Fisher (:fishd, Google)
Comment 5 2010-03-19 10:31:29 PDT
Note You need to log in before you can comment on or make changes to this bug.