summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index da1ea8dde..76f94c61f 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -1005,7 +1005,13 @@ static bool navigationThrottleCallback(content::WebContents *source,
WebContentsViewQt::from(static_cast<content::WebContentsImpl *>(source)->GetView())->client();
if (!client)
return false;
- client->navigationRequested(pageTransitionToNavigationType(params.transition_type()),
+
+ // Redirects might not be reflected in transition_type at this point (see also chrome/.../web_navigation_api_helpers.cc)
+ auto transition_type = params.transition_type();
+ if (params.is_redirect())
+ transition_type = ui::PageTransitionFromInt(transition_type | ui::PAGE_TRANSITION_SERVER_REDIRECT);
+
+ client->navigationRequested(pageTransitionToNavigationType(transition_type),
toQt(params.url()),
navigationRequestAction,
params.is_main_frame());