Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-06-18 14:26:10 +02:00 committed by Martin Robinson
parent 90a65bcf01
commit 6755548267
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,4 @@
-moz-content-preferred-color-scheme
-moz-gtk-csd-close-button-position
-moz-gtk-csd-maximize-button-position
-moz-gtk-csd-menu-radius

View file

@ -64,6 +64,7 @@ fn get_safearea_inset_right(device: &Device) -> VariableValue {
VariableValue::pixels(device.safe_area_insets().right)
}
#[cfg(feature = "gecko")]
fn get_content_preferred_color_scheme(device: &Device) -> VariableValue {
use crate::gecko::media_features::PrefersColorScheme;
let prefers_color_scheme = unsafe {
@ -78,6 +79,12 @@ fn get_content_preferred_color_scheme(device: &Device) -> VariableValue {
})
}
#[cfg(feature = "servo")]
fn get_content_preferred_color_scheme(_device: &Device) -> VariableValue {
// TODO: implement this.
VariableValue::ident("light")
}
static ENVIRONMENT_VARIABLES: [EnvironmentVariable; 4] = [
make_variable!(atom!("safe-area-inset-top"), get_safearea_inset_top),
make_variable!(atom!("safe-area-inset-bottom"), get_safearea_inset_bottom),