--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -7004,22 +7004,17 @@ if (IsCSSPropertyPrefEnabled("layout.css
domProp: "scrollSnapTypeY",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: ["mandatory", "proximity"],
invalid_values: [ "auto", "1px" ]
};
}
-
-function SupportsMaskShorthand() {
- return "maskImage" in document.documentElement.style;
-}
-
-if (SupportsMaskShorthand()) {
+if (IsCSSPropertyPrefEnabled("layout.css.positioned-mask.enabled")) {
gCSSProperties["mask"] = {
domProp: "mask",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
/* FIXME: All mask-border-* should be added when we implement them. */
subproperties: ["mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position-x", "mask-position-y", "mask-repeat", "mask-size" , "mask-composite"],
initial_values: [ "match-source", "none", "no-repeat", "add", "50% 50%", "center center", "50% 50% / auto", "center / auto", "center center / auto", "50% 50% / auto auto",
"center none", "center center none", "none center", "none center center", "none 50% 50%", "center / auto none",
@@ -7275,24 +7270,37 @@ if (SupportsMaskShorthand()) {
"calc(20px) calc(20px)",
"calc(20px + 1em) calc(20px / 2)",
"calc(20px + 50%) calc(50% - 10px)",
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)"
],
invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ]
};
-} else {
+} else { /* mask longhand */
gCSSProperties["mask"] = {
domProp: "mask",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: [ "url(#mymask)" ],
- invalid_values: []
+ invalid_values: [
+ "none repeat-y alpha add 50% 50%",
+ "subtract",
+ "50% center subtract alpha no-repeat none",
+ "top",
+ "left",
+ "0% 0%",
+ "top left",
+ "center / 100px",
+ "center / contain",
+ "center / cover",
+ "10px / 10%",
+ "10em / calc(20px)"
+ ]
};
}
if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
gCSSProperties["-webkit-animation"] = {
domProp: "webkitAnimation",
inherited: false,
type: CSS_TYPE_TRUE_SHORTHAND,
@@ -7688,17 +7696,17 @@ if (IsCSSPropertyPrefEnabled("layout.css
gCSSProperties["-webkit-user-select"] = {
domProp: "webkitUserSelect",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "-moz-user-select",
subproperties: [ "-moz-user-select" ],
};
- if (SupportsMaskShorthand()) {
+ if (IsCSSPropertyPrefEnabled("layout.css.positioned-mask.enabled")) {
gCSSProperties["-webkit-mask"] = {
domProp: "webkitMask",
inherited: false,
type: CSS_TYPE_TRUE_SHORTHAND,
alias_for: "mask",
subproperties: [ "mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size" , "mask-composite" ],
};
gCSSProperties["-webkit-mask-clip"] = {