github web-platform-tests/wpt merge_pr_46715

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
15 months ago

Make canvas layers non-drawable for non-invertible transforms

When setting a non-invertible matrix, like scale(0, 0), nothing
gets rendered in the canvas. This should apply to layers too.

Transforms impact filters applied to the layer's output. For instance,
if the layer has a shadow filter, the transform of the parent should
impact the shadow's offset. If the transform scales to zero, the
shadow should scale to zero. To be consistent, the layer itself must
scale to zero too. Thus, the layer cannot be visible if the transform
isn't invertible.

It's possible to change the global transform by calling setTransform
from inside the layer. This however doesn't make the layer drawable if
it was opened with an invalid transform in the first place because the
parent transform is the one used to process the layer's filter.

Bug: 40257559
Change-Id: I1ef7e3f56b7ecd500e8480afb132277fc0f37fc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5593019
Commit-Queue: Jean-Philippe Gravel jpgravel@chromium.org
Reviewed-by: Justin Novosad junov@chromium.org
Cr-Commit-Position: refs/heads/main@{#1314008}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.