mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add a '-moz-menulist-button' value to '-moz-appearance'.
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
This commit is contained in:
parent
bee7cbad0d
commit
b05ace3e4a
2 changed files with 12 additions and 7 deletions
|
@ -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",
|
||||
)}
|
||||
|
||||
|
|
|
@ -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 <input type=number>
|
||||
NumberInput,
|
||||
/// A horizontal progress bar.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue