summaryrefslogtreecommitdiffstats
path: root/layout/style/test/property_database.js
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/test/property_database.js')
-rw-r--r--layout/style/test/property_database.js308
1 files changed, 158 insertions, 150 deletions
diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js
index 2e8b4c71a3..302bd48b42 100644
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -1035,6 +1035,36 @@ if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-rect.enabled")) {
);
}
+var basicShapeShapeValues = [];
+var basicShapeShapeValuesWithFillRule = [];
+if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-shape.enabled")) {
+ basicShapeShapeValuesWithFillRule.push(
+ "shape(evenodd from 0px 0px, line to 10px 10px)",
+ "shape(nonzero from 0px 0px, line to 10px 10px)"
+ );
+
+ basicShapeShapeValues.push(
+ "shape(from 0px 0%, line to 10px 10%)",
+ "shape(from 10px 10px, move by 10px 5px, line by 20px 40%, close)",
+ "shape(from 10px 10px, hline by 10px, vline to 5rem)",
+ "shape(from 10px 10px, vline by 5%, hline to 1vw)",
+ "shape(from 10px 10px, curve to 50px 20px via 10rem 1%)",
+ "shape(from 10px 10px, smooth to 50px 20px via 10rem 1%)",
+ "shape(from 10% 1rem, arc to 50px 1pt of 20% cw large rotate 25deg)"
+ );
+
+ // It's fine to include this for properties which don't support shape(),
+ // e.g. shape-outside, because they must reject these values.
+ basicShapeInvalidValues.push(
+ "shape()",
+ "shape(evenodd, from 0px 0px)",
+ "shape(from 0px 0px line to 10px 10px)",
+ "shape(from 0px 0px)",
+ "shape(close)",
+ "shape(nonzero, close)"
+ );
+}
+
if (/* mozGradientsEnabled */ true) {
// Maybe one day :(
// Extend gradient lists with valid/invalid moz-prefixed expressions:
@@ -5352,7 +5382,6 @@ var gCSSProperties = {
"counter(\\()",
"counters(a\\+b, '.')",
"counter(\\}, upper-alpha)",
- "-moz-alt-content",
"counter(foo, symbols('*'))",
"counter(foo, symbols(numeric '0' '1'))",
"counters(foo, '.', symbols('*'))",
@@ -5370,6 +5399,7 @@ var gCSSProperties = {
"attr(-2)",
"counter(2)",
"counters(-2, '.')",
+ "-moz-alt-content",
"-moz-alt-content 'foo'",
"'foo' -moz-alt-content",
"counter(one, two, three) 'foo'",
@@ -6841,6 +6871,130 @@ var gCSSProperties = {
"left 10px top",
],
},
+ offset: {
+ domProp: "offset",
+ inherited: false,
+ type: CSS_TYPE_TRUE_SHORTHAND,
+ subproperties: [
+ "offset-path",
+ "offset-distance",
+ "offset-rotate",
+ "offset-anchor",
+ "offset-position",
+ ],
+ initial_values: ["none"],
+ other_values: [
+ "none 30deg reverse",
+ "none 50px reverse 30deg",
+ "none calc(10px + 20%) auto",
+ "none reverse",
+ "none / left center",
+ "path('M 0 0 H 1') -200% auto",
+ "path('M 0 0 H 1') -200%",
+ "path('M 0 0 H 1') 50px",
+ "path('M 0 0 H 1') auto",
+ "path('M 0 0 H 1') reverse 30deg 50px",
+ "path('M 0 0 H 1')",
+ "path('m 20 0 h 100') -7rad 8px / auto",
+ "path('m 0 30 v 100') -7rad 8px / left top",
+ "path('m 0 0 h 100') -7rad 8px",
+ "path('M 0 0 H 100') 100px 0deg",
+ "top right / top left",
+ "top right ray(45deg closest-side)",
+ "50% 50% ray(0rad farthest-side)",
+ ],
+ invalid_values: [
+ "100px 0deg path('m 0 0 h 100')",
+ "30deg",
+ "auto 30deg 100px",
+ "auto / none",
+ "none /",
+ "none / 100px 20px 30deg",
+ "path('M 20 30 A 60 70 80') bottom",
+ "path('M 20 30 A 60 70 80') bottom top",
+ "path('M 20 30 A 60 70 80') 100px 200px",
+ "path('M 20 30 A 60 70 80') reverse auto",
+ "path('M 20 30 A 60 70 80') reverse 10px 30deg",
+ "path('M 20 30 A 60 70 80') /",
+ ],
+ },
+ "offset-anchor": {
+ domProp: "offsetAnchor",
+ inherited: false,
+ type: CSS_TYPE_LONGHAND,
+ initial_values: ["auto"],
+ other_values: [
+ "left bottom",
+ "center center",
+ "calc(20% + 10px) center",
+ "right 30em",
+ "10px 20%",
+ "left -10px top -20%",
+ "right 10% bottom 20em",
+ ],
+ invalid_values: ["none", "10deg", "left 10% top"],
+ },
+ "offset-distance": {
+ domProp: "offsetDistance",
+ inherited: false,
+ type: CSS_TYPE_LONGHAND,
+ initial_values: ["0"],
+ other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
+ invalid_values: ["none", "45deg"],
+ },
+ "offset-path": {
+ domProp: "offsetPath",
+ inherited: false,
+ type: CSS_TYPE_LONGHAND,
+ initial_values: ["none"],
+ other_values: [
+ "ray(0deg)",
+ "ray(45deg closest-side)",
+ "ray(0rad farthest-side)",
+ "ray(0.5turn closest-corner contain)",
+ "ray(200grad farthest-corner)",
+ "ray(sides 180deg)",
+ "ray(contain farthest-side 180deg)",
+ "ray(calc(180deg - 45deg) farthest-side)",
+ "ray(0deg at center center)",
+ "ray(at 10% 10% 1rad)",
+ ]
+ .concat(pathValues.other_values)
+ .concat(basicShapeOtherValues)
+ .concat(basicShapeXywhRectValues)
+ .concat(basicShapeShapeValues),
+ invalid_values: [
+ "path('')",
+ "ray(closest-side)",
+ "ray(0deg, closest-side)",
+ "ray(contain 0deg closest-side contain)",
+ ].concat(pathValues.invalid_values),
+ },
+ "offset-position": {
+ domProp: "offsetPosition",
+ inherited: false,
+ type: CSS_TYPE_LONGHAND,
+ initial_values: ["normal"],
+ other_values: [
+ "auto",
+ "left bottom",
+ "center center",
+ "calc(20% + 10px) center",
+ "right 30em",
+ "10px 20%",
+ "left -10px top -20%",
+ "right 10% bottom 20em",
+ ],
+ invalid_values: ["none", "10deg", "left 10% top"],
+ },
+ "offset-rotate": {
+ domProp: "offsetRotate",
+ inherited: false,
+ type: CSS_TYPE_LONGHAND,
+ initial_values: ["auto"],
+ other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"],
+ invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"],
+ },
opacity: {
domProp: "opacity",
inherited: false,
@@ -8827,7 +8981,9 @@ var gCSSProperties = {
.concat(basicShapeSVGBoxValues)
.concat(basicShapeOtherValues)
.concat(basicShapeOtherValuesWithFillRule)
- .concat(basicShapeXywhRectValues),
+ .concat(basicShapeXywhRectValues)
+ .concat(basicShapeShapeValues)
+ .concat(basicShapeShapeValuesWithFillRule),
invalid_values: [
"path(nonzero)",
"path(abs, 'M 10 10 L 10 10 z')",
@@ -13409,158 +13565,10 @@ gCSSProperties["scrollbar-width"] = {
invalid_values: ["1px"],
};
-gCSSProperties["offset"] = {
- domProp: "offset",
- inherited: false,
- type: CSS_TYPE_TRUE_SHORTHAND,
- subproperties: [
- "offset-path",
- "offset-distance",
- "offset-rotate",
- "offset-anchor",
- ],
- initial_values: ["none"],
- other_values: [
- "none 30deg reverse",
- "none 50px reverse 30deg",
- "none calc(10px + 20%) auto",
- "none reverse",
- "none / left center",
- "path('M 0 0 H 1') -200% auto",
- "path('M 0 0 H 1') -200%",
- "path('M 0 0 H 1') 50px",
- "path('M 0 0 H 1') auto",
- "path('M 0 0 H 1') reverse 30deg 50px",
- "path('M 0 0 H 1')",
- "path('m 20 0 h 100') -7rad 8px / auto",
- "path('m 0 30 v 100') -7rad 8px / left top",
- "path('m 0 0 h 100') -7rad 8px",
- "path('M 0 0 H 100') 100px 0deg",
- ],
- invalid_values: [
- "100px 0deg path('m 0 0 h 100')",
- "30deg",
- "auto 30deg 100px",
- "auto / none",
- "none /",
- "none / 100px 20px 30deg",
- "path('M 20 30 A 60 70 80') bottom",
- "path('M 20 30 A 60 70 80') bottom top",
- "path('M 20 30 A 60 70 80') 100px 200px",
- "path('M 20 30 A 60 70 80') reverse auto",
- "path('M 20 30 A 60 70 80') reverse 10px 30deg",
- "path('M 20 30 A 60 70 80') /",
- ],
-};
-
-gCSSProperties["offset-path"] = {
- domProp: "offsetPath",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: ["none"],
- other_values: [...pathValues.other_values],
- invalid_values: ["path('')"].concat(pathValues.invalid_values),
-};
-
-if (IsCSSPropertyPrefEnabled("layout.css.motion-path-ray.enabled")) {
- gCSSProperties["offset-path"]["other_values"].push(
- "ray(0deg)",
- "ray(45deg closest-side)",
- "ray(0rad farthest-side)",
- "ray(0.5turn closest-corner contain)",
- "ray(200grad farthest-corner)",
- "ray(sides 180deg)",
- "ray(contain farthest-side 180deg)",
- "ray(calc(180deg - 45deg) farthest-side)",
- "ray(0deg at center center)",
- "ray(at 10% 10% 1rad)"
- );
-
- gCSSProperties["offset-path"]["invalid_values"].push(
- "ray(closest-side)",
- "ray(0deg, closest-side)",
- "ray(contain 0deg closest-side contain)"
- );
-}
-
-if (IsCSSPropertyPrefEnabled("layout.css.motion-path-basic-shapes.enabled")) {
- gCSSProperties["offset-path"]["other_values"].push(
- ...basicShapeOtherValues,
- ...basicShapeXywhRectValues
- );
-}
-
if (IsCSSPropertyPrefEnabled("layout.css.motion-path-url.enabled")) {
gCSSProperties["offset-path"]["other_values"].push("url(#svgPath)");
}
-gCSSProperties["offset-distance"] = {
- domProp: "offsetDistance",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: ["0"],
- other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
- invalid_values: ["none", "45deg"],
-};
-
-gCSSProperties["offset-rotate"] = {
- domProp: "offsetRotate",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: ["auto"],
- other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"],
- invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"],
-};
-
-gCSSProperties["offset-anchor"] = {
- domProp: "offsetAnchor",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: ["auto"],
- other_values: [
- "left bottom",
- "center center",
- "calc(20% + 10px) center",
- "right 30em",
- "10px 20%",
- "left -10px top -20%",
- "right 10% bottom 20em",
- ],
- invalid_values: ["none", "10deg", "left 10% top"],
-};
-
-if (
- IsCSSPropertyPrefEnabled("layout.css.motion-path-offset-position.enabled")
-) {
- gCSSProperties["offset"]["subproperties"].push("offset-position");
- gCSSProperties["offset"]["other_values"].push("top right / top left");
-
- if (IsCSSPropertyPrefEnabled("layout.css.motion-path-ray.enabled")) {
- gCSSProperties["offset"]["other_values"].push(
- "top right ray(45deg closest-side)",
- "50% 50% ray(0rad farthest-side)"
- );
- }
-
- gCSSProperties["offset-position"] = {
- domProp: "offsetPosition",
- inherited: false,
- type: CSS_TYPE_LONGHAND,
- initial_values: ["normal"],
- other_values: [
- "auto",
- "left bottom",
- "center center",
- "calc(20% + 10px) center",
- "right 30em",
- "10px 20%",
- "left -10px top -20%",
- "right 10% bottom 20em",
- ],
- invalid_values: ["none", "10deg", "left 10% top"],
- };
-}
-
{
let linear_function_other_values = [
"linear(0, 1)",