Index: LayoutTests/animations/interpolation/perspective-interpolation.html |
diff --git a/LayoutTests/animations/interpolation/perspective-interpolation.html b/LayoutTests/animations/interpolation/perspective-interpolation.html |
index 2af8937b370e686b6adf8093e9b735e4a79769e9..c9dd60752741735006b5eaacacb01e787df1d7a2 100644 |
--- a/LayoutTests/animations/interpolation/perspective-interpolation.html |
+++ b/LayoutTests/animations/interpolation/perspective-interpolation.html |
@@ -1,10 +1,14 @@ |
<!DOCTYPE html> |
<meta charset="UTF-8"> |
<style> |
+.parent { |
+ perspective: 30px; |
+} |
.target { |
display: inline-block; |
margin-top: 50px; |
margin-bottom: 25px; |
+ perspective: 10px; |
} |
.transformed { |
width: 50px; |
@@ -29,8 +33,50 @@ |
<script> |
assertInterpolation({ |
property: 'perspective', |
+ from: '', |
+ to: '20px', |
+}, [ |
+ {at: -20, is: 'none'}, |
+ {at: -1, is: 'none'}, |
+ {at: -0.3, is: '7px'}, |
+ {at: 0, is: '10px'}, |
+ {at: 0.3, is: '13px'}, |
+ {at: 0.6, is: '16px'}, |
+ {at: 1, is: '20px'}, |
+ {at: 1.5, is: '25px'}, |
+]); |
+ |
+assertNoInterpolation({ |
+ property: 'perspective', |
+ from: 'initial', |
+ to: '20px', |
+}); |
+ |
+assertInterpolation({ |
+ property: 'perspective', |
+ from: 'inherit', |
+ to: '20px', |
+}, [ |
+ {at: -20, is: '230px'}, |
+ {at: -1, is: '40px'}, |
+ {at: -0.3, is: '33px'}, |
+ {at: 0, is: '30px'}, |
+ {at: 0.3, is: '27px'}, |
+ {at: 0.6, is: '24px'}, |
+ {at: 1, is: '20px'}, |
+ {at: 1.5, is: '15px'}, |
+]); |
+ |
+assertNoInterpolation({ |
+ property: 'perspective', |
+ from: 'unset', |
+ to: '20px', |
+}); |
+ |
+assertInterpolation({ |
+ property: 'perspective', |
from: '50px', |
- to: '100px' |
+ to: '100px', |
}, [ |
{at: -20, is: 'none'}, // perspective does not accept 0 or negative values |
{at: -1, is: 'none'}, // perspective does not accept 0 or negative values |
@@ -39,13 +85,13 @@ assertInterpolation({ |
{at: 0.3, is: '65px'}, |
{at: 0.6, is: '80px'}, |
{at: 1, is: '100px'}, |
- {at: 1.5, is: '125px'} |
+ {at: 1.5, is: '125px'}, |
]); |
assertNoInterpolation({ |
property: 'perspective', |
from: '50px', |
- to: 'none' |
+ to: 'none', |
}); |
</script> |
</body> |