[wpt-sync] Sync PR 62408 - [CE] Restrict script-initiated focus on capability elements
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62408 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62408
Details from upstream follow.
Thomas Nguyen <tungnh@chromium.org> wrote:
[CE] Restrict script-initiated focus on capability elements
Internal programmatic focus paths, such as modal dialog transitions or
popover autofocus, reach this method withFocusType::kNone. This
allowed capability elements to acquire focus without transient user
activation, bypassing safeguards. By trackingFocusTriggerinstead,
internal script-driven invocations are properly captured and blocked
unless user activation is present.Fixed: 540076586, 344739595
Change-Id: I5caec2bab0d2817f17b3e9f458e6da773b6761de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8328459
Reviewed-by: Dominic Farolino \<dom@chromium.org>
Commit-Queue: Thomas Nguyen \<tungnh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1691080}
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=4367520f260458b95fdbf7b2235a987abcd9a2a6
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 14 tests and 1 subtests
Status Summary
Firefox
OK : 1[GitHub] 14[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 18
FAIL: 2[GitHub] 58[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
FAIL: 2
Safari
OK : 1
FAIL: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/permission-element/usermedia/idlharness.window.html [wpt.fyi]
- HTMLUserMediaElement interface: existence and properties of interface object:
FAIL - HTMLUserMediaElement interface object length:
FAIL - HTMLUserMediaElement interface object name:
FAIL - HTMLUserMediaElement interface: existence and properties of interface prototype object:
FAIL - HTMLUserMediaElement interface: existence and properties of interface prototype object's "constructor" property:
FAIL - HTMLUserMediaElement interface: existence and properties of interface prototype object's @@unscopables property:
FAIL - HTMLUserMediaElement interface: attribute onstream:
FAIL - HTMLUserMediaElement interface: attribute oncancel:
FAIL - HTMLUserMediaElement interface: attribute onerror:
FAIL - HTMLUserMediaElement interface: attribute stream:
FAIL - HTMLUserMediaElement interface: attribute error:
FAIL - HTMLUserMediaElement interface: operation setConstraints(optional HTMLMediaStreamConstraints):
FAIL - HTMLUserMediaElement must be primary interface of document.createElement('usermedia'):
FAIL - Stringification of document.createElement('usermedia'):
FAIL - HTMLUserMediaElement interface: document.createElement('usermedia') must inherit property "onstream" with the proper type:
FAIL - HTMLUserMediaElement interface: document.createElement('usermedia') must inherit property "stream" with the proper type:
FAIL - HTMLUserMediaElement interface: document.createElement('usermedia') must inherit property "error" with the proper type:
FAIL - HTMLUserMediaElement interface: document.createElement('usermedia') must inherit property "setConstraints(optional HTMLMediaStreamConstraints)" with the proper type:
FAIL - HTMLUserMediaElement interface: calling setConstraints(optional HTMLMediaStreamConstraints) on document.createElement('usermedia') with too few arguments must throw TypeError:
FAIL - HTMLGeolocationElement interface: existence and properties of interface object:
FAIL - HTMLGeolocationElement interface object length:
FAIL - HTMLGeolocationElement interface object name:
FAIL - HTMLGeolocationElement interface: existence and properties of interface prototype object:
FAIL - HTMLGeolocationElement interface: existence and properties of interface prototype object's "constructor" property:
FAIL - HTMLGeolocationElement interface: existence and properties of interface prototype object's @@unscopables property:
FAIL - HTMLGeolocationElement interface: attribute position:
FAIL - HTMLGeolocationElement interface: attribute error:
FAIL - HTMLGeolocationElement interface: attribute autolocate:
FAIL - HTMLGeolocationElement interface: attribute watch:
FAIL - HTMLGeolocationElement interface: attribute onlocation:
FAIL - HTMLGeolocationElement interface: attribute isValid:
FAIL - HTMLGeolocationElement interface: attribute invalidReason:
FAIL - HTMLGeolocationElement interface: attribute initialPermissionStatus:
FAIL - HTMLGeolocationElement interface: attribute permissionStatus:
FAIL - HTMLGeolocationElement interface: attribute onpromptaction:
FAIL - HTMLGeolocationElement interface: attribute onpromptdismiss:
FAIL - HTMLGeolocationElement interface: attribute onvalidationstatuschange:
FAIL
- HTMLUserMediaElement interface: existence and properties of interface object:
- /html/semantics/permission-element/usermedia/invalid-css-properties.html [wpt.fyi]
- None of the listed properties should be applied:
FAIL
- None of the listed properties should be applied:
- /html/semantics/permission-element/usermedia/lang-attribute-update.html [wpt.fyi]
- UserMedia element should dynamically change text when the lang attribute changes:
FAIL
- UserMedia element should dynamically change text when the lang attribute changes:
- /html/semantics/permission-element/usermedia/legacy-mode/legacy-mode.https.html [wpt.fyi]
- isTypeSupported existence and behavior:
FAIL - Legacy attributes existence and validation:
FAIL - Invalid type causes fallback/invalid state in legacy mode:
FAIL - Standard events and stream attribute are not active in legacy mode:
FAIL
- isTypeSupported existence and behavior:
- /html/semantics/permission-element/usermedia/no-children-rendered.html [wpt.fyi]
- The usermedia element should have no end tag or contents:
FAIL
- The usermedia element should have no end tag or contents:
- /html/semantics/permission-element/usermedia/no-focus.html [wpt.fyi]
- UserMedia element is not focusable by script and does not autofocus in dialog without user activation:
FAIL(Chrome:FAIL, Safari:FAIL) - UserMedia element and dialog autofocus are allowed with user activation:
FAIL(Chrome:FAIL, Safari:FAIL)
- UserMedia element is not focusable by script and does not autofocus in dialog without user activation:
- /html/semantics/permission-element/usermedia/oncancel-attribute.html [wpt.fyi]
- oncancel IDL attribute:
FAIL
- oncancel IDL attribute:
- /html/semantics/permission-element/usermedia/onerror-attribute.html [wpt.fyi]
- onerror IDL attribute:
FAIL
- onerror IDL attribute:
- /html/semantics/permission-element/usermedia/onstream-attribute.html [wpt.fyi]
- onstream IDL attribute:
FAIL - onstream HTML attribute:
FAIL
- onstream IDL attribute:
- /html/semantics/permission-element/usermedia/set-constraints-combinations.https.html [wpt.fyi]
- Case 0: No constraints:
FAIL - Case 1: Video set, Audio missing:
FAIL - Case 2: Audio set, Video missing:
FAIL - Case 3: Both set:
FAIL
- Case 0: No constraints:
- /html/semantics/permission-element/usermedia/usermedia-cancel-prompt.https.html [wpt.fyi]
- Denying PEPC prompt triggers oncancel event and sets NotAllowedError:
FAIL
- Denying PEPC prompt triggers oncancel event and sets NotAllowedError:
- /html/semantics/permission-element/usermedia/usermedia-iframe.https.html [wpt.fyi]
- A usermedia element in an iframe without permissions policy delegation should be blocked:
FAIL
- A usermedia element in an iframe without permissions policy delegation should be blocked:
- /html/semantics/permission-element/usermedia/usermedia-set-constraints-sanitization.https.html [wpt.fyi]
- HTMLUserMediaElement setConstraints sanitization handles video and audio constraint dictionaries correctly:
FAIL
- HTMLUserMediaElement setConstraints sanitization handles video and audio constraint dictionaries correctly:
- /html/semantics/permission-element/usermedia/usermedia-untrusted-click.https.html [wpt.fyi]
- Untrusted click on usermedia element should fail with InvalidStateError:
FAIL
- Untrusted click on usermedia element should fail with InvalidStateError:
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e807d6a0f301
https://hg.mozilla.org/mozilla-central/rev/c33b7d375e67
Description
•