mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1861958 - Remove layout.css.container-queries.enabled pref r=emilio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192207
This commit is contained in:
parent
e2b92de4e3
commit
262f539b78
@ -25,7 +25,6 @@ const TEST_URI = `
|
||||
`;
|
||||
|
||||
add_task(async function () {
|
||||
await pushPref("layout.css.container-queries.enabled", true);
|
||||
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
|
||||
const { inspector } = await openLayoutView();
|
||||
|
||||
|
@ -52,8 +52,6 @@ const TEST_URI = `
|
||||
`;
|
||||
|
||||
add_task(async function () {
|
||||
await pushPref("layout.css.container-queries.enabled", true);
|
||||
|
||||
await addTab(
|
||||
"https://example.com/document-builder.sjs?html=" +
|
||||
encodeURIComponent(TEST_URI)
|
||||
|
@ -28,8 +28,6 @@ const TEST_URI = `
|
||||
`;
|
||||
|
||||
add_task(async function () {
|
||||
await pushPref("layout.css.container-queries.enabled", true);
|
||||
|
||||
await addTab(
|
||||
"https://example.com/document-builder.sjs?html=" +
|
||||
encodeURIComponent(TEST_URI)
|
||||
|
@ -38,7 +38,6 @@ const NEW_RULE = `
|
||||
waitForExplicitFinish();
|
||||
|
||||
add_task(async function () {
|
||||
await pushPref("layout.css.container-queries.enabled", true);
|
||||
// Enable @property rules
|
||||
await pushPref("layout.css.properties-and-values.enabled", true);
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
|
||||
[Exposed=Window, Pref="layout.css.container-queries.enabled"]
|
||||
[Exposed=Window]
|
||||
interface CSSContainerRule : CSSConditionRule {
|
||||
readonly attribute UTF8String containerName;
|
||||
readonly attribute UTF8String containerQuery;
|
||||
|
@ -4,7 +4,6 @@ prefs = [
|
||||
"dom.animations-api.timelines.enabled=true",
|
||||
"gfx.omta.background-color=true",
|
||||
"gfx.font_loader.delay=0",
|
||||
"layout.css.container-queries.enabled=true",
|
||||
"layout.css.individual-transform.enabled=true",
|
||||
"layout.css.motion-path-url.enabled=true",
|
||||
"layout.css.backdrop-filter.enabled=true",
|
||||
|
@ -2953,6 +2953,43 @@ var gCSSProperties = {
|
||||
],
|
||||
invalid_values: ["20", "-1px", "50%"],
|
||||
},
|
||||
"container-type": {
|
||||
domProp: "containerType",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["normal"],
|
||||
other_values: ["inline-size", "size"],
|
||||
invalid_values: [
|
||||
"none style",
|
||||
"none inline-size",
|
||||
"inline-size none",
|
||||
"style none",
|
||||
"style style",
|
||||
"inline-size style inline-size",
|
||||
"inline-size block-size",
|
||||
"block-size",
|
||||
"block-size style",
|
||||
"size inline-size",
|
||||
"size block-size",
|
||||
],
|
||||
},
|
||||
"container-name": {
|
||||
domProp: "containerName",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["none"],
|
||||
other_values: ["foo bar", "foo", "baz bazz", "foo foo"],
|
||||
invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"],
|
||||
},
|
||||
container: {
|
||||
domProp: "container",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_TRUE_SHORTHAND,
|
||||
subproperties: ["container-type", "container-name"],
|
||||
initial_values: ["none"],
|
||||
other_values: ["foo / size", "foo bar / size", "foo / inline-size", "foo"],
|
||||
invalid_values: ["size / foo", "size / foo bar"],
|
||||
},
|
||||
d: {
|
||||
domProp: "d",
|
||||
inherited: false,
|
||||
@ -13260,46 +13297,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
|
||||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.container-queries.enabled")) {
|
||||
gCSSProperties["container-type"] = {
|
||||
domProp: "containerType",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["normal"],
|
||||
other_values: ["inline-size", "size"],
|
||||
invalid_values: [
|
||||
"none style",
|
||||
"none inline-size",
|
||||
"inline-size none",
|
||||
"style none",
|
||||
"style style",
|
||||
"inline-size style inline-size",
|
||||
"inline-size block-size",
|
||||
"block-size",
|
||||
"block-size style",
|
||||
"size inline-size",
|
||||
"size block-size",
|
||||
],
|
||||
};
|
||||
gCSSProperties["container-name"] = {
|
||||
domProp: "containerName",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["none"],
|
||||
other_values: ["foo bar", "foo", "baz bazz", "foo foo"],
|
||||
invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"],
|
||||
};
|
||||
gCSSProperties["container"] = {
|
||||
domProp: "container",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_TRUE_SHORTHAND,
|
||||
subproperties: ["container-type", "container-name"],
|
||||
initial_values: ["none"],
|
||||
other_values: ["foo / size", "foo bar / size", "foo / inline-size", "foo"],
|
||||
invalid_values: ["size / foo", "size / foo bar"],
|
||||
};
|
||||
}
|
||||
|
||||
if (false) {
|
||||
// TODO These properties are chrome-only, and are not exposed via CSSOM.
|
||||
// We may still want to find a way to test them. See bug 1206999.
|
||||
|
@ -8445,13 +8445,6 @@
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether Container Queries are enabled
|
||||
- name: layout.css.container-queries.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether content-box and stroke-box are enabled for transform-box.
|
||||
- name: layout.css.transform-box-content-stroke.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
@ -500,8 +500,6 @@ ${helpers.predefined_type(
|
||||
"computed::ContainerType::Normal",
|
||||
engines="gecko servo",
|
||||
animation_value_type="none",
|
||||
enabled_in="ua",
|
||||
gecko_pref="layout.css.container-queries.enabled",
|
||||
servo_pref="layout.container-queries.enabled",
|
||||
spec="https://drafts.csswg.org/css-contain-3/#container-type",
|
||||
affects="layout",
|
||||
@ -513,8 +511,6 @@ ${helpers.predefined_type(
|
||||
"computed::ContainerName::none()",
|
||||
engines="gecko servo",
|
||||
animation_value_type="none",
|
||||
enabled_in="ua",
|
||||
gecko_pref="layout.css.container-queries.enabled",
|
||||
servo_pref="layout.container-queries.enabled",
|
||||
spec="https://drafts.csswg.org/css-contain-3/#container-name",
|
||||
affects="",
|
||||
|
@ -37,8 +37,6 @@ ${helpers.two_properties_shorthand(
|
||||
engines="gecko"
|
||||
name="container"
|
||||
sub_properties="container-name container-type"
|
||||
gecko_pref="layout.css.container-queries.enabled"
|
||||
enabled_in="ua"
|
||||
spec="https://drafts.csswg.org/css-contain-3/#container-shorthand"
|
||||
>
|
||||
use crate::values::specified::box_::{ContainerName, ContainerType};
|
||||
|
@ -667,7 +667,7 @@ impl<'a, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'i> {
|
||||
"font-face" => {
|
||||
AtRulePrelude::FontFace
|
||||
},
|
||||
"container" if static_prefs::pref!("layout.css.container-queries.enabled") => {
|
||||
"container" => {
|
||||
let condition = Arc::new(ContainerCondition::parse(&self.context, input)?);
|
||||
AtRulePrelude::Container(condition)
|
||||
},
|
||||
|
@ -946,15 +946,6 @@ impl ContainerRelativeLength {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn are_container_queries_enabled() -> bool {
|
||||
static_prefs::pref!("layout.css.container-queries.enabled")
|
||||
}
|
||||
#[cfg(feature = "servo")]
|
||||
fn are_container_queries_enabled() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// A `<length>` without taking `calc` expressions into account
|
||||
///
|
||||
/// <https://drafts.csswg.org/css-values/#lengths>
|
||||
@ -1138,22 +1129,22 @@ impl NoCalcLength {
|
||||
},
|
||||
// Container query lengths. Inherit the limitation from viewport units since
|
||||
// we may fall back to them.
|
||||
"cqw" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqw" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqw(value))
|
||||
},
|
||||
"cqh" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqh" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqh(value))
|
||||
},
|
||||
"cqi" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqi" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqi(value))
|
||||
},
|
||||
"cqb" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqb" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqb(value))
|
||||
},
|
||||
"cqmin" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqmin" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqmin(value))
|
||||
},
|
||||
"cqmax" if !context.in_page_rule() && are_container_queries_enabled() => {
|
||||
"cqmax" if !context.in_page_rule() && cfg!(feature = "gecko") => {
|
||||
Self::ContainerRelative(ContainerRelativeLength::Cqmax(value))
|
||||
},
|
||||
_ => return Err(()),
|
||||
|
@ -1,2 +1,2 @@
|
||||
prefs: [layout.css.container-queries.enabled:true, layout.css.import-supports.enabled:true, dom.customHighlightAPI.enabled:true]
|
||||
prefs: [layout.css.import-supports.enabled:true, dom.customHighlightAPI.enabled:true]
|
||||
leak-threshold: [default:51200]
|
||||
|
Loading…
Reference in New Issue
Block a user