From 4fe31d5d846b4a5a55c16820a268fe0b089d06cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 6 Jun 2023 13:07:36 +0200 Subject: [PATCH] style: Use titlebar radius on Linux and make titlebar set-up work for lightweight themes To do this, we always draw the native titlebar behind the toolbox, and then make the toolbox adapt to it by using the titlebar radius. This makes us preserve the shadow properly. On Wayland we'd double-draw the shadow (see bug 1509931 comment 4) so this fixes it by trimming it as well using border-radius. Differential Revision: https://phabricator.services.mozilla.com/D128681 --- components/style/gecko/media_features.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/style/gecko/media_features.rs b/components/style/gecko/media_features.rs index c80ace2015b..be30e5f0b6f 100644 --- a/components/style/gecko/media_features.rs +++ b/components/style/gecko/media_features.rs @@ -652,7 +652,7 @@ macro_rules! bool_pref_feature { /// to support new types in these entries and (2) ensuring that either /// nsPresContext::MediaFeatureValuesChanged is called when the value that /// would be returned by the evaluator function could change. -pub static MEDIA_FEATURES: [MediaFeatureDescription; 57] = [ +pub static MEDIA_FEATURES: [MediaFeatureDescription; 58] = [ feature!( atom!("width"), AllowsRanges::Yes, @@ -919,6 +919,7 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 57] = [ atom!("-moz-gtk-csd-reversed-placement"), GTKCSDReversedPlacement ), + lnf_int_feature!(atom!("-moz-gtk-wayland"), GTKWayland), lnf_int_feature!(atom!("-moz-system-dark-theme"), SystemUsesDarkTheme), bool_pref_feature!( atom!("-moz-proton-places-tooltip"),