Closed Bug 2074185 Opened 2 months ago Closed 1 month ago

[wpt-sync] Sync PR 62837 - Don't use FocusTrigger::kUserGesture when handling untrusted key events.

Categories

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

task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

David Baron <dbaron@chromium.org> wrote:

Don't use FocusTrigger::kUserGesture when handling untrusted key events.

This makes menu elements stop using EventHandler::IsHandlingKeyEvent()
and instead make decisions based on the event we're actually handling.

Fixed: 553335083
Change-Id: Ie574a5595c9d476387ef3bcfa77a7244b00c83c0

Reviewed-on: https://chromium-review.googlesource.com/8427363
WPT-Export-Revision: 3450ec03de0b54c71c318056cfc6d835763f8095

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 29 tests and 1 subtests

Status Summary

Firefox

OK : 22
PASS : 15
FAIL : 2[GitHub] 142[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 147[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-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 2
ERROR : 1
NOTRUN : 1

Chrome

OK : 1
PASS : 2
FAIL : 2

Safari

FAIL : 2
TIMEOUT: 2
NOTRUN : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/semantics/menu/tentative/long-menulist-appearance.html [wpt.fyi]: FAIL
  • /html/semantics/menu/tentative/menu-elements-default-style.html [wpt.fyi]: FAIL
  • /html/semantics/menu/tentative/menu-elements-links-hidden.html [wpt.fyi]: FAIL
  • /html/semantics/menu/tentative/menu-elements-pseudo-ordering.html [wpt.fyi]: FAIL
  • /html/semantics/menu/tentative/menuitem-anchor-positioning.html [wpt.fyi]: FAIL
  • /html/semantics/menu/tentative/button-invoke-menulist.html [wpt.fyi]
    • Button with command=toggle-popover can invoke menulist popover.: FAIL
  • /html/semantics/menu/tentative/checkable.html [wpt.fyi]
    • menuitem is not checkable on its own: FAIL
    • menuitem in menubar is not checkable: FAIL
    • menuitem in menulist: FAIL
    • checkable menuitem exclusivity: FAIL
    • checkable multiple: FAIL
    • checkable menuitem exclusivity when disconnected: FAIL
    • when fieldset becomes uncheckable, so do its menuitems: FAIL
    • fieldset multiple => single; all but the first checked menuitem gets reset: FAIL
    • fieldset with checkable="" allows multiple menuitems to be checked: FAIL
    • fieldset with checkable=unknownvalue allows multiple menuitems to be checked: FAIL
    • fieldset '' => single; all but the first checked menuitem gets reset: FAIL
    • fieldset unknownvalue => single; all but the first checked menuitem gets reset: FAIL
    • when fieldset with checkable='' becomes uncheckable, so do its menuitems: FAIL
    • when fieldset with checkable=unknownvalue becomes uncheckable, so do its menuitems: FAIL
    • Default checkedness and checkedness dirtying are wired up correctly: FAIL
  • /html/semantics/menu/tentative/focus-enters-menulist.html [wpt.fyi]
    • Focus should move into menulist when invoking it. useInterest: true, key: enter, invoker: <menuitem id="menuitem-trigger">toggle-menu</menuitem>: FAIL
    • Focus should move into menulist when invoking it. useInterest: true, key: space, invoker: <menuitem id="menuitem-trigger">toggle-menu</menuitem>: FAIL
    • Focus should move into menulist when invoking it. useInterest: false, key: enter, invoker: <button commandfor="menulist" command="toggle-popover">toggle-menu</button>: FAIL
    • Focus should move into menulist when invoking it. useInterest: false, key: enter, invoker: <menuitem id="menuitem-trigger">toggle-menu</menuitem>: FAIL
    • Focus should move into menulist when invoking it. useInterest: false, key: space, invoker: <button commandfor="menulist" command="toggle-popover">toggle-menu</button>: FAIL
    • Focus should move into menulist when invoking it. useInterest: false, key: space, invoker: <menuitem id="menuitem-trigger">toggle-menu</menuitem>: FAIL
  • /html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html [wpt.fyi]
    • Should use arrow keys to move between menuitems in menulist (long delays): FAIL
    • Should use arrow keys to move between menuitems in menubar (long delays): FAIL
    • Should use arrow keys to move between menuitems in menulist (no delays): FAIL
    • Should use arrow keys to move between menuitems in menubar (no delays): FAIL
  • /html/semantics/menu/tentative/focus-menu-elements-nested-arrowoperations.html [wpt.fyi]
    • Should use arrow keys to move between menuitems in menulist invoked from menubar.: FAIL
    • Should use arrow keys to move between menuitems in menulist invoked from menubar inside a popover without closing the popover.: FAIL
    • Should use arrow keys to move between menuitems: Hide popover on beforetoggle should still work.: FAIL
  • /html/semantics/menu/tentative/focus-menu-elements-side-arrowoperations.html [wpt.fyi]
    • side arrow keys should move between menus in a menubar with multiple menus: FAIL
    • side arrow keys should no-op in a menubar with just one menu: FAIL
    • side arrow keys should no-op in a menulist invoked by a button: FAIL
  • /html/semantics/menu/tentative/focus-without-user-activation.html [wpt.fyi]: TIMEOUT (Chrome: OK, Safari: TIMEOUT)
    • Script click during key event on button commandfor menulist does not bypass focus-without-user-activation: FAIL (Chrome: FAIL, Safari: FAIL)
    • Script click during key event on menuitem activating submenu does not bypass focus-without-user-activation: FAIL (Chrome: FAIL, Safari: FAIL)
    • Trusted key event on button commandfor menulist focuses first item: TIMEOUT (Chrome: PASS, Safari: TIMEOUT)
    • Trusted key event on menuitem activating submenu focuses first item: NOTRUN (Chrome: PASS, Safari: NOTRUN)
  • /html/semantics/menu/tentative/idlharness.https.html [wpt.fyi]
    • HTMLMenuBarElement interface: existence and properties of interface object: FAIL
    • HTMLMenuBarElement interface object length: FAIL
    • HTMLMenuBarElement interface object name: FAIL
    • HTMLMenuBarElement interface: existence and properties of interface prototype object: FAIL
    • HTMLMenuBarElement interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • HTMLMenuBarElement interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • HTMLMenuBarElement must be primary interface of document.createElement("menubar"): FAIL
    • Stringification of document.createElement("menubar"): FAIL
    • HTMLMenuListElement interface: existence and properties of interface object: FAIL
    • HTMLMenuListElement interface object length: FAIL
    • HTMLMenuListElement interface object name: FAIL
    • HTMLMenuListElement interface: existence and properties of interface prototype object: FAIL
    • HTMLMenuListElement interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • HTMLMenuListElement interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • HTMLMenuListElement must be primary interface of document.createElement("menulist"): FAIL
    • Stringification of document.createElement("menulist"): FAIL
    • HTMLSubMenuElement interface: existence and properties of interface object: FAIL
    • HTMLSubMenuElement interface object length: FAIL
    • HTMLSubMenuElement interface object name: FAIL
    • HTMLSubMenuElement interface: existence and properties of interface prototype object: FAIL
    • HTMLSubMenuElement interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • HTMLSubMenuElement interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • HTMLSubMenuElement must be primary interface of document.createElement("submenu"): FAIL
    • Stringification of document.createElement("submenu"): FAIL
    • HTMLMenuItemElement interface: existence and properties of interface object: FAIL
    • HTMLMenuItemElement interface object length: FAIL
    • HTMLMenuItemElement interface object name: FAIL
    • HTMLMenuItemElement interface: existence and properties of interface prototype object: FAIL
    • HTMLMenuItemElement interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • HTMLMenuItemElement interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • HTMLMenuItemElement interface: attribute disabled: FAIL
    • HTMLMenuItemElement interface: attribute checked: FAIL
    • HTMLMenuItemElement interface: attribute defaultChecked: FAIL
    • HTMLMenuItemElement must be primary interface of document.createElement("menuitem"): FAIL
    • Stringification of document.createElement("menuitem"): FAIL
    • HTMLMenuItemElement interface: document.createElement("menuitem") must inherit property "disabled" with the proper type: FAIL
    • HTMLMenuItemElement interface: document.createElement("menuitem") must inherit property "checked" with the proper type: FAIL
    • HTMLMenuItemElement interface: document.createElement("menuitem") must inherit property "defaultChecked" with the proper type: FAIL
    • HTMLFieldSetElement interface: attribute checkable: FAIL
  • /html/semantics/menu/tentative/menu-content-model-violation.html [wpt.fyi]
    • Menulist without content model violations does not force dialog: FAIL
    • Menubar without content model violations does not force dialog: FAIL
    • Menulist containing an anchor tag forces dialog: FAIL
    • Menubar containing an anchor tag forces dialog: FAIL
    • Submenu containing <div>text</div> forces dialog: FAIL
    • Submenu containing wayward text content forces dialog: FAIL
    • Fieldset containing wayward text forces dialog: FAIL
    • Menulist with wayward text content forces dialog: FAIL
    • Menubar with wayward button forces dialog: FAIL
    • Invalid submenu sequence intentionally does not force dialog: FAIL
    • Invalid submenu multiple items intentionally does not force dialog: FAIL
    • Invalid submenu missing item intentionally does not force dialog: FAIL
    • Dynamic mutation correctly triggers and untriggers dialog mode: FAIL
    • Invalid outer menubar forces dialog on itself and list on valid inner menulist: FAIL
    • Invalid outer menubar forces dialog on itself and list on valid inner menubar: FAIL
    • Dynamic text mutation correctly triggers and untriggers dialog mode: FAIL
    • Attribute mutation double-counting incorrectly fails to untrigger dialog mode: FAIL
    • Dynamic structural violation (div in submenu) does not force dialog: FAIL
    • Removing valid text content does not incorrectly clear dialog mode: FAIL
    • Menulist containing a menubar does not force dialog: FAIL
    • Menulist with wayward pseudo-element text incorrectly fails to force dialog: FAIL
    • React/lit teardown: Mutating a detached subtree does not incorrectly trigger dialog mode: FAIL
    • Vue/Angular teardown: Removing invalid nodes in reverse tree order restores menu role: FAIL
    • Outer menu ignores mutations inside detached nested menus: FAIL
    • Adding and immediately removing an invalid text node does not force dialog: FAIL
    • Adding and immediately removing text inside a menuitem does not force dialog: FAIL
    • Removing a node from a detached valid subtree should not crash: FAIL
    • A single violation forces the entire menu tree (ancestors, siblings, descendants) into dialog mode: FAIL
    • Dynamic removal of the only violation restores the entire tree: FAIL
    • Multiple violations across different branches require all to be removed before restoring: FAIL
    • Detaching an invalid subtree restores the outer menu, but the detached subtree remains a dialog: FAIL
    • Removing a wrapper element containing an invalid menu correctly restores the outer menu: FAIL
    • Inserting and immediately removing a violating subtree correctly maintains the outer menu state: FAIL
    • Reparenting a standalone violating menulist into a menubar correctly transfers violations to the top-level observer: FAIL
  • /html/semantics/menu/tentative/menu-dialog-mode-focus.html [wpt.fyi]
    • In dialog mode, Tab navigates between interactive children and natively focusable menuitems instead of closing the menu.: FAIL
    • Dialog mode fallback applies to the specific menu and all nested menus.: FAIL
    • Global dialog propagation correctly applies dialog keyboard routing to lateral structurally-valid submenus.: FAIL
    • Dialog mode allows tabbing across deep submenu boundaries.: FAIL
    • Tab navigation skips disabled menuitems in dialog mode: FAIL
  • /html/semantics/menu/tentative/menu-elements-pageup-pagedown.optional.html [wpt.fyi]
    • PageUp and PageDown should scroll and focus menuitems.: FAIL
  • /html/semantics/menu/tentative/menu-elements-tab-focus.optional.html [wpt.fyi]
    • Tab and shift+tab behavior in and around menu elements.: FAIL
  • /html/semantics/menu/tentative/menu-elements-typeahead.html [wpt.fyi]: ERROR
  • /html/semantics/menu/tentative/menu-safe-triangle.optional.html [wpt.fyi]
    • moving mouse out of safe triangle lets menu close: FAIL
    • moving mouse within safe triangle keeps menu open: FAIL
  • /html/semantics/menu/tentative/menubar-interest-command-invoker.tentative.html [wpt.fyi]
    • A menuitem invoking a menulist in a menubar should not close the menulist on loss of interest if opened via command (submenu): FAIL
    • A menuitem with explicit command/interestfor in a menubar should not close the menulist on loss of interest if opened via command: FAIL
  • /html/semantics/menu/tentative/menubar-invoke-menulist.html [wpt.fyi]
    • Menu elements are HTML elements.: FAIL
    • Menuitem with toggle-popover, show-popover, hide-popover commands can invoke menulist popover.: FAIL
    • Nested submenu can be invoked by clicking.: FAIL
    • hidePopover() on nested menulist closes the popover.: FAIL
    • menuitems that invoke menulists cannot be checkable: FAIL
  • /html/semantics/menu/tentative/menuitem-activate.html [wpt.fyi]
    • User menuitem activation works with the toggle-menu command: FAIL
    • User menuitem activation works with show-popover command: FAIL
    • Menulist inside a popover works correctly; does not get accidentally dismissed by opening submenus: FAIL
    • A mousedown-drag-mouseup gesture on a normal menuitem picks the item: FAIL
    • A mousedown-drag-mouseup gesture on a submenu item leaves both menus open: FAIL
    • :open only applies to the invoker and only works for toggle-menu commands: FAIL
  • /html/semantics/menu/tentative/menuitem-drag-click-event.html [wpt.fyi]
    • A drag from New to Open dispatches click to Open item.: FAIL
    • A drag from File to Cut dispatches click to Cut item.: FAIL
    • A drag gesture within a menulist from one item to another dispatches click event: FAIL
  • /html/semantics/menu/tentative/menuitem-implicit-interest-invoker.tentative.html [wpt.fyi]
    • hover implicitly causes interest on a menuitem in a menubar only when an item in that menubar is already open: FAIL
    • hover implicitly causes interest on a menuitem in a menulist: FAIL
    • hover implicitly causes interest on a menuitem in a fieldset in a menulist: FAIL
  • /html/semantics/menu/tentative/menuitem-interest-invoker.tentative.html [wpt.fyi]
    • InterestEvent dispatches on menuitem hover: FAIL
    • event does not dispatch if invoker menuitem is disabled: FAIL
  • /html/semantics/menu/tentative/menulist-popover-attribute.html [wpt.fyi]
    • menulist is a popover by default.: FAIL
  • /html/semantics/menu/tentative/reparent-with-pending-dialog-microtask.html [wpt.fyi]
    • Synchronous reparenting correctly delegates dialog role updates to the new root: FAIL
  • /html/semantics/menu/tentative/uncheck-menuitem-dismiss-popover.html [wpt.fyi]
    • Unchecking an exclusive menuitem should dismiss the menulist: FAIL
    • Swapping exclusive checkedness should dismiss the menulist: FAIL
  • /html/semantics/menu/tentative/valid-submenu-invalid-root.html [wpt.fyi]
    • Attaching a valid submenu to an invalid root correctly propagates list state: FAIL
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.