[wpt-sync] Sync PR 59237 - Implement new/revised popover=hint behavior
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 59237 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/59237
Details from upstream follow.
Mason Freed <masonf@chromium.org> wrote:
Implement new/revised popover=hint behavior
See this discussion for more context:
https://github.com/whatwg/html/issues/12304
https://github.com/whatwg/html/pull/12345This CL implements a simplified behavioral model for popover=hint and
popover=auto, cleanly separating the autoRootedPopoverStack from the
hintRootedPopoverStack and introducing ahintStackParentto track
where the hint stack branches off the auto stack.The new behavior resolves the following inconsistencies (gated behind
thePopoverHintNewBehaviorexperimental runtime flag):
- Opening a hint popover will not hide unrelated auto popovers.
- Opening a hint popover closes only other non-ancestor hint
popovers.- Clicking outside consistently closes both auto and hint popovers.
- Hiding an auto popover closes only its child popovers.
- Opening an auto popover inside a hint popover is disallowed and
will fail.A new WPT test (
popover-hint-hierarchy.html) is added to explicitly
assert these 5 rules, and existing popover WPTs are updated to reflect
the new behavior. A virtual test suite (popover-hint-old-behavior)
is also added to continue testing the legacy behavior. I'm not sure
how to best handle the changed tests (and I guess the new test too)
in the context of a spec PR that is forthcoming. I'd like to be able
to publish (as a WPT PR at least) the changes, to help with the PR
effort. Suggestions appreciated.A note about the diff: I made all of the feature flag checks look like
if (!feature enabled) {in the hopes that the old code would show
as unchanged in the diff, but gerrit's diff algorithm isn't great.
It's at least a little better like this than if I put the new code
first, so I left it.Bug: 499019927
Change-Id: I41d8d96be71ba60ec5e7aa640c935258d1e33431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727959
Auto-Submit: Mason Freed \<masonf@chromium.org>
Reviewed-by: David Baron \<dbaron@chromium.org>
Commit-Queue: David Baron \<dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1615186}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=71387f0126f0644900a04380b29048656674e4fb
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 4 tests and 6 subtests
Status Summary
Firefox
OK : 4
PASS: 25
FAIL: 17
Chrome
OK : 4
PASS: 37
FAIL: 5
Safari
OK : 4
PASS: 20
FAIL: 22
Links
Details
Firefox-only Failures
- /html/semantics/popovers/popover-hint-hierarchy.html [wpt.fyi]
- Opening a hint popover will not hide unrelated auto popovers.:
FAIL
- Opening a hint popover will not hide unrelated auto popovers.:
- /html/semantics/popovers/popover-types-with-hints.html [wpt.fyi]
- manuals do not close popovers:
FAILlinked bug:Bug 1819242 - If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should not be hidden. (Non-nested popover=hint are not hidden when unrelated popover=autos are hidden):
FAIL
- manuals do not close popovers:
New Tests That Don't Pass
- /html/semantics/popovers/popover-hint-hierarchy.html [wpt.fyi]
- Opening a hint popover will not hide unrelated auto popovers.:
FAIL(Chrome:PASS, Safari:PASS) - Opening a hint popover closes only other non-ancestor hint popovers.:
FAIL(Chrome:PASS, Safari:FAIL) - Clicking outside consistently closes both auto and hint popovers.:
FAIL(Chrome:PASS, Safari:FAIL) - Clicking outside consistently closes both auto and hint popovers (nested).:
FAIL(Chrome:PASS, Safari:FAIL) - Hiding an auto popover closes only its child popovers.:
FAIL(Chrome:PASS, Safari:FAIL) - Opening an auto popover inside a hint popover is disallowed and will fail.:
FAIL(Chrome:PASS, Safari:FAIL)
- Opening a hint popover will not hide unrelated auto popovers.:
- /html/semantics/popovers/popover-light-dismiss-hint.html [wpt.fyi]
- Auto cannot be nested inside hint (invalidauto1):
FAIL(Chrome:PASS, Safari:FAIL) - Auto cannot be nested inside hint (invalidauto2):
FAIL(Chrome:PASS, Safari:FAIL)
- Auto cannot be nested inside hint (invalidauto1):
- /html/semantics/popovers/popover-top-layer-nesting-hints.html [wpt.fyi]
- Nested auto/hint ancestors, target is auto with dialog:
FAIL(Chrome:FAIL, Safari:PASS) - Nested auto/hint ancestors, target is auto with fullscreen:
FAIL(Chrome:FAIL, Safari:FAIL) - Unrelated hint, target=auto with dialog:
FAIL(Chrome:FAIL, Safari:PASS) - Unrelated hint, target=auto with fullscreen:
FAIL(Chrome:FAIL, Safari:FAIL)
- Nested auto/hint ancestors, target is auto with dialog:
- /html/semantics/popovers/popover-types-with-hints.html [wpt.fyi]
- manuals do not close popovers:
FAIL(Chrome:PASS, Safari:PASS) - autos close hints but not manuals:
FAIL(Chrome:PASS, Safari:FAIL) - If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral popover of the popover=auto. (You can't nest a popover=auto inside a popover=hint):
FAIL(Chrome:PASS, Safari:FAIL) - If you: a) show a popover=auto (call it D), then b) show a descendent popover=hint of D (call it T), then c) hide D, then T should be hidden. (A popover=hint can be nested inside a popover=auto):
FAIL(Chrome:PASS, Safari:FAIL) - If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should not be hidden. (Non-nested popover=hint are not hidden when unrelated popover=autos are hidden):
FAIL(Chrome:PASS, Safari:PASS)
- manuals do not close popovers:
https://hg.mozilla.org/mozilla-central/rev/b28be57dceaa
https://hg.mozilla.org/mozilla-central/rev/2b61da431914
Description
•