Selaa lähdekoodia

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.
Timothy Flynn 2 vuotta sitten
vanhempi
commit
9782660cb6
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      Userland/Libraries/LibWebView/OutOfProcessWebView.cpp

+ 2 - 0
Userland/Libraries/LibWebView/OutOfProcessWebView.cpp

@@ -300,12 +300,14 @@ void OutOfProcessWebView::notify_server_did_middle_click_link(Badge<WebContentCl
 
 
 void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL& url)
 void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL& url)
 {
 {
+    m_url = url;
     if (on_load_start)
     if (on_load_start)
         on_load_start(url);
         on_load_start(url);
 }
 }
 
 
 void OutOfProcessWebView::notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL& url)
 void OutOfProcessWebView::notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL& url)
 {
 {
+    m_url = url;
     if (on_load_finish)
     if (on_load_finish)
         on_load_finish(url);
         on_load_finish(url);
 }
 }