Title: [295392] trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
- Revision
- 295392
- Author
- akeer...@apple.com
- Date
- 2022-06-08 13:58:30 -0700 (Wed, 08 Jun 2022)
Log Message
REGRESSION (250836@main): [iOS] Found text is not scrolled into view when highlighting the next/previous result
https://bugs.webkit.org/show_bug.cgi?id=241431
rdar://94584301
Reviewed by Wenson Hsieh.
250836@main switched to a model in which we update the selection asynchronously
in the case of having a non-user triggered change.
Scrolling to highlighted found text is done using TemporarySelectionChange,
which relies on selection updates being synchronous, as the previous selection
is restored once the object is destroyed.
Similar to the fix for App Highlights, included in 250836@main, treat the
selection change for scrolling to a found text range as a UserTriggered change,
so that it is performed synchronously, and the scroll actualy occurs.
This is covered by existing API tests, that are currently run on internal bots
only.
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::scrollTextRangeToVisible):
Canonical link: https://commits.webkit.org/251398@main
Modified Paths
Diff
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp (295391 => 295392)
--- trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp 2022-06-08 19:06:03 UTC (rev 295391)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp 2022-06-08 20:58:30 UTC (rev 295392)
@@ -154,7 +154,7 @@
return;
WebCore::VisibleSelection visibleSelection(*simpleRange);
- OptionSet temporarySelectionOptions { WebCore::TemporarySelectionOption::DelegateMainFrameScroll, WebCore::TemporarySelectionOption::RevealSelectionBounds, WebCore::TemporarySelectionOption::DoNotSetFocus };
+ OptionSet temporarySelectionOptions { WebCore::TemporarySelectionOption::DelegateMainFrameScroll, WebCore::TemporarySelectionOption::RevealSelectionBounds, WebCore::TemporarySelectionOption::DoNotSetFocus, WebCore::TemporarySelectionOption::UserTriggered };
if (document->isTopDocument())
temporarySelectionOptions.add(WebCore::TemporarySelectionOption::SmoothScroll);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes