Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-09-23 15:57:21 +02:00 committed by Martin Robinson
parent 34373c2ac8
commit 3d02b4ef90

View file

@ -518,7 +518,10 @@ impl Color {
/// Returns whether this color is allowed in forced-colors mode. /// Returns whether this color is allowed in forced-colors mode.
pub fn honored_in_forced_colors_mode(&self, allow_transparent: bool) -> bool { pub fn honored_in_forced_colors_mode(&self, allow_transparent: bool) -> bool {
match *self { match *self {
Color::InheritFromBodyQuirk | Color::CurrentColor => false, #[cfg(feature = "gecko")]
Color::InheritFromBodyQuirk => false,
Color::CurrentColor => false,
#[cfg(feature = "gecko")]
Color::System(..) => true, Color::System(..) => true,
Color::Numeric { ref parsed, .. } => allow_transparent && parsed.alpha == 0, Color::Numeric { ref parsed, .. } => allow_transparent && parsed.alpha == 0,
Color::ColorMix(ref mix) => { Color::ColorMix(ref mix) => {