Add setting to enable/disable WebGL.

See #612.
This commit is contained in:
Florian Bruhin 2015-05-16 00:31:13 +02:00
parent f855d5f349
commit cd53318c7f
4 changed files with 19 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Added
- There are now some example userscripts in `misc/userscripts`.
- New command `:scroll-px` which replaces `:scroll` for pixel-exact scrolling.
- New setting `ui -> smooth-scrolling`.
- New setting `content -> webgl` to enable/disable https://www.khronos.org/webgl/[WebGL].
Changed
~~~~~~~

View File

@ -135,6 +135,7 @@
|<<content-allow-images,allow-images>>|Whether images are automatically loaded in web pages.
|<<content-allow-javascript,allow-javascript>>|Enables or disables the running of JavaScript programs.
|<<content-allow-plugins,allow-plugins>>|Enables or disables plugins in Web pages.
|<<content-webgl,webgl>>|Enables or disables WebGL.
|<<content-geolocation,geolocation>>|Allow websites to request geolocations.
|<<content-notifications,notifications>>|Allow websites to show notifications.
|<<content-javascript-can-open-windows,javascript-can-open-windows>>|Whether JavaScript programs can open new windows.
@ -1150,6 +1151,17 @@ Valid values:
Default: +pass:[false]+
[[content-webgl]]
=== webgl
Enables or disables WebGL.
Valid values:
* +true+
* +false+
Default: +pass:[true]+
[[content-geolocation]]
=== geolocation
Allow websites to request geolocations.

View File

@ -609,6 +609,10 @@ def data(readonly=False):
'Qt plugins with a mimetype such as "application/x-qt-plugin" '
"are not affected by this setting."),
('webgl',
SettingValue(typ.Bool(), 'true'),
"Enables or disables WebGL."),
('geolocation',
SettingValue(typ.BoolAsk(), 'ask'),
"Allow websites to request geolocations."),

View File

@ -254,6 +254,8 @@ MAPPINGS = {
# Attribute(QWebSettings.JavaEnabled),
'allow-plugins':
Attribute(QWebSettings.PluginsEnabled),
'webgl':
Attribute(QWebSettings.WebGLEnabled),
'local-content-can-access-remote-urls':
Attribute(QWebSettings.LocalContentCanAccessRemoteUrls),
'local-content-can-access-file-urls':