fune/testing/web-platform/tests/css/css-animations/transform-animation-under-large-scale.html
Xianzhu Wang da4a99e16a Bug 1679920 [wpt PR 26686] - Fix too small scale during animation without scale but with ancestor scale, a=testonly
Automatic update from web-platform-tests
Fix too small scale during animation without scale but with ancestor scale

Previously during a translation animation, as the animation didn't have
scale, we would fallback to use the native scale. In cases that the
animating element had a big accumulated scale from ancestors, the scale
would be too small compared to the ideal scale.

Another failure case was that when a big animation scale would cause the
rasterized layer to be larger than the viewport, we would also fallback
to use the native scale, which might be also too small if the layer had
a big accumulated scale from ancestors.

Now don't adjust scale for transform animation if the animation doesn't
animate scale. And don't fallback to native scale when the scale is too
big, but calculate a scale that just makes the rasterized layer not
larger than the viewport.

Bug: 1153428
Change-Id: I4a4f3133b01099752629f6710c8375a7b715ab0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566053
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832491}

--

wpt-commits: 8a5a3c901357b86c49ac39a7f856311c0b71df39
wpt-pr: 26686
2020-12-07 09:25:58 +00:00

17 lines
686 B
HTML

<!DOCTYPE html>
<title>Transform animation under large scale</title>
<link rel="author" title="Xianzhu Wang" href="mailto:wangxianzhu@chromium.org">
<link rel="help" href="https://crbug.com/1153428">
<link rel="match" href="transform-animation-under-large-scale-ref.html">
<style>
@keyframes move {
0% {transform: translateX(-1px);}
100% {transform: translateX(0);}
}
</style>
<div style="width: 2px; height: 2px; transform: scale(100); transform-origin: 0 0; overflow: hidden">
<div style="animation: move 1s infinite alternate">
<div style="width: 4px; height: 1px; background: blue"></div>
<div style="width: 4px; height: 1px; background: green"></div>
</div>
</div>