mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 08:52:54 +00:00
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:
parent
461184d964
commit
a8cf1aca7c
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: a8cf1aca7c
Pull-request: https://github.com/SerenityOS/serenity/pull/23952
Reviewed-by: https://github.com/trflynn89
11 changed files with 14 additions and 14 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue