Closed Bug 483330 Opened 13 years ago Closed 13 years ago
Session restore flushes layout on save; affects page performance
When session restore saves data, it saves scroll positions. It seems to use the scrollX and scrollY properties on content windows to do that. Unfortunately, those don't just read back the scroll position: they flush layout and _then_ return the resulting scroll position. For session restore that seems unnecessary: if the scroll position will change after reflow, we'll just get called again. And the current setup means that if you take a long page and trigger an interruptible reflow and then scroll during it, then after 3 seconds you get a non-interruptible flush and your browser freezes up for a while until that's done. We should probably just have an nsIDOMWindowUtils API for doing this without flushing. Thoughts?
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #368159 - Flags: review?(zeniko)
OS: Mac OS X → All
Hardware: x86 → All
Comment on attachment 368159 [details] [diff] [review] make use of new getter It'd be awfully nice to also get a test case here - e.g. as to whether duplicating a scrolled tab also restores the correct scroll position. Thanks and r+=me with those added.
Comment on attachment 368695 [details] [diff] [review] patch+test Thanks again, Gavin.
Attachment #368695 - Flags: review?(zeniko) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Attachment #368695 - Flags: approval1.9.1?
Comment on attachment 368695 [details] [diff] [review] patch+test We can take this on branch now that bug 483634's landed there.
Comment on attachment 368695 [details] [diff] [review] patch+test a191=beltzner
Attachment #368695 - Flags: approval1.9.1? → approval1.9.1+
verified FIXED on builds: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090505 Shiretoko/3.5b5pre ID:20090505031155 and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090505 Minefield/3.6a1pre ID:20090505031205
You need to log in before you can comment on or make changes to this bug.