mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta.
Bug: 1477553 Differential Revision: https://phabricator.services.mozilla.com/D2288
This commit is contained in:
parent
7e77f4dd4e
commit
77f47eea34
1 changed files with 13 additions and 0 deletions
|
@ -30,6 +30,17 @@ 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() ||
|
||||||
|
unsafe {
|
||||||
|
structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
|
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
|
||||||
SpecifiedValueInfo, ToComputedValue, ToCss)]
|
SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||||
|
@ -80,8 +91,10 @@ pub enum Display {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
WebkitInlineBox,
|
WebkitInlineBox,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "moz_box_display_values_enabled")]
|
||||||
MozBox,
|
MozBox,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "moz_box_display_values_enabled")]
|
||||||
MozInlineBox,
|
MozInlineBox,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[parse(condition = "moz_display_values_enabled")]
|
#[parse(condition = "moz_display_values_enabled")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue