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

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

Issue 2812523002: Support animating <resolution> custom properties (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/BUILD.gn » ('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/resolution-interpolation.html
diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/resolution-interpolation.html b/third_party/WebKit/LayoutTests/animations/custom-properties/resolution-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..2b1d312fedfa17be31e24735596dd5984594c2cb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/custom-properties/resolution-interpolation.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.parent {
+ --resolution: 30dppx;
+}
+.target {
+ --resolution: 10dppx;
+}
+</style>
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+CSS.registerProperty({
+ name: '--resolution',
+ syntax: '<resolution>',
+ initialValue: '40dppx',
+});
+
+assertInterpolation({
+ property: '--resolution',
+ from: neutralKeyframe,
+ to: '20dppx',
+}, [
+ {at: -0.3, is: '7dppx'},
+ {at: 0, is: '10dppx'},
+ {at: 0.5, is: '15dppx'},
+ {at: 1, is: '20dppx'},
+ {at: 1.5, is: '25dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: 'initial',
+ to: '20dppx',
+}, [
+ {at: -0.3, is: '46dppx'},
+ {at: 0, is: '40dppx'},
+ {at: 0.5, is: '30dppx'},
+ {at: 1, is: '20dppx'},
+ {at: 1.5, is: '10dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: 'inherit',
+ to: '20dppx',
+}, [
+ {at: -0.3, is: '33dppx'},
+ {at: 0, is: '30dppx'},
+ {at: 0.5, is: '25dppx'},
+ {at: 1, is: '20dppx'},
+ {at: 1.5, is: '15dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: 'unset',
+ to: '20dppx',
+}, [
+ {at: -0.3, is: '46dppx'},
+ {at: 0, is: '40dppx'},
+ {at: 0.5, is: '30dppx'},
+ {at: 1, is: '20dppx'},
+ {at: 1.5, is: '10dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: '-10dppx',
+ to: '10dppx',
+}, [
+ {at: -0.3, is: '-16dppx'},
+ {at: 0, is: '-10dppx'},
+ {at: 0.5, is: '0dppx'},
+ {at: 1, is: '10dppx'},
+ {at: 1.5, is: '20dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: '10dpi',
+ to: '20dpcm',
+}, [
+ {at: -0.3, is: '-0.0233333dppx'},
+ {at: 0, is: '0.104167dppx'},
+ {at: 0.5, is: '0.316667dppx'},
+ {at: 1, is: '0.529167dppx'},
+ {at: 1.5, is: '0.741667dppx'},
+]);
+
+assertInterpolation({
+ property: '--resolution',
+ from: '200dpi',
+ to: '90dppx',
+}, [
+ {at: -0.3, is: '-24.2917dppx'},
+ {at: 0, is: '2.08333dppx'},
+ {at: 0.5, is: '46.0417dppx'},
+ {at: 1, is: '90dppx'},
+ {at: 1.5, is: '133.958dppx'},
+]);
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698