[WebBrowser Plasmoid] Support opening external links
ClosedPublic

Authored by broulik on Mar 23 2018, 10:21 AM.

Details

Summary

This implements a context menu for opening links externally. There is unfortunately currently no way to add custom context menu entries to WebEngineView's context menu, so the link menu is completely replaced.
It also lets websites open new windows and fixes target="_blank" links

CCBUG: 371023

Test Plan


Verified that clicking a <a href="file:///usr/bin/kate" target="_blank"> link does not result in that file being executed.
Unwanted popups are successfully blocked and show a hint

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 23 2018, 10:21 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 23 2018, 10:21 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Mar 23 2018, 10:21 AM
Murz added a subscriber: Murz.Mar 24 2018, 6:27 AM

In general fine.

applets/webbrowser/package/contents/ui/main.qml
65–67

You can find a better solution. Especially as there's only 3 items (two spaces) in this Layout.

broulik added inline comments.Mar 25 2018, 12:00 PM
applets/webbrowser/package/contents/ui/main.qml
65–67

The layout is

[<] [>] [address bar] [popup blocked] [ reload ]

I want a space between everything except around the popup info

This revision was not accepted when it landed; it landed in state Needs Review.Mar 26 2018, 2:12 PM
This revision was automatically updated to reflect the committed changes.