1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 16:32:07 +00:00

Browser: 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.
This commit is contained in:
Baitinq 2022-11-24 01:18:11 +01:00 committed by Andreas Kling
parent b447e486b5
commit f1205b608f
3 changed files with 11 additions and 5 deletions

View file

@ -298,11 +298,11 @@ void OutOfProcessWebView::notify_server_did_middle_click_link(Badge<WebContentCl
on_link_middle_click(url, target, modifiers);
}
void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL& url, bool)
void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL& url, bool is_redirect)
{
m_url = url;
if (on_load_start)
on_load_start(url);
on_load_start(url, is_redirect);
}
void OutOfProcessWebView::notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL& url)