Bug 1336924 - Part 1. add invalidate test cases for shape-outside's shape-box. draft
authorcku <cku@mozilla.com>
Mon, 06 Feb 2017 16:30:05 +0800
changeset 479309 6d6d90cd2ebeac06b3efad4fe8ce4a3f36840cef
parent 479044 3e555770a90a41e04bbb4ac41b65fa2f1db6977d
child 479310 d74e15d527373719f76a1719aa82c343d978ee81
push id44215
push userbmo:cku@mozilla.com
push dateMon, 06 Feb 2017 13:00:53 +0000
bugs1336924
milestone54.0a1
Bug 1336924 - Part 1. add invalidate test cases for shape-outside's shape-box. spec: https://drafts.csswg.org/css-shapes-1/#shape-outside-property svg box values(fill-box/stroke-box and view-box) are not valid for shape-box. MozReview-Commit-ID: 3yct8P0PFFM
layout/style/test/property_database.js
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -5612,16 +5612,26 @@ if (IsCSSPropertyPrefEnabled("svg.transf
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "border-box" ],
     other_values: [ "fill-box", "view-box" ],
     invalid_values: []
   };
 }
 
+var basicShapeSVGBoxValues = [
+  "fill-box",
+  "stroke-box",
+  "view-box",
+
+  "polygon(evenodd, 20pt 20cm) fill-box",
+  "polygon(evenodd, 20ex 20pc) stroke-box",
+  "polygon(evenodd, 20rem 20in) view-box",
+];
+
 var basicShapeOtherValues = [
   "polygon(20px 20px)",
   "polygon(20px 20%)",
   "polygon(20% 20%)",
   "polygon(20rem 20em)",
   "polygon(20cm 20mm)",
   "polygon(20px 20px, 30px 30px)",
   "polygon(20px 20px, 30% 30%, 30px 30px)",
@@ -5788,40 +5798,32 @@ if (IsCSSPropertyPrefEnabled("layout.css
   gCSSProperties["clip-path"] = {
     domProp: "clipPath",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: [
       // SVG reference clip-path
       "url(#my-clip-path)",
-
-      "fill-box",
-      "stroke-box",
-      "view-box",
-
-      "polygon(evenodd, 20pt 20cm) fill-box",
-      "polygon(evenodd, 20ex 20pc) stroke-box",
-      "polygon(evenodd, 20rem 20in) view-box",
-    ].concat(basicShapeOtherValues),
+    ].concat(basicShapeSVGBoxValues).concat(basicShapeOtherValues),
     invalid_values: basicShapeInvalidValues,
     unbalanced_values: basicShapeUnbalancedValues,
   };
 }
 
 if (IsCSSPropertyPrefEnabled("layout.css.shape-outside.enabled")) {
   gCSSProperties["shape-outside"] = {
     domProp: "shapeOutside",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: [
       "url(#my-shape-outside)",
     ].concat(basicShapeOtherValues),
-    invalid_values: basicShapeInvalidValues,
+    invalid_values: basicShapeSVGBoxValues.concat(basicShapeInvalidValues),
     unbalanced_values: basicShapeUnbalancedValues,
   };
 }
 
 
 if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) {
   gCSSProperties["filter"] = {
     domProp: "filter",