From f2c78750c1eb192b2d8a07629dc288c48300d3d0 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Fri, 12 Jul 2024 02:58:28 +0000
Subject: [PATCH] Wrap "activate view transition" with script prepare/clean up
This ensures that we perform a microtask checkpoint (and set the incumbent script) right after resolving/rejecting the ViewTransition promises.
It's necessary as those promises need to be resolved before the other rendering operations, mainly style/layout.
---
source | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/source b/source
index fc77a13f120..843f618854d 100644
--- a/source
+++ b/source
@@ -103105,8 +103105,21 @@ location.href = '#foo';
data-x="dom-PageRevealEvent-viewTransition">viewTransition set to
transition.
- If transition is not null, then activate transition.
+
+ If transition is not null, then:
+
+
+ Prepare to run script given document.
+
+ Activate transition.
+
+ Clean up after running script given document.
+
+
+ Activating a view transition might resolve/reject promises, so by wrapping the
+ activation with prepare/cleanup we ensure those promises are handled before the next rendering
+ step.
+
Though pagereveal
is guaranteed to be fired