Skip to content

Commit

Permalink
Rename Chromium settings
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Mar 3, 2022
1 parent ac4ca6b commit 38acd8f
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 52 deletions.
3 changes: 3 additions & 0 deletions doc/changelog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Changed
than `rofi` to ask for a password.
- The `content.headers.custom` setting now accepts empty strings as values,
resulting in an empty header being sent.
- Renamed settings:
* `qt.low_end_device_mode` -> `qt.chromium.low_end_device_mode`
* `qt.process_model` -> `qt.chromium.process_model`
Added
~~~~~
Expand Down
88 changes: 44 additions & 44 deletions doc/help/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@
|<<prompt.filebrowser,prompt.filebrowser>>|Show a filebrowser in download prompts.
|<<prompt.radius,prompt.radius>>|Rounding radius (in pixels) for the edges of prompts.
|<<qt.args,qt.args>>|Additional arguments to pass to Qt, without leading `--`.
|<<qt.chromium.low_end_device_mode,qt.chromium.low_end_device_mode>>|When to use Chromium's low-end device mode.
|<<qt.chromium.process_model,qt.chromium.process_model>>|Which Chromium process model to use.
|<<qt.environ,qt.environ>>|Additional environment variables to set.
|<<qt.force_platform,qt.force_platform>>|Force a Qt platform to use.
|<<qt.force_platformtheme,qt.force_platformtheme>>|Force a Qt platformtheme to use.
|<<qt.force_software_rendering,qt.force_software_rendering>>|Force software rendering for QtWebEngine.
|<<qt.highdpi,qt.highdpi>>|Turn on Qt HighDPI scaling.
|<<qt.low_end_device_mode,qt.low_end_device_mode>>|When to use Chromium's low-end device mode.
|<<qt.process_model,qt.process_model>>|Which Chromium process model to use.
|<<qt.workarounds.locale,qt.workarounds.locale>>|Work around locale parsing issues in QtWebEngine 5.15.3.
|<<qt.workarounds.remove_service_workers,qt.workarounds.remove_service_workers>>|Delete the QtWebEngine Service Worker directory on every start.
|<<scrolling.bar,scrolling.bar>>|When/how to show the scrollbar.
Expand Down Expand Up @@ -3772,6 +3772,48 @@ Type: <<types,List of String>>

Default: empty

[[qt.chromium.low_end_device_mode]]
=== qt.chromium.low_end_device_mode
When to use Chromium's low-end device mode.
This improves the RAM usage of renderer processes, at the expense of performance.

This setting requires a restart.

This setting is only available with the QtWebEngine backend.

Type: <<types,String>>

Valid values:

* +always+: Always use low-end device mode.
* +auto+: Decide automatically (uses low-end mode with < 1 GB available RAM).
* +never+: Never use low-end device mode.

Default: +pass:[auto]+

[[qt.chromium.process_model]]
=== qt.chromium.process_model
Which Chromium process model to use.
Alternative process models use less resources, but decrease security and robustness.
See the following pages for more details:

- https://www.chromium.org/developers/design-documents/process-models
- https://doc.qt.io/qt-5/qtwebengine-features.html#process-models

This setting requires a restart.

This setting is only available with the QtWebEngine backend.

Type: <<types,String>>

Valid values:

* +process-per-site-instance+: Pages from separate sites are put into separate processes and separate visits to the same site are also isolated.
* +process-per-site+: Pages from separate sites are put into separate processes. Unlike Process per Site Instance, all visits to the same site will share an OS process. The benefit of this model is reduced memory consumption, because more web pages will share processes. The drawbacks include reduced security, robustness, and responsiveness.
* +single-process+: Run all tabs in a single process. This should be used for debugging purposes only, and it disables `:open --private`.

Default: +pass:[process-per-site-instance]+

[[qt.environ]]
=== qt.environ
Additional environment variables to set.
Expand Down Expand Up @@ -3837,48 +3879,6 @@ Type: <<types,Bool>>

Default: +pass:[false]+

[[qt.low_end_device_mode]]
=== qt.low_end_device_mode
When to use Chromium's low-end device mode.
This improves the RAM usage of renderer processes, at the expense of performance.

This setting requires a restart.

This setting is only available with the QtWebEngine backend.

Type: <<types,String>>

Valid values:

* +always+: Always use low-end device mode.
* +auto+: Decide automatically (uses low-end mode with < 1 GB available RAM).
* +never+: Never use low-end device mode.

Default: +pass:[auto]+

[[qt.process_model]]
=== qt.process_model
Which Chromium process model to use.
Alternative process models use less resources, but decrease security and robustness.
See the following pages for more details:

- https://www.chromium.org/developers/design-documents/process-models
- https://doc.qt.io/qt-5/qtwebengine-features.html#process-models

This setting requires a restart.

This setting is only available with the QtWebEngine backend.

Type: <<types,String>>

Valid values:

* +process-per-site-instance+: Pages from separate sites are put into separate processes and separate visits to the same site are also isolated.
* +process-per-site+: Pages from separate sites are put into separate processes. Unlike Process per Site Instance, all visits to the same site will share an OS process. The benefit of this model is reduced memory consumption, because more web pages will share processes. The drawbacks include reduced security, robustness, and responsiveness.
* +single-process+: Run all tabs in a single process. This should be used for debugging purposes only, and it disables `:open --private`.

Default: +pass:[process-per-site-instance]+

[[qt.workarounds.locale]]
=== qt.workarounds.locale
Work around locale parsing issues in QtWebEngine 5.15.3.
Expand Down
2 changes: 1 addition & 1 deletion doc/qutebrowser.1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ show it.
*'URL'*::
URLs to open on startup (empty as a window separator).

=== optional arguments
=== options
*-h*, *--help*::
show this help message and exit

Expand Down
6 changes: 6 additions & 0 deletions qutebrowser/config/configdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ qt.force_platformtheme:
based on the desktop environment.
qt.process_model:
renamed: qt.chromium.process_model

qt.chromium.process_model:
type:
name: String
valid_values:
Expand Down Expand Up @@ -268,6 +271,9 @@ qt.process_model:
- https://doc.qt.io/qt-5/qtwebengine-features.html#process-models
qt.low_end_device_mode:
renamed: qt.chromium.low_end_device_mode

qt.chromium.low_end_device_mode:
type:
name: String
valid_values:
Expand Down
4 changes: 2 additions & 2 deletions qutebrowser/config/qtargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@ def _qtwebengine_settings_args(versions: version.WebEngineVersions) -> Iterator[
'--force-webrtc-ip-handling-policy='
'disable_non_proxied_udp',
},
'qt.process_model': {
'qt.chromium.process_model': {
'process-per-site-instance': None,
'process-per-site': '--process-per-site',
'single-process': '--single-process',
},
'qt.low_end_device_mode': {
'qt.chromium.low_end_device_mode': {
'auto': None,
'always': '--enable-low-end-device-mode',
'never': '--disable-low-end-device-mode',
Expand Down
6 changes: 3 additions & 3 deletions qutebrowser/html/warning-webkit.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ <h2>(Outdated) reasons to use QtWebKit</h2>
notification support was added for Qt 5.13.0.</p>

<p><b>Resource usage</b>: qutebrowser v1.5.0 added the <span
class="mono">qt.process_model</span> and <span
class="mono">qt.low_end_device_mode</span> settings which can be used to
class="mono">qt.chromium.process_model</span> and <span
class="mono">qt.chromium.low_end_device_mode</span> settings which can be used to
decrease the resource usage of QtWebEngine (but come with other drawbacks).</p>

<p><b>Not trusting Google</b>: Various people have checked the connections made
Expand Down Expand Up @@ -78,7 +78,7 @@ <h2>(Outdated) reasons to use QtWebKit</h2>
method</a>.</p>

<p><b>White flashing between loads with a custom stylesheet</b>: This doesn't
seem to happen with <span class="mono">qt.process_model = single-process</span>
seem to happen with <span class="mono">qt.chromium.process_model = single-process</span>
set. However, note that that setting comes with decreased security and
stability, but QtWebKit doesn't have any process isolation at all.</p>
{% endblock %}
4 changes: 2 additions & 2 deletions tests/unit/config/test_qtargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def test_canvas_reading(self, config_stub, parser, canvas_reading, added):
('single-process', True),
])
def test_process_model(self, config_stub, parser, process_model, added):
config_stub.val.qt.process_model = process_model
config_stub.val.qt.chromium.process_model = process_model
parsed = parser.parse_args([])
args = qtargs.qt_args(parsed)

Expand All @@ -267,7 +267,7 @@ def test_process_model(self, config_stub, parser, process_model, added):
('never', '--disable-low-end-device-mode'),
])
def test_low_end_device_mode(self, config_stub, parser, low_end_device_mode, arg):
config_stub.val.qt.low_end_device_mode = low_end_device_mode
config_stub.val.qt.chromium.low_end_device_mode = low_end_device_mode
parsed = parser.parse_args([])
args = qtargs.qt_args(parsed)

Expand Down

0 comments on commit 38acd8f

Please sign in to comment.