diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 39532ecc6fc..8578df21bc2 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -448,7 +448,7 @@ ${helpers.predefined_type( ${helpers.predefined_type( "container-type", "ContainerType", - "computed::ContainerType::NONE", + "computed::ContainerType::NORMAL", engines="gecko servo", animation_value_type="none", gecko_pref="layout.css.container-queries.enabled", diff --git a/components/style/properties/shorthands/box.mako.rs b/components/style/properties/shorthands/box.mako.rs index a05f7fd461c..7a2d9088a17 100644 --- a/components/style/properties/shorthands/box.mako.rs +++ b/components/style/properties/shorthands/box.mako.rs @@ -52,7 +52,7 @@ ${helpers.two_properties_shorthand( let container_type = if input.try_parse(|input| input.expect_delim('/')).is_ok() { ContainerType::parse(context, input)? } else { - ContainerType::NONE + ContainerType::NORMAL }; Ok(expanded! { container_name: container_name, diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index 45ea83efaa1..e532855c1d6 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -1496,21 +1496,19 @@ bitflags! { #[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue, ToCss, Parse, ToResolvedValue, ToShmem)] #[repr(C)] #[allow(missing_docs)] - #[css(bitflags(single="none", mixed="style,size,inline-size", overlapping_bits))] + #[css(bitflags(single="normal", mixed="size,inline-size", overlapping_bits))] /// https://drafts.csswg.org/css-contain-3/#container-type /// /// TODO: block-size is on the spec but it seems it was removed? WPTs don't /// support it, see https://github.com/w3c/csswg-drafts/issues/7179. pub struct ContainerType: u8 { /// The `none` variant. - const NONE = 0; - /// The `style` variant. - const STYLE = 1 << 0; + const NORMAL = 0; /// The `inline-size` variant. - const INLINE_SIZE = 1 << 1; + const INLINE_SIZE = 1 << 0; /// The `size` variant, exclusive with `inline-size` (they sharing bits /// guarantees this). - const SIZE = 1 << 2 | Self::INLINE_SIZE.bits; + const SIZE = 1 << 1 | Self::INLINE_SIZE.bits; } } @@ -1539,7 +1537,7 @@ impl Parse for ContainerName { if first.eq_ignore_ascii_case("none") { return Ok(Self::none()) } - const DISALLOWED_CONTAINER_NAMES: &'static [&'static str] = &["none", "not", "or", "and"]; + const DISALLOWED_CONTAINER_NAMES: &'static [&'static str] = &["none", "not", "or", "and", "auto", "normal"]; idents.push(CustomIdent::from_ident(location, first, DISALLOWED_CONTAINER_NAMES)?); while let Ok(ident) = input.try_parse(|input| input.expect_ident_cloned()) { idents.push(CustomIdent::from_ident(location, &ident, DISALLOWED_CONTAINER_NAMES)?);