You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-view-transitions-1] Fix tree-scoping from element-based to name-based. (#10528)
* [css-view-transitions-1] Fix tree-scoping from being element-based to being name-based.
The previous fix for using the tree context made it inconsistent with how shadow DOM styling
works for things like anchor positioning, and made it so that e.g. `::part` cannot set a
`view-transition-name`.
Refactored to make the `view-transition-name` a tree-scoped name, rather than check the
tree context of the element.
Closes#10145
* Add changelog entry
* Modifiy vt-name algorithm
Each [=view transition name=] is a [=tree-scoped name=].
542
+
543
+
Note: Since currently only document-scoped view transitions are supported, only view transition names that are associated with the document are respected.
544
+
541
545
The values <css>none</css> and <css>auto</css> are excluded from <<custom-ident>> here.
Note: [=box fragment=] here does not refer to fragmentation of <a href="https://www.w3.org/TR/CSS2/visuren.html#inline-boxes">inline boxes</a> across <a href="https://www.w3.org/TR/CSS2/visuren.html#line-box">line boxes</a>.
1336
1349
Such inlines can participate in a transition.
1337
1350
1338
-
1. Let |transitionName| be the [=computed value=] of 'view-transition-name' for |element|.
1351
+
1. Let |transitionName| be the |element|'s [=document-scoped viewtransition name=].
1339
1352
1340
1353
1. If |transitionName| is ''view-transition-name/none'',
1341
1354
or |element| is [=element-not-rendered|not rendered=],
1. [=list/For each=] |element| of every [=/element=] that is [=/connected=],
1405
1418
and has a [=node document=] equal to |document|,
1406
-
and has a [=tree context=] equal to |document|,
1407
1419
in [paint order](https://drafts.csswg.org/css2/#painting-order):
1408
1420
1409
1421
1. If any [=flat tree=] ancestor of this |element| [=skips its contents=], then [=continue=].
1410
1422
1411
-
1. Let |transitionName| be the[=computed value=] of 'view-transition-name' for |element|.
1423
+
1. Let |transitionName| be |element|'s[=document-scoped viewtransition name=].
1412
1424
1413
1425
1. If |transitionName| is ''view-transition-name/none'',
1414
1426
or |element| is [=element-not-rendered|not rendered=],
@@ -1966,6 +1978,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
1966
1978
* Use snapshot containing block when capturing new state for document element. See <a href="https://github.com/w3c/csswg-drafts/issues/10177">issue #10177</a>.
1967
1979
* Fix algorithm for dispatching updateDOMCallback promise.
1968
1980
* Scope view transition names to matching tree context. See <a href="https://github.com/w3c/csswg-drafts/issues/10145">issue 10145</a>.
1981
+
* Fix scoping to match name instead of element. See <a href="https://github.com/w3c/csswg-drafts/issues/10145">issue 10145</a>.
1969
1982
1970
1983
<h3 id="changes-since-2022-05-25">
1971
1984
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
0 commit comments