summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp6
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.h1
-rw-r--r--Userland/Libraries/LibWeb/Page/Page.h2
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.cpp2
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.h2
-rw-r--r--Userland/Libraries/LibWebView/ViewImplementation.h2
-rw-r--r--Userland/Libraries/LibWebView/WebContentClient.cpp4
-rw-r--r--Userland/Libraries/LibWebView/WebContentClient.h2
-rw-r--r--Userland/Services/WebContent/PageHost.cpp4
-rw-r--r--Userland/Services/WebContent/PageHost.h2
-rw-r--r--Userland/Services/WebContent/WebContentClient.ipc2
-rw-r--r--Userland/Utilities/headless-browser.cpp2
12 files changed, 16 insertions, 15 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index a8e78c3d68..08267c4e69 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -215,10 +215,10 @@ bool FrameLoader::load(LoadRequest& request, Type type)
auto& url = request.url();
- if (type == Type::Navigation || type == Type::Reload) {
+ if (type == Type::Navigation || type == Type::Reload || type == Type::Redirect) {
if (auto* page = browsing_context().page()) {
if (&page->top_level_browsing_context() == &m_browsing_context)
- page->client().page_did_start_loading(url);
+ page->client().page_did_start_loading(url, type == Type::Redirect);
}
}
@@ -401,7 +401,7 @@ void FrameLoader::resource_did_load()
return;
}
m_redirects_count++;
- load(url.complete_url(location.value()), FrameLoader::Type::Navigation);
+ load(url.complete_url(location.value()), Type::Redirect);
return;
}
}
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.h b/Userland/Libraries/LibWeb/Loader/FrameLoader.h
index 2c83386970..2df7255a2f 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.h
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.h
@@ -21,6 +21,7 @@ public:
Navigation,
Reload,
IFrame,
+ Redirect,
};
static void set_default_favicon_path(String);
diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h
index 037f1a054c..25635f9e86 100644
--- a/Userland/Libraries/LibWeb/Page/Page.h
+++ b/Userland/Libraries/LibWeb/Page/Page.h
@@ -152,7 +152,7 @@ public:
virtual Gfx::IntRect page_did_request_maximize_window() { return {}; }
virtual Gfx::IntRect page_did_request_minimize_window() { return {}; }
virtual Gfx::IntRect page_did_request_fullscreen_window() { return {}; }
- virtual void page_did_start_loading(const AK::URL&) { }
+ virtual void page_did_start_loading(const AK::URL&, bool is_redirect) { (void)is_redirect; }
virtual void page_did_create_main_document() { }
virtual void page_did_finish_loading(const AK::URL&) { }
virtual void page_did_change_selection() { }
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
index 24c861cd2e..ed6185983c 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
@@ -298,7 +298,7 @@ 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)
+void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL& url, bool)
{
m_url = url;
if (on_load_start)
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h
index 3a5f9b6723..34e5424dbb 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h
@@ -151,7 +151,7 @@ private:
virtual void notify_server_did_unhover_link(Badge<WebContentClient>) override;
virtual void notify_server_did_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers) override;
virtual void notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers) override;
- virtual void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&) override;
+ virtual void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&, bool is_redirect) override;
virtual void notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL&) override;
virtual void notify_server_did_request_navigate_back(Badge<WebContentClient>) override;
virtual void notify_server_did_request_navigate_forward(Badge<WebContentClient>) override;
diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h
index c15dfb0a1a..65c004fd8b 100644
--- a/Userland/Libraries/LibWebView/ViewImplementation.h
+++ b/Userland/Libraries/LibWebView/ViewImplementation.h
@@ -33,7 +33,7 @@ public:
virtual void notify_server_did_unhover_link(Badge<WebContentClient>) = 0;
virtual void notify_server_did_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers) = 0;
virtual void notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers) = 0;
- virtual void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&) = 0;
+ virtual void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&, bool is_redirect) = 0;
virtual void notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL&) = 0;
virtual void notify_server_did_request_navigate_back(Badge<WebContentClient>) = 0;
virtual void notify_server_did_request_navigate_forward(Badge<WebContentClient>) = 0;
diff --git a/Userland/Libraries/LibWebView/WebContentClient.cpp b/Userland/Libraries/LibWebView/WebContentClient.cpp
index ade4613a7c..4df5d36ea1 100644
--- a/Userland/Libraries/LibWebView/WebContentClient.cpp
+++ b/Userland/Libraries/LibWebView/WebContentClient.cpp
@@ -131,9 +131,9 @@ void WebContentClient::did_middle_click_link(AK::URL const& url, String const& t
m_view.notify_server_did_middle_click_link({}, url, target, modifiers);
}
-void WebContentClient::did_start_loading(AK::URL const& url)
+void WebContentClient::did_start_loading(AK::URL const& url, bool is_redirect)
{
- m_view.notify_server_did_start_loading({}, url);
+ m_view.notify_server_did_start_loading({}, url, is_redirect);
}
void WebContentClient::did_request_context_menu(Gfx::IntPoint const& content_position)
diff --git a/Userland/Libraries/LibWebView/WebContentClient.h b/Userland/Libraries/LibWebView/WebContentClient.h
index ae781781fe..886d20c935 100644
--- a/Userland/Libraries/LibWebView/WebContentClient.h
+++ b/Userland/Libraries/LibWebView/WebContentClient.h
@@ -47,7 +47,7 @@ private:
virtual void did_unhover_link() override;
virtual void did_click_link(AK::URL const&, String const&, unsigned) override;
virtual void did_middle_click_link(AK::URL const&, String const&, unsigned) override;
- virtual void did_start_loading(AK::URL const&) override;
+ virtual void did_start_loading(AK::URL const&, bool) override;
virtual void did_request_context_menu(Gfx::IntPoint const&) override;
virtual void did_request_link_context_menu(Gfx::IntPoint const&, AK::URL const&, String const&, unsigned) override;
virtual void did_request_image_context_menu(Gfx::IntPoint const&, AK::URL const&, String const&, unsigned, Gfx::ShareableBitmap const&) override;
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index 6f61c1b0aa..d4a3c8e044 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -253,9 +253,9 @@ void PageHost::page_did_middle_click_link(const URL& url, [[maybe_unused]] Strin
m_client.async_did_middle_click_link(url, target, modifiers);
}
-void PageHost::page_did_start_loading(const URL& url)
+void PageHost::page_did_start_loading(const URL& url, bool is_redirect)
{
- m_client.async_did_start_loading(url);
+ m_client.async_did_start_loading(url, is_redirect);
}
void PageHost::page_did_create_main_document()
diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h
index aadda02b5f..524ee8484f 100644
--- a/Userland/Services/WebContent/PageHost.h
+++ b/Userland/Services/WebContent/PageHost.h
@@ -77,7 +77,7 @@ private:
virtual void page_did_middle_click_link(const URL&, String const& target, unsigned modifiers) override;
virtual void page_did_request_context_menu(Gfx::IntPoint const&) override;
virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const URL&, String const& target, unsigned modifiers) override;
- virtual void page_did_start_loading(const URL&) override;
+ virtual void page_did_start_loading(const URL&, bool) override;
virtual void page_did_create_main_document() override;
virtual void page_did_finish_loading(const URL&) override;
virtual void page_did_request_alert(String const&) override;
diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc
index c5c1e1df53..28a413a83d 100644
--- a/Userland/Services/WebContent/WebContentClient.ipc
+++ b/Userland/Services/WebContent/WebContentClient.ipc
@@ -6,7 +6,7 @@
endpoint WebContentClient
{
- did_start_loading(URL url) =|
+ did_start_loading(URL url, bool is_redirect) =|
did_finish_loading(URL url) =|
did_request_navigate_back() =|
did_request_navigate_forward() =|
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp
index 75f23cbee0..67e0e8243d 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -155,7 +155,7 @@ public:
{
}
- virtual void page_did_start_loading(AK::URL const&) override
+ virtual void page_did_start_loading(AK::URL const&, bool) override
{
}