[webkit-changes] [WebKit/WebKit] 2dd5d4: Scroll To Text Fragement re-loads after every dyna...
megangardner
noreply at github.com
Fri Dec 15 17:01:19 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2dd5d4cec216fe15f1571fda3d2b578056e5ce75
https://github.com/WebKit/WebKit/commit/2dd5d4cec216fe15f1571fda3d2b578056e5ce75
Author: Megan Gardner <megan_gardner at apple.com>
Date: 2023-12-15 (Fri, 15 Dec 2023)
Changed paths:
A LayoutTests/http/tests/scroll-to-text-fragment/no-scroll-after-stylesheet-load-expected.txt
A LayoutTests/http/tests/scroll-to-text-fragment/no-scroll-after-stylesheet-load.html
M LayoutTests/platform/gtk/TestExpectations
M LayoutTests/resources/ui-helper.js
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
Scroll To Text Fragement re-loads after every dynamic style sheet load, and fights user scrolls to do so.
https://bugs.webkit.org/show_bug.cgi?id=264195
rdar://112608578
Reviewed by Simon Fraser.
In order to account for style changes adjusting the scroll of the page, after each dynamic style
sheet load, we recall scrollToFragment to set the page at the correct position again.
We need to stop automatically scrolling after the user has scrolled, as user scroll should trump
all URL programatic scrolls. So we reset the flag that causes scrolls to happen when a user scroll is
detected.
* LayoutTests/http/tests/scroll-to-text-fragment/no-scroll-after-stylesheet-load-expected.txt: Added.
* LayoutTests/http/tests/scroll-to-text-fragment/no-scroll-after-stylesheet-load.html: Added.
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.async initiateUserScroll):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::didRemoveAllPendingStylesheet):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::scrollToFragment):
(WebCore::LocalFrameView::setWasScrolledByUser):
* Source/WebCore/page/LocalFrameView.h:
Canonical link: https://commits.webkit.org/272151@main
More information about the webkit-changes
mailing list