Closed Bug 1958782 Opened 13 days ago Closed 10 days ago

[wpt-sync] Sync PR 51870 - Fix the focus controller logic for invokers of all kinds

Categories

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

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Mason Freed <masonf@chromium.org> wrote:

Fix the focus controller logic for invokers of all kinds

This CL renames InterestInvokerData to just InvokerData, and adds
the target popover to that data. This allows an invoker to know
which target element it invoked, which in turn lets the focus
controller logic use that, rather than just the existence of a
popovertarget attribute, to correctly manage focus.

This adds GetOpenPopoverTarget() to Element, which retrieves the open
popover target for an element, regardless of the source:

  • popovertarget
  • commandfor
  • interesttarget
  • JS showPopover({source:foo})

This CL also takes the opportunity to clean up capitalization for
several things in InvokerData that shouldn't have been camel case,
which unfortunately means lots of files changed.

This CL takes inspiration from two others, and subsumes both:
https://chromium-review.googlesource.com/c/chromium/src/+/6324529
https://chromium-review.googlesource.com/c/chromium/src/+/6357056

Bug: 326681249
Change-Id: I25de9c68e8206cfaf505f257291d3a7b102d34a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6432176
Reviewed-by: Keith Cirkel \<chromium@keithcirkel.co.uk>
Auto-Submit: Mason Freed \<masonf@chromium.org>
Commit-Queue: Keith Cirkel \<chromium@keithcirkel.co.uk>
Cr-Commit-Position: refs/heads/main@{#1443065}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Attached file Notable wpt changes
# CI Results Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI Total 43 tests ## Status Summary ### Firefox `OK` : 41 `PASS` : 1989[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-windows11-64-24h2-debug] 1990[Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-opt, GitHub] `FAIL` : 894[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 896[Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-64-24h2-opt, GitHub] 897[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-windows11-64-24h2-debug] ### Chrome `OK` : 41 `PASS` : 2874 `FAIL` : 12 ### Safari `OK` : 39 `PASS` : 1980 `FAIL` : 890 `TIMEOUT`: 4 `NOTRUN` : 14 ## Links [Gecko CI (Treeherder)](https://treeherder.mozilla.org/#/jobs?repo=try&revision=c7fa16e030b146413c56c3bd13b450d3421534b4) [GitHub PR Head](https://wpt.fyi/results/?sha=c00c71cc51e4e7c07ccb82293c01f5cea6bfaf66&label=pr_head) [GitHub PR Base](https://wpt.fyi/results/?sha=c00c71cc51e4e7c07ccb82293c01f5cea6bfaf66&label=pr_base) ## Details ### Firefox-only Failures * [/html/semantics/popovers/popover-focus-2.html](https://wpt.live/html/semantics/popovers/popover-focus-2.html) [[wpt.fyi](https://wpt.fyi/results/html/semantics/popovers/popover-focus-2.html)] * Popover focus navigation with popovertarget invocation: `FAIL` [`Gecko-linux1804-64-qr-debug`, `Gecko-linux1804-64-qr-opt`, `Gecko-windows11-32-24h2-debug`, `Gecko-windows11-32-24h2-opt`, `Gecko-windows11-64-24h2-debug`, `Gecko-windows11-64-24h2-opt`, `GitHub`], `PASS` [`Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview`, `Gecko-android-em-7.0-x86_64-qr-debug-geckoview`, `Gecko-android-em-7.0-x86_64-qr-opt-geckoview`] * [/html/semantics/popovers/popover-focus-3.html](https://wpt.live/html/semantics/popovers/popover-focus-3.html) [[wpt.fyi](https://wpt.fyi/results/html/semantics/popovers/popover-focus-3.html)] * Popover focus returns when popover is hidden by invoker with commandfor invocation: `FAIL` * [/html/semantics/popovers/popover-light-dismiss-command.html](https://wpt.live/html/semantics/popovers/popover-light-dismiss-command.html) [[wpt.fyi](https://wpt.fyi/results/html/semantics/popovers/popover-light-dismiss-command.html)] * Clicking on invoking element, after using it for activation, shouldn't close its popover: `FAIL` * Clicking on invoking element, after using it for activation, shouldn't close its popover (nested case): `FAIL` * Clicking on invoking element, after using it for activation, shouldn't close its popover (nested case, not used for invocation): `FAIL` * Clicking on invoking element, even if it wasn't used for activation, shouldn't close its popover: `FAIL` * A popover inside an invoking element doesn't participate in that invoker's ancestor chain: `FAIL` * Clicking inside a shadow DOM popover does not close that popover: `FAIL` * Clicking outside a shadow DOM popover should close that popover: `FAIL` * Ensure circular/convoluted ancestral relationships are functional: `FAIL` * Ensure circular/convoluted ancestral relationships are functional, with a direct showPopover(): `FAIL` * Pointer down in one document and pointer up in another document shouldn't dismiss popover: `FAIL` * Pointer down inside invoker and up outside that invoker shouldn't dismiss popover: `FAIL` * [/html/semantics/popovers/popover-nested-in-button.html](https://wpt.live/html/semantics/popovers/popover-nested-in-button.html) [[wpt.fyi](https://wpt.fyi/results/html/semantics/popovers/popover-nested-in-button.html)] * clicking a popover nested inside a button should not re-invoke the popover: `FAIL` * invoker inside popover still works, even with weird nesting: `FAIL` (See attachment for full changes)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/85898ba2f0f8 [wpt PR 51870] - Fix the focus controller logic for invokers of all kinds, a=testonly https://hg.mozilla.org/integration/autoland/rev/9094c95d3a6b [wpt PR 51870] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 10 days ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: