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
This commit is contained in:
Emilio Cobos Álvarez 2023-06-06 13:07:36 +02:00 committed by Oriol Brufau
parent a8bcfc7f77
commit 4fe31d5d84

View file

@ -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"),