Scoped View Transitions Across Three Engines

โšก Web Platform ๐Ÿ”ง C++ / WebKit / Gecko / WPT ๐Ÿ‘ค Helmut Januschka

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.

Firefox - Bugzilla 2075158
before (pref off)
after (patched)
WebKit - PR #81741
before (pref off)
after (patched)
Chromium - baseline on main
before
after (same build)

Full 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:

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:

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