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

Unified Diff: third_party/WebKit/LayoutTests/animations/interpolation/caret-color-interpolation.html

Issue 2537373005: [css-ui] Make caret-color animatable (Closed)
Patch Set: Patch for landing adding TODO Created 4 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/interpolation/caret-color-interpolation.html
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/caret-color-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/caret-color-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..3f0a8cfc6ce2ef42a6cc0aa80242d0b43de80a29
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/caret-color-interpolation.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.parent {
+ caret-color: blue;
+}
+.target {
+ display: inline-block;
+ font-size: 60pt;
+ caret-color: yellow;
+}
+.expected {
+ margin-right: 15px;
+}
+</style>
+<body alink="red" link="blue" contenteditable>
+<template id="target-template">T</template>
+<script src="resources/interpolation-test.js"></script>
+<script>
+assertInterpolation({
+ property: 'caret-color',
+ from: neutralKeyframe,
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(255, 255, 0)'},
+ {at: 0, is: 'rgb(255, 255, 0)'},
+ {at: 0.3, is: 'rgb(179, 217, 0)'},
+ {at: 0.6, is: 'rgb(102, 179, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 65, 0)'},
+]);
+
+assertNoInterpolation({
+ property: 'caret-color',
+ from: 'initial',
+ to: 'green',
+});
+
+assertNoInterpolation({
+ property: 'caret-color',
+ from: 'auto',
+ to: 'green',
+});
+
+assertInterpolation({
+ property: 'caret-color',
+ from: 'currentColor',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 0)'},
+ {at: 0, is: 'rgb(0, 0, 0)'},
+ {at: 0.3, is: 'rgb(0, 38, 0)'},
+ {at: 0.6, is: 'rgb(0, 77, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'caret-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 255)'},
+ {at: 0, is: 'rgb(0, 0, 255)'},
+ {at: 0.3, is: 'rgb(0, 38, 179)'},
+ {at: 0.6, is: 'rgb(0, 77, 102)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'caret-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 255)'},
+ {at: 0, is: 'rgb(0, 0, 255)'},
+ {at: 0.3, is: 'rgb(0, 38, 179)'},
+ {at: 0.6, is: 'rgb(0, 77, 102)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'caret-color',
+ from: 'black',
+ to: 'orange',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 0)'},
+ {at: 0, is: 'rgb(0, 0, 0)'},
+ {at: 0.3, is: 'rgb(77, 50, 0)'},
+ {at: 0.6, is: 'rgb(153, 99, 0)'},
+ {at: 1, is: 'rgb(255, 165, 0)'},
+ {at: 1.5, is: 'rgb(255, 248, 0)'},
+]);
+
+assertInterpolation({
+ property: 'caret-color',
+ from: '-webkit-activelink',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(255, 0, 0)'},
+ {at: 0, is: 'rgb(255, 0, 0)'},
+ {at: 0.3, is: 'rgb(179, 38, 0)'},
+ {at: 0.6, is: 'rgb(102, 77, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'caret-color',
+ from: '-webkit-link',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 255)'},
+ {at: 0, is: 'rgb(0, 0, 255)'},
+ {at: 0.3, is: 'rgb(0, 38, 179)'},
+ {at: 0.6, is: 'rgb(0, 77, 102)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698