style: Restrict properties that apply to ::marker for now.

Differential Revision: https://phabricator.services.mozilla.com/D31680
This commit is contained in:
Emilio Cobos Álvarez 2019-06-27 00:53:45 +00:00
parent b8873f44aa
commit 3530ea9862
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
7 changed files with 40 additions and 30 deletions

View file

@ -182,13 +182,18 @@ impl PseudoElement {
/// Property flag that properties must have to apply to this pseudo-element.
#[inline]
pub fn property_restriction(&self) -> Option<PropertyFlags> {
match *self {
PseudoElement::FirstLetter => Some(PropertyFlags::APPLIES_TO_FIRST_LETTER),
PseudoElement::FirstLine => Some(PropertyFlags::APPLIES_TO_FIRST_LINE),
PseudoElement::Placeholder => Some(PropertyFlags::APPLIES_TO_PLACEHOLDER),
PseudoElement::Cue => Some(PropertyFlags::APPLIES_TO_CUE),
_ => None,
}
Some(match *self {
PseudoElement::FirstLetter => PropertyFlags::APPLIES_TO_FIRST_LETTER,
PseudoElement::FirstLine => PropertyFlags::APPLIES_TO_FIRST_LINE,
PseudoElement::Placeholder => PropertyFlags::APPLIES_TO_PLACEHOLDER,
PseudoElement::Cue => PropertyFlags::APPLIES_TO_CUE,
PseudoElement::Marker
if unsafe { structs::StaticPrefs::sVarCache_layout_css_marker_restricted } =>
{
PropertyFlags::APPLIES_TO_MARKER
},
_ => return None,
})
}
/// Whether this pseudo-element should actually exist if it has