Bringing Element.startViewTransition() to WebKit and Firefox against the same WPT suite.
Status: ๐ง In Progress
What It Looks Like
Three engines, same scenario: a scope escapes its own clip region but stays inside an ancestor's overflow: hidden box. Before is the unpatched / baseline build, after is the scoped-VT implementation.
mainFull tracking page with all four canonical scenarios per engine: https://static.januschka.com/vt/.
The Feature
Level 1 ships document.startViewTransition(): one transition at a time, snapshotting the whole viewport. Level 2 adds Element.startViewTransition() so a transition can be scoped to a subtree, multiple scopes can run concurrently, and view-transition-name on descendants resolves per scope.
const transition = card.startViewTransition(() => updateCard());
await transition.finished;
Spec: css-view-transitions-2. Shared test suite: css/css-view-transitions/scoped (93 tests at wpt e8ca14556268).
Status
| Engine | Tracking | Suite |
|---|---|---|
| Chromium | baseline on main, shipped, no flag |
90/93 |
| Firefox | IN PROGRESS Bugzilla 2075158, Phabricator stack in prep | 90/93 |
| WebKit | IN REVIEW PR #81741 | 93/93 |
Chromium and Firefox fail the same three tests: SVG root, MathML root, replaced-element root. One shared bug across three engines.
WebKit PR
~5100 added lines across WebCore, the inspector protocol, preference plumbing, and every scoped WPT test imported into LayoutTests. Passes the full suite (93/93). It stays as one branch for now to prove the end-to-end picture - style, bindings, EWS across iOS/macOS/WPE, and the full suite all green at once - then gets split into reviewable chunks before landing.
What's in it:
Element.startViewTransition()with the Level 2 options bag, concurrent scopes, per-scope name resolution.- Scope containment: remembered size, pseudo-element borders, sibling offset, display changes, MathML / SVG roots.
- Shadow DOM:
autoname discovery across shadow trees, cross-tree morphs, nested groups, pairing/collision rules. - Preference gate for staged rollout.
Firefox Patches
Implementation branch sits at 90/93 (91/93 once the WPT display-change fix below propagates). Phabricator stack is being prepared from that branch.
Chromium
Baseline. document.startViewTransition() has shipped; scoped is in active implementation. For the tracking page the Chromium folder is chromium/src@main content_shell captures with no patch - before and after are the same clip. When a shipping scoped-VT CL is being tracked the folder gets swapped to a proper i-<issueid>/ sampler.
Upstream WPT
Running the same suite on three engines surfaces test issues. Two merged:
- MERGED Reftest: scope background stable under ancestor overflow clip - the exact scenario the videos above cover; now pinned in the suite.
- MERGED Drop
:only-childqualifier from display-change test - the test was gating on a structural selector unrelated to what it was measuring. Firefox picks up one more test as a result, with no engine change. - IN REVIEW Concurrent scoped transitions use own group keyframes - concurrent scopes produce UA group animations with colliding dynamic names (each scope's
::view-transition-group(root)). Resolving keyframes against the wrong transition applies the other scope's captured geometry and resizes the snapshot mid-animation.run_in_parallel.htmlcannot catch this (it setsanimation: unset); the new test asserts each group'sfromkeyframe matches its own scope's captured size.
The tracking page uses the same wpt sha and the same denominator on every card. The Firefox sampler previously said WebKit was at 83/93 while WebKit itself reported 87/93; the shared number is what keeps that from happening.
Next
- WebKit PR #81741: split into reviewable chunks and land one at a time.
- Firefox Bugzilla 2075158: finish the Phabricator stack.
- Chromium: track the shipping scoped-VT CL and swap the baseline folder to a proper issue sampler.
- Drive the three shared failures (svg / mathml / replaced-element scope roots) to zero.