Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 35df6e540d68f300c49c8798c0e4f95ac3b89e37
https://github.com/WebKit/WebKit/commit/35df6e540d68f300c49c8798c0e4f95ac3b89e37
Author: Megan Gardner <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M Source/WebCore/page/EventHandler.cpp
M Tools/Scripts/webkitpy/api_tests/allowlist.txt
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/MouseEventTests.mm
Log Message:
-----------
[macOS] Drag-selecting text that starts in a position: fixed element doesn't
autoscroll.
https://bugs.webkit.org/show_bug.cgi?id=325203
rdar://188330363
Reviewed by Wenson Hsieh.
EventHandler::handleMouseDraggedEvent only tries to start autoscroll on the
first mouse-dragged event. If the pointer
is still over a position: fixed element then, startAutoscrollForSelection
declines, and it never tries again once the
drag moves onto scrollable content.
This likely started with 317473@main, which added the fixed-position check and
the return value.
Only clear m_mouseDownMayStartAutoscroll once autoscroll has started, so later
mouse-dragged events try again. The iOS
selection handle path already retries on every position update.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/MouseEventTests.mm
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
* Tools/Scripts/webkitpy/api_tests/allowlist.txt:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/MouseEventTests.mm:
(TestWebKitAPI::scrollOffsetAfterDraggingSelectionBelowWindow):
(TestWebKitAPI::TEST(MouseEventTests, AutoscrollOnMouseDragBelowWindow)):
(TestWebKitAPI::TEST(MouseEventTests,
AutoscrollOnMouseDragBelowWindowFromFixedContainer)):
Canonical link: https://commits.webkit.org/322310@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications