Bug
1779311 [wpt PR 34819] - Child of delegatesFocus should not get :focus-visible styling if parent is clicked, a=testonly
Automatic update from web-platform-tests
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
[2] https://html.spec.whatwg.org/#element-has-the-focus
Change-Id: I76f4ccf8d20ba9886d01f0e185e02c257955c286
Fixed:
1327136
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3755450
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1024371}
--
wpt-commits:
fa49104bd886d5436d7f58a291e049e02cf157c9
wpt-pr: 34819