diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 8f4fcaec5c9..bf7bc9aceec 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -3177,7 +3177,6 @@ fn static_assert() { use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT; - use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS; @@ -3201,9 +3200,6 @@ fn static_assert() { if v.contains(SpecifiedValue::LAYOUT) { bitfield |= NS_STYLE_CONTAIN_LAYOUT; } - if v.contains(SpecifiedValue::STYLE) { - bitfield |= NS_STYLE_CONTAIN_STYLE; - } if v.contains(SpecifiedValue::PAINT) { bitfield |= NS_STYLE_CONTAIN_PAINT; } @@ -3219,7 +3215,6 @@ fn static_assert() { use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT; - use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS; use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS; @@ -3249,9 +3244,6 @@ fn static_assert() { if gecko_flags & (NS_STYLE_CONTAIN_LAYOUT as u8) != 0 { servo_flags.insert(SpecifiedValue::LAYOUT); } - if gecko_flags & (NS_STYLE_CONTAIN_STYLE as u8) != 0 { - servo_flags.insert(SpecifiedValue::STYLE); - } if gecko_flags & (NS_STYLE_CONTAIN_PAINT as u8) != 0 { servo_flags.insert(SpecifiedValue::PAINT); } diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index 2495cca3d6c..d4b66e42ab9 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -752,25 +752,23 @@ pub fn assert_touch_action_matches() { bitflags! { #[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue)] - #[value_info(other_values = "none,strict,content,size,layout,style,paint")] + #[value_info(other_values = "none,strict,content,size,layout,paint")] /// Constants for contain: https://drafts.csswg.org/css-contain/#contain-property pub struct Contain: u8 { /// 'size' variant, turns on size containment const SIZE = 0x01; /// `layout` variant, turns on layout containment const LAYOUT = 0x02; - /// `style` variant, turns on style containment - const STYLE = 0x04; /// `paint` variant, turns on paint containment - const PAINT = 0x08; + const PAINT = 0x04; /// `strict` variant, turns on all types of containment - const STRICT = 0x10; - /// 'content' variant, turns on style, layout, and paint containment - const CONTENT = 0x20; + const STRICT = 0x08; + /// 'content' variant, turns on layout and paint containment + const CONTENT = 0x10; /// variant with all the bits that contain: strict turns on - const STRICT_BITS = Contain::LAYOUT.bits | Contain::STYLE.bits | Contain::PAINT.bits | Contain::SIZE.bits; + const STRICT_BITS = Contain::LAYOUT.bits | Contain::PAINT.bits | Contain::SIZE.bits; /// variant with all the bits that contain: content turns on - const CONTENT_BITS = Contain::STYLE.bits | Contain::LAYOUT.bits | Contain::PAINT.bits; + const CONTENT_BITS = Contain::LAYOUT.bits | Contain::PAINT.bits; } } @@ -803,7 +801,6 @@ impl ToCss for Contain { } maybe_write_value!(Contain::SIZE => "size"); maybe_write_value!(Contain::LAYOUT => "layout"); - maybe_write_value!(Contain::STYLE => "style"); maybe_write_value!(Contain::PAINT => "paint"); debug_assert!(has_any); @@ -812,7 +809,7 @@ impl ToCss for Contain { } impl Parse for Contain { - /// none | strict | content | [ size || layout || style || paint ] + /// none | strict | content | [ size || layout || paint ] fn parse<'i, 't>( _context: &ParserContext, input: &mut Parser<'i, 't>, @@ -822,7 +819,6 @@ impl Parse for Contain { let flag = match_ignore_ascii_case! { &name, "size" => Some(Contain::SIZE), "layout" => Some(Contain::LAYOUT), - "style" => Some(Contain::STYLE), "paint" => Some(Contain::PAINT), "strict" if result.is_empty() => return Ok(Contain::STRICT | Contain::STRICT_BITS), "content" if result.is_empty() => return Ok(Contain::CONTENT | Contain::CONTENT_BITS),