Backed out 5 changesets (bug 1417709) for failing X in devtools/shared/tests/unit/test_css-properties-db.js r=backout on a CLOSED TREE

Backed out changeset 5670c9582add (bug 1417709)
Backed out changeset 50f0febe43a0 (bug 1417709)
Backed out changeset 29e6c0d82193 (bug 1417709)
Backed out changeset e3a6c5b74595 (bug 1417709)
Backed out changeset a0fe569c86c0 (bug 1417709)
This commit is contained in:
Margareta Eliza Balazs 2017-11-23 01:17:07 +02:00
Родитель 2214548e2c
Коммит 2cb7aeff33
11 изменённых файлов: 60 добавлений и 91 удалений

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

@ -97,7 +97,12 @@
}
}
#main-window:not(:-moz-lwtheme) > #titlebar {
-moz-appearance: -moz-window-titlebar;
}
#main-window:not([tabsintitlebar]) > #titlebar {
-moz-appearance: -moz-window-titlebar;
height: 22px; /* The native titlebar on OS X is 22px tall. */
}
@ -810,8 +815,8 @@ html|span.ac-emphasize-text-url {
}
:root:-moz-any([inFullscreen], [tabsintitlebar]) #TabsToolbar:not(:-moz-lwtheme) {
-moz-appearance: -moz-mac-vibrant-titlebar-dark;
-moz-font-smoothing-background-color: -moz-mac-vibrant-titlebar-dark;
-moz-appearance: -moz-mac-vibrancy-dark;
-moz-font-smoothing-background-color: -moz-mac-vibrancy-dark;
background-color: #232323;
color: hsl(240, 9%, 98%);
text-shadow: none;

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

@ -10,6 +10,6 @@
}
#TabsToolbar:-moz-lwtheme-darktext {
-moz-appearance: -moz-mac-vibrant-titlebar-light;
-moz-font-smoothing-background-color: -moz-mac-vibrant-titlebar-light;
-moz-appearance: -moz-mac-vibrancy-light;
-moz-font-smoothing-background-color: -moz-mac-vibrancy-light;
}

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

@ -294,8 +294,6 @@ enum ThemeWidgetType : uint8_t {
NS_THEME_MAC_VIBRANCY_LIGHT,
NS_THEME_MAC_VIBRANCY_DARK,
NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT,
NS_THEME_MAC_VIBRANT_TITLEBAR_DARK,
NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN,
NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED,

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

@ -760,8 +760,6 @@ CSS_KEY(-moz-mac-help-button, _moz_mac_help_button)
CSS_KEY(-moz-win-exclude-glass, _moz_win_exclude_glass)
CSS_KEY(-moz-mac-vibrancy-light, _moz_mac_vibrancy_light)
CSS_KEY(-moz-mac-vibrancy-dark, _moz_mac_vibrancy_dark)
CSS_KEY(-moz-mac-vibrant-titlebar-light, _moz_mac_vibrant_titlebar_light)
CSS_KEY(-moz-mac-vibrant-titlebar-dark, _moz_mac_vibrant_titlebar_dark)
CSS_KEY(-moz-mac-disclosure-button-closed, _moz_mac_disclosure_button_closed)
CSS_KEY(-moz-mac-disclosure-button-open, _moz_mac_disclosure_button_open)
CSS_KEY(-moz-mac-source-list, _moz_mac_source_list)

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

@ -859,8 +859,6 @@ const KTableEntry nsCSSProps::kAppearanceKTable[] = {
{ eCSSKeyword__moz_win_exclude_glass, NS_THEME_WIN_EXCLUDE_GLASS },
{ eCSSKeyword__moz_mac_vibrancy_light, NS_THEME_MAC_VIBRANCY_LIGHT },
{ eCSSKeyword__moz_mac_vibrancy_dark, NS_THEME_MAC_VIBRANCY_DARK },
{ eCSSKeyword__moz_mac_vibrant_titlebar_light, NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT },
{ eCSSKeyword__moz_mac_vibrant_titlebar_dark, NS_THEME_MAC_VIBRANT_TITLEBAR_DARK },
{ eCSSKeyword__moz_mac_disclosure_button_open, NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN },
{ eCSSKeyword__moz_mac_disclosure_button_closed, NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED },
{ eCSSKeyword__moz_gtk_info_bar, NS_THEME_GTK_INFO_BAR },
@ -1134,8 +1132,6 @@ const KTableEntry nsCSSProps::kColorKTable[] = {
{ eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight },
{ eCSSKeyword__moz_mac_vibrancy_light, LookAndFeel::eColorID__moz_mac_vibrancy_light },
{ eCSSKeyword__moz_mac_vibrancy_dark, LookAndFeel::eColorID__moz_mac_vibrancy_dark },
{ eCSSKeyword__moz_mac_vibrant_titlebar_light, LookAndFeel::eColorID__moz_mac_vibrant_titlebar_light },
{ eCSSKeyword__moz_mac_vibrant_titlebar_dark, LookAndFeel::eColorID__moz_mac_vibrant_titlebar_dark },
{ eCSSKeyword__moz_mac_menuitem, LookAndFeel::eColorID__moz_mac_menuitem },
{ eCSSKeyword__moz_mac_active_menuitem, LookAndFeel::eColorID__moz_mac_active_menuitem },
{ eCSSKeyword__moz_mac_menupopup, LookAndFeel::eColorID__moz_mac_menupopup },

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

@ -160,8 +160,6 @@ public:
// on -moz-appearance names
eColorID__moz_mac_vibrancy_light,
eColorID__moz_mac_vibrancy_dark,
eColorID__moz_mac_vibrant_titlebar_light,
eColorID__moz_mac_vibrant_titlebar_dark,
eColorID__moz_mac_menupopup,
eColorID__moz_mac_menuitem,
eColorID__moz_mac_active_menuitem,

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

@ -2484,10 +2484,9 @@ FindTitlebarBottom(const nsTArray<nsIWidget::ThemeGeometry>& aThemeGeometries,
int32_t aWindowWidth)
{
int32_t titlebarBottom = 0;
for (auto& g : aThemeGeometries) {
if ((g.mType == nsNativeThemeCocoa::eThemeGeometryTypeTitlebar ||
g.mType == nsNativeThemeCocoa::eThemeGeometryTypeVibrantTitlebarLight ||
g.mType == nsNativeThemeCocoa::eThemeGeometryTypeVibrantTitlebarDark) &&
for (uint32_t i = 0; i < aThemeGeometries.Length(); ++i) {
const nsIWidget::ThemeGeometry& g = aThemeGeometries[i];
if ((g.mType == nsNativeThemeCocoa::eThemeGeometryTypeTitlebar) &&
g.mRect.X() <= 0 &&
g.mRect.XMost() >= aWindowWidth &&
g.mRect.Y() <= 0) {
@ -2561,43 +2560,15 @@ nsChildView::UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometri
[win placeFullScreenButton:[mView convertRect:DevPixelsToCocoaPoints(fullScreenButtonRect) toView:nil]];
}
static Maybe<VibrancyType>
ThemeGeometryTypeToVibrancyType(nsITheme::ThemeGeometryType aThemeGeometryType)
{
switch (aThemeGeometryType) {
case nsNativeThemeCocoa::eThemeGeometryTypeVibrancyLight:
case nsNativeThemeCocoa::eThemeGeometryTypeVibrantTitlebarLight:
return Some(VibrancyType::LIGHT);
case nsNativeThemeCocoa::eThemeGeometryTypeVibrancyDark:
case nsNativeThemeCocoa::eThemeGeometryTypeVibrantTitlebarDark:
return Some(VibrancyType::DARK);
case nsNativeThemeCocoa::eThemeGeometryTypeSheet:
return Some(VibrancyType::SHEET);
case nsNativeThemeCocoa::eThemeGeometryTypeTooltip:
return Some(VibrancyType::TOOLTIP);
case nsNativeThemeCocoa::eThemeGeometryTypeMenu:
return Some(VibrancyType::MENU);
case nsNativeThemeCocoa::eThemeGeometryTypeHighlightedMenuItem:
return Some(VibrancyType::HIGHLIGHTED_MENUITEM);
case nsNativeThemeCocoa::eThemeGeometryTypeSourceList:
return Some(VibrancyType::SOURCE_LIST);
case nsNativeThemeCocoa::eThemeGeometryTypeSourceListSelection:
return Some(VibrancyType::SOURCE_LIST_SELECTION);
case nsNativeThemeCocoa::eThemeGeometryTypeActiveSourceListSelection:
return Some(VibrancyType::ACTIVE_SOURCE_LIST_SELECTION);
default:
return Nothing();
}
}
static LayoutDeviceIntRegion
GatherVibrantRegion(const nsTArray<nsIWidget::ThemeGeometry>& aThemeGeometries,
VibrancyType aVibrancyType)
GatherThemeGeometryRegion(const nsTArray<nsIWidget::ThemeGeometry>& aThemeGeometries,
nsITheme::ThemeGeometryType aThemeGeometryType)
{
LayoutDeviceIntRegion region;
for (auto& geometry : aThemeGeometries) {
if (ThemeGeometryTypeToVibrancyType(geometry.mType) == Some(aVibrancyType)) {
region.OrWith(geometry.mRect);
for (size_t i = 0; i < aThemeGeometries.Length(); ++i) {
const nsIWidget::ThemeGeometry& g = aThemeGeometries[i];
if (g.mType == aThemeGeometryType) {
region.OrWith(g.mRect);
}
}
return region;
@ -2633,23 +2604,23 @@ nsChildView::UpdateVibrancy(const nsTArray<ThemeGeometry>& aThemeGeometries)
}
LayoutDeviceIntRegion sheetRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::SHEET);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeSheet);
LayoutDeviceIntRegion vibrantLightRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::LIGHT);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeVibrancyLight);
LayoutDeviceIntRegion vibrantDarkRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::DARK);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeVibrancyDark);
LayoutDeviceIntRegion menuRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::MENU);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeMenu);
LayoutDeviceIntRegion tooltipRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::TOOLTIP);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeTooltip);
LayoutDeviceIntRegion highlightedMenuItemRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::HIGHLIGHTED_MENUITEM);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeHighlightedMenuItem);
LayoutDeviceIntRegion sourceListRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::SOURCE_LIST);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeSourceList);
LayoutDeviceIntRegion sourceListSelectionRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::SOURCE_LIST_SELECTION);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeSourceListSelection);
LayoutDeviceIntRegion activeSourceListSelectionRegion =
GatherVibrantRegion(aThemeGeometries, VibrancyType::ACTIVE_SOURCE_LIST_SELECTION);
GatherThemeGeometryRegion(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeActiveSourceListSelection);
MakeRegionsNonOverlapping(sheetRegion, vibrantLightRegion, vibrantDarkRegion,
menuRegion, tooltipRegion, highlightedMenuItemRegion,
@ -2658,14 +2629,14 @@ nsChildView::UpdateVibrancy(const nsTArray<ThemeGeometry>& aThemeGeometries)
auto& vm = EnsureVibrancyManager();
vm.UpdateVibrantRegion(VibrancyType::LIGHT, vibrantLightRegion);
vm.UpdateVibrantRegion(VibrancyType::DARK, vibrantDarkRegion);
vm.UpdateVibrantRegion(VibrancyType::MENU, menuRegion);
vm.UpdateVibrantRegion(VibrancyType::TOOLTIP, tooltipRegion);
vm.UpdateVibrantRegion(VibrancyType::MENU, menuRegion);
vm.UpdateVibrantRegion(VibrancyType::HIGHLIGHTED_MENUITEM, highlightedMenuItemRegion);
vm.UpdateVibrantRegion(VibrancyType::SHEET, sheetRegion);
vm.UpdateVibrantRegion(VibrancyType::SOURCE_LIST, sourceListRegion);
vm.UpdateVibrantRegion(VibrancyType::SOURCE_LIST_SELECTION, sourceListSelectionRegion);
vm.UpdateVibrantRegion(VibrancyType::ACTIVE_SOURCE_LIST_SELECTION, activeSourceListSelectionRegion);
vm.UpdateVibrantRegion(VibrancyType::DARK, vibrantDarkRegion);
}
void
@ -2676,14 +2647,39 @@ nsChildView::ClearVibrantAreas()
}
}
static VibrancyType
ThemeGeometryTypeToVibrancyType(nsITheme::ThemeGeometryType aThemeGeometryType)
{
switch (aThemeGeometryType) {
case nsNativeThemeCocoa::eThemeGeometryTypeVibrancyLight:
return VibrancyType::LIGHT;
case nsNativeThemeCocoa::eThemeGeometryTypeVibrancyDark:
return VibrancyType::DARK;
case nsNativeThemeCocoa::eThemeGeometryTypeTooltip:
return VibrancyType::TOOLTIP;
case nsNativeThemeCocoa::eThemeGeometryTypeMenu:
return VibrancyType::MENU;
case nsNativeThemeCocoa::eThemeGeometryTypeHighlightedMenuItem:
return VibrancyType::HIGHLIGHTED_MENUITEM;
case nsNativeThemeCocoa::eThemeGeometryTypeSheet:
return VibrancyType::SHEET;
case nsNativeThemeCocoa::eThemeGeometryTypeSourceList:
return VibrancyType::SOURCE_LIST;
case nsNativeThemeCocoa::eThemeGeometryTypeSourceListSelection:
return VibrancyType::SOURCE_LIST_SELECTION;
case nsNativeThemeCocoa::eThemeGeometryTypeActiveSourceListSelection:
return VibrancyType::ACTIVE_SOURCE_LIST_SELECTION;
default:
MOZ_CRASH();
}
}
NSColor*
nsChildView::VibrancyFillColorForThemeGeometryType(nsITheme::ThemeGeometryType aThemeGeometryType)
{
if (VibrancyManager::SystemSupportsVibrancy()) {
Maybe<VibrancyType> vibrancyType =
ThemeGeometryTypeToVibrancyType(aThemeGeometryType);
MOZ_RELEASE_ASSERT(vibrancyType, "should only encounter vibrant theme geometry types here");
return EnsureVibrancyManager().VibrancyFillColorForType(*vibrancyType);
return EnsureVibrancyManager().VibrancyFillColorForType(
ThemeGeometryTypeToVibrancyType(aThemeGeometryType));
}
return [NSColor whiteColor];
}

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

@ -336,13 +336,11 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
// requires the use of the private API
// -[NSVisualEffectView fontSmoothingBackgroundColor].
case eColorID__moz_mac_vibrancy_light:
case eColorID__moz_mac_vibrant_titlebar_light:
case eColorID__moz_mac_source_list:
case eColorID__moz_mac_tooltip:
aColor = NS_RGB(0xf7,0xf7,0xf7);
break;
case eColorID__moz_mac_vibrancy_dark:
case eColorID__moz_mac_vibrant_titlebar_dark:
aColor = NS_RGB(0x28,0x28,0x28);
break;
case eColorID__moz_mac_menupopup:

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

@ -38,8 +38,6 @@ public:
eThemeGeometryTypeHighlightedMenuItem,
eThemeGeometryTypeVibrancyLight,
eThemeGeometryTypeVibrancyDark,
eThemeGeometryTypeVibrantTitlebarLight,
eThemeGeometryTypeVibrantTitlebarDark,
eThemeGeometryTypeTooltip,
eThemeGeometryTypeSheet,
eThemeGeometryTypeSourceList,

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

@ -2969,9 +2969,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(gfxContext* aContext,
break;
case NS_THEME_MAC_VIBRANCY_LIGHT:
case NS_THEME_MAC_VIBRANCY_DARK:
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK: {
case NS_THEME_MAC_VIBRANCY_DARK: {
ThemeGeometryType type = ThemeGeometryTypeForWidget(aFrame, aWidgetType);
DrawVibrancyBackground(cgContext, macRect, aFrame, type);
break;
@ -3145,9 +3143,7 @@ nsNativeThemeCocoa::CreateWebRenderCommandsForWidget(mozilla::wr::DisplayListBui
return false;
case NS_THEME_MAC_VIBRANCY_LIGHT:
case NS_THEME_MAC_VIBRANCY_DARK:
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK: {
case NS_THEME_MAC_VIBRANCY_DARK: {
ThemeGeometryType type = ThemeGeometryTypeForWidget(aFrame, aWidgetType);
aBuilder.PushRect(bounds, bounds, true,
wr::ToColorF(VibrancyFillColor(aFrame, type)));
@ -3740,8 +3736,6 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
case NS_THEME_METERCHUNK:
case NS_THEME_MAC_VIBRANCY_LIGHT:
case NS_THEME_MAC_VIBRANCY_DARK:
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK:
*aShouldRepaint = false;
return NS_OK;
}
@ -3904,8 +3898,6 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a
case NS_THEME_MAC_VIBRANCY_LIGHT:
case NS_THEME_MAC_VIBRANCY_DARK:
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK:
return VibrancyManager::SystemSupportsVibrancy();
}
@ -4013,8 +4005,6 @@ nsNativeThemeCocoa::NeedToClearBackgroundBehindWidget(nsIFrame* aFrame,
case NS_THEME_MAC_ACTIVE_SOURCE_LIST_SELECTION:
case NS_THEME_MAC_VIBRANCY_LIGHT:
case NS_THEME_MAC_VIBRANCY_DARK:
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK:
case NS_THEME_TOOLTIP:
case NS_THEME_MENUPOPUP:
case NS_THEME_MENUITEM:
@ -4045,10 +4035,6 @@ nsNativeThemeCocoa::ThemeGeometryTypeForWidget(nsIFrame* aFrame, uint8_t aWidget
return eThemeGeometryTypeVibrancyLight;
case NS_THEME_MAC_VIBRANCY_DARK:
return eThemeGeometryTypeVibrancyDark;
case NS_THEME_MAC_VIBRANT_TITLEBAR_LIGHT:
return eThemeGeometryTypeVibrantTitlebarLight;
case NS_THEME_MAC_VIBRANT_TITLEBAR_DARK:
return eThemeGeometryTypeVibrantTitlebarDark;
case NS_THEME_TOOLTIP:
return eThemeGeometryTypeTooltip;
case NS_THEME_MENUPOPUP:

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

@ -248,8 +248,6 @@ const char nsXPLookAndFeel::sColorPrefs[][41] =
"ui.-moz-mac-secondaryhighlight",
"ui.-moz-mac-vibrancy-light",
"ui.-moz-mac-vibrancy-dark",
"ui.-moz-mac-vibrant-titlebar-light",
"ui.-moz-mac-vibrant-titlebar-dark",
"ui.-moz-mac-menupopup",
"ui.-moz-mac-menuitem",
"ui.-moz-mac-active-menuitem",
@ -679,10 +677,8 @@ nsXPLookAndFeel::GetStandinForNativeColor(ColorID aID)
case eColorID__moz_mac_secondaryhighlight:
result = NS_RGB(0xD4, 0xD4, 0xD4); break;
case eColorID__moz_mac_vibrancy_light:
case eColorID__moz_mac_vibrant_titlebar_light:
result = NS_RGB(0xf7, 0xf7, 0xf7); break;
case eColorID__moz_mac_vibrancy_dark:
case eColorID__moz_mac_vibrant_titlebar_dark:
result = NS_RGB(0x28, 0x28, 0x28); break;
case eColorID__moz_mac_menupopup:
result = NS_RGB(0xe6, 0xe6, 0xe6); break;