fune/testing/web-platform/tests/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.html
Daniil Sakhapov 1df64fddf0 Bug 1877079 [wpt PR 44257] - Resolve math expressions in StyleBuilderConverter::ConvertRotation, a=testonly
Automatic update from web-platform-tests
Resolve math expressions in StyleBuilderConverter::ConvertRotation

Note: rotation interpolation is not working properly for now,
since it requires introducing unresolved versions of Rotation and
Quaternion.

Bug: 1521261
Change-Id: I73159fceb275419f04910c23a4d873c0dc67f2b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5242794
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1269499}

--

wpt-commits: 42b2c9fd139b1d51df5b0924243ac30b127f49c0
wpt-pr: 44257
2024-03-14 08:38:54 +00:00

46 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>rotate interpolation with css math functions</title>
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#propdef-rotate">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
</head>
<style>
:root {
font-size: 10px;
}
</style>
<body>
<script>
test_interpolation({
property: 'rotate',
from: '100deg',
to: 'calc(sign(20rem - 20px) * 180deg)',
}, [
{at: -1, expect: '20deg'},
{at: 0, expect: '100deg'},
{at: 0.125, expect: '110deg'},
{at: 0.875, expect: '170deg'},
{at: 1, expect: '180deg'},
{at: 2, expect: '260deg'}
]);
test_interpolation({
property: 'rotate',
from: 'calc(sign(20rem - 20px) * 100deg)',
to: 'calc(progress(10rem from 20px to 100px) * 180deg)',
}, [
{at: -1, expect: '20deg'},
{at: 0, expect: '100deg'},
{at: 0.125, expect: '110deg'},
{at: 0.875, expect: '170deg'},
{at: 1, expect: '180deg'},
{at: 2, expect: '260deg'}
]);
</script>
</body>
</html>