Bug 13629 - Webkit has a "flash of unscrolled content" when you click Back to a page that wasn't in the page cache
Summary: Webkit has a "flash of unscrolled content" when you click Back to a page that...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
: 75501 (view as bug list)
Depends on:
Blocks: 4123
  Show dependency treegraph
 
Reported: 2007-05-08 19:50 PDT by Brady Eidson
Modified: 2012-01-12 12:32 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2007-05-08 19:50:27 PDT
When you click back to a page that is cached, you shouldn't have the jarring effect of a paint, then a scroll - it should just appear at the right place
Comment 1 Brady Eidson 2007-05-15 11:59:36 PDT
<rdar://problem/5204291>
Comment 2 Brady Eidson 2007-05-15 12:27:33 PDT
When the page your going back to actually is in the cache, we're fine. 
The real bug here is when going back to a noncached page, and the page is reconstructed from cached resources.  Our engine is so fast that sometimes these types of navigation might be confused for cached pages and therefore the jarring scroll change seems super bizzare.

So basically I think the real issue is the jarring way in which scroll happens when you go back to a page that *isn't* cached.  When the page goes through the loading mechanism the "normal way" and resources are pulled from the memory cache, disk cache, and even over the network, we do eventually restore the scroll position.  Twice, in fact.  At horrible times - after the first layout and after the load is complete.  

These are really silly times to be doing this.  We should scroll to the position in the document the moment that position exists.  Scrolling really has nothing to do with loading.  Darin had this idea - and I think it's perfect with some small refinements - which is that the FrameLoader tells the FrameView "Hey, this is your cached scroll position.  Scroll to this point the moment it actual exists in the document".  Then when the load is complete, FrameLoader tells the view "Okay, we're done loading.  So if you haven't already scrolled to that position, don't do it anymore"

This should be reasonably easy to do.
Comment 3 Brady Eidson 2012-01-12 12:32:04 PST
*** Bug 75501 has been marked as a duplicate of this bug. ***