зеркало из 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();
|
const nsStyleDisplay* disp = rootStyleFrame->StyleDisplay();
|
||||||
StyleAppearance appearance = disp->EffectiveAppearance();
|
StyleAppearance appearance = disp->EffectiveAppearance();
|
||||||
if (rootStyleFrame->IsThemed(disp) &&
|
if (rootStyleFrame->IsThemed(disp) &&
|
||||||
appearance != StyleAppearance::MozWinGlass &&
|
|
||||||
appearance != StyleAppearance::MozWinBorderlessGlass) {
|
appearance != StyleAppearance::MozWinBorderlessGlass) {
|
||||||
// Ignore the CSS background-color if -moz-appearance is used and it is
|
// 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
|
// not one of the glass values. (Windows 7 Glass has traditionally not
|
||||||
|
|
|
@ -6895,10 +6895,6 @@ nsTransparencyMode nsLayoutUtils::GetFrameTransparency(
|
||||||
StyleAppearance appearance =
|
StyleAppearance appearance =
|
||||||
aCSSRootFrame->StyleDisplay()->EffectiveAppearance();
|
aCSSRootFrame->StyleDisplay()->EffectiveAppearance();
|
||||||
|
|
||||||
if (appearance == StyleAppearance::MozWinGlass) {
|
|
||||||
return eTransparencyGlass;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (appearance == StyleAppearance::MozWinBorderlessGlass) {
|
if (appearance == StyleAppearance::MozWinBorderlessGlass) {
|
||||||
return eTransparencyBorderlessGlass;
|
return eTransparencyBorderlessGlass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3682,8 +3682,7 @@ void nsDisplayThemedBackground::Init(nsDisplayListBuilder* aBuilder) {
|
||||||
RegisterThemeGeometry(aBuilder, this, StyleFrame(), type);
|
RegisterThemeGeometry(aBuilder, this, StyleFrame(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mAppearance == StyleAppearance::MozWinBorderlessGlass ||
|
if (mAppearance == StyleAppearance::MozWinBorderlessGlass) {
|
||||||
mAppearance == StyleAppearance::MozWinGlass) {
|
|
||||||
aBuilder->SetGlassDisplayItem(this);
|
aBuilder->SetGlassDisplayItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3718,8 +3717,7 @@ nsRegion nsDisplayThemedBackground::GetOpaqueRegion(
|
||||||
|
|
||||||
Maybe<nscolor> nsDisplayThemedBackground::IsUniform(
|
Maybe<nscolor> nsDisplayThemedBackground::IsUniform(
|
||||||
nsDisplayListBuilder* aBuilder) const {
|
nsDisplayListBuilder* aBuilder) const {
|
||||||
if (mAppearance == StyleAppearance::MozWinBorderlessGlass ||
|
if (mAppearance == StyleAppearance::MozWinBorderlessGlass) {
|
||||||
mAppearance == StyleAppearance::MozWinGlass) {
|
|
||||||
return Some(NS_RGBA(0, 0, 0, 0));
|
return Some(NS_RGBA(0, 0, 0, 0));
|
||||||
}
|
}
|
||||||
return Nothing();
|
return Nothing();
|
||||||
|
|
|
@ -89,7 +89,6 @@ const NON_CONTENT_ACCESSIBLE_VALUES = {
|
||||||
"-moz-win-communications-toolbox",
|
"-moz-win-communications-toolbox",
|
||||||
"-moz-win-media-toolbox",
|
"-moz-win-media-toolbox",
|
||||||
"-moz-win-browsertabbar-toolbox",
|
"-moz-win-browsertabbar-toolbox",
|
||||||
"-moz-win-glass",
|
|
||||||
"-moz-win-borderless-glass",
|
"-moz-win-borderless-glass",
|
||||||
"-moz-win-exclude-glass",
|
"-moz-win-exclude-glass",
|
||||||
"-moz-mac-help-button",
|
"-moz-mac-help-button",
|
||||||
|
|
|
@ -2011,9 +2011,6 @@ pub enum Appearance {
|
||||||
MozWinMediaToolbox,
|
MozWinMediaToolbox,
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinBrowsertabbarToolbox,
|
MozWinBrowsertabbarToolbox,
|
||||||
/// Vista glass.
|
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
|
||||||
MozWinGlass,
|
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinBorderlessGlass,
|
MozWinBorderlessGlass,
|
||||||
/// -moz-apperance style used in setting proper glass margins.
|
/// -moz-apperance style used in setting proper glass margins.
|
||||||
|
|
|
@ -163,13 +163,11 @@ typedef void* nsNativeWidget;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum nsTransparencyMode {
|
enum nsTransparencyMode {
|
||||||
eTransparencyOpaque = 0, // Fully opaque
|
eTransparencyOpaque = 0, // Fully opaque
|
||||||
eTransparencyTransparent, // Parts of the window may be transparent
|
eTransparencyTransparent, // Parts of the window may be transparent
|
||||||
eTransparencyGlass, // Transparent parts of the window have Vista AeroGlass
|
eTransparencyBorderlessGlass // Transparent parts of the window has windows 7
|
||||||
// effect applied
|
// glass effect, without a border around opaque
|
||||||
eTransparencyBorderlessGlass // As above, but without a border around the
|
// areas.
|
||||||
// opaque areas when there would otherwise be
|
|
||||||
// one with eTransparencyGlass
|
|
||||||
// If you add to the end here, you must update the serialization code in
|
// If you add to the end here, you must update the serialization code in
|
||||||
// WidgetMessageUtils.h
|
// WidgetMessageUtils.h
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,9 +122,7 @@ bool CompositorWidgetParent::HasGlass() const {
|
||||||
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
|
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
|
||||||
wr::RenderThread::IsInRenderThread());
|
wr::RenderThread::IsInRenderThread());
|
||||||
|
|
||||||
nsTransparencyMode transparencyMode = mTransparencyMode;
|
return mTransparencyMode == eTransparencyBorderlessGlass;
|
||||||
return transparencyMode == eTransparencyGlass ||
|
|
||||||
transparencyMode == eTransparencyBorderlessGlass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompositorWidgetParent::IsHidden() const { return ::IsIconic(mWnd); }
|
bool CompositorWidgetParent::IsHidden() const { return ::IsIconic(mWnd); }
|
||||||
|
|
|
@ -296,10 +296,7 @@ bool InProcessWinCompositorWidget::GetWindowIsFullyOccluded() const {
|
||||||
bool InProcessWinCompositorWidget::HasGlass() const {
|
bool InProcessWinCompositorWidget::HasGlass() const {
|
||||||
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
|
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread() ||
|
||||||
wr::RenderThread::IsInRenderThread());
|
wr::RenderThread::IsInRenderThread());
|
||||||
|
return mTransparencyMode == eTransparencyBorderlessGlass;
|
||||||
nsTransparencyMode transparencyMode = mTransparencyMode;
|
|
||||||
return transparencyMode == eTransparencyGlass ||
|
|
||||||
transparencyMode == eTransparencyBorderlessGlass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InProcessWinCompositorWidget::ClearTransparentWindow() {
|
void InProcessWinCompositorWidget::ClearTransparentWindow() {
|
||||||
|
|
|
@ -768,7 +768,6 @@ mozilla::Maybe<nsUXThemeClass> nsNativeThemeWin::GetThemeClass(
|
||||||
case StyleAppearance::MozWindowButtonRestore:
|
case StyleAppearance::MozWindowButtonRestore:
|
||||||
case StyleAppearance::MozWindowButtonBox:
|
case StyleAppearance::MozWindowButtonBox:
|
||||||
case StyleAppearance::MozWindowButtonBoxMaximized:
|
case StyleAppearance::MozWindowButtonBoxMaximized:
|
||||||
case StyleAppearance::MozWinGlass:
|
|
||||||
case StyleAppearance::MozWinBorderlessGlass:
|
case StyleAppearance::MozWinBorderlessGlass:
|
||||||
return Some(eUXWindowFrame);
|
return Some(eUXWindowFrame);
|
||||||
default:
|
default:
|
||||||
|
@ -1370,7 +1369,6 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
case StyleAppearance::MozWindowButtonBox:
|
case StyleAppearance::MozWindowButtonBox:
|
||||||
case StyleAppearance::MozWindowButtonBoxMaximized:
|
case StyleAppearance::MozWindowButtonBoxMaximized:
|
||||||
case StyleAppearance::MozWinGlass:
|
|
||||||
case StyleAppearance::MozWinBorderlessGlass:
|
case StyleAppearance::MozWinBorderlessGlass:
|
||||||
aPart = -1;
|
aPart = -1;
|
||||||
aState = 0;
|
aState = 0;
|
||||||
|
@ -1446,7 +1444,6 @@ nsNativeThemeWin::DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
|
||||||
// through here and call the theme library we'll get aero
|
// through here and call the theme library we'll get aero
|
||||||
// basic bitmaps.
|
// basic bitmaps.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
case StyleAppearance::MozWinGlass:
|
|
||||||
case StyleAppearance::MozWinBorderlessGlass:
|
case StyleAppearance::MozWinBorderlessGlass:
|
||||||
// Nothing to draw, this is the glass background.
|
// Nothing to draw, this is the glass background.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -1847,7 +1844,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::GetWidgetBorder(
|
||||||
aAppearance == StyleAppearance::Separator ||
|
aAppearance == StyleAppearance::Separator ||
|
||||||
aAppearance == StyleAppearance::MozWindowTitlebar ||
|
aAppearance == StyleAppearance::MozWindowTitlebar ||
|
||||||
aAppearance == StyleAppearance::MozWindowTitlebarMaximized ||
|
aAppearance == StyleAppearance::MozWindowTitlebarMaximized ||
|
||||||
aAppearance == StyleAppearance::MozWinGlass ||
|
|
||||||
aAppearance == StyleAppearance::MozWinBorderlessGlass)
|
aAppearance == StyleAppearance::MozWinBorderlessGlass)
|
||||||
return result; // Don't worry about it.
|
return result; // Don't worry about it.
|
||||||
|
|
||||||
|
@ -2131,7 +2127,6 @@ LayoutDeviceIntSize nsNativeThemeWin::GetMinimumWidgetSize(
|
||||||
case StyleAppearance::Listbox:
|
case StyleAppearance::Listbox:
|
||||||
case StyleAppearance::Treeview:
|
case StyleAppearance::Treeview:
|
||||||
case StyleAppearance::Menuitemtext:
|
case StyleAppearance::Menuitemtext:
|
||||||
case StyleAppearance::MozWinGlass:
|
|
||||||
case StyleAppearance::MozWinBorderlessGlass:
|
case StyleAppearance::MozWinBorderlessGlass:
|
||||||
return {}; // Don't worry about it.
|
return {}; // Don't worry about it.
|
||||||
default:
|
default:
|
||||||
|
@ -2312,7 +2307,6 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame,
|
||||||
aAppearance == StyleAppearance::Tabpanels ||
|
aAppearance == StyleAppearance::Tabpanels ||
|
||||||
aAppearance == StyleAppearance::Tabpanel ||
|
aAppearance == StyleAppearance::Tabpanel ||
|
||||||
aAppearance == StyleAppearance::Separator ||
|
aAppearance == StyleAppearance::Separator ||
|
||||||
aAppearance == StyleAppearance::MozWinGlass ||
|
|
||||||
aAppearance == StyleAppearance::MozWinBorderlessGlass) {
|
aAppearance == StyleAppearance::MozWinBorderlessGlass) {
|
||||||
*aShouldRepaint = false;
|
*aShouldRepaint = false;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -2466,7 +2460,6 @@ nsITheme::Transparency nsNativeThemeWin::GetWidgetTransparency(
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (aAppearance) {
|
switch (aAppearance) {
|
||||||
case StyleAppearance::MozWinGlass:
|
|
||||||
case StyleAppearance::MozWinBorderlessGlass:
|
case StyleAppearance::MozWinBorderlessGlass:
|
||||||
case StyleAppearance::ProgressBar:
|
case StyleAppearance::ProgressBar:
|
||||||
case StyleAppearance::Progresschunk:
|
case StyleAppearance::Progresschunk:
|
||||||
|
|
|
@ -3427,8 +3427,6 @@ void nsWindow::UpdateGlass() {
|
||||||
margins.cxRightWidth += kGlassMarginAdjustment;
|
margins.cxRightWidth += kGlassMarginAdjustment;
|
||||||
margins.cyBottomHeight += kGlassMarginAdjustment;
|
margins.cyBottomHeight += kGlassMarginAdjustment;
|
||||||
}
|
}
|
||||||
[[fallthrough]];
|
|
||||||
case eTransparencyGlass:
|
|
||||||
policy = DWMNCRP_ENABLED;
|
policy = DWMNCRP_ENABLED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -542,8 +542,7 @@ class nsWindow final : public nsBaseWidget {
|
||||||
HRGN ExcludeNonClientFromPaintRegion(HRGN aRegion);
|
HRGN ExcludeNonClientFromPaintRegion(HRGN aRegion);
|
||||||
static const wchar_t* GetMainWindowClass();
|
static const wchar_t* GetMainWindowClass();
|
||||||
bool HasGlass() const {
|
bool HasGlass() const {
|
||||||
return mTransparencyMode == eTransparencyGlass ||
|
return mTransparencyMode == eTransparencyBorderlessGlass;
|
||||||
mTransparencyMode == eTransparencyBorderlessGlass;
|
|
||||||
}
|
}
|
||||||
HWND GetOwnerWnd() const { return ::GetWindow(mWnd, GW_OWNER); }
|
HWND GetOwnerWnd() const { return ::GetWindow(mWnd, GW_OWNER); }
|
||||||
bool IsOwnerForegroundWindow() const {
|
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
|
// don't need to double buffer with anything but GDI
|
||||||
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
|
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
|
||||||
switch (mTransparencyMode) {
|
switch (mTransparencyMode) {
|
||||||
case eTransparencyGlass:
|
|
||||||
case eTransparencyBorderlessGlass:
|
case eTransparencyBorderlessGlass:
|
||||||
default:
|
default:
|
||||||
// If we're not doing translucency, then double buffer
|
// If we're not doing translucency, then double buffer
|
||||||
|
|
Загрузка…
Ссылка в новой задаче