Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 53940734029eaa6f334327b5985d047375f7c4c6
      
https://github.com/WebKit/WebKit/commit/53940734029eaa6f334327b5985d047375f7c4c6
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-06-10 (Wed, 10 Jun 2026)

  Changed paths:
    M Source/WebKit/UIProcess/FindStringCallbackAggregator.cpp
    M Source/WebKit/WebProcess/WebPage/FindController.cpp
    M Source/WebKit/WebProcess/WebPage/FindController.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  -----------
  [Site Isolation] Avoid re-searching the document when selecting a 
find-in-page match
https://bugs.webkit.org/show_bug.cgi?id=316695
rdar://179150748

Reviewed by Sammy Gill.

Find-in-page under site isolation runs in two passes: a first pass that 
searches every web content
process, then a second pass that asks the process owning the targeted match to 
select it. The second
pass re-sent FindString, forcing that process to search its potentially large 
document all over
again.

Add a SelectLastFoundRange message and FindController::selectLastFoundRange 
that reuse the SimpleRange
cached from the first pass, selecting it directly when it is still connected 
and only falling back
to a fresh search otherwise. FindStringCallbackAggregator now sends 
SelectLastFoundRange for the
second pass.

* Source/WebKit/UIProcess/FindStringCallbackAggregator.cpp:
(WebKit::FindStringCallbackAggregator::~FindStringCallbackAggregator):
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::selectLastFoundRange):
(WebKit::FindController::hideFindUI):
* Source/WebKit/WebProcess/WebPage/FindController.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::selectLastFoundRange):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/314925@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to