From 9782660cb60a00deccdfb9f390a38cb37888c41b Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 19 Nov 2022 11:40:18 -0500 Subject: [PATCH] LibWebView: Update OOPWV's URL when a page starts/finishes loading If the page's URL is changed from within the WebContent process (e.g. window.location.href is set from JavaScript, or a navigation is started from WebDriver), we would not store the URL at all within OOPWV. This prevented actions like reloading from working properly, as the browser would reload whatever URL was previously entered in the URL box. --- Userland/Libraries/LibWebView/OutOfProcessWebView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index 63fd5fb795..88d27e357c 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -300,12 +300,14 @@ void OutOfProcessWebView::notify_server_did_middle_click_link(Badge, const AK::URL& url) { + m_url = url; if (on_load_start) on_load_start(url); } void OutOfProcessWebView::notify_server_did_finish_loading(Badge, const AK::URL& url) { + m_url = url; if (on_load_finish) on_load_finish(url); }