From c511b9c3f991d157cef6a2016f7574cd7368a121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 16 Dec 2022 11:23:16 +0000 Subject: [PATCH] style: Unconditionally enable container properties in UA sheets If the UA sheet gets parsed with the pref off, and then the pref gets flipped on, we don't re-parse the UA sheet (nor we want to). Enable the property in UA sheets unconditionally so that the test passes even when the browser was started-up with the container queries pref off. Differential Revision: https://phabricator.services.mozilla.com/D164823 --- components/style/properties/longhands/box.mako.rs | 2 ++ components/style/properties/shorthands/box.mako.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 14fd3402265..7010aab5a4f 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -450,6 +450,7 @@ ${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", @@ -461,6 +462,7 @@ ${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", diff --git a/components/style/properties/shorthands/box.mako.rs b/components/style/properties/shorthands/box.mako.rs index cd67dfcb75e..259febc7507 100644 --- a/components/style/properties/shorthands/box.mako.rs +++ b/components/style/properties/shorthands/box.mako.rs @@ -37,7 +37,8 @@ ${helpers.two_properties_shorthand( engines="gecko" name="container" sub_properties="container-name container-type" - gecko_pref="layout.css.container-queries.enabled", + 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};