From 7d61998f4077cd684d0e6869365c02757168736a Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Thu, 10 Nov 2022 13:49:36 -0800 Subject: [PATCH] Disallow "combined" top layer APIs As resolved in [1], the top layer APIs, when used on the *same element*, should disallow the second API usage. For example, with an element like ``, this can get to the top layer two ways: 1) `dialog.showModal()` 2) `dialog.showPopover()` With this CL, the first such call will succeed, and the second will throw an exception. [1] https://github.com/openui/open-ui/issues/520#issuecomment-1270626461 Bug: 1307772 Change-Id: If968211a3c69e72b9e734cdff93b8cf96e01860c --- ...over-top-layer-combinations.tentative.html | 124 ++++++++++++++++++ ...over-top-layer-interactions.tentative.html | 16 +-- .../popovers/resources/popover-utils.js | 13 ++ 3 files changed, 139 insertions(+), 14 deletions(-) create mode 100644 html/semantics/popovers/popover-top-layer-combinations.tentative.html diff --git a/html/semantics/popovers/popover-top-layer-combinations.tentative.html b/html/semantics/popovers/popover-top-layer-combinations.tentative.html new file mode 100644 index 00000000000000..66106ce17d9afe --- /dev/null +++ b/html/semantics/popovers/popover-top-layer-combinations.tentative.html @@ -0,0 +1,124 @@ + + +Popover combined with dialog/fullscreen behavior + + + + + + + + +
+ Popover Dialog + Open Non-modal Popover Dialog + Defaultopen Popover Dialog + Defaultopen and Open Popover Dialog +
Fullscreen Popover
+ Fullscreen Popover Dialog + Fullscreen Open Non-modal Popover Dialog +
+ + + + + diff --git a/html/semantics/popovers/popover-top-layer-interactions.tentative.html b/html/semantics/popovers/popover-top-layer-interactions.tentative.html index bdc550b423e5f5..50a21be7f7723e 100644 --- a/html/semantics/popovers/popover-top-layer-interactions.tentative.html +++ b/html/semantics/popovers/popover-top-layer-interactions.tentative.html @@ -7,6 +7,7 @@ +