1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

Ladybird: Replace history entry if loading URL because of a redirect

We now replace the current history entry if the page-load has been
caused because of a redirect. This makes it able to traverse the
history if one of the entries redirects you, which previously
caused an infinite history traversion loop.

Depends on https://github.com/SerenityOS/serenity/pull/16004
This commit is contained in:
Baitinq 2022-11-24 01:52:16 +01:00 committed by Andrew Kaster
parent ec55b13e96
commit 97dd5a085f
3 changed files with 11 additions and 5 deletions

View file

@ -802,10 +802,10 @@ void WebContentView::notify_server_did_middle_click_link(Badge<WebContentClient>
(void)modifiers;
}
void WebContentView::notify_server_did_start_loading(Badge<WebContentClient>, AK::URL const& url)
void WebContentView::notify_server_did_start_loading(Badge<WebContentClient>, AK::URL const& url, bool is_redirect)
{
m_url = url;
emit load_started(url);
emit load_started(url, is_redirect);
}
void WebContentView::notify_server_did_finish_loading(Badge<WebContentClient>, AK::URL const& url)