Closed Bug 2068984 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62408 - [CE] Restrict script-initiated focus on capability elements

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
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 with FocusType::kNone. This
allowed capability elements to acquire focus without transient user
activation, bypassing safeguards. By tracking FocusTrigger instead,
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}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

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

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.