mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Restrict properties that apply to ::marker for now.
Differential Revision: https://phabricator.services.mozilla.com/D31680
This commit is contained in:
parent
b8873f44aa
commit
3530ea9862
7 changed files with 40 additions and 30 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue