diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-11-15 21:32:34 +0100 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-11-21 15:36:35 +0100 |
commit | b6db94bdf5fdb59550380a0b0b3f418afb01965f (patch) | |
tree | d1d5d360e2b001e46fe1984a1f80ee0a0de66ecf /components/style/servo | |
parent | 8c1c4073e250502822604c71fcaab9c183e4372a (diff) | |
download | servo-b6db94bdf5fdb59550380a0b0b3f418afb01965f.tar.gz servo-b6db94bdf5fdb59550380a0b0b3f418afb01965f.zip |
Further changes required by Servo
Diffstat (limited to 'components/style/servo')
-rw-r--r-- | components/style/servo/media_queries.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs index 21aeb1692fb..7e17e23c639 100644 --- a/components/style/servo/media_queries.rs +++ b/components/style/servo/media_queries.rs @@ -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 |