Permalink
Browse files

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.
  • Loading branch information...
The-Compiler committed Jun 6, 2017
1 parent 1785b72 commit 2a32e26846b34cf668d2d21d14189934f69316a5
View
@@ -89,6 +89,14 @@ Changed
- The installer is now generated using NSIS instead of being a MSI
- Texts in prompts are now selectable.
- 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
~~~~~
View
@@ -164,7 +164,6 @@
|<<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-css-regions,css-regions>>|Enable or disable support for CSS regions.
|<<content-hyperlink-auditing,hyperlink-auditing>>|Enable or disable hyperlink auditing (<a ping>).
|<<content-geolocation,geolocation>>|Allow websites to request geolocations.
|<<content-notifications,notifications>>|Allow websites to show notifications.
@@ -1473,19 +1472,6 @@ Valid values:
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]]
=== hyperlink-auditing
Enable or disable hyperlink auditing (<a ping>).
@@ -59,14 +59,6 @@ class Setter(Base, websettings.Setter):
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):
"""A setting set via a static QWebSettings setter method."""
@@ -177,8 +169,6 @@ def shutdown():
Attribute(QWebSettings.PluginsEnabled),
'webgl':
Attribute(QWebSettings.WebGLEnabled),
'css-regions':
Attribute(QWebSettings.CSSRegionsEnabled),
'hyperlink-auditing':
Attribute(QWebSettings.HyperlinkAuditingEnabled),
'local-content-can-access-remote-urls':
@@ -230,8 +220,6 @@ def shutdown():
'frame-flattening':
Attribute(QWebSettings.FrameFlatteningEnabled),
# user-stylesheet is handled separately
'css-media-type':
NullStringSetter(QWebSettings.setCSSMediaType),
'smooth-scrolling':
Attribute(QWebSettings.ScrollAnimatorEnabled),
#'accelerated-compositing':
@@ -248,16 +236,6 @@ def shutdown():
Attribute(QWebSettings.LocalStorageEnabled),
'maximum-pages-in-cache':
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': {
'developer-extras':
@@ -266,8 +244,6 @@ def shutdown():
Attribute(QWebSettings.PrintElementBackgrounds),
'xss-auditing':
Attribute(QWebSettings.XSSAuditingEnabled),
'site-specific-quirks':
Attribute(QWebSettings.SiteSpecificQuirksEnabled),
'default-encoding':
Setter(QWebSettings.setDefaultTextEncoding),
}
@@ -403,9 +403,15 @@ class ConfigManager(QObject):
('tabs', 'hide-always'),
('ui', 'display-statusbar-messages'),
('ui', 'hide-mouse-cursor'),
('ui', 'css-media-type'),
('general', 'wrap-search'),
('general', 'site-specific-quirks'),
('hints', 'opacity'),
('completion', 'auto-open'),
('storage', 'object-cache-capacities'),
('storage', 'offline-storage-default-quota'),
('storage', 'offline-web-application-cache-quota'),
('content', 'css-regions'),
]
CHANGED_OPTIONS = {
('content', 'cookies-accept'):
@@ -450,8 +456,6 @@ class ConfigManager(QObject):
_get_value_transformer({'52428800': ''}),
('storage', 'maximum-pages-in-cache'):
_get_value_transformer({'': '0'}),
('storage', 'offline-storage-default-quota'):
_get_value_transformer({'': str(5 * 1024 * 1024)}),
('fonts', 'web-size-minimum'):
_get_value_transformer({'': '0'}),
('fonts', 'web-size-minimum-logical'):
@@ -215,11 +215,6 @@ def data(readonly=False):
"inspector's JavaScript console. Enabling this feature might "
"have an impact on performance."),
('site-specific-quirks',
SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]),
"Enable QtWebKit workarounds for broken sites."),
('default-encoding',
SettingValue(typ.String(), 'iso-8859-1'),
"Default encoding to use for websites.\n\n"
@@ -349,11 +344,6 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'true'),
"Hide the main scrollbar."),
('css-media-type',
SettingValue(typ.String(none_ok=True), '',
backends=[usertypes.Backend.QtWebKit]),
"Set the CSS media type."),
('smooth-scrolling',
SettingValue(typ.Bool(), 'false'),
"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: "
"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',
SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]),
@@ -856,11 +818,6 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'true'),
"Enables or disables WebGL."),
('css-regions',
SettingValue(typ.Bool(), 'true',
backends=[usertypes.Backend.QtWebKit]),
"Enable or disable support for CSS regions."),
('hyperlink-auditing',
SettingValue(typ.Bool(), 'false'),
"Enable or disable hyperlink auditing (<a ping>)."),

0 comments on commit 2a32e26

Please sign in to comment.