Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7ed302f504e22a82977a3ef7301b6580c5ba92a4
https://github.com/WebKit/WebKit/commit/7ed302f504e22a82977a3ef7301b6580c5ba92a4
Author: Jessica Lee <[email protected]>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M Source/WebKit/WebProcess/WebPage/FindController.cpp
M Source/WebKit/WebProcess/WebPage/FindController.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewFindString.mm
Log Message:
-----------
Reset find match index when search string changes
https://bugs.webkit.org/show_bug.cgi?id=324535
rdar://187773600
Reviewed by Brady Eidson.
FindController previously cached the match index across calls without checking
whether the
search term itself had changed. This fix tracks the previous find string, and
whenever a new
search string differs from it, resets the cached match index and other state
artifacts instead
of incorrectly reusing stale state from the prior search.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewFindString.mm
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::hideFindUI):
* Source/WebKit/WebProcess/WebPage/FindController.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewFindString.mm:
(TestWebKitAPI::TEST(WKWebViewFindString,
MatchIndexResetsWhenSearchStringChanges)):
Canonical link: https://commits.webkit.org/321412@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications