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

Unified Diff: third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-y-composition.html

Issue 1535523002: Web Animations: Add SVGLengthListInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/svg-attribute-composition/svg-y-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-y-composition.html b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-y-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..65d1fbe2c7c52169c6786d1aff19849ddb5b118c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-y-composition.html
@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ font-size: 10px;
+ }
+ </style>
+</head>
+<body>
+<template id="target-template">
+<svg width="200px" height="300px" viewBox="0 0 1500 1000">
+ <text class="target" x="20, 40, 60" />
+</svg>
+</template>
+<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
+<script>
+'use strict';
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '1, 1, 1',
+ from: '-1, -2, 1',
+ fromComposite: 'add',
+ to: '4, -7, 6',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '-2, 1, 0'},
+ {at: 0, is: '0, -1, 2'},
+ {at: 0.2, is: '1, -2, 3'},
+ {at: 0.6, is: '3, -4, 5'},
+ {at: 1, is: '5, -6, 7'},
+ {at: 1.4, is: '7, -8, 9'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '1em, 1ex, 1rem',
+ from: '-1em, 0ex, 1rem',
+ fromComposite: 'add',
+ to: '4em, 5ex, 6rem',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '-2em, -1ex, 0rem'},
+ {at: 0, is: '0em, 1ex, 2rem'},
+ {at: 0.2, is: '1em, 2ex, 3rem'},
+ {at: 0.6, is: '3em, 4ex, 5rem'},
+ {at: 1, is: '5em, 6ex, 7rem'},
+ {at: 1.4, is: '7em, 8ex, 9rem'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '50, 50, 0',
+ from: '50%, 0em, 0',
+ fromComposite: 'add',
+ to: '0em, 50%, 0',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '750, -150, 0'},
+ {at: 0, is: '550, 50, 0'},
+ {at: 0.2, is: '450, 150, 0'},
+ {at: 0.6, is: '250, 350, 0'},
+ {at: 1, is: '50, 550, 0'},
+ {at: 1.4, is: '-150, 750, 0'}
+]);
+
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '1, 1, 1',
+ from: '0, -1, 2',
+ fromComposite: 'replace',
+ to: '4, -7, 6',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '-2, 1, 0'},
+ {at: 0, is: '0, -1, 2'},
+ {at: 0.2, is: '1, -2, 3'},
+ {at: 0.6, is: '3, -4, 5'},
+ {at: 1, is: '5, -6, 7'},
+ {at: 1.4, is: '7, -8, 9'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '1em, 1ex, 1rem',
+ from: '0em, 1ex, 2rem',
+ fromComposite: 'replace',
+ to: '4em, 5ex, 6rem',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '-2em, -1ex, 0rem'},
+ {at: 0, is: '0em, 1ex, 2rem'},
+ {at: 0.2, is: '1em, 2ex, 3rem'},
+ {at: 0.6, is: '3em, 4ex, 5rem'},
+ {at: 1, is: '5em, 6ex, 7rem'},
+ {at: 1.4, is: '7em, 8ex, 9rem'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '1em, 10%, 0',
+ from: '55%, 5em, 0',
+ fromComposite: 'replace',
+ to: '4em, 45%, 0',
+ toComposite: 'add'
+}, [
+ {at: -0.4, is: '750, -150, 0'},
+ {at: 0, is: '550, 50, 0'},
+ {at: 0.2, is: '450, 150, 0'},
+ {at: 0.6, is: '250, 350, 0'},
+ {at: 1, is: '50, 550, 0'},
+ {at: 1.4, is: '-150, 750, 0'}
+]);
+
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '0, -1, 2',
+ from: neutralKeyframe,
+ to: '5, -6, 7',
+ toComposite: 'replace'
+}, [
+ {at: -0.4, is: '-2, 1, 0'},
+ {at: 0, is: '0, -1, 2'},
+ {at: 0.2, is: '1, -2, 3'},
+ {at: 0.6, is: '3, -4, 5'},
+ {at: 1, is: '5, -6, 7'},
+ {at: 1.4, is: '7, -8, 9'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '0em, 1ex, 2rem',
+ from: neutralKeyframe,
+ to: '5em, 6ex, 7rem',
+ toComposite: 'replace'
+}, [
+ {at: -0.4, is: '-2em, -1ex, 0rem'},
+ {at: 0, is: '0em, 1ex, 2rem'},
+ {at: 0.2, is: '1em, 2ex, 3rem'},
+ {at: 0.6, is: '3em, 4ex, 5rem'},
+ {at: 1, is: '5em, 6ex, 7rem'},
+ {at: 1.4, is: '7em, 8ex, 9rem'}
+]);
+assertAttributeInterpolation({
+ property: 'y',
+ underlying: '55%, 5em, 0',
+ from: neutralKeyframe,
+ to: '5em, 55%, 0',
+ toComposite: 'replace'
+}, [
+ {at: -0.4, is: '750, -150, 0'},
+ {at: 0, is: '550, 50, 0'},
+ {at: 0.2, is: '450, 150, 0'},
+ {at: 0.6, is: '250, 350, 0'},
+ {at: 1, is: '50, 550, 0'},
+ {at: 1.4, is: '-150, 750, 0'}
+]);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698