mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 08:52:54 +00:00
LibWeb+WebContent: Provide feedback on find in page requests
This change allows the results of a find in page query to be reported back to the user interface. Currently, the number of results found and the current match index are reported.
This commit is contained in:
parent
6957b87ac2
commit
d33c4c751f
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/tcl3
Commit: d33c4c751f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/121
Reviewed-by: https://github.com/trflynn89 ✅
7 changed files with 46 additions and 12 deletions
|
@ -78,6 +78,14 @@ void WebContentClient::did_finish_text_test(u64 page_id)
|
|||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_find_in_page(u64 page_id, size_t current_match_index, Optional<size_t> const& total_match_count)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_find_in_page)
|
||||
view->on_find_in_page(current_match_index, total_match_count);
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_navigate_back(u64 page_id)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue