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

Unified Diff: third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation.html

Issue 2692273010: Support animating <angle> custom properties (Closed)
Patch Set: norebaseline Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation.html
diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation.html b/third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..7085a599b6003805718942e856fa3a5b52790a84
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.parent {
+ --angle: 30deg;
+}
+.target {
+ --angle: 10deg;
+}
+</style>
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+CSS.registerProperty({
+ name: '--angle',
+ syntax: '<angle>',
+ initialValue: '40deg',
+});
+
+assertInterpolation({
+ property: '--angle',
+ from: neutralKeyframe,
+ to: '20deg',
+}, [
+ {at: -0.3, is: '7deg'},
+ {at: 0, is: '10deg'},
+ {at: 0.5, is: '15deg'},
+ {at: 1, is: '20deg'},
+ {at: 1.5, is: '25deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: 'initial',
+ to: '20deg',
+}, [
+ {at: -0.3, is: '46deg'},
+ {at: 0, is: '40deg'},
+ {at: 0.5, is: '30deg'},
+ {at: 1, is: '20deg'},
+ {at: 1.5, is: '10deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: 'inherit',
+ to: '20deg',
+}, [
+ {at: -0.3, is: '33deg'},
+ {at: 0, is: '30deg'},
+ {at: 0.5, is: '25deg'},
+ {at: 1, is: '20deg'},
+ {at: 1.5, is: '15deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: 'unset',
+ to: '20deg',
+}, [
+ {at: -0.3, is: '46deg'},
+ {at: 0, is: '40deg'},
+ {at: 0.5, is: '30deg'},
+ {at: 1, is: '20deg'},
+ {at: 1.5, is: '10deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: '-10deg',
+ to: '10deg',
+}, [
+ {at: -0.3, is: '-16deg'},
+ {at: 0, is: '-10deg'},
+ {at: 0.5, is: '0deg'},
+ {at: 1, is: '10deg'},
+ {at: 1.5, is: '20deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: '10rad',
+ to: '20rad',
+}, [
+ {at: -0.3, is: '401.07deg'},
+ {at: 0, is: '572.958deg'},
+ {at: 0.5, is: '859.437deg'},
+ {at: 1, is: '1145.92deg'},
+ {at: 1.5, is: '1432.39deg'},
+]);
+
+assertInterpolation({
+ property: '--angle',
+ from: '200grad',
+ to: '90deg',
+}, [
+ {at: -0.3, is: '207deg'},
+ {at: 0, is: '180deg'},
+ {at: 0.5, is: '135deg'},
+ {at: 1, is: '90deg'},
+ {at: 1.5, is: '45deg'},
+]);
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/custom-properties/angle-type-interpolation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698