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:
Emilio Cobos Álvarez 2018-07-22 16:10:23 +02:00
parent 7e77f4dd4e
commit 77f47eea34
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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)]
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
SpecifiedValueInfo, ToComputedValue, ToCss)]
@ -80,8 +91,10 @@ pub enum Display {
#[cfg(feature = "gecko")]
WebkitInlineBox,
#[cfg(feature = "gecko")]
#[parse(condition = "moz_box_display_values_enabled")]
MozBox,
#[cfg(feature = "gecko")]
#[parse(condition = "moz_box_display_values_enabled")]
MozInlineBox,
#[cfg(feature = "gecko")]
#[parse(condition = "moz_display_values_enabled")]