Closed Bug 1688236 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 27288 - [selectors] :focus-visible on <select> element

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Manuel Rego Casasnovas <rego@igalia.com>' wrote:

[selectors] :focus-visible on <select> element

When you do a mouse click to focus a \<select> element
:focus-visible shouldn't match.
This is Firefox behavior and has been agreed on the following issue:
https://github.com/w3c/csswg-drafts/issues/5822

This patch fixes the problem by removing
HTMLSelectElement::MayTriggerVirtualKeyboard() that was returning true
for \<select> elements.
And also by passing the proper FocusType::kMouse
in MenuListSelectType::DefaultEventHandler().

The previous wrong behavior was tested in focus-visible-002.html,
so removed the \<select> element on that test.

Added a new test case to check the new behavior
in focus-visible-003.html and focus-visible-004.html.

BUG=1169708
TEST=external/wpt/css/selectors/focus-visible-003.html
TEST=external/wpt/css/selectors/focus-visible-004.html

Change-Id: I6649ce6355aafc79b2fa3d258b2b69fa5a259ce7

Reviewed-on: https://chromium-review.googlesource.com/2644906
WPT-Export-Revision: 965387affd8ba0dadac73a0fc3645789c8273b8e

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 1 tests and 14 subtests

Status Summary

Firefox

OK : 1
PASS: 14

Chrome

OK : 1
PASS: 14

Safari

OK : 1
FAIL: 14

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c9382ef7ccc [wpt PR 27288] - [selectors] Move :focus-visible on <select> test to internal test, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.