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
This commit is contained in:
Emilio Cobos Álvarez 2023-04-20 11:42:44 +00:00 committed by Martin Robinson
parent 9dfa7fb136
commit 5d59674c8a

View file

@ -698,7 +698,7 @@ macro_rules! bool_pref_feature {
/// to support new types in these entries and (2) ensuring that either /// to support new types in these entries and (2) ensuring that either
/// nsPresContext::MediaFeatureValuesChanged is called when the value that /// nsPresContext::MediaFeatureValuesChanged is called when the value that
/// would be returned by the evaluator function could change. /// would be returned by the evaluator function could change.
pub static MEDIA_FEATURES: [QueryFeatureDescription; 67] = [ pub static MEDIA_FEATURES: [QueryFeatureDescription; 68] = [
feature!( feature!(
atom!("width"), atom!("width"),
AllowsRanges::Yes, 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-system-dark-theme"), SystemUsesDarkTheme),
lnf_int_feature!(atom!("-moz-panel-animations"), PanelAnimations), 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 // media query for MathML Core's implementation of maction/semantics
bool_pref_feature!( bool_pref_feature!(
atom!("-moz-mathml-core-maction-and-semantics"), atom!("-moz-mathml-core-maction-and-semantics"),
@ -1025,8 +1026,5 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 67] = [
"mathml.ms_lquote_rquote_attributes.disabled" "mathml.ms_lquote_rquote_attributes.disabled"
), ),
// media query for popover attribute // media query for popover attribute
bool_pref_feature!( bool_pref_feature!(atom!("-moz-popover-enabled"), "dom.element.popover.enabled"),
atom!("-moz-popover-enabled"),
"dom.element.popover.enabled"
),
]; ];