github web-platform-tests/wpt merge_pr_48675

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

Fix unintended behavior change animating to/from an underlying auto height/width.

This moves compositing of lengths from regular (optimized) Composite to
(spec-conforming) PreInterpolationCompositeIfNeeded. We recently added
the ability to animate to/from sizing keywords in some cases
(depending on interpolate-size, whether values are calc-size(), and
whether sizing keywords are mixed). Now whether a pair of values (where
one comes from a neutral value) can be interpolated depends on the
result of compositing with the underlying value (which may or may not be
a sizing keyword), so we must do compositing before interpolation for
lengths.

This in turn requires that CSSCustomListInterpolationType forward
PreInterpolationCompositeIfNeeded to its inner interpolation type.

The added test in css/css-sizing/animation/height-interpolation.html
passed before calc-size() was enabled and failed since, until this
change fixes it. This is the test for the regression that is being
fixed here.

A number of calc-size() composition tests are changed because I think
this exposes that the old tests were incorrect. (They were assuming our
composite-after-interpolation behavior rather than what I think is the
correct composite-before-interpolation behavior.) Some of these changes
are that the animation is now discrete rather than interpolated (because
one end being able to composite on the underlying value means the
endpoints can no longer interpolate), and some of these changes are
simply adjustments of syntax for the cases (min/max-height/width) where
getComputedStyle provides computed values rather than resolved values.
(I can't yet assert that the latter group of expectations are fully
correct, but I think the newer expectations are better than the older
ones.)

Fixed: 370343332
Change-Id: Id606bf89153c9b2c9770124674af8939dc12ef7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5924553
Commit-Queue: David Baron dbaron@chromium.org
Reviewed-by: Kevin Ellis kevers@chromium.org
Cr-Commit-Position: refs/heads/main@{#1370136}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.