Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-11-15 21:32:34 +01:00 committed by Martin Robinson
parent 8c1c4073e2
commit b6db94bdf5
9 changed files with 94 additions and 66 deletions

View file

@ -4,6 +4,7 @@
//! Servo's media-query device and expression representation.
use crate::color::AbsoluteColor;
use crate::context::QuirksMode;
use crate::custom_properties::CssEnvironment;
use crate::font_metrics::FontMetrics;
@ -117,7 +118,7 @@ impl Device {
/// Sets the body text color for the "inherit color from body" quirk.
///
/// <https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk>
pub fn set_body_text_color(&self, _color: RGBA) {
pub fn set_body_text_color(&self, _color: AbsoluteColor) {
// Servo doesn't implement this quirk (yet)
}
@ -201,13 +202,13 @@ impl Device {
}
/// Returns the default background color.
pub fn default_background_color(&self) -> RGBA {
RGBA::new(255, 255, 255, 1.0)
pub fn default_background_color(&self) -> AbsoluteColor {
AbsoluteColor::white()
}
/// Returns the default foreground color.
pub fn default_color(&self) -> RGBA {
RGBA::new(0, 0, 0, 1.0)
pub fn default_color(&self) -> AbsoluteColor {
AbsoluteColor::black()
}
/// Returns safe area insets