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`. - There are now some example userscripts in `misc/userscripts`.
- New command `:scroll-px` which replaces `:scroll` for pixel-exact scrolling. - New command `:scroll-px` which replaces `:scroll` for pixel-exact scrolling.
- New setting `ui -> smooth-scrolling`. - New setting `ui -> smooth-scrolling`.
- New setting `content -> webgl` to enable/disable https://www.khronos.org/webgl/[WebGL].
Changed Changed
~~~~~~~ ~~~~~~~

View File

@ -135,6 +135,7 @@
|<<content-allow-images,allow-images>>|Whether images are automatically loaded in web pages. |<<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-javascript,allow-javascript>>|Enables or disables the running of JavaScript programs.
|<<content-allow-plugins,allow-plugins>>|Enables or disables plugins in Web pages. |<<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-geolocation,geolocation>>|Allow websites to request geolocations.
|<<content-notifications,notifications>>|Allow websites to show notifications. |<<content-notifications,notifications>>|Allow websites to show notifications.
|<<content-javascript-can-open-windows,javascript-can-open-windows>>|Whether JavaScript programs can open new windows. |<<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]+ Default: +pass:[false]+
[[content-webgl]]
=== webgl
Enables or disables WebGL.
Valid values:
* +true+
* +false+
Default: +pass:[true]+
[[content-geolocation]] [[content-geolocation]]
=== geolocation === geolocation
Allow websites to request geolocations. 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" ' 'Qt plugins with a mimetype such as "application/x-qt-plugin" '
"are not affected by this setting."), "are not affected by this setting."),
('webgl',
SettingValue(typ.Bool(), 'true'),
"Enables or disables WebGL."),
('geolocation', ('geolocation',
SettingValue(typ.BoolAsk(), 'ask'), SettingValue(typ.BoolAsk(), 'ask'),
"Allow websites to request geolocations."), "Allow websites to request geolocations."),

View File

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