forked from mirrors/gecko-dev
Bug 1906037 - Restore macOS desktop tinting on dialog windows. a=RyanVM
After bug 1867854, dialog windows on macOS no longer show desktop tinting on the window background. Since this requires a transparent Gecko background, the `-moz-mac-unified-toolbar-window` appearance added in bug 1870481 should be applied to every window. It has been renamed to reflect this. Original Revision: https://phabricator.services.mozilla.com/D215596 Differential Revision: https://phabricator.services.mozilla.com/D219588
This commit is contained in:
parent
06d83f0a7f
commit
78d2e9b10b
6 changed files with 14 additions and 22 deletions
|
|
@ -8,12 +8,6 @@
|
|||
|
||||
:root {
|
||||
--arrowpanel-field-background: light-dark(rgba(249, 249, 250, .3), rgba(12, 12, 13, .3));
|
||||
|
||||
/* On macOS, top level windows are always opaque. This gives us the right
|
||||
* default background color, without confusing Gecko about whether the window
|
||||
* is transparent or not. */
|
||||
appearance: auto;
|
||||
-moz-default-appearance: -moz-mac-unified-toolbar-window;
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line media-query-no-invalid */
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
:root {
|
||||
-moz-default-appearance: -moz-mac-unified-toolbar-window;
|
||||
appearance: auto;
|
||||
}
|
||||
|
||||
#placesToolbar {
|
||||
position: relative;
|
||||
-moz-window-dragging: drag;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,6 @@
|
|||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
:root {
|
||||
-moz-default-appearance: -moz-mac-unified-toolbar-window;
|
||||
appearance: auto;
|
||||
}
|
||||
|
||||
#topBar {
|
||||
position: relative;
|
||||
-moz-window-dragging: drag;
|
||||
|
|
|
|||
|
|
@ -1584,11 +1584,11 @@ pub enum Appearance {
|
|||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||
MozMacHelpButton,
|
||||
|
||||
/// An appearance value for the root, so that we can get unified toolbar looks (which require a
|
||||
/// transparent gecko background) without really using the whole transparency set-up which
|
||||
/// otherwise loses window borders, see bug 1870481.
|
||||
/// An appearance value for the root, so that we can get tinting and unified toolbar looks
|
||||
/// (which require a transparent gecko background) without really using the whole transparency
|
||||
/// set-up which otherwise loses window borders, see bug 1870481.
|
||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||
MozMacUnifiedToolbarWindow,
|
||||
MozMacWindow,
|
||||
|
||||
/// Windows themed window frame elements.
|
||||
#[parse(condition = "ParserContext::chrome_rules_enabled")]
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@
|
|||
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
:root {
|
||||
/* On macOS, top level windows are always opaque. This gives us the right
|
||||
* default background color, without confusing Gecko about whether the window
|
||||
* is transparent or not. */
|
||||
-moz-default-appearance: -moz-mac-window;
|
||||
appearance: auto;
|
||||
}
|
||||
|
||||
/* ::::: Alert icons :::::*/
|
||||
|
||||
.message-icon,
|
||||
|
|
|
|||
|
|
@ -2966,7 +2966,7 @@ bool nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||
case StyleAppearance::MozMacHelpButton:
|
||||
case StyleAppearance::MozMacDisclosureButtonOpen:
|
||||
case StyleAppearance::MozMacDisclosureButtonClosed:
|
||||
case StyleAppearance::MozMacUnifiedToolbarWindow:
|
||||
case StyleAppearance::MozMacWindow:
|
||||
case StyleAppearance::Button:
|
||||
case StyleAppearance::Toolbarbutton:
|
||||
case StyleAppearance::Spinner:
|
||||
|
|
@ -3084,7 +3084,7 @@ nsITheme::Transparency nsNativeThemeCocoa::GetWidgetTransparency(
|
|||
case StyleAppearance::Menupopup:
|
||||
case StyleAppearance::Tooltip:
|
||||
return eTransparent;
|
||||
case StyleAppearance::MozMacUnifiedToolbarWindow:
|
||||
case StyleAppearance::MozMacWindow:
|
||||
// We want these to be treated as opaque by Gecko. We ensure there's an
|
||||
// appropriate OS-level clear color to make sure that's the case.
|
||||
return eOpaque;
|
||||
|
|
|
|||
Loading…
Reference in a new issue