Skip to content

Commit 7d8f178

Browse files
noamrkhushalsagar
andauthored
[css-view-transitions-1] Fragmented elements don't participate in view transitions. (w3c#8831)
* Fragmented elements don't participate in view transitions. Closes w3c#8339 * Update css-view-transitions-1/Overview.bs Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> * Skip transition if captured element became fragmented * Move constraint to 'update' phase --------- Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
1 parent ea43cbf commit 7d8f178

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,19 +1243,17 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
12431243

12441244
1. If any [=flat tree=] ancestor of this |element| [=skips its contents=], then [=continue=].
12451245

1246+
1. If |element| has more than one [=box-fragment=], then [=continue=].
1247+
1248+
Issue: We might want to enable transitions for fragmented elements in future versions.
1249+
12461250
1. Let |transitionName| be the [=computed value=] of 'view-transition-name' for |element|.
12471251

12481252
1. If |transitionName| is ''view-transition-name/none'',
12491253
or |element| is [=element-not-rendered|not rendered=],
12501254
then [=continue=].
12511255

1252-
1. If any of the following is true:
1253-
1254-
* |usedTransitionNames| [=list/contains=] |transitionName|.
1255-
1256-
* |element| is not |element|'s [=tree/root=] and |element| allows [=fragmentation=].
1257-
1258-
Then return failure.
1256+
1. If |usedTransitionNames| [=list/contains=] |transitionName|, then return failure.
12591257

12601258
1. [=set/Append=] |transitionName| to |usedTransitionNames|.
12611259

@@ -1615,7 +1613,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
16151613
1. Let |hasActiveAnimations| be a boolean, initially false.
16161614

16171615
1. [=list/For each=] |element| of |transition|'s [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=]:
1618-
16191616
1. For each |animation| whose [=timeline=] is a [=document timeline=] associated with |document|,
16201617
and contains at least one [=animation/associated effect=] whose [=effect target=] is |element|,
16211618
set |hasActiveAnimations| to true if any of the following conditions is true:
@@ -1675,9 +1672,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
16751672

16761673
1. Otherwise:
16771674

1678-
1. If any [=flat tree=] ancestor of |capturedElement|'s [=new element=] [=skips its contents=],
1679-
or |capturedElement|'s [=new element=] is [=element-not-rendered|not rendered=],
1680-
then return failure.
1675+
1. Return failure if any of the following conditions is true:
1676+
- |capturedElement|'s [=new element=] has a [=flat tree=] ancestor that [=skips its contents=].
1677+
1678+
- |capturedElement|'s [=new element=] is [=element-not-rendered|not rendered=].
1679+
1680+
- |capturedElement| has more than one [=box-fragment=].
16811681

16821682
Note: Other rendering constraints are enforced via |capturedElement|'s [=new element=] being [=involved in a view transition=].
16831683

@@ -1794,6 +1794,7 @@ Changes from <a href="https://www.w3.org/TR/2022/WD-css-view-transitions-1-20221
17941794
* When skipping a transition, the {{UpdateCallback}} is called in own task rather than synchronosly. See <a href="https://github.com/w3c/csswg-drafts/issues/7904">issue 7904</a>
17951795
* When capturing images, at least the in-viewport part of the image should be captured, downscale if needed. See <a href="https://github.com/w3c/csswg-drafts/issues/8561">issue 8561</a>.
17961796
* Applying the [=ink overflow=] to the captured image is implementation defined, and doesn't affect the image's [=natural size=]. See <a href="https://github.com/w3c/csswg-drafts/issues/8597">issue 8597</a>.
1797+
* Fragmented elements don't participate in view transitions. See <a href="https://github.com/w3c/csswg-drafts/issues/8339">issue 8339</a>.
17971798

17981799
<h3 id="changes-since-2022-10-25">
17991800
Changes from <a href="https://www.w3.org/TR/2022/WD-css-view-transitions-1-20221025/">2022-10-25 Working Draft (FPWD)</a>

0 commit comments

Comments
 (0)