mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Further changes required by Servo
This commit is contained in:
parent
980d10fc17
commit
e1f254854d
1 changed files with 13 additions and 1 deletions
|
@ -32,6 +32,18 @@ pub struct ColorMix {
|
|||
pub percentage: Percentage,
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
fn allow_color_mix() -> bool {
|
||||
static_prefs::pref!("layout.css.color-mix.enabled")
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
#[inline]
|
||||
fn allow_color_mix() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
// NOTE(emilio): Syntax is still a bit in-flux, since [1] doesn't seem
|
||||
// particularly complete, and disagrees with the examples.
|
||||
//
|
||||
|
@ -42,7 +54,7 @@ impl Parse for ColorMix {
|
|||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let enabled =
|
||||
context.chrome_rules_enabled() || static_prefs::pref!("layout.css.color-mix.enabled");
|
||||
context.chrome_rules_enabled() || allow_color_mix();
|
||||
|
||||
if !enabled {
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue