Index: third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html |
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/perspective-origin-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html |
similarity index 53% |
copy from third_party/WebKit/LayoutTests/animations/interpolation/perspective-origin-interpolation.html |
copy to third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html |
index b2bcffd77c62c3d33249964003e19373850e36f7..eb935dabacb63bfe20ff32721f6ec496ae3a8738 100644 |
--- a/third_party/WebKit/LayoutTests/animations/interpolation/perspective-origin-interpolation.html |
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html |
@@ -2,29 +2,10 @@ |
<meta charset="UTF-8"> |
<style> |
.parent { |
- perspective-origin: 30px 10px; |
+ offset-anchor: 30px 10px; |
} |
.target { |
- display: inline-block; |
- -webkit-perspective: 50; |
- perspective: 50; |
- margin-top: 50px; |
- margin-bottom: 25px; |
- perspective-origin: 10px 30px; |
-} |
-.transformed { |
- width: 50px; |
- height: 50px; |
- background: black; |
- transform: rotateY(45deg); |
-} |
-.expected .transformed { |
- background: green; |
-} |
-.expected { |
- position: relative; |
- left: -50px; |
- opacity: 0.75; |
+ offset-anchor: 10px 30px; |
} |
</style> |
<body> |
@@ -34,7 +15,7 @@ |
<script src="resources/interpolation-test.js"></script> |
<script> |
assertInterpolation({ |
- property: 'perspective-origin', |
+ property: 'offset-anchor', |
from: neutralKeyframe, |
to: '20px 20px', |
}, [ |
@@ -47,20 +28,20 @@ assertInterpolation({ |
]); |
assertInterpolation({ |
- property: 'perspective-origin', |
+ property: 'offset-anchor', |
from: 'initial', |
- to: '20px 20px', |
+ to: '60% 40%', |
}, [ |
- {at: -0.3, is: '26.5px 26.5px'}, |
- {at: 0, is: '25px 25px'}, |
- {at: 0.3, is: '23.5px 23.5px'}, |
- {at: 0.6, is: '22px 22px'}, |
- {at: 1, is: '20px 20px'}, |
- {at: 1.5, is: '17.5px 17.5px'}, |
+ {at: -0.3, is: '47% 53%'}, |
+ {at: 0, is: '50% 50%'}, |
+ {at: 0.3, is: '53% 47%'}, |
+ {at: 0.6, is: '56% 44%'}, |
+ {at: 1, is: '60% 40%'}, |
+ {at: 1.5, is: '65% 35%'}, |
]); |
assertInterpolation({ |
- property: 'perspective-origin', |
+ property: 'offset-anchor', |
from: 'inherit', |
to: '20px 20px', |
}, [ |
@@ -73,20 +54,20 @@ assertInterpolation({ |
]); |
assertInterpolation({ |
- property: 'perspective-origin', |
+ property: 'offset-anchor', |
from: 'unset', |
- to: '20px 20px', |
+ to: '50% 10px', |
}, [ |
- {at: -0.3, is: '26.5px 26.5px'}, |
- {at: 0, is: '25px 25px'}, |
- {at: 0.3, is: '23.5px 23.5px'}, |
- {at: 0.6, is: '22px 22px'}, |
- {at: 1, is: '20px 20px'}, |
- {at: 1.5, is: '17.5px 17.5px'}, |
+ {at: -0.3, is: '50% calc(-3px + 65%)'}, |
+ {at: 0, is: '50% 50%'}, |
+ {at: 0.3, is: '50% calc(3px + 35%)'}, |
+ {at: 0.6, is: '50% calc(6px + 20%)'}, |
+ {at: 1, is: '50% 10px'}, |
+ {at: 1.5, is: '50% calc(15px - 25%)'}, |
]); |
assertInterpolation({ |
- property: 'perspective-origin', |
+ property: 'offset-anchor', |
from: '0% 50%', |
to: '100% 150%' |
}, [ |
@@ -97,5 +78,11 @@ assertInterpolation({ |
{at: 1, is: '100% 150%'}, |
{at: 1.5, is: '150% 200%'} |
]); |
+ |
+assertNoInterpolation({ |
+ property: 'offset-anchor', |
+ from: 'auto', |
+ to: '20px 20px', |
+}); |
</script> |
</body> |