Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aeacdd2cd7d9d2d77cc232b524975ee2f0815191
https://github.com/WebKit/WebKit/commit/aeacdd2cd7d9d2d77cc232b524975ee2f0815191
Author: Wenson Hsieh <[email protected]>
Date: 2024-10-23 (Wed, 23 Oct 2024)
Changed paths:
A
LayoutTests/editing/selection/ios/autoscroll-text-field-in-subframe-expected.txt
A LayoutTests/editing/selection/ios/autoscroll-text-field-in-subframe.html
M Source/WebCore/page/EventHandler.h
M Source/WebCore/page/FocusController.cpp
M Source/WebCore/page/ios/EventHandlerIOS.mm
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
Inputs with overflowing content cannot be scrolled within an iFrame.
https://bugs.webkit.org/show_bug.cgi?id=277666
rdar://133320357
Reviewed by Abrar Rahman Protyasha.
Add support on iOS for selection autoscrolling, for content inside subframes.
See below for more
details.
*
LayoutTests/editing/selection/ios/autoscroll-text-field-in-subframe-expected.txt:
Added.
* LayoutTests/editing/selection/ios/autoscroll-text-field-in-subframe.html:
Added.
Add a layout test to exercise this fix. Note that the test will attempt to
autoscroll against the
right edge of the focused input until it reaches the last selection offset,
such that it will be
robust even if the maximum autoscrolling speed is lowered in the future.
* Source/WebCore/page/EventHandler.h:
* Source/WebCore/page/FocusController.cpp:
(WebCore::FocusController::setFocusedFrame):
Stop autoscrolling when a frame is no longer focused; this is necessary because
it's no longer
guaranteed that `WebPage::cancelAutoscroll` will cancel autoscrolling in the
correct frame, in the
case where the frame was blurred in the middle of autoscrolling.
* Source/WebCore/page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::startSelectionAutoscroll):
(WebCore::EventHandler::cancelSelectionAutoscroll):
(WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll const):
Avoid adjusting the target autoscroll position for subframes, since the edges
of the unobscured
content rect aren't flush with the edges of the layout viewport.
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::startAutoscrollAtPosition):
Implement the main fix here — instead of always using the local main frame,
tell the focused or main
frame to autoscroll.
(WebKit::WebPage::cancelAutoscroll):
Canonical link: https://commits.webkit.org/285635@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes