summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_view_qt.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2017-05-09 14:52:45 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2017-06-07 14:20:47 +0000
commitfa19227c3ac7df7c0d2f8a548a9a36ac9a7b803c (patch)
treef25e8bf0aea2d8194f39ac0d0495de12ae48b289 /src/core/web_contents_view_qt.cpp
parent1ad5b3b680d71ab6f97503398fbcc4c0f313aacb (diff)
Fix copying JavaScript URLs
Wire unfiltered link URL to the API layer. [ChangeLog][QtWebEngine] linkUrl member of QWebEngineContextMenuData and ContextMenuRequest was previously returning with "about:blank" in case of non-standard URLs. Now it contains the unvalidated URL and CopyLinkToClipboard action has been fixed to handle such URLs (like javascript:) correctly. Task-number: QTBUG-59307 Change-Id: I2e49767e1cc9ec8324d230c1bf346e21d7b8d9bb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_view_qt.cpp')
-rw-r--r--src/core/web_contents_view_qt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 844544887..e627fa06d 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -164,6 +164,7 @@ static inline WebEngineContextMenuData fromParams(const content::ContextMenuPara
ret.setPosition(QPoint(params.x, params.y));
ret.setLinkUrl(toQt(params.link_url));
ret.setLinkText(toQt(params.link_text.data()));
+ ret.setUnfilteredLinkUrl(toQt(params.unfiltered_link_url));
ret.setSelectedText(toQt(params.selection_text.data()));
ret.setMediaUrl(toQt(params.src_url));
ret.setMediaType((WebEngineContextMenuData::MediaType)params.media_type);