diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index ed08ac8504a..765731c13f2 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -515,7 +515,6 @@ ${helpers.predefined_type( products="gecko", alias="-webkit-appearance:layout.css.webkit-appearance.enabled", spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance)", - needs_context=False, animation_value_type="discrete", )} diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index afa88955d98..f1295fa5f0b 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -20,11 +20,16 @@ use values::specified::{AllowQuirks, Number}; use values::specified::length::{LengthOrPercentage, NonNegativeLength}; #[cfg(feature = "gecko")] -fn moz_display_values_enabled(context: &ParserContext) -> bool { - use gecko_bindings::structs; +fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool { use stylesheets::Origin; context.stylesheet_origin == Origin::UserAgent || - context.chrome_rules_enabled() || + context.chrome_rules_enabled() +} + +#[cfg(feature = "gecko")] +fn moz_display_values_enabled(context: &ParserContext) -> bool { + use gecko_bindings::structs; + in_ua_or_chrome_sheet(context) || unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_display_values_content_enabled } @@ -33,9 +38,7 @@ fn moz_display_values_enabled(context: &ParserContext) -> bool { #[cfg(feature = "gecko")] fn moz_box_display_values_enabled(context: &ParserContext) -> bool { use gecko_bindings::structs; - use stylesheets::Origin; - context.stylesheet_origin == Origin::UserAgent || - context.chrome_rules_enabled() || + in_ua_or_chrome_sheet(context) || unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled } @@ -948,6 +951,9 @@ pub enum Appearance { Meterbar, /// The meter bar's meter indicator. Meterchunk, + /// The "arrowed" part of the dropdown button that open up a dropdown list. + #[parse(condition = "in_ua_or_chrome_sheet")] + MozMenulistButton, /// For HTML's NumberInput, /// A horizontal progress bar.