Bug 1798396 - Remove appearance: -moz-win-glass, which is unused. r=tnikkel

This we don't need to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D162535
This commit is contained in:
Emilio Cobos Álvarez 2022-11-22 10:56:38 +00:00
Родитель 8ed42c86fa
Коммит 4c6d8f0273
12 изменённых файлов: 10 добавлений и 39 удалений

Просмотреть файл

@ -5523,7 +5523,6 @@ PresShell::CanvasBackground PresShell::ComputeCanvasBackground() const {
const nsStyleDisplay* disp = rootStyleFrame->StyleDisplay();
StyleAppearance appearance = disp->EffectiveAppearance();
if (rootStyleFrame->IsThemed(disp) &&
appearance != StyleAppearance::MozWinGlass &&
appearance != StyleAppearance::MozWinBorderlessGlass) {
// Ignore the CSS background-color if -moz-appearance is used and it is
// not one of the glass values. (Windows 7 Glass has traditionally not

Просмотреть файл

@ -6895,10 +6895,6 @@ nsTransparencyMode nsLayoutUtils::GetFrameTransparency(
StyleAppearance appearance =
aCSSRootFrame->StyleDisplay()->EffectiveAppearance();
if (appearance == StyleAppearance::MozWinGlass) {
return eTransparencyGlass;
}
if (appearance == StyleAppearance::MozWinBorderlessGlass) {
return eTransparencyBorderlessGlass;
}

Просмотреть файл

@ -3682,8 +3682,7 @@ void nsDisplayThemedBackground::Init(nsDisplayListBuilder* aBuilder) {
RegisterThemeGeometry(aBuilder, this, StyleFrame(), type);
}
if (mAppearance == StyleAppearance::MozWinBorderlessGlass ||
mAppearance == StyleAppearance::MozWinGlass) {
if (mAppearance == StyleAppearance::MozWinBorderlessGlass) {
aBuilder->SetGlassDisplayItem(this);
}
@ -3718,8 +3717,7 @@ nsRegion nsDisplayThemedBackground::GetOpaqueRegion(
Maybe<nscolor> nsDisplayThemedBackground::IsUniform(
nsDisplayListBuilder* aBuilder) const {
if (mAppearance == StyleAppearance::MozWinBorderlessGlass ||
mAppearance == StyleAppearance::MozWinGlass) {
if (mAppearance == StyleAppearance::MozWinBorderlessGlass) {
return Some(NS_RGBA(0, 0, 0, 0));
}
return Nothing();

Просмотреть файл

@ -89,7 +89,6 @@ const NON_CONTENT_ACCESSIBLE_VALUES = {
"-moz-win-communications-toolbox",
"-moz-win-media-toolbox",
"-moz-win-browsertabbar-toolbox",
"-moz-win-glass",
"-moz-win-borderless-glass",
"-moz-win-exclude-glass",
"-moz-mac-help-button",

Просмотреть файл

@ -2011,9 +2011,6 @@ pub enum Appearance {
MozWinMediaToolbox,
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
MozWinBrowsertabbarToolbox,
/// Vista glass.
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
MozWinGlass,
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
MozWinBorderlessGlass,
/// -moz-apperance style used in setting proper glass margins.

Просмотреть файл

@ -163,13 +163,11 @@ typedef void* nsNativeWidget;
*/
enum nsTransparencyMode {
eTransparencyOpaque = 0, // Fully opaque
eTransparencyTransparent, // Parts of the window may be transparent
eTransparencyGlass, // Transparent parts of the window have Vista AeroGlass
// effect applied
eTransparencyBorderlessGlass // As above, but without a border around the
// opaque areas when there would otherwise be
// one with eTransparencyGlass
eTransparencyOpaque = 0, // Fully opaque
eTransparencyTransparent, // Parts of the window may be transparent
eTransparencyBorderlessGlass // Transparent parts of the window has windows 7
// glass effect, without a border around opaque
// areas.
// If you add to the end here, you must update the serialization code in
// WidgetMessageUtils.h
};

Просмотреть файл

@ -122,9 +122,7 @@ bool CompositorWidgetParent::HasGlass() const {
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
wr::RenderThread::IsInRenderThread());
nsTransparencyMode transparencyMode = mTransparencyMode;
return transparencyMode == eTransparencyGlass ||
transparencyMode == eTransparencyBorderlessGlass;
return mTransparencyMode == eTransparencyBorderlessGlass;
}
bool CompositorWidgetParent::IsHidden() const { return ::IsIconic(mWnd); }

Просмотреть файл

@ -296,10 +296,7 @@ bool InProcessWinCompositorWidget::GetWindowIsFullyOccluded() const {
bool InProcessWinCompositorWidget::HasGlass() const {
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
wr::RenderThread::IsInRenderThread());
nsTransparencyMode transparencyMode = mTransparencyMode;
return transparencyMode == eTransparencyGlass ||
transparencyMode == eTransparencyBorderlessGlass;
return mTransparencyMode == eTransparencyBorderlessGlass;
}
void InProcessWinCompositorWidget::ClearTransparentWindow() {

Просмотреть файл

@ -768,7 +768,6 @@ mozilla::Maybe<nsUXThemeClass> nsNativeThemeWin::GetThemeClass(
case StyleAppearance::MozWindowButtonRestore:
case StyleAppearance::MozWindowButtonBox:
case StyleAppearance::MozWindowButtonBoxMaximized:
case StyleAppearance::MozWinGlass:
case StyleAppearance::MozWinBorderlessGlass:
return Some(eUXWindowFrame);
default:
@ -1370,7 +1369,6 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame,
return NS_OK;
case StyleAppearance::MozWindowButtonBox:
case StyleAppearance::MozWindowButtonBoxMaximized:
case StyleAppearance::MozWinGlass:
case StyleAppearance::MozWinBorderlessGlass:
aPart = -1;
aState = 0;
@ -1446,7 +1444,6 @@ nsNativeThemeWin::DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
// through here and call the theme library we'll get aero
// basic bitmaps.
return NS_OK;
case StyleAppearance::MozWinGlass:
case StyleAppearance::MozWinBorderlessGlass:
// Nothing to draw, this is the glass background.
return NS_OK;
@ -1847,7 +1844,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::GetWidgetBorder(
aAppearance == StyleAppearance::Separator ||
aAppearance == StyleAppearance::MozWindowTitlebar ||
aAppearance == StyleAppearance::MozWindowTitlebarMaximized ||
aAppearance == StyleAppearance::MozWinGlass ||
aAppearance == StyleAppearance::MozWinBorderlessGlass)
return result; // Don't worry about it.
@ -2131,7 +2127,6 @@ LayoutDeviceIntSize nsNativeThemeWin::GetMinimumWidgetSize(
case StyleAppearance::Listbox:
case StyleAppearance::Treeview:
case StyleAppearance::Menuitemtext:
case StyleAppearance::MozWinGlass:
case StyleAppearance::MozWinBorderlessGlass:
return {}; // Don't worry about it.
default:
@ -2312,7 +2307,6 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame,
aAppearance == StyleAppearance::Tabpanels ||
aAppearance == StyleAppearance::Tabpanel ||
aAppearance == StyleAppearance::Separator ||
aAppearance == StyleAppearance::MozWinGlass ||
aAppearance == StyleAppearance::MozWinBorderlessGlass) {
*aShouldRepaint = false;
return NS_OK;
@ -2466,7 +2460,6 @@ nsITheme::Transparency nsNativeThemeWin::GetWidgetTransparency(
}
switch (aAppearance) {
case StyleAppearance::MozWinGlass:
case StyleAppearance::MozWinBorderlessGlass:
case StyleAppearance::ProgressBar:
case StyleAppearance::Progresschunk:

Просмотреть файл

@ -3427,8 +3427,6 @@ void nsWindow::UpdateGlass() {
margins.cxRightWidth += kGlassMarginAdjustment;
margins.cyBottomHeight += kGlassMarginAdjustment;
}
[[fallthrough]];
case eTransparencyGlass:
policy = DWMNCRP_ENABLED;
break;
default:

Просмотреть файл

@ -542,8 +542,7 @@ class nsWindow final : public nsBaseWidget {
HRGN ExcludeNonClientFromPaintRegion(HRGN aRegion);
static const wchar_t* GetMainWindowClass();
bool HasGlass() const {
return mTransparencyMode == eTransparencyGlass ||
mTransparencyMode == eTransparencyBorderlessGlass;
return mTransparencyMode == eTransparencyBorderlessGlass;
}
HWND GetOwnerWnd() const { return ::GetWindow(mWnd, GW_OWNER); }
bool IsOwnerForegroundWindow() const {

Просмотреть файл

@ -293,7 +293,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) {
// don't need to double buffer with anything but GDI
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
switch (mTransparencyMode) {
case eTransparencyGlass:
case eTransparencyBorderlessGlass:
default:
// If we're not doing translucency, then double buffer