Skip to content

Commit

Permalink
Bug 1870961 [wpt PR 43737] - Update popover=hint behavior to allow a …
Browse files Browse the repository at this point in the history
…stack of hints, a=testonly

Automatic update from web-platform-tests
Update popover=hint behavior to allow a stack of hints

The previous implementation only allowed one popover=hint to be open
at a time. Per conversation at [1], developers feel that it should be
possible to nest popover=hint popovers. This CL implements that
capability.

There are now two popover stacks in Document: PopoverAutoStack and
PopoverHintStack. Since it is possible to nest hints within autos,
the PopoverAutoStack can contain hints. However, there
are a few constraints:
 - The PopoverHintStack only ever contains hints.
 - Once the PopoverAutoStack contains a hint, all subsequent popovers
   in the stack must also be hints.
 - A popover=hint can never be the ancestor of a popover=auto.

The light dismiss behavior is roughly the same as before, with a
slight tweak that simplifies behavior: closing anything in the
PopoverAutoStack will always close everything in the PopoverHintStack.
That was not the case before, but it was a bit of a weird corner case.

Note that I found a crasher (happens in stable, with just auto
popovers) that I added a test for here. The bug for that is
crbug.com/1513282. I'll fix that in a followup.

[1] whatwg/html#9776 (comment)

Bug: 1416284,1513282
Change-Id: Ic064ecf1377bb8abfc812654c85016e6d1cbbdaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5133909
Reviewed-by: Joey Arhar <jarharchromium.org>
Commit-Queue: Mason Freed <masonfchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1246573}

--

wpt-commits: 51c87dc4c5d4a61caef22344e4dba6f5f233ffc3
wpt-pr: 43737

UltraBlame original commit: fcb792a0665afea5e736dd56c36dc1d59340362a
  • Loading branch information
marco-c committed Jan 16, 2024
1 parent d736110 commit cf858ef
Show file tree
Hide file tree
Showing 4 changed files with 1,668 additions and 1,318 deletions.
Loading

0 comments on commit cf858ef

Please sign in to comment.