mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
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:
parent
c5403b8345
commit
5c26733cab
@ -30,9 +30,6 @@ const TEST_URI = `
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
add_task(async function() {
|
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(
|
const { inspector } = await openInspectorForURL(
|
||||||
"data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
|
"data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
|
||||||
);
|
);
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
const TEST_URL = URL_ROOT + "doc_markup_subgrid.html";
|
const TEST_URL = URL_ROOT + "doc_markup_subgrid.html";
|
||||||
|
|
||||||
add_task(async function() {
|
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 { inspector } = await openInspectorForURL(TEST_URL);
|
||||||
const { highlighters, store } = inspector;
|
const { highlighters, store } = inspector;
|
||||||
|
|
||||||
|
@ -83,10 +83,6 @@ loader.lazyRequireGetter(
|
|||||||
true
|
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 = "The quick brown fox jumps over the lazy dog";
|
||||||
const FONT_FAMILY_PREVIEW_TEXT_SIZE = 20;
|
const FONT_FAMILY_PREVIEW_TEXT_SIZE = 20;
|
||||||
|
|
||||||
@ -376,7 +372,6 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
SUBGRID_ENABLED &&
|
|
||||||
(display === "grid" || display === "inline-grid") &&
|
(display === "grid" || display === "inline-grid") &&
|
||||||
(style.gridTemplateRows.startsWith("subgrid") ||
|
(style.gridTemplateRows.startsWith("subgrid") ||
|
||||||
style.gridTemplateColumns.startsWith("subgrid"))
|
style.gridTemplateColumns.startsWith("subgrid"))
|
||||||
|
@ -54,10 +54,6 @@ loader.lazyRequireGetter(
|
|||||||
"resource://devtools/shared/dom-node-constants.js"
|
"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.
|
* 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;
|
form.containerNodeActorID = this.walker.getNode(this.containerEl).actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SUBGRID_ENABLED) {
|
form.isSubgrid =
|
||||||
form.isSubgrid =
|
gridTemplateRows.startsWith("subgrid") ||
|
||||||
gridTemplateRows.startsWith("subgrid") ||
|
gridTemplateColumns.startsWith("subgrid");
|
||||||
gridTemplateColumns.startsWith("subgrid");
|
|
||||||
}
|
|
||||||
|
|
||||||
return form;
|
return form;
|
||||||
},
|
},
|
||||||
|
@ -735,7 +735,7 @@ load 1542441.html
|
|||||||
load 1543140-1.html
|
load 1543140-1.html
|
||||||
load 1544060-1.html
|
load 1544060-1.html
|
||||||
load 1544060-2.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
|
asserts(26-42) load 1554824.html # extreme sizes, column-width: 0em
|
||||||
load 1555142.html
|
load 1555142.html
|
||||||
load 1560349.html
|
load 1560349.html
|
||||||
|
@ -721,10 +721,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1508420
|
|||||||
for (let subtest of gridContainerSubtests) {
|
for (let subtest of gridContainerSubtests) {
|
||||||
runGridContainerSubtest(subtest);
|
runGridContainerSubtest(subtest);
|
||||||
}
|
}
|
||||||
if (SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled")) {
|
for (let subtest of gridSubgridSubtests) {
|
||||||
for (let subtest of gridSubgridSubtests) {
|
runGridSubgridSubtest(subtest);
|
||||||
runGridSubgridSubtest(subtest);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (let subtest of gridItemSubtests) {
|
for (let subtest of gridItemSubtests) {
|
||||||
runGridItemSubtest(subtest);
|
runGridItemSubtest(subtest);
|
||||||
|
@ -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(
|
var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
|
||||||
"layout.css.grid-template-masonry-value.enabled"
|
"layout.css.grid-template-masonry-value.enabled"
|
||||||
);
|
);
|
||||||
@ -12187,6 +12183,22 @@ gCSSProperties["grid-template-columns"] = {
|
|||||||
"fit-content(1px) 1fr",
|
"fit-content(1px) 1fr",
|
||||||
"[a] fit-content(calc(1px - 99%)) [b]",
|
"[a] fit-content(calc(1px - 99%)) [b]",
|
||||||
"[a] fit-content(10%) [b c] fit-content(1em)",
|
"[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: [
|
invalid_values: [
|
||||||
"",
|
"",
|
||||||
@ -12251,30 +12263,6 @@ gCSSProperties["grid-template-columns"] = {
|
|||||||
"fit-content(min-content)",
|
"fit-content(min-content)",
|
||||||
"fit-content(1px) repeat(auto-fit, 1px)",
|
"fit-content(1px) repeat(auto-fit, 1px)",
|
||||||
"fit-content(1px) repeat(auto-fill, 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 [inherit]",
|
||||||
"subgrid [initial]",
|
"subgrid [initial]",
|
||||||
"subgrid [unset]",
|
"subgrid [unset]",
|
||||||
@ -12308,9 +12296,10 @@ if (isGridTemplateSubgridValueEnabled) {
|
|||||||
"subgrid [a] repeat(auto-fit,[])",
|
"subgrid [a] repeat(auto-fit,[])",
|
||||||
"subgrid repeat(auto-fill, 1px)",
|
"subgrid repeat(auto-fill, 1px)",
|
||||||
"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) {
|
if (isGridTemplateMasonryValueEnabled) {
|
||||||
gCSSProperties["grid-template-columns"].other_values.push("masonry");
|
gCSSProperties["grid-template-columns"].other_values.push("masonry");
|
||||||
gCSSProperties["grid-template-columns"].invalid_values.push(
|
gCSSProperties["grid-template-columns"].invalid_values.push(
|
||||||
@ -12386,6 +12375,13 @@ gCSSProperties["grid-template"] = {
|
|||||||
"[bar] 'fizz' 100px / [foo] 40px",
|
"[bar] 'fizz' 100px / [foo] 40px",
|
||||||
"[bar] 'fizz' 100px [buzz] / [foo] 40px",
|
"[bar] 'fizz' 100px [buzz] / [foo] 40px",
|
||||||
"[bar] 'fizz' 100px [buzz] \n [a] '.' 200px [b] / [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: [
|
invalid_values: [
|
||||||
"'fizz' / repeat(1, 100px)",
|
"'fizz' / repeat(1, 100px)",
|
||||||
@ -12394,25 +12390,12 @@ gCSSProperties["grid-template"] = {
|
|||||||
"[fizz] [buzz] 100px / 40px",
|
"[fizz] [buzz] 100px / 40px",
|
||||||
"[fizz] [buzz] 'foo' / 40px",
|
"[fizz] [buzz] 'foo' / 40px",
|
||||||
"'foo' / none",
|
"'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 []",
|
"subgrid []",
|
||||||
"subgrid [] / 'fizz'",
|
"subgrid [] / 'fizz'",
|
||||||
"subgrid / 'fizz'"
|
"subgrid / 'fizz'",
|
||||||
);
|
],
|
||||||
}
|
};
|
||||||
if (isGridTemplateMasonryValueEnabled) {
|
if (isGridTemplateMasonryValueEnabled) {
|
||||||
gCSSProperties["grid-template"].other_values.push(
|
gCSSProperties["grid-template"].other_values.push(
|
||||||
"masonry / subgrid",
|
"masonry / subgrid",
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var isGridTemplateSubgridValueEnabled =
|
|
||||||
SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled");
|
|
||||||
|
|
||||||
var initial_values = {
|
var initial_values = {
|
||||||
gridTemplateAreas: "none",
|
gridTemplateAreas: "none",
|
||||||
gridTemplateRows: "none",
|
gridTemplateRows: "none",
|
||||||
@ -147,33 +144,31 @@ var grid_template_test_cases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
specified: "subgrid / subgrid",
|
specified: "subgrid / subgrid",
|
||||||
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
|
gridTemplateColumns: "subgrid",
|
||||||
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
|
gridTemplateRows: "subgrid",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
specified: "subgrid [foo] / subgrid",
|
specified: "subgrid [foo] / subgrid",
|
||||||
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
|
gridTemplateColumns: "subgrid",
|
||||||
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid [foo]" : "none",
|
gridTemplateRows: "subgrid [foo]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
specified: "subgrid [foo] repeat(3, [] [a b] [c]) / subgrid",
|
specified: "subgrid [foo] repeat(3, [] [a b] [c]) / subgrid",
|
||||||
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid" : "none",
|
gridTemplateColumns: "subgrid",
|
||||||
gridTemplateRows: isGridTemplateSubgridValueEnabled ?
|
gridTemplateRows: "subgrid [foo] [] [a b] [c] [] [a b] [c] [] [a b] [c]",
|
||||||
"subgrid [foo] [] [a b] [c] [] [a b] [c] [] [a b] [c]" : "none",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Test that the number of lines is clamped to kMaxLine = 10000.
|
// Test that the number of lines is clamped to kMaxLine = 10000.
|
||||||
specified: "subgrid [foo] repeat(999999999, [a]) / subgrid",
|
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) .
|
// Array(n).join(s) is a hack for the non-standard s.repeat(n - 1) .
|
||||||
// [foo] + 9999 [a] gives us 10000 lines.
|
// [foo] + 9999 [a] gives us 10000 lines.
|
||||||
gridTemplateRows: isGridTemplateSubgridValueEnabled ?
|
gridTemplateRows: "subgrid [foo]" + Array(10000).join(" [a]"),
|
||||||
"subgrid [foo]" + Array(10000).join(" [a]") : "none",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
specified: "subgrid [bar]/ subgrid [] [foo",
|
specified: "subgrid [bar]/ subgrid [] [foo",
|
||||||
gridTemplateColumns: isGridTemplateSubgridValueEnabled ? "subgrid [] [foo]" : "none",
|
gridTemplateColumns: "subgrid [] [foo]",
|
||||||
gridTemplateRows: isGridTemplateSubgridValueEnabled ? "subgrid [bar]" : "none",
|
gridTemplateRows: "subgrid [bar]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
specified: "'fizz' repeat(1, 100px)",
|
specified: "'fizz' repeat(1, 100px)",
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var isGridTemplateSubgridValueEnabled =
|
|
||||||
SpecialPowers.getBoolPref("layout.css.grid-template-subgrid-value.enabled");
|
|
||||||
|
|
||||||
var initial_values = {
|
var initial_values = {
|
||||||
gridTemplateAreas: "none",
|
gridTemplateAreas: "none",
|
||||||
gridTemplateRows: "none",
|
gridTemplateRows: "none",
|
||||||
@ -48,7 +45,7 @@ var grid_template_test_cases = [
|
|||||||
{
|
{
|
||||||
gridTemplateRows: "40px",
|
gridTemplateRows: "40px",
|
||||||
gridTemplateColumns: "subgrid",
|
gridTemplateColumns: "subgrid",
|
||||||
shorthand: isGridTemplateSubgridValueEnabled ? "40px / subgrid" : "",
|
shorthand: "40px / subgrid",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
gridTemplateRows: "[foo] 40px [bar]",
|
gridTemplateRows: "[foo] 40px [bar]",
|
||||||
|
@ -8396,13 +8396,6 @@
|
|||||||
value: @IS_NOT_RELEASE_OR_BETA@
|
value: @IS_NOT_RELEASE_OR_BETA@
|
||||||
mirror: always
|
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?
|
# Is support for caching an grid item's block axis measurement enabled?
|
||||||
- name: layout.css.grid-item-baxis-measurement.enabled
|
- name: layout.css.grid-item-baxis-measurement.enabled
|
||||||
type: bool
|
type: bool
|
||||||
|
@ -290,7 +290,7 @@ impl Parse for TrackList<LengthPercentage, Integer> {
|
|||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn allow_grid_template_subgrids() -> bool {
|
fn allow_grid_template_subgrids() -> bool {
|
||||||
static_prefs::pref!("layout.css.grid-template-subgrid-value.enabled")
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
/* globals user_pref */
|
/* globals user_pref */
|
||||||
// Enable w3c touch events for testing
|
// Enable w3c touch events for testing
|
||||||
user_pref("dom.w3c_touch_events.enabled", 1);
|
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
|
// Enable CSS initial-letter for testing
|
||||||
user_pref("layout.css.initial-letter.enabled", true);
|
user_pref("layout.css.initial-letter.enabled", true);
|
||||||
// Enable Media Source Extensions for testing
|
// Enable Media Source Extensions for testing
|
||||||
|
Loading…
Reference in New Issue
Block a user