mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1592739 - Make -moz-appearance: dialog render nothing. r=spohl
The window background will be contributed by the widget itself, which renders them underneath Gecko's rendering. As a result, -moz-appearance: dialog is now equivalent to the combination -moz-appearance: none; background-color: transparent. This change does not turn the widget itself transparent because nsCocoaWindow does not allow top level windows to become transparent (ever since bug 1162649). If we ever add support for top level widgets with transparent backgrounds again, we will probably want to treat -moz-appearance: dialog differently from -moz-appearance: none; background-color: transparent, but for now this is fine. This change means that Gecko's rendering will go into transparent buffers. This may result in some loss of subpixel AA in various cases. In the main browser window, there are CSS backgound colors that cover all the non-vibrant areas of the window, so in that window we still render mostly onto opaque pixels. Differential Revision: https://phabricator.services.mozilla.com/D51461 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1e79827721
commit
41d42f6f41
@ -2690,15 +2690,6 @@ Maybe<nsNativeThemeCocoa::WidgetInfo> nsNativeThemeCocoa::ComputeWidgetInfo(
|
||||
EventStates eventState = GetContentState(aFrame, aAppearance);
|
||||
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Dialog:
|
||||
if (IsWindowSheet(aFrame)) {
|
||||
if (VibrancyManager::SystemSupportsVibrancy()) {
|
||||
return Nothing();
|
||||
}
|
||||
return Some(WidgetInfo::SheetBackground());
|
||||
}
|
||||
return Some(WidgetInfo::DialogBackground());
|
||||
|
||||
case StyleAppearance::Menupopup:
|
||||
if (VibrancyManager::SystemSupportsVibrancy()) {
|
||||
return Nothing();
|
||||
@ -3371,12 +3362,6 @@ bool nsNativeThemeCocoa::CreateWebRenderCommandsForWidget(
|
||||
// - If the case in DrawWidgetBackground draws something complicated for the
|
||||
// given widget type, return false here.
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Dialog:
|
||||
if (IsWindowSheet(aFrame) && VibrancyManager::SystemSupportsVibrancy()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
case StyleAppearance::Menupopup:
|
||||
if (VibrancyManager::SystemSupportsVibrancy()) {
|
||||
return true;
|
||||
@ -4366,10 +4351,8 @@ nsITheme::Transparency nsNativeThemeCocoa::GetWidgetTransparency(nsIFrame* aFram
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Menupopup:
|
||||
case StyleAppearance::Tooltip:
|
||||
return eTransparent;
|
||||
|
||||
case StyleAppearance::Dialog:
|
||||
return IsWindowSheet(aFrame) ? eTransparent : eOpaque;
|
||||
return eTransparent;
|
||||
|
||||
case StyleAppearance::ScrollbarSmall:
|
||||
case StyleAppearance::Scrollbar:
|
||||
|
Loading…
Reference in New Issue
Block a user