Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="UTF-8">
<title>text-decoration-thickness interpolation</title>
<link rel="author" title="ChangSeok Oh" href="mailto:changseok@webkit.org">
<meta name="test" content="text-decoration-thickness supports animation by the computed value type">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body>
<template id="target-template">T</template>
</body>
<script>
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '0px',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '11.2px'},
{at: 0.6, expect: '6.4px'},
{at: 1, expect: '0px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '32px',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '20.8px'},
{at: 0.6, expect: '25.6px'},
{at: 1, expect: '32px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '0em',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '11.2px'},
{at: 0.6, expect: '6.4px'},
{at: 1, expect: '0px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '2em',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '20.8px'},
{at: 0.6, expect: '25.6px'},
{at: 1, expect: '32px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '0%',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: '70%'},
{at: 0.6, expect: '40%'},
{at: 1, expect: '0%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '200%',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: '130%'},
{at: 0.6, expect: '160%'},
{at: 1, expect: '200%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '0em',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '11.2px'},
{at: 0.6, expect: '6.4px'},
{at: 1, expect: '0px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '2em',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '20.8px'},
{at: 0.6, expect: '25.6px'},
{at: 1, expect: '32px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '0%',
}, [
{at: 0, expect: 'calc(0% + 16px)'},
{at: 0.3, expect: 'calc(0% + 11.2px)'},
{at: 0.6, expect: 'calc(0% + 6.4px)'},
{at: 1, expect: '0%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '16px',
to: '200%',
}, [
{at: 0, expect: 'calc(0% + 16px)'},
{at: 0.3, expect: 'calc(60% + 11.2px)'},
{at: 0.6, expect: 'calc(120% + 6.4px)'},
{at: 1, expect: '200%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '0px',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '11.2px'},
{at: 0.6, expect: '6.4px'},
{at: 1, expect: '0px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '32px',
}, [
{at: 0, expect: '16px'},
{at: 0.3, expect: '20.8px'},
{at: 0.6, expect: '25.6px'},
{at: 1, expect: '32px'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '0%',
}, [
{at: 0, expect: 'calc(0% + 16px)'},
{at: 0.3, expect: 'calc(0% + 11.2px)'},
{at: 0.6, expect: 'calc(0% + 6.4px)'},
{at: 1, expect: '0%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '1em',
to: '200%',
}, [
{at: 0, expect: 'calc(0% + 16px)'},
{at: 0.3, expect: 'calc(60% + 11.2px)'},
{at: 0.6, expect: 'calc(120% + 6.4px)'},
{at: 1, expect: '200%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '0px',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: '70%'},
{at: 0.6, expect: '40%'},
{at: 1, expect: '0%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '32px',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: 'calc(70% + 9.6px)'},
{at: 0.6, expect: 'calc(40% + 19.2px)'},
{at: 1, expect: 'calc(0% + 32px)'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '0em',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: '70%'},
{at: 0.6, expect: '40%'},
{at: 1, expect: '0%'},
]);
test_interpolation({
property: 'text-decoration-thickness',
from: '100%',
to: '2em',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: 'calc(70% + 9.6px)'},
{at: 0.6, expect: 'calc(40% + 19.2px)'},
{at: 1, expect: 'calc(0% + 32px)'},
]);
</script>