From e70378bb7c9203a30508c0e5c2fdda84b91e6f45 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Sat, 18 Jun 2022 09:56:15 +0000 Subject: [PATCH] Bug 1772618 [wpt PR 34304] - Make popups animation-friendly, a=testonly Automatic update from web-platform-tests Make popups animation-friendly Now, popups will follow this process when showing/hiding: showPopup(): 1. Move the popup to the top layer, and remove the UA display:none style. 2. Update style. (Transition initial style can be specified in this state.) 3. Set the :top-layer pseudo class. 4. Update style. (Animations/transitions happen here.) hidePopup(): 1. Capture any already-running animations via getAnimations(). 2. Remove the :top-layer pseudo class. 3. Update style. (Animations/transitions start here.) 4. If the hidePopup() call is not due to a "force out" situation, getAnimations() again, remove any from step #1, and then wait here until all of them finish or are cancelled. 4. Remove the popup from the top layer, and add the UA display:none style. 5. Update style. See this issue for more details: https://github.com/openui/open-ui/issues/335 Bug: 1307772 Change-Id: Ia20eb6e9533c1a0b1029ca1279d42fe2648300af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688871 Reviewed-by: Robert Flack Commit-Queue: Mason Freed Cr-Commit-Position: refs/heads/main@{#1014235} -- wpt-commits: 297b9403e0ab65348de01169d1a4e3cf078af7b9 wpt-pr: 34304 --- .../popup-animated-display-ref.tentative.html | 34 +++++++ ...popup-animated-hide-cleanup.tentative.html | 98 +++++++++++++++++++ ...popup-animated-hide-display.tentative.html | 61 ++++++++++++ ...-animated-hide-finishes-ref.tentative.html | 16 +++ ...opup-animated-hide-finishes.tentative.html | 60 ++++++++++++ ...popup-animated-show-display.tentative.html | 56 +++++++++++ 6 files changed, 325 insertions(+) create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-display-ref.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-hide-display.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes-ref.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popups/popup-animated-show-display.tentative.html diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-display-ref.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-display-ref.tentative.html new file mode 100644 index 0000000000000..77f15441ae95d --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-display-ref.tentative.html @@ -0,0 +1,34 @@ + + +
+
This is a popup
+ + + diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html new file mode 100644 index 0000000000000..762458ea669dd --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html @@ -0,0 +1,98 @@ + + + + + + + + + + + + + +I am a dialog + + + + diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-display.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-display.tentative.html new file mode 100644 index 0000000000000..410639e67152c --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-display.tentative.html @@ -0,0 +1,61 @@ + + + + + + + +
This is a popup
+
+ + + + diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes-ref.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes-ref.tentative.html new file mode 100644 index 0000000000000..d8334f985ed51 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes-ref.tentative.html @@ -0,0 +1,16 @@ + + +
+ + diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes.tentative.html new file mode 100644 index 0000000000000..88e37cb4e3bd7 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-finishes.tentative.html @@ -0,0 +1,60 @@ + + + + + + + +
This is a popup
+
+ + + + diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-show-display.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-show-display.tentative.html new file mode 100644 index 0000000000000..deb7550926422 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-show-display.tentative.html @@ -0,0 +1,56 @@ + + + + + + + +
This is a popup
+
+ + + +