From 424eb94c7ffe3ecf1508780127d25a4a337145a9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Jan 2019 12:44:49 +0000 Subject: [PATCH] Enable hidden system titlebar by default on Gnome. This patch implements -moz-gtk-csd-hide-titlebar-by-default media query to check if the system titlebar should be disabled by default on Linux systems (it's already disabled on Window/Mac). It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux. When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set in about:config or by Customize menu, the user peference is used instead of the default. It also fixes a -moz-gtk-csd-available media query, it was always true regardless the actual system setting. Differential Revision: https://phabricator.services.mozilla.com/D16036 --- 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 82613c9e245..e18b1cd8be6 100644 --- a/components/style/gecko/media_features.rs +++ b/components/style/gecko/media_features.rs @@ -526,7 +526,7 @@ lazy_static! { /// 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 ref MEDIA_FEATURES: [MediaFeatureDescription; 50] = [ + pub static ref MEDIA_FEATURES: [MediaFeatureDescription; 51] = [ feature!( atom!("width"), AllowsRanges::Yes, @@ -719,6 +719,7 @@ lazy_static! { system_metric_feature!(atom!("-moz-menubar-drag")), system_metric_feature!(atom!("-moz-swipe-animation-enabled")), system_metric_feature!(atom!("-moz-gtk-csd-available")), + system_metric_feature!(atom!("-moz-gtk-csd-hide-titlebar-by-default")), system_metric_feature!(atom!("-moz-gtk-csd-transparent-background")), system_metric_feature!(atom!("-moz-gtk-csd-minimize-button")), system_metric_feature!(atom!("-moz-gtk-csd-maximize-button")),