Bug 1367977 - add serialization tests for SVG unitless length values. draft
authorJeremy Chen <jeremychen@mozilla.com>
Fri, 26 May 2017 15:09:20 +0800
changeset 584973 e7ec9c6a1cc53e9fc2d754c956a4d96335d7147a
parent 584877 5d6fe59a9a5dfd2d381d2cdfdc968d3305b417cf
child 630595 1ca06e0b21d836bae30b4f9840166a385217dd16
push id60966
push userbmo:jeremychen@mozilla.com
push dateFri, 26 May 2017 09:45:17 +0000
bugs1367977
milestone55.0a1
Bug 1367977 - add serialization tests for SVG unitless length values. Add small factor numbers as valid values for SVG unitless length values, so we could ensure that a unitless length will not be rounded accidentally during computation and serialization. MozReview-Commit-ID: 8H3RNYsEXVx
layout/style/test/property_database.js
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -4364,25 +4364,25 @@ var gCSSProperties = {
     other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ],
     invalid_values: [ "000000", "ff00ff" ]
   },
   "stroke-dasharray": {
     domProp: "strokeDasharray",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none", "context-value" ],
-    other_values: [ "5px,3px,2px", "5px 3px 2px", "  5px ,3px\t, 2px ", "1px", "5%", "3em" ],
+    other_values: [ "5px,3px,2px", "5px 3px 2px", "  5px ,3px\t, 2px ", "1px", "5%", "3em", "0.0002" ],
     invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ]
   },
   "stroke-dashoffset": {
     domProp: "strokeDashoffset",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "0", "-0px", "0em", "context-value" ],
-    other_values: [ "3px", "3%", "1em" ],
+    other_values: [ "3px", "3%", "1em", "0.0002" ],
     invalid_values: []
   },
   "stroke-linecap": {
     domProp: "strokeLinecap",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "butt" ],
     other_values: [ "round", "square" ],
@@ -4412,17 +4412,17 @@ var gCSSProperties = {
     other_values: [ "0", "0.3", "-7.3" ],
     invalid_values: []
   },
   "stroke-width": {
     domProp: "strokeWidth",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "1px", "context-value" ],
-    other_values: [ "0", "0px", "-0em", "17px", "0.2em" ],
+    other_values: [ "0", "0px", "-0em", "17px", "0.2em", "0.0002" ],
     invalid_values: [ "-0.1px", "-3px" ]
   },
   "text-anchor": {
     domProp: "textAnchor",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "start" ],
     other_values: [ "middle", "end" ],