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

Unified Diff: LayoutTests/animations/interpolation/resources/interpolation-test.js

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: all working! Created 7 years, 1 month 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/resources/interpolation-test.js
diff --git a/LayoutTests/animations/interpolation/resources/interpolation-test.js b/LayoutTests/animations/interpolation/resources/interpolation-test.js
index c56ccfacbc58b57125cb958e07ddefd22804d221..8cab9e9020e681ffe17bc07ccc10d7b151f50c8e 100644
--- a/LayoutTests/animations/interpolation/resources/interpolation-test.js
+++ b/LayoutTests/animations/interpolation/resources/interpolation-test.js
@@ -194,9 +194,11 @@
function normalizeValue(value) {
return value.
- // Round numbers to two decimal places.
+ // Round numbers to one decimal place. Our layout units are not exact
dstockwell 2013/11/27 23:49:31 This shouldn't be necessary and isn't really appro
cbiesinger 2013/12/18 02:09:12 Reverted, see below.
+ // enough for any finer comparisons -- a difference of 1 LayoutUnit is
+ // 0.016 pixels.
replace(/-?\d*\.\d+/g, function(n) {
- return (parseFloat(n).toFixed(2)).
+ return (parseFloat(n).toFixed(1)).
replace(/\.0*$/, '').
replace(/^-0$/, '0');
}).

Powered by Google App Engine
This is Rietveld 408576698