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

Unified Diff: LayoutTests/animations/interpolation/font-size-adjust-interpolation.html

Issue 983073002: Make font-size-adjust animatable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do not allow font-size-adjust to animate for none or 0 Created 5 years, 9 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: LayoutTests/animations/interpolation/font-size-adjust-interpolation.html
diff --git a/LayoutTests/animations/interpolation/font-size-adjust-interpolation.html b/LayoutTests/animations/interpolation/font-size-adjust-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..4664ca66b454d8b40d62b9da2a7863fd6e4ff81e
--- /dev/null
+++ b/LayoutTests/animations/interpolation/font-size-adjust-interpolation.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<style type="text/css">
+.container {
+ font-size: 20px;
+ line-height: 1;
+}
+
+@font-face {
+ font-family : 'testFont';
+ src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff");
+}
+
+.target {
+ display: inline-block;
+ font-family: testFont;
+}
+
+.replica {
+ color: green;
+ margin-right: 30px;
+}
+</style>
+
+<template id="target-template">
+ <span class="container">
+ <div class="target">x</span>
+ </div>
+</template>
+<script src="resources/interpolation-test.js"></script>
+<script>
+assertInterpolation({
+ property: 'font-size-adjust',
+ from: '0',
+ to: '1.2'
+}, [
+ {at: -2, is: 'none'},
dstockwell 2015/03/16 21:49:31 Why can't we interpolate smoothly from 0 to 1.2?
changseok 2015/03/17 07:12:58 Because '0' for font-size-adjust is same meaning w
dstockwell 2015/03/17 07:42:10 This sounds like a bug in gecko, we should clarify
changseok 2015/03/17 11:35:06 O.K
dstockwell 2015/03/17 23:36:46 OK, but please file the bug and start the discussi
+ {at: -0.3, is: 'none'},
+ {at: 0, is: 'none'},
+ {at: 0.3, is: 'none'},
+ {at: 0.6, is: 'none'},
+ {at: 1, is: 'none'},
+ {at: 1.5, is: 'none'},
+]);
+
+assertInterpolation({
+ property: 'font-size-adjust',
+ from: 'none',
+ to: '1.2'
+}, [
+ {at: -2, is: 'none'},
+ {at: -0.3, is: 'none'},
+ {at: 0, is: 'none'},
+ {at: 0.3, is: 'none'},
+ {at: 0.6, is: 'none'},
dstockwell 2015/03/16 21:49:31 This is incorrect, the values should be '1.2' at 0
changseok 2015/03/17 07:12:58 With same reason above. if any single frame has '0
dstockwell 2015/03/17 07:42:10 For values which do not smoothly interpolate, eg.
changseok 2015/03/17 11:35:06 I see. Fixed as you said.
+ {at: 1, is: 'none'},
+ {at: 1.5, is: 'none'},
+]);
+
+assertInterpolation({
+ property: 'font-size-adjust',
+ from: '0.2',
+ to: '1.2'
+}, [
+ {at: -2, is: 'none'}, // CSS font-size-adjust can't be negative.
+ {at: -0.3, is: 'none'},
+ {at: 0, is: '0.200000002980232'},
dstockwell 2015/03/16 21:49:31 just '0.2' should work here, the helper performs r
changseok 2015/03/17 07:12:58 Cool!
+ {at: 0.3, is: '0.5'},
+ {at: 0.6, is: '0.800000011920929'},
+ {at: 1, is: '1.20000004768372'},
+ {at: 1.5, is: '1.70000004768372'},
+]);
+</script>

Powered by Google App Engine
This is Rietveld 408576698