diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index e9b3dbb1b..c7da3e82e 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -161,7 +161,6 @@ |<>|Allow websites to request geolocations. |<>|Allow websites to show notifications. |<>|Allow websites to record audio/video. -|<>|Allow websites to lock the mouse pointer. |<>|Whether JavaScript programs can open new windows without user interaction. |<>|Whether JavaScript programs can close windows. |<>|Whether JavaScript programs can read or write to the clipboard. @@ -1466,20 +1465,6 @@ Default: +pass:[ask]+ This setting is only available with the QtWebEngine backend. -[[content-mouse-lock]] -=== mouse-lock -Allow websites to lock the mouse pointer. - -Valid values: - - * +true+ - * +false+ - * +ask+ - -Default: +pass:[ask]+ - -This setting is only available with the QtWebEngine backend. - [[content-javascript-can-open-windows-automatically]] === javascript-can-open-windows-automatically Whether JavaScript programs can open new windows without user interaction. diff --git a/qutebrowser/browser/webengine/webview.py b/qutebrowser/browser/webengine/webview.py index f3fc9bfbe..92d67b1db 100644 --- a/qutebrowser/browser/webengine/webview.py +++ b/qutebrowser/browser/webengine/webview.py @@ -133,7 +133,6 @@ class WebEnginePage(QWebEnginePage): QWebEnginePage.MediaAudioCapture: ('content', 'media-capture'), QWebEnginePage.MediaVideoCapture: ('content', 'media-capture'), QWebEnginePage.MediaAudioVideoCapture: ('content', 'media-capture'), - QWebEnginePage.MouseLock: ('content', 'mouse-lock'), } messages = { QWebEnginePage.Geolocation: 'access your location', @@ -141,6 +140,15 @@ class WebEnginePage(QWebEnginePage): QWebEnginePage.MediaVideoCapture: 'record video', QWebEnginePage.MediaAudioVideoCapture: 'record audio/video', } + assert options.keys() == messages.keys() + + if feature not in options: + log.webview.error("Unhandled feature permission {}".format( + debug.qenum_key(QWebEnginePage, feature))) + self.setFeaturePermission(url, feature, + QWebEnginePage.PermissionDeniedByUser) + return + yes_action = functools.partial( self.setFeaturePermission, url, feature, QWebEnginePage.PermissionGrantedByUser) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 0037acbeb..e90ac15b3 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -826,11 +826,6 @@ def data(readonly=False): backends=[usertypes.Backend.QtWebEngine]), "Allow websites to record audio/video."), - ('mouse-lock', - SettingValue(typ.BoolAsk(), 'ask', - backends=[usertypes.Backend.QtWebEngine]), - "Allow websites to lock the mouse pointer."), - ('javascript-can-open-windows-automatically', SettingValue(typ.Bool(), 'false'), "Whether JavaScript programs can open new windows without user "