LibWeb: Rename did_update_url() to did_history_api_push_or_replace()

The previous name was extremely misleading, because the call is used for
pushing or replacing new session history entry on chrome side instead of
only changing URL.
This commit is contained in:
Aliaksandr Kalenik 2024-04-13 23:25:10 +02:00 committed by Alexander Kalenik
parent 461184d964
commit a8cf1aca7c
Notes: sideshowbarker 2024-07-17 11:30:05 +09:00
11 changed files with 14 additions and 14 deletions

View file

@ -66,13 +66,13 @@ void WebContentClient::did_finish_loading(u64 page_id, URL::URL const& url)
}
}
void WebContentClient::did_update_url(u64 page_id, URL::URL const& url, Web::HTML::HistoryHandlingBehavior history_behavior)
void WebContentClient::did_history_api_push_or_replace(u64 page_id, URL::URL const& url, Web::HTML::HistoryHandlingBehavior history_behavior)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {
view->set_url({}, url);
if (view->on_url_updated)
view->on_url_updated(url, history_behavior);
if (view->on_history_api_push_or_replace)
view->on_history_api_push_or_replace(url, history_behavior);
}
}