mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision f0cb9071aea5ce5b641fcba5f362a0796bdc70bc
This commit is contained in:
parent
0d549e8146
commit
7289e837fd
558 changed files with 8627 additions and 6619 deletions
|
@ -55,10 +55,10 @@ test_interpolation({
|
|||
to: '-1 1 0 60deg',
|
||||
}, [
|
||||
{at: -1, expect: '0.447214 -0.447214 0.774597 104.478deg'},
|
||||
{at: 0, expect: '45deg'},
|
||||
{at: 0, expect: 'z 45deg'},
|
||||
{at: 0.125, expect: '-0.136456 0.136456 0.981203 40.6037deg'},
|
||||
{at: 0.875, expect: '-0.70246 0.70246 0.114452 53.1994deg'},
|
||||
{at: 1, expect: '-1 1 0 60deg'},
|
||||
{at: 1, expect: '-0.71 0.71 0 60deg'},
|
||||
{at: 2, expect: '-0.637897 0.637897 -0.431479 124.975deg'}
|
||||
]);
|
||||
|
||||
|
@ -67,12 +67,12 @@ test_interpolation({
|
|||
from: 'none',
|
||||
to: '7 -8 9 400grad',
|
||||
}, [
|
||||
{at: -1, expect: '7 -8 9 -400grad'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0.125, expect: '7 -8 9 50grad'},
|
||||
{at: 0.875, expect: '7 -8 9 350grad'},
|
||||
{at: 1, expect: '7 -8 9 400grad'},
|
||||
{at: 2, expect: '7 -8 9 800grad'}
|
||||
{at: -1, expect: '0.5 -0.57 0.65 -400grad'},
|
||||
{at: 0, expect: '0.5 -0.57 0.65 0deg'},
|
||||
{at: 0.125, expect: '0.5 -0.57 0.65 50grad'},
|
||||
{at: 0.875, expect: '0.5 -0.57 0.65 350grad'},
|
||||
{at: 1, expect: '0.5 -0.57 0.65 400grad'},
|
||||
{at: 2, expect: '0.5 -0.57 0.65 800grad'}
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
|
@ -94,7 +94,7 @@ test_interpolation({
|
|||
to: '30deg',
|
||||
}, [
|
||||
{at: -1, expect: '-30deg'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0deg'},
|
||||
{at: 0.25, expect: '7.5deg'},
|
||||
{at: 0.75, expect: '22.5deg'},
|
||||
{at: 1, expect: '30deg'},
|
||||
|
@ -133,7 +133,7 @@ test_interpolation({
|
|||
to: '30deg',
|
||||
}, [
|
||||
{at: -1, expect: '-30deg'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0deg'},
|
||||
{at: 0.25, expect: '7.5deg'},
|
||||
{at: 0.75, expect: '22.5deg'},
|
||||
{at: 1, expect: '30deg'},
|
||||
|
@ -171,21 +171,26 @@ test_interpolation({
|
|||
from: '1 -2.5 3.64 100deg',
|
||||
to: '1 -2.5 3.64 -100deg',
|
||||
}, [
|
||||
{at: -1, expect: '1 -2.5 3.64 300deg'},
|
||||
{at: 0, expect: '1 -2.5 3.64 100deg'},
|
||||
{at: 0.25, expect: '1 -2.5 3.64 50deg'},
|
||||
{at: 0.75, expect: '1 -2.5 3.64 -50deg'},
|
||||
{at: 1, expect: '1 -2.5 3.64 -100deg'},
|
||||
{at: 2, expect: '1 -2.5 3.64 -300deg'},
|
||||
{at: -1, expect: '0.22 -0.55 0.8 300deg'},
|
||||
{at: 0, expect: '0.22 -0.55 0.8 100deg'},
|
||||
{at: 0.25, expect: '0.22 -0.55 0.8 50deg'},
|
||||
{at: 0.75, expect: '0.22 -0.55 0.8 -50deg'},
|
||||
{at: 1, expect: '0.22 -0.55 0.8 -100deg'},
|
||||
{at: 2, expect: '0.22 -0.55 0.8 -300deg'},
|
||||
]);
|
||||
|
||||
// The rotation angle gets interpolated numerically and the rotation vector
|
||||
// of the non-zero angle is used or (0, 0, 1) if both angles are zero.
|
||||
// So, we have to convert "1 0 0 0deg" into "0 1 0 0deg", and apply the same
|
||||
// concept for other test cases.
|
||||
// https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions
|
||||
test_interpolation({
|
||||
property: 'rotate',
|
||||
from: '1 0 0 0deg',
|
||||
to: '0 1 0 10deg',
|
||||
}, [
|
||||
{at: -1, expect: '0 1 0 -10deg'},
|
||||
{at: 0, expect: '1 0 0 0deg'},
|
||||
{at: 0, expect: '0 1 0 0deg'},
|
||||
{at: 0.25, expect: '0 1 0 2.5deg'},
|
||||
{at: 0.75, expect: '0 1 0 7.5deg'},
|
||||
{at: 1, expect: '0 1 0 10deg'},
|
||||
|
@ -198,11 +203,20 @@ test_interpolation({
|
|||
to: '0 1 1 135deg',
|
||||
}, [
|
||||
{at: -1, expect: '0.67 -0.06 -0.74 124.97deg'},
|
||||
{at: 0, expect: '1 1 0 90deg'},
|
||||
{at: 0, expect: '0.71 0.71 0 90deg'},
|
||||
{at: 0.25, expect: '0.54 0.8 0.26 94.83deg'},
|
||||
{at: 0.75, expect: '0.17 0.78 0.61 118.68deg'},
|
||||
{at: 1, expect: '0 1 1 135deg'},
|
||||
{at: 2, expect: '0.52 -0.29 -0.81 151.04deg'},
|
||||
{at: 1, expect: '0 0.71 0.71 135deg'},
|
||||
// The result in Blink is '0.52 -0.29 -0.81 151.04deg', and the result in
|
||||
// Gecko is `-0.52 0.29 0.8 208.96deg`. Both of them can be represented as the
|
||||
// same 3d rotation (but by an opposite direction vector and angle).
|
||||
// The spec only mentions we should use Slerp to do interpolation for rotate
|
||||
// property, but it seems the implementation detail for extrapolation are
|
||||
// different (because this is not in the range of [0, 1]).
|
||||
// For now, we make both results pass because their rendering results are the
|
||||
// same.
|
||||
{at: 2, expect: '0.52 -0.29 -0.81 151.04deg',
|
||||
option: '-0.52 0.29 0.81 208.96deg'},
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
|
@ -211,7 +225,7 @@ test_interpolation({
|
|||
to: '1 0 0 450deg',
|
||||
}, [
|
||||
{at: -1, expect: '1 0 0 -450deg'},
|
||||
{at: 0, expect: '0 1 0 0deg'},
|
||||
{at: 0, expect: '1 0 0 0deg'},
|
||||
{at: 0.25, expect: '1 0 0 112.5deg'},
|
||||
{at: 0.75, expect: '1 0 0 337.5deg'},
|
||||
{at: 1, expect: '1 0 0 450deg'},
|
||||
|
@ -227,7 +241,7 @@ test_interpolation({
|
|||
{at: 0, expect: '1 0 0 450deg'},
|
||||
{at: 0.25, expect: '1 0 0 337.5deg'},
|
||||
{at: 0.75, expect: '1 0 0 112.5deg'},
|
||||
{at: 1, expect: '0 1 0 0deg'},
|
||||
{at: 1, expect: '1 0 0 0deg'},
|
||||
{at: 2, expect: '1 0 0 -450deg'},
|
||||
]);
|
||||
</script>
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
to: '4 3 2',
|
||||
}, [
|
||||
{at: -1, expect: '-2 -1 0'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '1'},
|
||||
{at: 0.125, expect: '1.375 1.25 1.125'},
|
||||
{at: 0.875, expect: '3.625 2.75 1.875'},
|
||||
{at: 1, expect: '4 3 2'},
|
||||
|
@ -149,7 +149,7 @@
|
|||
to: '2 0.5 1',
|
||||
}, [
|
||||
{at: -1, expect: '0 1.5'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '1'},
|
||||
{at: 0.25, expect: '1.25 0.875'},
|
||||
{at: 0.75, expect: '1.75 0.625'},
|
||||
{at: 1, expect: '2 0.5'},
|
||||
|
@ -165,7 +165,7 @@
|
|||
{at: 0, expect: '2 0.5'},
|
||||
{at: 0.25, expect: '1.75 0.6251'},
|
||||
{at: 0.75, expect: '1.25 0.875'},
|
||||
{at: 1, expect: 'none'},
|
||||
{at: 1, expect: '1'},
|
||||
{at: 2, expect: '0 1.5'},
|
||||
]);
|
||||
|
||||
|
@ -177,7 +177,7 @@
|
|||
to: '1.5 1',
|
||||
}, [
|
||||
{at: -1, expect: '0.5 1'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '1'},
|
||||
{at: 0.25, expect: '1.125 1'},
|
||||
{at: 0.75, expect: '1.375 1'},
|
||||
{at: 1, expect: '1.5 1'},
|
||||
|
@ -218,7 +218,7 @@
|
|||
to: 'inherit',
|
||||
}, [
|
||||
{at: -1, expect: '1.5 1 0'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '1'},
|
||||
{at: 0.25, expect: '0.875 1 1.25'},
|
||||
{at: 0.75, expect: '0.625 1 1.75'},
|
||||
{at: 1, expect: '0.5 1 2'},
|
||||
|
@ -234,7 +234,7 @@
|
|||
{at: 0, expect: '0.5 1 2'},
|
||||
{at: 0.25, expect: '0.625 1 1.75'},
|
||||
{at: 0.75, expect: '0.875 1 1.25'},
|
||||
{at: 1, expect: 'none'},
|
||||
{at: 1, expect: '1'},
|
||||
{at: 2, expect: '1.5 1 0'},
|
||||
]);
|
||||
</script>
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
to: '8px 80% 800px',
|
||||
}, [
|
||||
{at: -1, expect: '-8px -80% -800px'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0px'},
|
||||
{at: 0.125, expect: '1px 10% 100px'},
|
||||
{at: 0.875, expect: '7px 70% 700px'},
|
||||
{at: 1, expect: '8px 80% 800px'},
|
||||
|
@ -177,7 +177,7 @@
|
|||
to: '200px 100px 200px',
|
||||
}, [
|
||||
{at: -1, expect: '-200px -100px -200px'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0px'},
|
||||
{at: 0.25, expect: '50px 25px 50px'},
|
||||
{at: 0.75, expect: '150px 75px 150px'},
|
||||
{at: 1, expect: '200px 100px 200px'},
|
||||
|
@ -193,7 +193,7 @@
|
|||
{at: 0, expect: '200px 100px 400px'},
|
||||
{at: 0.25, expect: '150px 75px 300px'},
|
||||
{at: 0.75, expect: '50px 25px 100px'},
|
||||
{at: 1, expect: 'none'},
|
||||
{at: 1, expect: '0px'},
|
||||
{at: 2, expect: '-200px -100px -400px'},
|
||||
]);
|
||||
|
||||
|
@ -205,7 +205,7 @@
|
|||
to: '20px',
|
||||
}, [
|
||||
{at: -1, expect: '-20px'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0px'},
|
||||
{at: 0.25, expect: '5px'},
|
||||
{at: 0.75, expect: '15px'},
|
||||
{at: 1, expect: '20px'},
|
||||
|
@ -246,7 +246,7 @@
|
|||
to: 'inherit',
|
||||
}, [
|
||||
{at: -1, expect: '-100px -200px -300px'},
|
||||
{at: 0, expect: 'none'},
|
||||
{at: 0, expect: '0px'},
|
||||
{at: 0.25, expect: '25px 50px 75px'},
|
||||
{at: 0.75, expect: '75px 150px 225px'},
|
||||
{at: 1, expect: '100px 200px 300px'},
|
||||
|
@ -262,7 +262,7 @@
|
|||
{at: 0, expect: '100px 200px 300px'},
|
||||
{at: 0.25, expect: '75px 150px 225px'},
|
||||
{at: 0.75, expect: '25px 50px 75px'},
|
||||
{at: 1, expect: 'none'},
|
||||
{at: 1, expect: '0px'},
|
||||
{at: 2, expect: '-100px -200px -300px'},
|
||||
]);
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue