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

Unified Diff: LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js

Issue 1120133004: Serialize <number> to round to at most 6 decimals (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V7 Created 5 years, 7 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/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js
diff --git a/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js b/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js
index beea4958ce8adf15ac3a446aea6bd96a361d48a7..6470e54018aa3b86ed7d311673abd467693a10e4 100644
--- a/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js
+++ b/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js
@@ -367,7 +367,11 @@ function convertToPx(origValue) {
else {
convertedUnit = unit;
}
+ if (number < 1000) {
Timothy Loh 2015/05/18 04:32:02 We shouldn't be changing this file, see LayoutTest
number = Math.round(number * 1000) / 1000;
+ } else {
+ number = Math.round(number * 100) / 100;
+ }
var find = valuesToConvert[i];
var replace = number.toString() + convertedUnit;
retStr = retStr.replace(valuesToConvert[i], number.toString() + convertedUnit);

Powered by Google App Engine
This is Rietveld 408576698