Bug 1804980: Remove the about:config pref for subgrid, layout.css.grid-template-subgrid-value.enabled, since it's been default-enabled for years. r=TYLin,tlouw

Differential Revision: https://phabricator.services.mozilla.com/D164389
This commit is contained in:
Daniel Holbert 2022-12-12 20:54:40 +00:00
parent c5403b8345
commit 5c26733cab
12 changed files with 48 additions and 100 deletions

View File

@ -30,9 +30,6 @@ const TEST_URI = `
`;
add_task(async function() {
info("Enable subgrid in order to see the subgrid display type.");
await pushPref("layout.css.grid-template-subgrid-value.enabled", true);
const { inspector } = await openInspectorForURL(
"data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
);

View File

@ -6,8 +6,6 @@
const TEST_URL = URL_ROOT + "doc_markup_subgrid.html";
add_task(async function() {
info("Enable subgrid in order to see the subgrid display type.");
await pushPref("layout.css.grid-template-subgrid-value.enabled", true);
const { inspector } = await openInspectorForURL(TEST_URL);
const { highlighters, store } = inspector;

View File

@ -83,10 +83,6 @@ loader.lazyRequireGetter(
true
);
const SUBGRID_ENABLED = Services.prefs.getBoolPref(
"layout.css.grid-template-subgrid-value.enabled"
);
const FONT_FAMILY_PREVIEW_TEXT = "The quick brown fox jumps over the lazy dog";
const FONT_FAMILY_PREVIEW_TEXT_SIZE = 20;
@ -376,7 +372,6 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
}
if (
SUBGRID_ENABLED &&
(display === "grid" || display === "inline-grid") &&
(style.gridTemplateRows.startsWith("subgrid") ||
style.gridTemplateColumns.startsWith("subgrid"))

View File

@ -54,10 +54,6 @@ loader.lazyRequireGetter(
"resource://devtools/shared/dom-node-constants.js"
);
const SUBGRID_ENABLED = Services.prefs.getBoolPref(
"layout.css.grid-template-subgrid-value.enabled"
);
/**
* Set of actors the expose the CSS layout information to the devtools protocol clients.
*
@ -345,11 +341,9 @@ const GridActor = ActorClassWithSpec(gridSpec, {
form.containerNodeActorID = this.walker.getNode(this.containerEl).actorID;
}
if (SUBGRID_ENABLED) {
form.isSubgrid =
gridTemplateRows.startsWith("subgrid") ||
gridTemplateColumns.startsWith("subgrid");
}
form.isSubgrid =
gridTemplateRows.startsWith("subgrid") ||
gridTemplateColumns.startsWith("subgrid");
return form;
},

View File

@ -735,7 +735,7 @@ load 1542441.html
load 1543140-1.html
load 1544060-1.html
load 1544060-2.html
pref(layout.css.grid-template-subgrid-value.enabled,true) load 1553824.html
load 1553824.html
asserts(26-42) load 1554824.html # extreme sizes, column-width: 0em
load 1555142.html
load 1560349.html

View File

@ -721,10 +721,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1508420
for (let subtest of gridContainerSubtests) {
runGridContainerSubtest(subtest);
}
if (SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled")) {
for (let subtest of gridSubgridSubtests) {
runGridSubgridSubtest(subtest);
}
for (let subtest of gridSubgridSubtests) {
runGridSubgridSubtest(subtest);
}
for (let subtest of gridItemSubtests) {
runGridItemSubtest(subtest);

View File

@ -12047,10 +12047,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.font-variant-emoji.enabled")) {
};
}
var isGridTemplateSubgridValueEnabled = IsCSSPropertyPrefEnabled(
"layout.css.grid-template-subgrid-value.enabled"
);
var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
"layout.css.grid-template-masonry-value.enabled"
);
@ -12187,6 +12183,22 @@ gCSSProperties["grid-template-columns"] = {
"fit-content(1px) 1fr",
"[a] fit-content(calc(1px - 99%)) [b]",
"[a] fit-content(10%) [b c] fit-content(1em)",
// See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
"[none subgrid min-content max-content foo] 40px",
"subgrid",
"subgrid [] [foo bar]",
"subgrid repeat(1, [])",
"subgrid Repeat(4, [a] [b c] [] [d])",
"subgrid repeat(auto-fill, [])",
"subgrid repeat(Auto-fill, [a b c]) [a] []",
"subgrid [x] repeat( Auto-fill, [a b c]) []",
"subgrid [x] repeat( auto-fill , [a b] [c]) [y]",
"subgrid repeat(auto-fill, [a] [b] [c]) [d]",
"subgrid repeat(Auto-fill, [a] [b c] [] [d])",
"subgrid [x y] [x] repeat(auto-fill, [a b] [c] [d] [d]) [x] [x]",
"subgrid [x] repeat(auto-fill, []) [y z]",
"subgrid [x] repeat(auto-fill, [y]) [z] [] repeat(2, [a] [b]) [y] []",
"subgrid [x] repeat(auto-fill, []) [x y] [z] [] []",
],
invalid_values: [
"",
@ -12251,30 +12263,6 @@ gCSSProperties["grid-template-columns"] = {
"fit-content(min-content)",
"fit-content(1px) repeat(auto-fit, 1px)",
"fit-content(1px) repeat(auto-fill, 1px)",
],
unbalanced_values: ["(foo] 40px"],
};
if (isGridTemplateSubgridValueEnabled) {
gCSSProperties["grid-template-columns"].other_values.push(
// See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
"[none subgrid min-content max-content foo] 40px",
"subgrid",
"subgrid [] [foo bar]",
"subgrid repeat(1, [])",
"subgrid Repeat(4, [a] [b c] [] [d])",
"subgrid repeat(auto-fill, [])",
"subgrid repeat(Auto-fill, [a b c]) [a] []",
"subgrid [x] repeat( Auto-fill, [a b c]) []",
"subgrid [x] repeat( auto-fill , [a b] [c]) [y]",
"subgrid repeat(auto-fill, [a] [b] [c]) [d]",
"subgrid repeat(Auto-fill, [a] [b c] [] [d])",
"subgrid [x y] [x] repeat(auto-fill, [a b] [c] [d] [d]) [x] [x]",
"subgrid [x] repeat(auto-fill, []) [y z]",
"subgrid [x] repeat(auto-fill, [y]) [z] [] repeat(2, [a] [b]) [y] []",
"subgrid [x] repeat(auto-fill, []) [x y] [z] [] []"
);
gCSSProperties["grid-template-columns"].invalid_values.push(
"subgrid [inherit]",
"subgrid [initial]",
"subgrid [unset]",
@ -12308,9 +12296,10 @@ if (isGridTemplateSubgridValueEnabled) {
"subgrid [a] repeat(auto-fit,[])",
"subgrid repeat(auto-fill, 1px)",
"subgrid repeat(auto-fill, 1px [])",
"subgrid repeat(auto-fill, []) repeat(auto-fill, [])"
);
}
"subgrid repeat(auto-fill, []) repeat(auto-fill, [])",
],
unbalanced_values: ["(foo] 40px"],
};
if (isGridTemplateMasonryValueEnabled) {
gCSSProperties["grid-template-columns"].other_values.push("masonry");
gCSSProperties["grid-template-columns"].invalid_values.push(
@ -12386,6 +12375,13 @@ gCSSProperties["grid-template"] = {
"[bar] 'fizz' 100px / [foo] 40px",
"[bar] 'fizz' 100px [buzz] / [foo] 40px",
"[bar] 'fizz' 100px [buzz] \n [a] '.' 200px [b] / [foo] 40px",
"subgrid / subgrid",
"subgrid/40px 20px",
"subgrid [foo] [] [bar baz] / 40px 20px",
"40px 20px/subgrid",
"40px 20px/subgrid [foo] [] repeat(3, [a] [b]) [bar baz]",
"subgrid/subgrid",
"subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]",
],
invalid_values: [
"'fizz' / repeat(1, 100px)",
@ -12394,25 +12390,12 @@ gCSSProperties["grid-template"] = {
"[fizz] [buzz] 100px / 40px",
"[fizz] [buzz] 'foo' / 40px",
"'foo' / none",
],
};
if (isGridTemplateSubgridValueEnabled) {
gCSSProperties["grid-template"].other_values.push(
"subgrid / subgrid",
"subgrid/40px 20px",
"subgrid [foo] [] [bar baz] / 40px 20px",
"40px 20px/subgrid",
"40px 20px/subgrid [foo] [] repeat(3, [a] [b]) [bar baz]",
"subgrid/subgrid",
"subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]"
);
gCSSProperties["grid-template"].invalid_values.push(
"subgrid",
"subgrid []",
"subgrid [] / 'fizz'",
"subgrid / 'fizz'"
);
}
"subgrid / 'fizz'",
],
};
if (isGridTemplateMasonryValueEnabled) {
gCSSProperties["grid-template"].other_values.push(
"masonry / subgrid",

View File

@ -12,9 +12,6 @@
<script>
var isGridTemplateSubgridValueEnabled =
SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled");
var initial_values = {
gridTemplateAreas: "none",
gridTemplateRows: "none",
@ -147,33 +144,31 @@ var grid_template_test_cases = [
},
{
specified: "subgrid / subgrid",
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
gridTemplateColumns: "subgrid",
gridTemplateRows: "subgrid",
},
{
specified: "subgrid [foo] / subgrid",
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid [foo]" : "none",
gridTemplateColumns: "subgrid",
gridTemplateRows: "subgrid [foo]",
},
{
specified: "subgrid [foo] repeat(3, [] [a b] [c]) / subgrid",
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
gridTemplateRows: isGridTemplateSubgridValueEnabled ?
"subgrid [foo] [] [a b] [c] [] [a b] [c] [] [a b] [c]" : "none",
gridTemplateColumns: "subgrid",
gridTemplateRows: "subgrid [foo] [] [a b] [c] [] [a b] [c] [] [a b] [c]",
},
{
// Test that the number of lines is clamped to kMaxLine = 10000.
specified: "subgrid [foo] repeat(999999999, [a]) / subgrid",
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
gridTemplateColumns: "subgrid",
// Array(n).join(s) is a hack for the non-standard s.repeat(n - 1) .
// [foo] + 9999 [a] gives us 10000 lines.
gridTemplateRows: isGridTemplateSubgridValueEnabled ?
"subgrid [foo]" + Array(10000).join(" [a]") : "none",
gridTemplateRows: "subgrid [foo]" + Array(10000).join(" [a]"),
},
{
specified: "subgrid [bar]/ subgrid [] [foo",
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid [] [foo]" : "none",
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid [bar]" : "none",
gridTemplateColumns: "subgrid [] [foo]",
gridTemplateRows: "subgrid [bar]",
},
{
specified: "'fizz' repeat(1, 100px)",

View File

@ -12,9 +12,6 @@
<script>
var isGridTemplateSubgridValueEnabled =
SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled");
var initial_values = {
gridTemplateAreas: "none",
gridTemplateRows: "none",
@ -48,7 +45,7 @@ var grid_template_test_cases = [
{
gridTemplateRows: "40px",
gridTemplateColumns: "subgrid",
shorthand: isGridTemplateSubgridValueEnabled ? "40px / subgrid" : "",
shorthand: "40px / subgrid",
},
{
gridTemplateRows: "[foo] 40px [bar]",

View File

@ -8396,13 +8396,6 @@
value: @IS_NOT_RELEASE_OR_BETA@
mirror: always
# Is support for CSS "grid-template-{columns,rows}: subgrid X" enabled?
- name: layout.css.grid-template-subgrid-value.enabled
type: RelaxedAtomicBool
value: true
mirror: always
rust: true
# Is support for caching an grid item's block axis measurement enabled?
- name: layout.css.grid-item-baxis-measurement.enabled
type: bool

View File

@ -290,7 +290,7 @@ impl Parse for TrackList<LengthPercentage, Integer> {
#[cfg(feature = "gecko")]
#[inline]
fn allow_grid_template_subgrids() -> bool {
static_prefs::pref!("layout.css.grid-template-subgrid-value.enabled")
true
}
#[cfg(feature = "servo")]

View File

@ -12,8 +12,6 @@
/* globals user_pref */
// Enable w3c touch events for testing
user_pref("dom.w3c_touch_events.enabled", 1);
// Enable CSS Grid 'subgrid' feature for testing
user_pref("layout.css.grid-template-subgrid-value.enabled", true);
// Enable CSS initial-letter for testing
user_pref("layout.css.initial-letter.enabled", true);
// Enable Media Source Extensions for testing