Skip to content

[css-view-transitions-1] Clarify capturing the background of the root element (in terms of css-backgrounds-3) #11083

Open
@mattwoodrow

Description

@mattwoodrow

The steps for capture the image say that the canvas background should be included. I would assume that means that the 'canvas surface' is not included in the capture.

In terms of what should not be drawn while the view-transition is in progress, 4.2 View Transition Painting Order only says that "the boxes generated by any element in that Document with captured in a view transition are invisible." For the root element, should that also include the canvas background, top layer content, but not canvas surface that become invisible? Or should those be rendered in both the snapshot, as well as outside of it.

Some testcases:

VT canvas background tests.zip

vt-canvas-background-drawn-outside-snapshots.html - Show that the canvas background color continues to be drawn outside of the view-transition snapshots
vt-canvas-background-drawn-inside-snapshots.html - Show that the canvas background color is also drawn inside the snapshots
vt-canvas-surface-drawn-inside-snapshots.html - Show that the canvas surface (white) gets drawn into the snapshots.
vt-canvas-background-image-not-outside-snapshots.html - Show that any images in the canvas background only end up in the snapshots, not both.

It seems that the current behaviour is that the canvas surface and background are both included in the snapshots, as well as remain visible outside of the snapshots while the transition is running.
The exception is any images that make up part of the canvas background, which only go into the snapshot and become invisible outside of the snapshots.

I think we need to figure out exactly which of these are intended or not, and clarify the spec for them.

I don't think there's existing terminology to define just the canvas background color and not image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions