Qt 6.8.2 has a more fine-grained workaround:
https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/606122
This never seems to have it made to Qt 6.9+, but I can't seem to reproduce the
issue anymore (neither with PDF.js nor with Google Sheets), even on older
affected Qt versions, even on older Intel hardware. Maybe something else (mesa
etc.?) changed and this was fixed there?
Let's reenable this and find out if it breaks things again for someone.
Fixes#8346
See #7489, #8001, #8006
The DocumentPictureInPicture JS API added in Chromium 116 is not implemented in
QtWebEngine. This results in createWindow() being called with a window type with
random value, which then causes qutebrowser to bail out:
Traceback (most recent call last):
File ".../qutebrowser/browser/webengine/webview.py", line 123, in createWindow
raise ValueError("Invalid wintype {}".format(debug_type))
ValueError: Invalid wintype 843995690
Until this is fixed in Qt, we pass an argument to Chromium to disable the API
entirely, so that web pages hopefully fall back to something else.
In the case of the new Google Huddle feature, this results in them still working
with an on-page overlay instead.
Thanks to Joshua Cold and Vivia for helping to debug this!
Fixes#8449
See https://bugreports.qt.io/browse/QTBUG-132681
We thought #7489 would be fixed on chrome 112 but it appears to still be
an issue. As discussed on the issue, it's not clear how many workflows
would be affected by accelerated 2d canvas and we don't have enough data
to detect the affected graphics configurations. So lets just disable
accelerated 2d canvas by default and users who want it turned on can do
so via the setting.
If some major use case pops up to enable this by default where possible
we can revisit and think of more nuanced feature detection.
I've kept the handling of callable values of `_WEBENGINE_SETTINGS`
because I don't like have to have something like
`--disable-accelerated-2d-canvas` written in code twice. The setting
above this one could probably be changed to use it too.
I previously changed the assertion to be a subset match, to deal with a qt arg
being added based on the Qt version the tests were being run on. I didn't
notice this fixture that can set setting to avoid that dynamic-ness instead.
I would like to be able to disable this workound for new enough chromium
versions (we still need to test that chrome 111 will be fixed, but we
can always bump it up later).
I also wanted to use the declarative mapping `_WEBENGINE_SETTINGS` instead
of adding a new conditional in `_qtwebengine_args`, because that just
seems nicer.
So I changed `_WEBENGINE_SETTINGS` so that the value could also be a
function. The idea is that the function returns on of the other values
based on some feature detection. This also required passing down the
args being used for feature detection in the calling method already.
I feel like that dict is being a bit abused here and if the entries
could be turned into objects with a bit more consistency it might be
nice. But this isn't too bad, right?
Had to change the `test_qt_args` test to be a superset test instead of
exact match because the new `--disable-accelerated-2d-canvas` arg was
showing up in the results based on whatever Qt version you happen to be
running the tests on.
git ls-files | \
xargs grep -l "This file is part of qutebrowser" | \
xargs grep -l SPDX-License-Identifier | \
xargs sed -i '/# This file is part of qutebrowser\./,/along with qutebrowser\. If not, see <https:\/\/www\.gnu.org\/licenses\/>./d'
We're deprecating vim modelines in favor of `.editorconfig`.
Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:
```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```
Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:
```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
Alternatively, it would have been possible to move the backend library
checking from backendproblem.py to earlyinit.py entirely. However, this
would lead to less user-friendly dialogs, as we can't e.g. offer a
button to switch the backend setting.
Fixes#6161
We now use versions.webengine_versions() to get the real QtWebEngine
version. This is more accurate and also allows us to drop the
InstalledApp workaround with QtWebEngine 5.15.3.
Also, we pass a WebEngineVersions object around instead of asking for
the versions multiple times. This also leads to less patching in tests.
See #3785