[wpt-sync] Sync PR 53352 - [menu]: Fix toggle-menu command with light dismiss
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 53352 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/53352
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
[menu]: Fix toggle-menu command with light dismiss
NearestTargetPopoverForInvoker()
finds the nearest target popover for
a given popover invoker that is a form control or button element.
Before this CL, this algorithm didn't consider HTMLMenuItemElements as
possible popover invokers, meaning it never returned relevant opened
HTMLMenuListElement popovers.This CL updates this algorithm to consider HTMLMenuItemElement as a
popover invoker, and return its associated target menulist as a
popover. This correctsFindTopmostRelatedPopover()
, which makes light
dismiss for clicks aimed at \<menuitem>s work the same as \<button>s.Concretely, this ensures we do not double-activate a menuitem when we
click it and its popover is open. This fixes the behavior of the
toggle-menu
command, ensuring it works the same astoggle-popover
on buttons/traditional popovers.R=masonf
Bug: 406566432
Change-Id: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6648085
Reviewed-by: Di Zhang \<dizhangg@chromium.org>
Reviewed-by: Mason Freed \<masonf@chromium.org>
Commit-Queue: Dominic Farolino \<dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1477891}
Assignee | ||
Updated•2 days ago
|
Assignee | ||
Comment 1•2 days ago
|
||
Assignee | ||
Comment 2•2 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Chrome on GitHub CI
Total 2 tests and 2 subtests
Status Summary
Firefox
OK
: 2
PASS
: 1
FAIL
: 7
Chrome
OK
: 2
PASS
: 1
FAIL
: 7
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/menu/tentative/menubar-invoke-menulist.html [wpt.fyi]
- Menu elements are HTML elements.:
FAIL
(Chrome:FAIL
) - Menuitem with toggle-popover, show-popover, hide-popover commands can invoke menulist popover.:
FAIL
(Chrome:FAIL
) - Menuitem with toggle-menu, show-menu, hide-menu commands can invoke menulist popover.:
FAIL
(Chrome:FAIL
) - hidePopover() on menulist closes the popover.:
FAIL
(Chrome:FAIL
) - Checkable menuitems can still invoke menulist popovers:
FAIL
(Chrome:FAIL
)
- Menu elements are HTML elements.:
- /html/semantics/menu/tentative/menuitem-activate.html [wpt.fyi]
- User menuitem activation works with the toggle-menu command:
FAIL
(Chrome:FAIL
) - User menuitem activation works with show-popover command:
FAIL
(Chrome:FAIL
)
- User menuitem activation works with the toggle-menu command:
Description
•