Qt 6.9: Work around QtWebEngine not handling <permission> element

See #8539
This commit is contained in:
Florian Bruhin 2025-04-07 21:58:45 +02:00 committed by Chad Kouse
parent e989f399fc
commit bbee1b7284
No known key found for this signature in database
GPG Key ID: 2BBC602A2578C7A2
3 changed files with 23 additions and 16 deletions

View File

@ -49,6 +49,9 @@ Fixed
number, which fixes overzealous blocking on ScienceDirect.
- New site-specific quirk to fix existing accounts showing as non-existent on
Digitec/Galaxus.
- Workaround for microphone/camera permissions not being requested with
QtWebEngine 6.9.0 on Google Meet, Zoom, or other pages using the new
`<permission>` element.
- Resolved issues in userscripts:
* `qute-bitwarden` will now prompt a re-login if its cached session has
been invalidated since last used. (#8456)

View File

@ -159,6 +159,11 @@ def _qtwebengine_features(
# TODO adjust if fixed in Qt 6.8.2/.3 or 6.9.0/.1
disabled_features.append('DocumentPictureInPictureAPI')
if versions.webengine == utils.VersionNumber(6, 9):
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-135787
# TODO adjust if still present in 6.9.1
disabled_features.append('PermissionElement')
if not config.val.input.media_keys:
disabled_features.append('HardwareMediaKeyHandling')

View File

@ -448,25 +448,25 @@ class TestWebEngineArgs:
expected = ['--disable-features=InstalledApp'] if has_workaround else []
assert disable_features_args == expected
@pytest.mark.parametrize('qt_version, has_workaround', [
@pytest.mark.parametrize('qt_version, disabled', [
# Qt 6.6
('6.6.3', False),
('6.6.3', None),
# Qt 6.7
('6.7.0', True),
('6.7.1', True),
('6.7.2', True),
('6.7.3', True),
('6.7.0', "DocumentPictureInPictureAPI"),
('6.7.1', "DocumentPictureInPictureAPI"),
('6.7.2', "DocumentPictureInPictureAPI"),
('6.7.3', "DocumentPictureInPictureAPI"),
# Qt 6.8
('6.8.0', True),
('6.8.1', True),
('6.8.2', True), # tbd
('6.8.3', True), # tbd
('6.8.0', "DocumentPictureInPictureAPI"),
('6.8.1', "DocumentPictureInPictureAPI"),
('6.8.2', "DocumentPictureInPictureAPI"),
('6.8.3', "DocumentPictureInPictureAPI"),
# Qt 6.9
('6.9.0', True), # tbd
('6.9.1', True), # tbd
('6.9.0', "DocumentPictureInPictureAPI,PermissionElement"),
('6.9.1', "DocumentPictureInPictureAPI"), # tbd
])
def test_document_pip_workaround(
self, parser, version_patcher, qt_version, has_workaround
def test_disble_feature_workaround(
self, parser, version_patcher, qt_version, disabled
):
version_patcher(qt_version)
@ -477,8 +477,7 @@ class TestWebEngineArgs:
if arg.startswith(qtargs._DISABLE_FEATURES)
]
flag = "--disable-features=DocumentPictureInPictureAPI"
expected = [flag] if has_workaround else []
expected = [f"--disable-features={disabled}"] if disabled else []
assert disable_features_args == expected
@pytest.mark.parametrize('enabled', [True, False])