mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
Further changes required by Servo
This commit is contained in:
parent
d92f66246e
commit
2c5aa34bb0
1 changed files with 9 additions and 1 deletions
|
@ -7,6 +7,14 @@
|
||||||
use super::{Context, ToResolvedValue};
|
use super::{Context, ToResolvedValue};
|
||||||
use crate::values::computed;
|
use crate::values::computed;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn allow_element_content_none() -> bool {
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
|
return static_prefs::pref!("layout.css.element-content-none.enabled");
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// https://drafts.csswg.org/css-content/#content-property
|
/// https://drafts.csswg.org/css-content/#content-property
|
||||||
///
|
///
|
||||||
/// We implement this at resolved value time because otherwise it causes us to
|
/// We implement this at resolved value time because otherwise it causes us to
|
||||||
|
@ -35,7 +43,7 @@ impl ToResolvedValue for computed::Content {
|
||||||
// https://github.com/w3c/csswg-drafts/issues/6124
|
// https://github.com/w3c/csswg-drafts/issues/6124
|
||||||
// Ditto for non-pseudo elements if the pref is disabled.
|
// Ditto for non-pseudo elements if the pref is disabled.
|
||||||
Self::None if (is_pseudo && !is_before_or_after && !is_marker) ||
|
Self::None if (is_pseudo && !is_before_or_after && !is_marker) ||
|
||||||
(!is_pseudo && !static_prefs::pref!("layout.css.element-content-none.enabled")) => Self::Normal,
|
(!is_pseudo && !allow_element_content_none()) => Self::Normal,
|
||||||
other => other,
|
other => other,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue