mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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
This commit is contained in:
parent
46a569ef45
commit
0748fd9582
2 changed files with 0 additions and 35 deletions
|
@ -55,16 +55,6 @@ ${helpers.single_keyword(
|
||||||
spec="None (internal)",
|
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(
|
${helpers.single_keyword(
|
||||||
"text-orientation",
|
"text-orientation",
|
||||||
"mixed upright sideways",
|
"mixed upright sideways",
|
||||||
|
|
|
@ -22,11 +22,6 @@ use std::fmt::{self, Debug, Formatter, Write};
|
||||||
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
||||||
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
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"))]
|
#[cfg(not(feature = "servo"))]
|
||||||
fn flexbox_enabled() -> bool {
|
fn flexbox_enabled() -> bool {
|
||||||
true
|
true
|
||||||
|
@ -54,8 +49,6 @@ pub enum DisplayOutside {
|
||||||
InternalTable,
|
InternalTable,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
InternalRuby,
|
InternalRuby,
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
XUL,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
|
@ -89,8 +82,6 @@ pub enum DisplayInside {
|
||||||
RubyTextContainer,
|
RubyTextContainer,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
WebkitBox,
|
WebkitBox,
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
MozBox,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
|
@ -185,12 +176,6 @@ impl Display {
|
||||||
DisplayInside::RubyTextContainer,
|
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 <display-outside> and <display-inside> values.
|
/// Make a raw display value from <display-outside> and <display-inside> values.
|
||||||
#[inline]
|
#[inline]
|
||||||
const fn new(outside: DisplayOutside, inside: DisplayInside) -> Self {
|
const fn new(outside: DisplayOutside, inside: DisplayInside) -> Self {
|
||||||
|
@ -294,8 +279,6 @@ impl Display {
|
||||||
DisplayInside::Flex => true,
|
DisplayInside::Flex => true,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
DisplayInside::Grid => true,
|
DisplayInside::Grid => true,
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
DisplayInside::MozBox => true,
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,8 +317,6 @@ impl Display {
|
||||||
Display::from3(DisplayOutside::Block, inside, self.is_list_item())
|
Display::from3(DisplayOutside::Block, inside, self.is_list_item())
|
||||||
},
|
},
|
||||||
DisplayOutside::Block | DisplayOutside::None => *self,
|
DisplayOutside::Block | DisplayOutside::None => *self,
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
DisplayOutside::XUL => *self,
|
|
||||||
_ => Display::Block,
|
_ => Display::Block,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,8 +367,6 @@ impl ToCss for Display {
|
||||||
Display::InlineBlock => dest.write_str("inline-block"),
|
Display::InlineBlock => dest.write_str("inline-block"),
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
Display::WebkitInlineBox => dest.write_str("-webkit-inline-box"),
|
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"),
|
Display::TableCaption => dest.write_str("table-caption"),
|
||||||
_ => match (outside, inside) {
|
_ => match (outside, inside) {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
@ -548,10 +527,6 @@ impl Parse for Display {
|
||||||
"-webkit-box" => Display::WebkitBox,
|
"-webkit-box" => Display::WebkitBox,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
"-webkit-inline-box" => Display::WebkitInlineBox,
|
"-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,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue