Skip to content

Commit

Permalink
style: Add a '-moz-menulist-button' value to '-moz-appearance'.
Browse files Browse the repository at this point in the history
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.

Bug: 1428676
Reviewed-by: emilio
  • Loading branch information
jwatt authored and emilio committed Aug 7, 2018
1 parent bee7cba commit b05ace3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion components/style/properties/longhands/box.mako.rs
Expand Up @@ -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",
)}

Expand Down
18 changes: 12 additions & 6 deletions components/style/values/specified/box.rs
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down Expand Up @@ -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 <input type=number>
NumberInput,
/// A horizontal progress bar.
Expand Down

0 comments on commit b05ace3

Please sign in to comment.