mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Further changes required by Servo
This commit is contained in:
parent
4559546fbb
commit
bb55e923bb
15 changed files with 76 additions and 38 deletions
|
@ -33,6 +33,14 @@ fn allow_color_mix() -> bool {
|
|||
return false;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn allow_more_color_4() -> bool {
|
||||
#[cfg(feature = "gecko")]
|
||||
return static_prefs::pref!("layout.css.more_color_4.enabled");
|
||||
#[cfg(feature = "servo")]
|
||||
return false;
|
||||
}
|
||||
|
||||
impl ColorMix {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
|
@ -759,7 +767,7 @@ impl Color {
|
|||
CSSParserColor::CurrentColor => Color::CurrentColor,
|
||||
CSSParserColor::Absolute(absolute) => {
|
||||
let enabled = matches!(absolute, cssparser::AbsoluteColor::Rgba(_)) ||
|
||||
static_prefs::pref!("layout.css.more_color_4.enabled");
|
||||
allow_more_color_4();
|
||||
if !enabled {
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue