Skip to content

Commit 26847f2

Browse files
authored
Test that float values are correctly produced while interpolating box-shadow and text-shadow values, added for WebKit bug https://bugs.webkit.org/show_bug.cgi?id=230347. (#30823)
1 parent fa627bb commit 26847f2

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

css/css-backgrounds/animations/box-shadow-interpolation.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@
9494
{at: 1.5, expect: 'rgb(255, 248, 0) -30px -20px 35px -9px'},
9595
]);
9696

97+
test_interpolation({
98+
property: 'box-shadow',
99+
from: '0px 0px 0px 0px black',
100+
to: '1px 1px 1px 1px black',
101+
}, [
102+
{at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px'},
103+
{at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'},
104+
{at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px'},
105+
{at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px'},
106+
{at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px 1px'},
107+
{at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px'},
108+
]);
109+
97110
// Test with color as first value.
98111
test_interpolation({
99112
property: 'box-shadow',

css/css-transitions/animations/text-shadow-interpolation.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,18 @@
106106
{at: 1, expect: 'rgb(0, 128, 0) 10px 10px 10px'},
107107
{at: 1.5, expect: 'rgb(0, 192, 0) 10px 10px 10px'},
108108
]);
109+
110+
test_interpolation({
111+
property: 'text-shadow',
112+
from: 'black 0px 0px 0px',
113+
to: 'black 1px 1px 1px',
114+
}, [
115+
{at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px'},
116+
{at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'},
117+
{at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px'},
118+
{at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px'},
119+
{at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px'},
120+
{at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px'},
121+
]);
109122
</script>
110123
</body>

0 commit comments

Comments
 (0)