Bug 1367977 - add serialization tests for SVG unitless length values. r=heycam
authorJeremy Chen <jeremychen@mozilla.com>
Fri, 26 May 2017 15:09:20 +0800
changeset 360794 ab6539ba5d376163db5dc6add595b45f0e2f9bc3
parent 360793 5850e5d245fb31bf5c352099f7c711f4a414a7c0
child 360795 2e6408a2b2c79932bdd177a348e12f819bfdd871
push id31902
push userryanvm@gmail.com
push dateFri, 26 May 2017 19:43:26 +0000
treeherdermozilla-central@ba1a33add29d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1367977
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367977 - add serialization tests for SVG unitless length values. r=heycam 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" ],