DescriptionscrollTop and scrollLeft always 0 in DOMContentLoaded handler on a scrolled page
Currently, when performing a "back" navigation, the scroll position
is restored at the time the first layout happens (see FrameLoader::didFirstLayout).
If that does not go through, another attempt to restore the scroll position
is made when the frame completes loading (see FrameLoader::checkLoadCompleteForThisFrame).
In a closer look, one might notice that in the later, not only the "back" navigation
case is covered, but also "reload".
Patch makes these two attempts of restore the scroll position to operate under the
same circumstances: back and reload.
Apart from bringing them in pair, it also makes it possible to query the scroll
position at the time DOMContentLoaded fires, as Gecko and Presto engines do.
Test: fast/loader/scroll-position-restored-on-reload-at-load-event.html
fast/loader/scroll-position-restored-on-back-at-load-event.html
R=Nate Chapin
BUG=290895
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161098
Patch Set 1 #
Total comments: 1
Patch Set 2 : #
Messages
Total messages: 3 (0 generated)
|