New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scrollTop and scrollLeft always 0 in DOMContentLoaded handler on a scrolled page #8809
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ahmad-S792
added
the
Page Loading
For bugs in page loading, including handling of network callbacks.
label
Jan 19, 2023
EWS run on previous version of this PR (hash dba341e) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Jan 19, 2023
EWS run on previous version of this PR (hash a0ba3b0) |
EWS run on previous version of this PR (hash bd2c879) |
EWS run on previous version of this PR (hash 8619852) |
β¦rolled page scrollTop and scrollLeft always 0 in DOMContentLoaded handler on a scrolled page https://bugs.webkit.org/show_bug.cgi?id=250814 Reviewed by NOBODY (OOPS!). Merge - https://chromium.googlesource.com/chromium/blink/+/3ad81cf0b724a2a25ee5cc79a09541d9a971ae15 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 Blink (Presto in the past as well) engines do. * Source/WebCore/loader/FrameLoader.cpp: (FrameLoader::didFirstLayout): (1) Add early return, if not presnet "m_frame.page()" (2) Accounted for Reload types during back navigation * LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event.html: Add Test Case * LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event-expected.txt: Add Test Case Expectation * LayoutTests/fast/loader/scroll-position-restored-on-back-at-load-event.html: Add Test Case * LayoutTests/fast/loader/scroll-position-restored-on-back-at-load-event-expected.txt: Add Test Case Expectation * LayoutTests/resources/back.html: Add Test Case Dependency
EWS run on current version of this PR (hash a592af3) |
Ahmad-S792
removed
the
merging-blocked
Applied to prevent a change from being merged
label
Feb 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a592af3