From 0748fd9582a6a8776a48b9acbfb81b411fe58b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 29 Mar 2023 21:23:55 +0000 Subject: [PATCH] style: Remove a bunch of now completely dead XUL layout code And some related tests. A bunch of -moz-box* properties are web exposed, so I'll file a follow-up for hiding them. Differential Revision: https://phabricator.services.mozilla.com/D173819 --- .../longhands/inherited_box.mako.rs | 10 -------- components/style/values/specified/box.rs | 25 ------------------- 2 files changed, 35 deletions(-) diff --git a/components/style/properties/longhands/inherited_box.mako.rs b/components/style/properties/longhands/inherited_box.mako.rs index 3eec62adfeb..947c66e9eed 100644 --- a/components/style/properties/longhands/inherited_box.mako.rs +++ b/components/style/properties/longhands/inherited_box.mako.rs @@ -55,16 +55,6 @@ ${helpers.single_keyword( spec="None (internal)", )} -${helpers.single_keyword( - "-moz-box-layout", - "flex legacy", - engines="gecko", - gecko_enum_prefix="StyleMozBoxLayout", - animation_value_type="none", - enabled_in="chrome", - spec="None (internal)", -)} - ${helpers.single_keyword( "text-orientation", "mixed upright sideways", diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index 70a99a66f6c..ea3e8d5b015 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -22,11 +22,6 @@ use std::fmt::{self, Debug, Formatter, Write}; use style_traits::{CssWriter, KeywordsCollectFn, ParseError}; use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss}; -#[cfg(feature = "gecko")] -fn moz_display_values_enabled(context: &ParserContext) -> bool { - context.in_ua_or_chrome_sheet() -} - #[cfg(not(feature = "servo"))] fn flexbox_enabled() -> bool { true @@ -54,8 +49,6 @@ pub enum DisplayOutside { InternalTable, #[cfg(feature = "gecko")] InternalRuby, - #[cfg(feature = "gecko")] - XUL, } #[allow(missing_docs)] @@ -89,8 +82,6 @@ pub enum DisplayInside { RubyTextContainer, #[cfg(feature = "gecko")] WebkitBox, - #[cfg(feature = "gecko")] - MozBox, } #[allow(missing_docs)] @@ -185,12 +176,6 @@ impl Display { DisplayInside::RubyTextContainer, ); - /// XUL boxes. - #[cfg(feature = "gecko")] - pub const MozBox: Self = Self::new(DisplayOutside::Block, DisplayInside::MozBox); - #[cfg(feature = "gecko")] - pub const MozInlineBox: Self = Self::new(DisplayOutside::Inline, DisplayInside::MozBox); - /// Make a raw display value from and values. #[inline] const fn new(outside: DisplayOutside, inside: DisplayInside) -> Self { @@ -294,8 +279,6 @@ impl Display { DisplayInside::Flex => true, #[cfg(feature = "gecko")] DisplayInside::Grid => true, - #[cfg(feature = "gecko")] - DisplayInside::MozBox => true, _ => false, } } @@ -334,8 +317,6 @@ impl Display { Display::from3(DisplayOutside::Block, inside, self.is_list_item()) }, DisplayOutside::Block | DisplayOutside::None => *self, - #[cfg(feature = "gecko")] - DisplayOutside::XUL => *self, _ => Display::Block, } } @@ -386,8 +367,6 @@ impl ToCss for Display { Display::InlineBlock => dest.write_str("inline-block"), #[cfg(feature = "gecko")] Display::WebkitInlineBox => dest.write_str("-webkit-inline-box"), - #[cfg(feature = "gecko")] - Display::MozInlineBox => dest.write_str("-moz-inline-box"), Display::TableCaption => dest.write_str("table-caption"), _ => match (outside, inside) { #[cfg(feature = "gecko")] @@ -548,10 +527,6 @@ impl Parse for Display { "-webkit-box" => Display::WebkitBox, #[cfg(feature = "gecko")] "-webkit-inline-box" => Display::WebkitInlineBox, - #[cfg(feature = "gecko")] - "-moz-box" if moz_display_values_enabled(context) => Display::MozBox, - #[cfg(feature = "gecko")] - "-moz-inline-box" if moz_display_values_enabled(context) => Display::MozInlineBox, }) } }