Bug 1838305 [wpt PR 40528] - [scroll-animations] Resolve auto to 0s for time-based...
commit131c9ea3fde2df5b73152744347869a5ed8da623
authorAnders Hartvoll Ruud <andruud@chromium.org>
Mon, 19 Jun 2023 20:07:53 +0000 (19 20:07 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 21 Jun 2023 14:35:01 +0000 (21 14:35 +0000)
treeadef9aaae295945b02681ca037b43a3b0d712590
parent030c9a9f151db070acc09ffa3ef756920b42fcce
Bug 1838305 [wpt PR 40528] - [scroll-animations] Resolve auto to 0s for time-based animations, a=testonly

Automatic update from web-platform-tests
[scroll-animations] Resolve auto to 0s for time-based animations

CL:4497757 made the initial value of animation-duration auto,
but unfortunately reporting this auto value through getComputedStyle
broke existing web content (Issue 1452130).

Hence, hence the CSSWG opted to define a resolved value for
animation-duration, which converts auto to 0s unless we have some
non-default value for animation-timeline. This CL implements that
change.

This CL also contains a second change: reset-only sub-properties
of the 'animation' shorthand are now correctly set to their
initial value, or not some repeated amount of their initial value.
This change was necessary to prevent e.g. "animation: a1, a2"
from expanding to "animation-timeline: auto, auto", which would
disable the auto-to-0s conversion behavior.

Finally, note that the computedStyleMap (Typed OM) does not return
resolved values, but computed values. Hence it must not be affected
by the auto-to-0s conversion. To ensure this, an "override"
was added for kAnimationDuration in ComputedStyleUtils::
ComputedPropertyValue.

Bug: 1452130
Change-Id: I021ac68b61b83cd96962c56dab24043a19e99c5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4607459
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1157426}

--

wpt-commits: f9048ac795492ddb638196dfb4002a6aba7ef830
wpt-pr: 40528
testing/web-platform/tests/css/css-animations/inheritance.html
testing/web-platform/tests/css/css-animations/parsing/animation-computed.html
testing/web-platform/tests/css/css-animations/parsing/animation-duration-computed.html
testing/web-platform/tests/css/css-animations/parsing/animation-shorthand.html
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/animation-duration.html
testing/web-platform/tests/scroll-animations/css/animation-duration-auto.tentative.html
testing/web-platform/tests/scroll-animations/css/animation-shorthand.html