From 5d59674c8a4821869444b122bda3e1432ddba2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 20 Apr 2023 11:42:44 +0000 Subject: [PATCH] style: Use more non-native rendering of menus This makes our menus closer to GTK4, and depends less on the native menu rendering etc. Thunderbird already does this to some extent. Leave the old code behind a pref for now (just in case). Also fix some code in nsNativeTheme::GetContentState (fixes rendering of radio menu items). Differential Revision: https://phabricator.services.mozilla.com/D175664 --- components/style/gecko/media_features.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/style/gecko/media_features.rs b/components/style/gecko/media_features.rs index 157d8daf2a6..70e03dc297c 100644 --- a/components/style/gecko/media_features.rs +++ b/components/style/gecko/media_features.rs @@ -698,7 +698,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: [QueryFeatureDescription; 67] = [ +pub static MEDIA_FEATURES: [QueryFeatureDescription; 68] = [ feature!( atom!("width"), AllowsRanges::Yes, @@ -1014,6 +1014,7 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 67] = [ ), lnf_int_feature!(atom!("-moz-system-dark-theme"), SystemUsesDarkTheme), lnf_int_feature!(atom!("-moz-panel-animations"), PanelAnimations), + bool_pref_feature!(atom!("-moz-gtk-non-native-menus"), "widget.gtk.non-native-menu-styling"), // media query for MathML Core's implementation of maction/semantics bool_pref_feature!( atom!("-moz-mathml-core-maction-and-semantics"), @@ -1025,8 +1026,5 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 67] = [ "mathml.ms_lquote_rquote_attributes.disabled" ), // media query for popover attribute - bool_pref_feature!( - atom!("-moz-popover-enabled"), - "dom.element.popover.enabled" - ), + bool_pref_feature!(atom!("-moz-popover-enabled"), "dom.element.popover.enabled"), ];