Bug 1818807 [wpt PR 38701] - Change popover invoking attributes, a=testonly
commit5167684f7ab70a051120e67951692eeb3201b9df
authorMason Freed <masonf@chromium.org>
Mon, 6 Mar 2023 13:51:09 +0000 (6 13:51 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 7 Mar 2023 00:23:51 +0000 (7 00:23 +0000)
tree4e4b0a22c95c19dc7cc7aca89a07d8debbac4164
parent8e876cfe60bd8e3ac845ff96a1cc146becf55a55
Bug 1818807 [wpt PR 38701] - Change popover invoking attributes, a=testonly

Automatic update from web-platform-tests
Change popover invoking attributes

See [1] for discussion. This changes the Popover invoking attribute
behavior. Previously, three attributes were used to set the invoking
relationship and behavior:
 - popovertoggletarget
 - popovershowtarget
 - popoverhidetarget

Those each could point to an idref for a popover, and the behavior
would be controlled by which attribute was used. However, there was
a confusing situation in the case that multiple such attributes
were used on a single element, and even more so when they pointed
to different elements. While there was concrete logic for resolving
that situation, it was confusing at best.

The new logic is controlled by two attributes:
 - popovertarget
 - popovertargetaction

The element reference is dictated by `popovertarget`, via an idref
or through element reflection (via `foo.popoverTargetElement = bar`).
The behavior is dictated by the (string valued) popovertargetaction
attribute, which can be one of "toggle", "show", or "hide". If any
other value is used (including missing attribute or invalid value),
the behavior and IDL reflected value is "toggle".

[1] https://github.com/whatwg/html/issues/8894#issuecomment-1442341167

Bug: 1307772
Change-Id: I2e530efe26032599f9376c8d5f4fe2a7f430a26b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288730
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1109867}

--

wpt-commits: 588e82830bb860050168fa89eddc93ac32293662
wpt-pr: 38701
testing/web-platform/tests/html/semantics/popovers/popover-anchor-idl-property.html
testing/web-platform/tests/html/semantics/popovers/popover-anchor-nested-display.html
testing/web-platform/tests/html/semantics/popovers/popover-focus-2.html
testing/web-platform/tests/html/semantics/popovers/popover-focus.html
testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute.html
testing/web-platform/tests/html/semantics/popovers/popover-light-dismiss.html
testing/web-platform/tests/html/semantics/popovers/popover-stacking.html
testing/web-platform/tests/html/semantics/popovers/popover-target-element-disabled.html
testing/web-platform/tests/html/semantics/popovers/popover-top-layer-combinations.html