зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8ed42c86fa
Коммит
4c6d8f0273
|
@ -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.
|
||||
|
|
|
@ -165,11 +165,9 @@ 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
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче