--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -25,17 +25,17 @@ fuzzy-if(skiaContent||winWidget,1,20000)
== mask-image-3a.html mask-image-3-ref.html
== mask-image-3b.html mask-image-3-ref.html
fuzzy-if(skiaContent||winWidget,1,43) == mask-image-3c.html mask-image-3-ref.html
fuzzy-if(skiaContent||winWidget,1,43) == mask-image-3d.html mask-image-3-ref.html
== mask-image-3e.html mask-image-3-ref.html
# Due to SVG luminance, see bug 1372577, parent process doesn't use d2d for luminance.
fuzzy-if(skiaContent||winWidget,50,85) fuzzy-if(webrender,1,126) fuzzy-if(d2d,255,1) fuzzy-if(winWidget&&!browserIsRemote,50,85) == mask-image-3f.html mask-image-3-ref.html
fuzzy-if(skiaContent||winWidget,50,85) fuzzy-if(webrender,1,126) fuzzy-if(d2d,255,1) fuzzy-if(winWidget&&!browserIsRemote,50,85) == mask-image-3g.html mask-image-3-ref.html
-pref(layout.css.clip-path-shapes.enabled,true) fuzzy-if(winWidget,1,3) fuzzy-if(skiaContent,2,12) == mask-image-3h.html mask-image-3-ref.html
+fuzzy-if(winWidget,1,3) fuzzy-if(skiaContent,2,12) == mask-image-3h.html mask-image-3-ref.html
fuzzy-if(skiaContent,71,203) == mask-image-3i.html mask-image-3-ref.html
== mask-image-4a.html blank.html
== mask-image-4b.html blank.html
== mask-image-5.html mask-image-5-ref.html
== mask-image-6.html mask-image-6-ref.html
# mask-clip test cases
== mask-clip-1.html mask-clip-1-ref.html
@@ -82,18 +82,16 @@ fails == mask-origin-2.html mask-origin-
== mask-size-length-length.html mask-size-length-length-ref.html
== mask-size-length-percent.html mask-size-length-percent-ref.html
== mask-size-percent.html mask-size-percent-percent-ref.html
== mask-size-percent-auto.html mask-size-percent-percent-ref.html
== mask-size-percent-length.html mask-size-percent-percent-ref.html
== mask-size-percent-percent.html mask-size-percent-percent-ref.html
== mask-size-percent-percent-stretch.html mask-size-percent-percent-stretch-ref.html
-default-preferences pref(layout.css.clip-path-shapes.enabled,true)
-
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-contentBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-paddingBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy(64,370) == clip-path-borderBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-borderBox-1b.html clip-path-geometryBox-1-ref.html
@@ -104,18 +102,16 @@ fuzzy(64,370) == clip-path-strokeBox-1a.
fuzzy(64,370) == clip-path-strokeBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-viewBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-viewBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy(64,370) == clip-path-viewBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,9,98) fuzzy-if(webrender,64,100) == clip-path-geometryBox-2.html clip-path-geometryBox-2-ref.html
== clip-path-localRef-1.html clip-path-localRef-1-ref.html
-default-preferences
-
# mask with opacity test cases
fuzzy(1,5000) == mask-opacity-1a.html mask-opacity-1-ref.html
fuzzy(1,5000) == mask-opacity-1b.html mask-opacity-1-ref.html
fuzzy(1,5000) == mask-opacity-1c.html mask-opacity-1-ref.html
fuzzy(1,5000) == mask-opacity-1d.html mask-opacity-1-ref.html
fuzzy(1,5000) == mask-opacity-1e.html mask-opacity-1-ref.html
== clip-path-mix-blend-mode-1.html clip-path-mix-blend-mode-1-ref.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -319,16 +319,193 @@ var invalidGradientAndElementValues = [
"radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
"radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
"radial-gradient(45px 399grad, farthest-side circle, red, blue)"
];
var unbalancedGradientAndElementValues = [
"-moz-element(#a()",
];
+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)",
+ "polygon(nonzero, 20px 20px, 30% 30%, 30px 30px)",
+ "polygon(evenodd, 20px 20px, 30% 30%, 30px 30px)",
+
+ "content-box",
+ "padding-box",
+ "border-box",
+ "margin-box",
+
+ "polygon(0 0) content-box",
+ "border-box polygon(0 0)",
+ "padding-box polygon( 0 20px , 30px 20% ) ",
+ "polygon(evenodd, 20% 20em) content-box",
+ "polygon(evenodd, 20vh 20em) padding-box",
+ "polygon(evenodd, 20vh calc(20% + 20em)) border-box",
+ "polygon(evenodd, 20vh 20vw) margin-box",
+
+ "circle()",
+ "circle(at center)",
+ "circle(at top left 20px)",
+ "circle(at bottom right)",
+ "circle(20%)",
+ "circle(300px)",
+ "circle(calc(20px + 30px))",
+ "circle(farthest-side)",
+ "circle(closest-side)",
+ "circle(closest-side at center)",
+ "circle(farthest-side at top)",
+ "circle(20px at top right)",
+ "circle(40% at 50% 100%)",
+ "circle(calc(20% + 20%) at right bottom)",
+ "circle() padding-box",
+
+ "ellipse()",
+ "ellipse(at center)",
+ "ellipse(at top left 20px)",
+ "ellipse(at bottom right)",
+ "ellipse(20% 20%)",
+ "ellipse(300px 50%)",
+ "ellipse(calc(20px + 30px) 10%)",
+ "ellipse(farthest-side closest-side)",
+ "ellipse(closest-side farthest-side)",
+ "ellipse(farthest-side farthest-side)",
+ "ellipse(closest-side closest-side)",
+ "ellipse(closest-side closest-side at center)",
+ "ellipse(20% farthest-side at top)",
+ "ellipse(20px 50% at top right)",
+ "ellipse(closest-side 40% at 50% 100%)",
+ "ellipse(calc(20% + 20%) calc(20px + 20cm) at right bottom)",
+
+ "inset(1px)",
+ "inset(20% -20px)",
+ "inset(20em 4rem calc(20% + 20px))",
+ "inset(20vh 20vw 20pt 3%)",
+ "inset(5px round 3px)",
+ "inset(1px 2px round 3px / 3px)",
+ "inset(1px 2px 3px round 3px 2em / 20%)",
+ "inset(1px 2px 3px 4px round 3px 2vw 20% / 20px 3em 2vh 20%)",
+];
+
+var basicShapeInvalidValues = [
+ "url(#test) url(#tes2)",
+ "polygon (0 0)",
+ "polygon(20px, 40px)",
+ "border-box content-box",
+ "polygon(0 0) polygon(0 0)",
+ "polygon(nonzero 0 0)",
+ "polygon(evenodd 20px 20px)",
+ "polygon(20px 20px, evenodd)",
+ "polygon(20px 20px, nonzero)",
+ "polygon(0 0) conten-box content-box",
+ "content-box polygon(0 0) conten-box",
+ "padding-box polygon(0 0) conten-box",
+ "polygon(0 0) polygon(0 0) content-box",
+ "polygon(0 0) content-box polygon(0 0)",
+ "polygon(0 0), content-box",
+ "polygon(0 0), polygon(0 0)",
+ "content-box polygon(0 0) polygon(0 0)",
+ "content-box polygon(0 0) none",
+ "none content-box polygon(0 0)",
+ "inherit content-box polygon(0 0)",
+ "initial polygon(0 0)",
+ "polygon(0 0) farthest-side",
+ "farthest-corner polygon(0 0)",
+ "polygon(0 0) farthest-corner",
+ "polygon(0 0) conten-box",
+ "polygon(0 0) polygon(0 0) farthest-corner",
+ "polygon(0 0) polygon(0 0) polygon(0 0)",
+ "border-box polygon(0, 0)",
+ "border-box padding-box",
+ "margin-box farthest-side",
+ "nonsense() border-box",
+ "border-box nonsense()",
+
+ "circle(at)",
+ "circle(at 20% 20% 30%)",
+ "circle(20px 2px at center)",
+ "circle(2at center)",
+ "circle(closest-corner)",
+ "circle(at center top closest-side)",
+ "circle(-20px)",
+ "circle(farthest-side closest-side)",
+ "circle(20% 20%)",
+ "circle(at farthest-side)",
+ "circle(calc(20px + rubbish))",
+
+ "ellipse(at)",
+ "ellipse(at 20% 20% 30%)",
+ "ellipse(20px at center)",
+ "ellipse(-20px 20px)",
+ "ellipse(closest-corner farthest-corner)",
+ "ellipse(20px -20px)",
+ "ellipse(-20px -20px)",
+ "ellipse(farthest-side)",
+ "ellipse(20%)",
+ "ellipse(at farthest-side farthest-side)",
+ "ellipse(at top left calc(20px + rubbish))",
+
+ "polygon(at)",
+ "polygon(at 20% 20% 30%)",
+ "polygon(20px at center)",
+ "polygon(2px 2at center)",
+ "polygon(closest-corner farthest-corner)",
+ "polygon(at center top closest-side closest-side)",
+ "polygon(40% at 50% 100%)",
+ "polygon(40% farthest-side 20px at 50% 100%)",
+
+ "inset()",
+ "inset(round)",
+ "inset(round 3px)",
+ "inset(1px round 1px 2px 3px 4px 5px)",
+ "inset(1px 2px 3px 4px 5px)",
+ "inset(1px, round 3px)",
+ "inset(1px, 2px)",
+ "inset(1px 2px, 3px)",
+ "inset(1px at 3px)",
+ "inset(1px round 1px // 2px)",
+ "inset(1px round)",
+ "inset(1px calc(2px + rubbish))",
+ "inset(1px round 2px calc(3px + rubbish))",
+];
+
+var basicShapeUnbalancedValues = [
+ "polygon(30% 30%",
+ "polygon(nonzero, 20% 20px",
+ "polygon(evenodd, 20px 20px",
+
+ "circle(",
+ "circle(40% at 50% 100%",
+ "ellipse(",
+ "ellipse(40% at 50% 100%",
+
+ "inset(1px",
+ "inset(1px 2px",
+ "inset(1px 2px 3px",
+ "inset(1px 2px 3px 4px",
+ "inset(1px 2px 3px 4px round 5px",
+ "inset(1px 2px 3px 4px round 5px / 6px",
+];
+
if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
// Extend gradient lists with valid/invalid webkit-prefixed expressions:
validGradientAndElementValues.push(
// 2008 GRADIENTS: -webkit-gradient()
// ----------------------------------
// linear w/ no color stops (valid) and a variety of position values:
"-webkit-gradient(linear, 1 2, 3 4)",
"-webkit-gradient(linear,1 2,3 4)", // (no extra space)
@@ -4397,18 +4574,21 @@ var gCSSProperties = {
invalid_values: [ "3.0", "17.5", "3e1" ]
}
,
"clip-path": {
domProp: "clipPath",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
- other_values: [ "url(#mypath)", "url('404.svg#mypath')" ],
- invalid_values: []
+ other_values: [
+ "url(#mypath)", "url('404.svg#mypath')", "url(#my-clip-path)"
+ ].concat(basicShapeSVGBoxValues).concat(basicShapeOtherValues),
+ invalid_values: basicShapeInvalidValues,
+ unbalanced_values: basicShapeUnbalancedValues
},
"clip-rule": {
domProp: "clipRule",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: [ "nonzero" ],
other_values: [ "evenodd" ],
invalid_values: []
@@ -5963,208 +6143,16 @@ if (IsCSSPropertyPrefEnabled("svg.transf
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "border-box" ],
other_values: [ "fill-box", "view-box" ],
invalid_values: ["content-box", "padding-box", "stroke-box", "margin-box"]
};
}
-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)",
- "polygon(nonzero, 20px 20px, 30% 30%, 30px 30px)",
- "polygon(evenodd, 20px 20px, 30% 30%, 30px 30px)",
-
- "content-box",
- "padding-box",
- "border-box",
- "margin-box",
-
- "polygon(0 0) content-box",
- "border-box polygon(0 0)",
- "padding-box polygon( 0 20px , 30px 20% ) ",
- "polygon(evenodd, 20% 20em) content-box",
- "polygon(evenodd, 20vh 20em) padding-box",
- "polygon(evenodd, 20vh calc(20% + 20em)) border-box",
- "polygon(evenodd, 20vh 20vw) margin-box",
-
- "circle()",
- "circle(at center)",
- "circle(at top left 20px)",
- "circle(at bottom right)",
- "circle(20%)",
- "circle(300px)",
- "circle(calc(20px + 30px))",
- "circle(farthest-side)",
- "circle(closest-side)",
- "circle(closest-side at center)",
- "circle(farthest-side at top)",
- "circle(20px at top right)",
- "circle(40% at 50% 100%)",
- "circle(calc(20% + 20%) at right bottom)",
- "circle() padding-box",
-
- "ellipse()",
- "ellipse(at center)",
- "ellipse(at top left 20px)",
- "ellipse(at bottom right)",
- "ellipse(20% 20%)",
- "ellipse(300px 50%)",
- "ellipse(calc(20px + 30px) 10%)",
- "ellipse(farthest-side closest-side)",
- "ellipse(closest-side farthest-side)",
- "ellipse(farthest-side farthest-side)",
- "ellipse(closest-side closest-side)",
- "ellipse(closest-side closest-side at center)",
- "ellipse(20% farthest-side at top)",
- "ellipse(20px 50% at top right)",
- "ellipse(closest-side 40% at 50% 100%)",
- "ellipse(calc(20% + 20%) calc(20px + 20cm) at right bottom)",
-
- "inset(1px)",
- "inset(20% -20px)",
- "inset(20em 4rem calc(20% + 20px))",
- "inset(20vh 20vw 20pt 3%)",
- "inset(5px round 3px)",
- "inset(1px 2px round 3px / 3px)",
- "inset(1px 2px 3px round 3px 2em / 20%)",
- "inset(1px 2px 3px 4px round 3px 2vw 20% / 20px 3em 2vh 20%)",
-];
-
-var basicShapeInvalidValues = [
- "url(#test) url(#tes2)",
- "polygon (0 0)",
- "polygon(20px, 40px)",
- "border-box content-box",
- "polygon(0 0) polygon(0 0)",
- "polygon(nonzero 0 0)",
- "polygon(evenodd 20px 20px)",
- "polygon(20px 20px, evenodd)",
- "polygon(20px 20px, nonzero)",
- "polygon(0 0) conten-box content-box",
- "content-box polygon(0 0) conten-box",
- "padding-box polygon(0 0) conten-box",
- "polygon(0 0) polygon(0 0) content-box",
- "polygon(0 0) content-box polygon(0 0)",
- "polygon(0 0), content-box",
- "polygon(0 0), polygon(0 0)",
- "content-box polygon(0 0) polygon(0 0)",
- "content-box polygon(0 0) none",
- "none content-box polygon(0 0)",
- "inherit content-box polygon(0 0)",
- "initial polygon(0 0)",
- "polygon(0 0) farthest-side",
- "farthest-corner polygon(0 0)",
- "polygon(0 0) farthest-corner",
- "polygon(0 0) conten-box",
- "polygon(0 0) polygon(0 0) farthest-corner",
- "polygon(0 0) polygon(0 0) polygon(0 0)",
- "border-box polygon(0, 0)",
- "border-box padding-box",
- "margin-box farthest-side",
- "nonsense() border-box",
- "border-box nonsense()",
-
- "circle(at)",
- "circle(at 20% 20% 30%)",
- "circle(20px 2px at center)",
- "circle(2at center)",
- "circle(closest-corner)",
- "circle(at center top closest-side)",
- "circle(-20px)",
- "circle(farthest-side closest-side)",
- "circle(20% 20%)",
- "circle(at farthest-side)",
- "circle(calc(20px + rubbish))",
-
- "ellipse(at)",
- "ellipse(at 20% 20% 30%)",
- "ellipse(20px at center)",
- "ellipse(-20px 20px)",
- "ellipse(closest-corner farthest-corner)",
- "ellipse(20px -20px)",
- "ellipse(-20px -20px)",
- "ellipse(farthest-side)",
- "ellipse(20%)",
- "ellipse(at farthest-side farthest-side)",
- "ellipse(at top left calc(20px + rubbish))",
-
- "polygon(at)",
- "polygon(at 20% 20% 30%)",
- "polygon(20px at center)",
- "polygon(2px 2at center)",
- "polygon(closest-corner farthest-corner)",
- "polygon(at center top closest-side closest-side)",
- "polygon(40% at 50% 100%)",
- "polygon(40% farthest-side 20px at 50% 100%)",
-
- "inset()",
- "inset(round)",
- "inset(round 3px)",
- "inset(1px round 1px 2px 3px 4px 5px)",
- "inset(1px 2px 3px 4px 5px)",
- "inset(1px, round 3px)",
- "inset(1px, 2px)",
- "inset(1px 2px, 3px)",
- "inset(1px at 3px)",
- "inset(1px round 1px // 2px)",
- "inset(1px round)",
- "inset(1px calc(2px + rubbish))",
- "inset(1px round 2px calc(3px + rubbish))",
-];
-
-var basicShapeUnbalancedValues = [
- "polygon(30% 30%",
- "polygon(nonzero, 20% 20px",
- "polygon(evenodd, 20px 20px",
-
- "circle(",
- "circle(40% at 50% 100%",
- "ellipse(",
- "ellipse(40% at 50% 100%",
-
- "inset(1px",
- "inset(1px 2px",
- "inset(1px 2px 3px",
- "inset(1px 2px 3px 4px",
- "inset(1px 2px 3px 4px round 5px",
- "inset(1px 2px 3px 4px round 5px / 6px",
-];
-
-if (IsCSSPropertyPrefEnabled("layout.css.clip-path-shapes.enabled")) {
- gCSSProperties["clip-path"] = {
- domProp: "clipPath",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: [ "none" ],
- other_values: [
- // SVG reference clip-path
- "url(#my-clip-path)",
- ].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,
applies_to_first_letter: true,
initial_values: [ "none" ],
other_values: [