Get rid of various rarely customized settings

All those were customized by some <5 people in the past few years of crash
reports.

Closes #1751.
See #2639.
This commit is contained in:
Florian Bruhin 2017-06-06 12:39:19 +02:00
parent 1785b72393
commit 2a32e26846
5 changed files with 14 additions and 83 deletions

View File

@ -89,6 +89,14 @@ Changed
- The installer is now generated using NSIS instead of being a MSI - The installer is now generated using NSIS instead of being a MSI
- Texts in prompts are now selectable. - Texts in prompts are now selectable.
- Renderer process crashes now show an error page. - Renderer process crashes now show an error page.
- (QtWebKit) Various rarely customized settings were removed:
- `ui -> css-media-type` (defaults to desktop)
- `general -> site-specific-quirks` (now always turned on)
- `storage -> offline-storage-default-quota` (defaults to 5MB)
- `storage -> offline-web-application-cache-quota` (defaults to no quota)
- `storage -> object-cache-capacities` (default depends on disk space)
- `content -> css-regions` (now always turned off)
Fixed Fixed
~~~~~ ~~~~~

View File

@ -164,7 +164,6 @@
|<<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-webgl,webgl>>|Enables or disables WebGL.
|<<content-css-regions,css-regions>>|Enable or disable support for CSS regions.
|<<content-hyperlink-auditing,hyperlink-auditing>>|Enable or disable hyperlink auditing (<a ping>). |<<content-hyperlink-auditing,hyperlink-auditing>>|Enable or disable hyperlink auditing (<a ping>).
|<<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.
@ -1473,19 +1472,6 @@ Valid values:
Default: +pass:[true]+ Default: +pass:[true]+
[[content-css-regions]]
=== css-regions
Enable or disable support for CSS regions.
Valid values:
* +true+
* +false+
Default: +pass:[true]+
This setting is only available with the QtWebKit backend.
[[content-hyperlink-auditing]] [[content-hyperlink-auditing]]
=== hyperlink-auditing === hyperlink-auditing
Enable or disable hyperlink auditing (<a ping>). Enable or disable hyperlink auditing (<a ping>).

View File

@ -59,14 +59,6 @@ class Setter(Base, websettings.Setter):
pass pass
class NullStringSetter(Base, websettings.Setter):
"""A setter for settings requiring a null QString as default."""
def set_default(self, settings=None):
self._set(None, settings=settings)
class StaticSetter(Base, websettings.StaticSetter): class StaticSetter(Base, websettings.StaticSetter):
"""A setting set via a static QWebSettings setter method.""" """A setting set via a static QWebSettings setter method."""
@ -177,8 +169,6 @@ MAPPINGS = {
Attribute(QWebSettings.PluginsEnabled), Attribute(QWebSettings.PluginsEnabled),
'webgl': 'webgl':
Attribute(QWebSettings.WebGLEnabled), Attribute(QWebSettings.WebGLEnabled),
'css-regions':
Attribute(QWebSettings.CSSRegionsEnabled),
'hyperlink-auditing': 'hyperlink-auditing':
Attribute(QWebSettings.HyperlinkAuditingEnabled), Attribute(QWebSettings.HyperlinkAuditingEnabled),
'local-content-can-access-remote-urls': 'local-content-can-access-remote-urls':
@ -230,8 +220,6 @@ MAPPINGS = {
'frame-flattening': 'frame-flattening':
Attribute(QWebSettings.FrameFlatteningEnabled), Attribute(QWebSettings.FrameFlatteningEnabled),
# user-stylesheet is handled separately # user-stylesheet is handled separately
'css-media-type':
NullStringSetter(QWebSettings.setCSSMediaType),
'smooth-scrolling': 'smooth-scrolling':
Attribute(QWebSettings.ScrollAnimatorEnabled), Attribute(QWebSettings.ScrollAnimatorEnabled),
#'accelerated-compositing': #'accelerated-compositing':
@ -248,16 +236,6 @@ MAPPINGS = {
Attribute(QWebSettings.LocalStorageEnabled), Attribute(QWebSettings.LocalStorageEnabled),
'maximum-pages-in-cache': 'maximum-pages-in-cache':
StaticSetter(QWebSettings.setMaximumPagesInCache), StaticSetter(QWebSettings.setMaximumPagesInCache),
'object-cache-capacities':
StaticSetter(QWebSettings.setObjectCacheCapacities,
unpack=True),
'offline-storage-default-quota':
StaticSetter(QWebSettings.setOfflineStorageDefaultQuota),
# Default from ApplicationCacheStorage::ApplicationCacheStorage in
# qtwebkit/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
'offline-web-application-cache-quota':
StaticSetter(QWebSettings.setOfflineWebApplicationCacheQuota,
default=qtutils.MAXVALS['int64']), # no quota
}, },
'general': { 'general': {
'developer-extras': 'developer-extras':
@ -266,8 +244,6 @@ MAPPINGS = {
Attribute(QWebSettings.PrintElementBackgrounds), Attribute(QWebSettings.PrintElementBackgrounds),
'xss-auditing': 'xss-auditing':
Attribute(QWebSettings.XSSAuditingEnabled), Attribute(QWebSettings.XSSAuditingEnabled),
'site-specific-quirks':
Attribute(QWebSettings.SiteSpecificQuirksEnabled),
'default-encoding': 'default-encoding':
Setter(QWebSettings.setDefaultTextEncoding), Setter(QWebSettings.setDefaultTextEncoding),
} }

View File

@ -403,9 +403,15 @@ class ConfigManager(QObject):
('tabs', 'hide-always'), ('tabs', 'hide-always'),
('ui', 'display-statusbar-messages'), ('ui', 'display-statusbar-messages'),
('ui', 'hide-mouse-cursor'), ('ui', 'hide-mouse-cursor'),
('ui', 'css-media-type'),
('general', 'wrap-search'), ('general', 'wrap-search'),
('general', 'site-specific-quirks'),
('hints', 'opacity'), ('hints', 'opacity'),
('completion', 'auto-open'), ('completion', 'auto-open'),
('storage', 'object-cache-capacities'),
('storage', 'offline-storage-default-quota'),
('storage', 'offline-web-application-cache-quota'),
('content', 'css-regions'),
] ]
CHANGED_OPTIONS = { CHANGED_OPTIONS = {
('content', 'cookies-accept'): ('content', 'cookies-accept'):
@ -450,8 +456,6 @@ class ConfigManager(QObject):
_get_value_transformer({'52428800': ''}), _get_value_transformer({'52428800': ''}),
('storage', 'maximum-pages-in-cache'): ('storage', 'maximum-pages-in-cache'):
_get_value_transformer({'': '0'}), _get_value_transformer({'': '0'}),
('storage', 'offline-storage-default-quota'):
_get_value_transformer({'': str(5 * 1024 * 1024)}),
('fonts', 'web-size-minimum'): ('fonts', 'web-size-minimum'):
_get_value_transformer({'': '0'}), _get_value_transformer({'': '0'}),
('fonts', 'web-size-minimum-logical'): ('fonts', 'web-size-minimum-logical'):

View File

@ -215,11 +215,6 @@ def data(readonly=False):
"inspector's JavaScript console. Enabling this feature might " "inspector's JavaScript console. Enabling this feature might "
"have an impact on performance."), "have an impact on performance."),
('site-specific-quirks',
SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]),
"Enable QtWebKit workarounds for broken sites."),
('default-encoding', ('default-encoding',
SettingValue(typ.String(), 'iso-8859-1'), SettingValue(typ.String(), 'iso-8859-1'),
"Default encoding to use for websites.\n\n" "Default encoding to use for websites.\n\n"
@ -349,11 +344,6 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'true'), SettingValue(typ.Bool(), 'true'),
"Hide the main scrollbar."), "Hide the main scrollbar."),
('css-media-type',
SettingValue(typ.String(none_ok=True), '',
backends=[usertypes.Backend.QtWebKit]),
"Set the CSS media type."),
('smooth-scrolling', ('smooth-scrolling',
SettingValue(typ.Bool(), 'false'), SettingValue(typ.Bool(), 'false'),
"Whether to enable smooth scrolling for web pages. Note smooth " "Whether to enable smooth scrolling for web pages. Note smooth "
@ -777,34 +767,6 @@ def data(readonly=False):
"For more information about the feature, please refer to: " "For more information about the feature, please refer to: "
"http://webkit.org/blog/427/webkit-page-cache-i-the-basics/"), "http://webkit.org/blog/427/webkit-page-cache-i-the-basics/"),
('object-cache-capacities',
SettingValue(
typ.List(typ.WebKitBytes(maxsize=MAXVALS['int'],
none_ok=True), none_ok=True, length=3), '',
backends=[usertypes.Backend.QtWebKit]),
"The capacities for the global memory cache for dead objects "
"such as stylesheets or scripts. Syntax: cacheMinDeadCapacity, "
"cacheMaxDead, totalCapacity.\n\n"
"The _cacheMinDeadCapacity_ specifies the minimum number of "
"bytes that dead objects should consume when the cache is under "
"pressure.\n\n"
"_cacheMaxDead_ is the maximum number of bytes that dead objects "
"should consume when the cache is *not* under pressure.\n\n"
"_totalCapacity_ specifies the maximum number of bytes "
"that the cache should consume *overall*."),
('offline-storage-default-quota',
SettingValue(typ.WebKitBytes(maxsize=MAXVALS['int64']),
str(5 * 1024 * 1024),
backends=[usertypes.Backend.QtWebKit]),
"Default quota for new offline storage databases."),
('offline-web-application-cache-quota',
SettingValue(typ.WebKitBytes(maxsize=MAXVALS['int64'],
none_ok=True), '',
backends=[usertypes.Backend.QtWebKit]),
"Quota for the offline web application cache."),
('offline-storage-database', ('offline-storage-database',
SettingValue(typ.Bool(), 'true', SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]), backends=[usertypes.Backend.QtWebKit]),
@ -856,11 +818,6 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'true'), SettingValue(typ.Bool(), 'true'),
"Enables or disables WebGL."), "Enables or disables WebGL."),
('css-regions',
SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]),
"Enable or disable support for CSS regions."),
('hyperlink-auditing', ('hyperlink-auditing',
SettingValue(typ.Bool(), 'false'), SettingValue(typ.Bool(), 'false'),
"Enable or disable hyperlink auditing (<a ping>)."), "Enable or disable hyperlink auditing (<a ping>)."),