summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_view_qt.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2017-06-20 10:19:56 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2017-09-12 08:21:40 +0000
commit73ae71cbd1937ef1e2a1ba888a4802792fe6d738 (patch)
tree64162de4723714715e72ba09e646da34a05c46dc /src/core/web_contents_view_qt.cpp
parent4fddefdcf2f25c52bd3258ce846233217bf7e465 (diff)
Set referrer on download requests
Note that the Referer header still won't be sent if the download is triggered via an anchor element with the 'download' attribute: crbug.com/455987 . Task-number: QTBUG-61354 Change-Id: I5af971af916b2190756e3e58f19736072a213922 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_contents_view_qt.cpp')
-rw-r--r--src/core/web_contents_view_qt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 844544887..86e839a7f 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -175,6 +175,9 @@ static inline WebEngineContextMenuData fromParams(const content::ContextMenuPara
ret.setMisspelledWord(toQt(params.misspelled_word));
ret.setSpellCheckerSuggestions(fromVector(params.dictionary_suggestions));
#endif
+ ret.setFrameUrl(toQt(params.frame_url));
+ ret.setPageUrl(toQt(params.page_url));
+ ret.setReferrerPolicy((ReferrerPolicy)params.referrer_policy);
return ret;
}