Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1530)

Unified Diff: third_party/WebKit/LayoutTests/animations/composition/motion-offset-composition.html

Issue 2856513002: Revert of CSS Motion Path: delete implementation of motion-offset property (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/animations/composition/motion-offset-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/composition/motion-offset-composition.html b/third_party/WebKit/LayoutTests/animations/composition/motion-offset-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..55b72e73c30824252f7b0515a3d51185920b2514
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/composition/motion-offset-composition.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+assertComposition({
+ property: 'motion-offset',
+ underlying: '50px',
+ addFrom: '100px',
+ addTo: '200px',
+}, [
+ {at: -0.3, is: '120px'},
+ {at: 0, is: '150px'},
+ {at: 0.5, is: '200px'},
+ {at: 1, is: '250px'},
+ {at: 1.5, is: '300px'},
+]);
+
+assertComposition({
+ property: 'motion-offset',
+ underlying: '100px',
+ addFrom: '10px',
+ addTo: '2px',
+}, [
+ {at: -0.5, is: '114px'},
+ {at: 0, is: '110px'},
+ {at: 0.5, is: '106px'},
+ {at: 1, is: '102px'},
+ {at: 1.5, is: '98px'},
+]);
+
+assertComposition({
+ property: 'motion-offset',
+ underlying: '10%',
+ addFrom: '100px',
+ addTo: '20%',
+}, [
+ {at: -0.3, is: 'calc(130px + 4%)'},
+ {at: 0, is: 'calc(100px + 10%)'},
+ {at: 0.5, is: 'calc(50px + 20%)'},
+ {at: 1, is: '30%'},
+ {at: 1.5, is: 'calc(-50px + 40%)'},
+]);
+
+assertComposition({
+ property: 'motion-offset',
+ underlying: '50px',
+ addFrom: '100px',
+ replaceTo: '200px',
+}, [
+ {at: -0.3, is: '135px'},
+ {at: 0, is: '150px'},
+ {at: 0.5, is: '175px'},
+ {at: 1, is: '200px'},
+ {at: 1.5, is: '225px'},
+]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698