Closed Bug 1779311 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34819 - Child of delegatesFocus should not get :focus-visible styling if parent is clicked

Categories

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

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 34819 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/34819
Details from upstream follow.

Di Zhang <dizhangg@chromium.org> wrote:

Child of delegatesFocus should not get :focus-visible styling if parent is clicked

When matching the pseudo class of a delegatedFocus child element that
gets focused through a mouse click, the MouseEventManager unnecessarily assign it the "Forward" focus type. Then, in SelectorChecker, given it now has focus type "Forward", it is assigned the selector :focus-visible. This CL fixes this wrong logic and add a WPT test.

[1] https://drafts.csswg.org/selectors/#the-focus-visible-pseudo

Change-Id: I76f4ccf8d20ba9886d01f0e185e02c257955c286
Fixed: 1327136

Reviewed-on: https://chromium-review.googlesource.com/3755450
WPT-Export-Revision: 4a977cdc1e2fe4ff7b7b95aeb47fdd6ae35eee7c

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

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 1 subtests

Status Summary

Firefox

OK : 2
PASS: 2

Chrome

OK : 2
PASS: 1
FAIL: 1

Safari

OK : 2
PASS: 2

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/482c053c7c84
[wpt PR 34819] - Child of delegatesFocus should not get :focus-visible styling if parent is clicked, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.