зеркало из https://github.com/mozilla/gecko-dev.git
merge fx-team to m-c
This commit is contained in:
Коммит
3579d651ff
|
@ -338,7 +338,7 @@ let CustomizableUIInternal = {
|
|||
if (!areaIsKnown) {
|
||||
gAreas.set(aName, props);
|
||||
|
||||
if (props.get("legacy")) {
|
||||
if (props.get("legacy") && !gPlacements.has(aName)) {
|
||||
// Guarantee this area exists in gFuturePlacements, to avoid checking it in
|
||||
// various places elsewhere.
|
||||
gFuturePlacements.set(aName, new Set());
|
||||
|
|
|
@ -99,10 +99,10 @@ skip-if = os == "linux"
|
|||
|
||||
[browser_985815_propagate_setToolbarVisibility.js]
|
||||
[browser_981305_separator_insertion.js]
|
||||
[browser_989609_bootstrapped_custom_toolbar.js]
|
||||
[browser_987177_destroyWidget_xul.js]
|
||||
[browser_987177_xul_wrapper_updating.js]
|
||||
[browser_987492_window_api.js]
|
||||
[browser_992747_toggle_noncustomizable_toolbar.js]
|
||||
[browser_993322_widget_notoolbar.js]
|
||||
[browser_bootstrapped_custom_toolbar.js]
|
||||
[browser_panel_toggle.js]
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
const kTestBarID = "testBar";
|
||||
const kWidgetID = "characterencoding-button";
|
||||
|
||||
function createTestBar() {
|
||||
function createTestBar(aLegacy) {
|
||||
let testBar = document.createElement("toolbar");
|
||||
testBar.id = kTestBarID;
|
||||
testBar.setAttribute("customizable", "true");
|
||||
CustomizableUI.registerArea(kTestBarID,
|
||||
{ type: CustomizableUI.TYPE_TOOLBAR, legacy: false }
|
||||
);
|
||||
CustomizableUI.registerArea(kTestBarID, {
|
||||
type: CustomizableUI.TYPE_TOOLBAR,
|
||||
legacy: aLegacy,
|
||||
});
|
||||
gNavToolbox.appendChild(testBar);
|
||||
return testBar;
|
||||
}
|
||||
|
@ -22,7 +23,8 @@ function createTestBar() {
|
|||
* Helper function that does the following:
|
||||
*
|
||||
* 1) Creates a custom toolbar and registers it
|
||||
* with CustomizableUI.
|
||||
* with CustomizableUI. Sets the legacy attribute
|
||||
* of the object passed to registerArea to aLegacy.
|
||||
* 2) Adds the widget with ID aWidgetID to that new
|
||||
* toolbar.
|
||||
* 3) Enters customize mode and makes sure that the
|
||||
|
@ -31,15 +33,15 @@ function createTestBar() {
|
|||
* the custom toolbar.
|
||||
* 5) Checks that the widget has no placement.
|
||||
* 6) Re-adds and re-registers a custom toolbar with the same
|
||||
* ID as the first one.
|
||||
* ID and options as the first one.
|
||||
* 7) Enters customize mode and checks that the widget is
|
||||
* properly back in the toolbar.
|
||||
* 8) Exits customize mode, removes and de-registers the
|
||||
* toolbar, and resets the toolbars to default.
|
||||
*/
|
||||
function checkRestoredPresence(aWidgetID) {
|
||||
function checkRestoredPresence(aWidgetID, aLegacy) {
|
||||
return Task.spawn(function* () {
|
||||
let testBar = createTestBar();
|
||||
let testBar = createTestBar(aLegacy);
|
||||
CustomizableUI.addWidgetToArea(aWidgetID, kTestBarID);
|
||||
let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
|
||||
is(placement.area, kTestBarID,
|
||||
|
@ -51,7 +53,7 @@ function checkRestoredPresence(aWidgetID) {
|
|||
let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
|
||||
is(placement, null, "Expected " + aWidgetID + " to be in the palette");
|
||||
|
||||
testBar = createTestBar();
|
||||
testBar = createTestBar(aLegacy);
|
||||
|
||||
yield startCustomizing();
|
||||
let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
|
||||
|
@ -67,9 +69,11 @@ function checkRestoredPresence(aWidgetID) {
|
|||
}
|
||||
|
||||
add_task(function* () {
|
||||
yield checkRestoredPresence("downloads-button")
|
||||
yield checkRestoredPresence("downloads-button", false);
|
||||
yield checkRestoredPresence("downloads-button", true);
|
||||
});
|
||||
|
||||
add_task(function* () {
|
||||
yield checkRestoredPresence("characterencoding-button")
|
||||
});
|
||||
yield checkRestoredPresence("characterencoding-button", false);
|
||||
yield checkRestoredPresence("characterencoding-button", true);
|
||||
});
|
|
@ -144,6 +144,18 @@
|
|||
border-right-style: none !important;
|
||||
}
|
||||
|
||||
/* Use a different color only on Windows 8 and higher for inactive windows.
|
||||
* On aero, the menubar fog disappears for inactive windows, and renders gray
|
||||
* illegible.
|
||||
*/
|
||||
@media not all and (-moz-os-version: windows-vista) {
|
||||
@media not all and (-moz-os-version: windows-win7) {
|
||||
#toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
color: ThreeDShadow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#main-window[darkwindowframe="true"] #toolbar-menubar:not(:-moz-lwtheme):not(:-moz-window-inactive),
|
||||
#main-window[darkwindowframe="true"] #TabsToolbar:not(:-moz-lwtheme):not(:-moz-window-inactive) {
|
||||
color: white;
|
||||
|
|
|
@ -109,12 +109,24 @@
|
|||
%endif
|
||||
|
||||
/* Make the menu inherit the toolbar's color. On non-compositor (Aero Basic, XP modern, classic)
|
||||
* this is defined above. Otherwise (Aero Glass, Windows 8 inactive windows), this is hardcoded
|
||||
* to black in browser-aero.css. */
|
||||
#main-menubar > menu:not(:-moz-lwtheme) {
|
||||
color: inherit;
|
||||
* this is defined above, but only for tabsintitlebar. Otherwise (Aero Glass, Windows 8),
|
||||
* this is hardcoded to black in browser-aero.css, even without tabsintitlebar. */
|
||||
%ifdef WINDOWS_AERO
|
||||
@media not all and (-moz-windows-compositor) {
|
||||
%endif
|
||||
#main-window[tabsintitlebar] #main-menubar > menu:not(:-moz-lwtheme) {
|
||||
color: inherit;
|
||||
}
|
||||
%ifdef WINDOWS_AERO
|
||||
}
|
||||
|
||||
@media (-moz-windows-compositor) {
|
||||
#main-menubar > menu:not(:-moz-lwtheme) {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
/**
|
||||
* In the classic themes, the titlebar has a horizontal gradient, which is
|
||||
* problematic for reading the text of background tabs when they're in the
|
||||
|
@ -591,7 +603,6 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme-bri
|
|||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
padding: 8px 2px;
|
||||
-moz-box-pack: center;
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
#nav-bar #PanelUI-menu-button {
|
||||
|
@ -1051,6 +1062,16 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
|||
-moz-image-region: rect(1px, 71px, 17px, 55px);
|
||||
}
|
||||
|
||||
/* zoom control text (reset) button special case: */
|
||||
|
||||
#nav-bar #zoom-reset-button > .toolbarbutton-text {
|
||||
/* To make this line up with the icons, it needs the same height (18px) +
|
||||
* padding (2 * 2px) + border (2 * 1px), but as a minimum because otherwise
|
||||
* increase in text sizes would break things...
|
||||
*/
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
/* ::::: fullscreen window controls ::::: */
|
||||
|
||||
#window-controls {
|
||||
|
|
Загрузка…
Ссылка в новой задаче