mirror of
https://github.com/servo/servo.git
synced 2025-07-01 20:43:39 +01:00
55 lines
1.6 KiB
HTML
55 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>offset-rotate interpolation</title>
|
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
|
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property">
|
|
<meta name="assert" content="offset-rotate supports animation.">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="resources/interpolation-testcommon.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
test_interpolation({
|
|
property: 'offset-rotate',
|
|
from: '100deg',
|
|
to: '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: 'offset-rotate',
|
|
from: 'auto 100deg',
|
|
to: 'reverse',
|
|
}, [
|
|
{at: -1, expect: 'auto 20deg'},
|
|
{at: 0, expect: 'auto 100deg'},
|
|
{at: 0.125, expect: 'auto 110deg'},
|
|
{at: 0.875, expect: 'auto 170deg'},
|
|
{at: 1, expect: 'reverse'},
|
|
{at: 2, expect: 'auto 260deg'}
|
|
]);
|
|
|
|
// No interpolation between auto/reverse and angle.
|
|
test_no_interpolation({
|
|
property: 'offset-rotate',
|
|
from: 'reverse 90deg',
|
|
to: '360deg',
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'offset-rotate',
|
|
from: '6rad',
|
|
to: 'auto',
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|