mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fx-team to m-c
This commit is contained in:
commit
abec953a8d
@ -502,7 +502,7 @@
|
||||
<deck flex="1" id="tab-view-deck">
|
||||
<vbox flex="1" id="browser-panel">
|
||||
|
||||
<toolbox id="navigator-toolbox">
|
||||
<toolbox id="navigator-toolbox" mode="icons">
|
||||
<!-- Menu -->
|
||||
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
|
||||
defaultset="menubar-items"
|
||||
|
@ -389,9 +389,10 @@ let CustomizableUIInternal = {
|
||||
|
||||
// If this area is not registered, try to do it automatically:
|
||||
if (!areaProperties) {
|
||||
// If there's no default set attribute at all, we assume that we should
|
||||
// wait for registerArea to be called:
|
||||
if (!aToolbar.hasAttribute("defaultset")) {
|
||||
// If there's no defaultset attribute and this isn't a legacy extra toolbar,
|
||||
// we assume that we should wait for registerArea to be called:
|
||||
if (!aToolbar.hasAttribute("defaultset") &&
|
||||
!aToolbar.hasAttribute("customindex")) {
|
||||
if (!gPendingBuildAreas.has(area)) {
|
||||
gPendingBuildAreas.set(area, new Map());
|
||||
}
|
||||
@ -400,7 +401,7 @@ let CustomizableUIInternal = {
|
||||
return;
|
||||
}
|
||||
let props = {type: CustomizableUI.TYPE_TOOLBAR, legacy: true};
|
||||
let defaultsetAttribute = aToolbar.getAttribute("defaultset");
|
||||
let defaultsetAttribute = aToolbar.getAttribute("defaultset") || "";
|
||||
props.defaultPlacements = defaultsetAttribute.split(',').filter(s => s);
|
||||
this.registerArea(area, props);
|
||||
areaProperties = gAreas.get(area);
|
||||
@ -2105,6 +2106,8 @@ let CustomizableUIInternal = {
|
||||
gUIStateBeforeReset.uiCustomizationState = Services.prefs.getCharPref(kPrefCustomizationState);
|
||||
} catch(e) { }
|
||||
|
||||
this._resetExtraToolbars();
|
||||
|
||||
Services.prefs.clearUserPref(kPrefCustomizationState);
|
||||
Services.prefs.clearUserPref(kPrefDrawInTitlebar);
|
||||
LOG("State reset");
|
||||
@ -2121,6 +2124,28 @@ let CustomizableUIInternal = {
|
||||
}
|
||||
},
|
||||
|
||||
_resetExtraToolbars: function(aFilter = null) {
|
||||
let firstWindow = true; // Only need to persist once
|
||||
for (let [win, ] of gBuildWindows) {
|
||||
let toolbox = win.gNavToolbox;
|
||||
for (let child of toolbox.children) {
|
||||
let matchesFilter = !aFilter || aFilter == child.id;
|
||||
if (child.hasAttribute("customindex") && matchesFilter) {
|
||||
if (firstWindow) {
|
||||
let toolbarId = "toolbar" + child.getAttribute("customindex");
|
||||
toolbox.toolbarset.removeAttribute(toolbarId);
|
||||
win.document.persist(toolbox.toolbarset.id, toolbarId);
|
||||
// We have to unregister it properly to ensure we don't kill
|
||||
// XUL widgets which might be in here
|
||||
this.unregisterArea(child.id, true);
|
||||
}
|
||||
child.remove();
|
||||
}
|
||||
}
|
||||
firstWindow = false;
|
||||
}
|
||||
},
|
||||
|
||||
_rebuildRegisteredAreas: function() {
|
||||
for (let [areaId, areaNodes] of gBuildAreas) {
|
||||
let placements = gPlacements.get(areaId);
|
||||
@ -2174,6 +2199,10 @@ let CustomizableUIInternal = {
|
||||
});
|
||||
},
|
||||
|
||||
removeExtraToolbar: function(aToolbarId) {
|
||||
this._resetExtraToolbars(aToolbarId);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String|Node} aWidget - widget ID or a widget node (preferred for performance).
|
||||
* @return {Boolean} whether the widget is removable
|
||||
@ -2281,7 +2310,8 @@ let CustomizableUIInternal = {
|
||||
// Toolbars have a currentSet property which also deals correctly with overflown
|
||||
// widgets (if any) - use that instead:
|
||||
if (props.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
currentPlacements = container.currentSet.split(',');
|
||||
let currentSet = container.currentSet;
|
||||
currentPlacements = currentSet ? currentSet.split(',') : [];
|
||||
currentPlacements = currentPlacements.filter(removableOrDefault);
|
||||
} else {
|
||||
// Clone the array so we don't modify the actual placements...
|
||||
@ -2942,6 +2972,17 @@ this.CustomizableUI = {
|
||||
CustomizableUIInternal.undoReset();
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove a custom toolbar added in a previous version of Firefox or using
|
||||
* an add-on. NB: only works on the customizable toolbars generated by
|
||||
* the toolbox itself. Intended for use from CustomizeMode, not by
|
||||
* other consumers.
|
||||
* @param aToolbarId the ID of the toolbar to remove
|
||||
*/
|
||||
removeExtraToolbar: function(aToolbarId) {
|
||||
CustomizableUIInternal.removeExtraToolbar(aToolbarId);
|
||||
},
|
||||
|
||||
/**
|
||||
* Can the last Restore Defaults operation be undone.
|
||||
*
|
||||
|
@ -300,6 +300,8 @@ CustomizeMode.prototype = {
|
||||
|
||||
this._handler.isExitingCustomizeMode = true;
|
||||
|
||||
this._removeExtraToolbarsIfEmpty();
|
||||
|
||||
CustomizableUI.removeListener(this);
|
||||
|
||||
this.document.removeEventListener("keypress", this);
|
||||
@ -855,6 +857,18 @@ CustomizeMode.prototype = {
|
||||
}.bind(this)).then(null, ERROR);
|
||||
},
|
||||
|
||||
_removeExtraToolbarsIfEmpty: function() {
|
||||
let toolbox = this.window.gNavToolbox;
|
||||
for (let child of toolbox.children) {
|
||||
if (child.hasAttribute("customindex")) {
|
||||
let placements = CustomizableUI.getWidgetIdsInArea(child.id);
|
||||
if (!placements.length) {
|
||||
CustomizableUI.removeExtraToolbar(child.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
persistCurrentSets: function(aSetBeforePersisting) {
|
||||
let document = this.document;
|
||||
let toolbars = document.querySelectorAll("toolbar[customizable='true'][currentset]");
|
||||
|
@ -71,4 +71,5 @@ skip-if = os == "linux"
|
||||
[browser_970511_undo_restore_default.js]
|
||||
[browser_972267_customizationchange_events.js]
|
||||
[browser_973932_addonbar_currentset.js]
|
||||
[browser_975719_customtoolbars_behaviour.js]
|
||||
[browser_panel_toggle.js]
|
||||
|
@ -59,6 +59,7 @@ add_task(function() {
|
||||
"Widget should be in navbar in other window.");
|
||||
}
|
||||
}
|
||||
CustomizableUI.destroyWidget(spec.id);
|
||||
yield promiseWindowClosed(otherWin);
|
||||
});
|
||||
|
||||
|
@ -0,0 +1,100 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(function customizeToolbarAndKeepIt() {
|
||||
ok(gNavToolbox.toolbarset, "There should be a toolbarset");
|
||||
let toolbarID = "testAustralisCustomToolbar";
|
||||
gNavToolbox.appendCustomToolbar(toolbarID, "");
|
||||
let toolbarDOMID = getToolboxCustomToolbarId(toolbarID);
|
||||
let toolbarElement = document.getElementById(toolbarDOMID);
|
||||
ok(toolbarElement, "There should be a toolbar");
|
||||
if (!toolbarElement) {
|
||||
ok(false, "No toolbar created, bailing out of the test.");
|
||||
return;
|
||||
}
|
||||
is(toolbarElement.nextSibling, gNavToolbox.toolbarset,
|
||||
"Toolbar should have been inserted in toolbox, before toolbarset element");
|
||||
let cuiAreaType = CustomizableUI.getAreaType(toolbarDOMID);
|
||||
is(cuiAreaType, CustomizableUI.TYPE_TOOLBAR,
|
||||
"CustomizableUI should know the area and think it's a toolbar");
|
||||
if (cuiAreaType != CustomizableUI.TYPE_TOOLBAR) {
|
||||
ok(false, "Toolbar not registered successfully, bailing out of the test.");
|
||||
toolbarElement.remove();
|
||||
return;
|
||||
}
|
||||
ok(!CustomizableUI.getWidgetIdsInArea(toolbarDOMID).length, "There should be no widgets in the area yet.");
|
||||
CustomizableUI.addWidgetToArea("open-file-button", toolbarDOMID, 0);
|
||||
ok(toolbarElement.hasChildNodes(), "Toolbar should now have a button.");
|
||||
assertAreaPlacements(toolbarDOMID, ["open-file-button"]);
|
||||
|
||||
yield startCustomizing();
|
||||
// First, exit customize mode without doing anything, and verify the toolbar doesn't get removed.
|
||||
yield endCustomizing();
|
||||
ok(!CustomizableUI.inDefaultState, "Shouldn't be in default state, the toolbar should still be there.");
|
||||
cuiAreaType = CustomizableUI.getAreaType(toolbarDOMID);
|
||||
is(cuiAreaType, CustomizableUI.TYPE_TOOLBAR,
|
||||
"CustomizableUI should still know the area and think it's a toolbar");
|
||||
ok(toolbarElement.parentNode, "Toolbar should still be in the DOM.");
|
||||
ok(toolbarElement.hasChildNodes(), "Toolbar should still have items in it.");
|
||||
assertAreaPlacements(toolbarDOMID, ["open-file-button"]);
|
||||
|
||||
// Then customize again, and this time empty out the toolbar and verify it *does* get removed.
|
||||
yield startCustomizing();
|
||||
let openFileButton = document.getElementById("open-file-button");
|
||||
let palette = document.getElementById("customization-palette");
|
||||
simulateItemDrag(openFileButton, palette);
|
||||
ok(!CustomizableUI.inDefaultState, "Shouldn't be in default state because there's still a non-collapsed toolbar.");
|
||||
ok(!toolbarElement.hasChildNodes(), "Toolbar should have no more child nodes.");
|
||||
|
||||
toolbarElement.collapsed = true;
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state because there's now just a collapsed toolbar.");
|
||||
toolbarElement.collapsed = false;
|
||||
ok(!CustomizableUI.inDefaultState, "Shouldn't be in default state because there's a non-collapsed toolbar again.");
|
||||
yield endCustomizing();
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state because the toolbar should have been removed.");
|
||||
ok(!toolbarElement.parentNode, "Toolbar should no longer be in the DOM.");
|
||||
cuiAreaType = CustomizableUI.getAreaType(toolbarDOMID);
|
||||
is(cuiAreaType, null, "CustomizableUI should have forgotten all about the area");
|
||||
});
|
||||
|
||||
add_task(function resetShouldDealWithCustomToolbars() {
|
||||
ok(gNavToolbox.toolbarset, "There should be a toolbarset");
|
||||
let toolbarID = "testAustralisCustomToolbar";
|
||||
gNavToolbox.appendCustomToolbar(toolbarID, "");
|
||||
let toolbarDOMID = getToolboxCustomToolbarId(toolbarID);
|
||||
let toolbarElement = document.getElementById(toolbarDOMID);
|
||||
ok(toolbarElement, "There should be a toolbar");
|
||||
if (!toolbarElement) {
|
||||
ok(false, "No toolbar created, bailing out of the test.");
|
||||
return;
|
||||
}
|
||||
is(toolbarElement.nextSibling, gNavToolbox.toolbarset,
|
||||
"Toolbar should have been inserted in toolbox, before toolbarset element");
|
||||
let cuiAreaType = CustomizableUI.getAreaType(toolbarDOMID);
|
||||
is(cuiAreaType, CustomizableUI.TYPE_TOOLBAR,
|
||||
"CustomizableUI should know the area and think it's a toolbar");
|
||||
if (cuiAreaType != CustomizableUI.TYPE_TOOLBAR) {
|
||||
ok(false, "Toolbar not registered successfully, bailing out of the test.");
|
||||
toolbarElement.remove();
|
||||
return;
|
||||
}
|
||||
ok(!CustomizableUI.getWidgetIdsInArea(toolbarDOMID).length, "There should be no widgets in the area yet.");
|
||||
CustomizableUI.addWidgetToArea("sync-button", toolbarDOMID, 0);
|
||||
ok(toolbarElement.hasChildNodes(), "Toolbar should now have a button.");
|
||||
assertAreaPlacements(toolbarDOMID, ["sync-button"]);
|
||||
|
||||
CustomizableUI.reset();
|
||||
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state after reset.");
|
||||
let syncButton = document.getElementById("sync-button");
|
||||
ok(!syncButton, "Sync button shouldn't be in the document anymore.");
|
||||
ok(gNavToolbox.palette.querySelector("#sync-button"), "Sync button should be in the palette");
|
||||
ok(!toolbarElement.hasChildNodes(), "Toolbar should have no more child nodes.");
|
||||
ok(!toolbarElement.parentNode, "Toolbar should no longer be in the DOM.");
|
||||
cuiAreaType = CustomizableUI.getAreaType(toolbarDOMID);
|
||||
is(cuiAreaType, null, "CustomizableUI should have forgotten all about the area");
|
||||
});
|
||||
|
@ -11,8 +11,7 @@ Cu.import("resource:///modules/CustomizableUI.jsm", tmp);
|
||||
let {Promise, CustomizableUI} = tmp;
|
||||
|
||||
let ChromeUtils = {};
|
||||
let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
|
||||
scriptLoader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js", ChromeUtils);
|
||||
Services.scriptloader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js", ChromeUtils);
|
||||
|
||||
Services.prefs.setBoolPref("browser.uiCustomization.skipSourceNodeCheck", true);
|
||||
registerCleanupFunction(() => Services.prefs.clearUserPref("browser.uiCustomization.skipSourceNodeCheck"));
|
||||
@ -55,6 +54,10 @@ function removeCustomToolbars() {
|
||||
gAddedToolbars.clear();
|
||||
}
|
||||
|
||||
function getToolboxCustomToolbarId(toolbarName) {
|
||||
return "__customToolbar_" + toolbarName.replace(" ", "_");
|
||||
}
|
||||
|
||||
function resetCustomization() {
|
||||
return CustomizableUI.reset();
|
||||
}
|
||||
|
@ -147,11 +147,8 @@ let gSyncPane = {
|
||||
document.getElementById("fxaEmailAddress2").textContent = data.email;
|
||||
document.getElementById("fxaEmailAddress3").textContent = data.email;
|
||||
document.getElementById("fxaSyncComputerName").value = Weave.Service.clientsEngine.localName;
|
||||
let enginesList = document.getElementById("fxaSyncEnginesList")
|
||||
enginesList.disabled = enginesListDisabled;
|
||||
// *sigh* - disabling the <richlistbox> draws each item as if it is disabled,
|
||||
// but doesn't disable the checkboxes.
|
||||
for (let checkbox of enginesList.querySelectorAll("checkbox")) {
|
||||
let engines = document.getElementById("fxaSyncEngines")
|
||||
for (let checkbox of engines.querySelectorAll("checkbox")) {
|
||||
checkbox.disabled = enginesListDisabled;
|
||||
}
|
||||
});
|
||||
|
@ -259,41 +259,25 @@
|
||||
|
||||
<groupbox id="syncOptions">
|
||||
<caption label="&syncBrand.shortName.label;"/>
|
||||
<vbox>
|
||||
<richlistbox id="fxaSyncEnginesList"
|
||||
orient="vertical"
|
||||
onselect="if (this.selectedCount) this.clearSelection();">
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.tabs.label;"
|
||||
accesskey="&engine.tabs.accesskey;"
|
||||
preference="engine.tabs"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.bookmarks.label;"
|
||||
accesskey="&engine.bookmarks.accesskey;"
|
||||
preference="engine.bookmarks"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.passwords.label;"
|
||||
accesskey="&engine.passwords.accesskey;"
|
||||
preference="engine.passwords"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.history.label;"
|
||||
accesskey="&engine.history.accesskey;"
|
||||
preference="engine.history"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.addons.label;"
|
||||
accesskey="&engine.addons.accesskey;"
|
||||
preference="engine.addons"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<checkbox label="&engine.prefs.label;"
|
||||
accesskey="&engine.prefs.accesskey;"
|
||||
preference="engine.prefs"/>
|
||||
</richlistitem>
|
||||
</richlistbox>
|
||||
<vbox id="fxaSyncEngines">
|
||||
<checkbox label="&engine.tabs.label;"
|
||||
accesskey="&engine.tabs.accesskey;"
|
||||
preference="engine.tabs"/>
|
||||
<checkbox label="&engine.bookmarks.label;"
|
||||
accesskey="&engine.bookmarks.accesskey;"
|
||||
preference="engine.bookmarks"/>
|
||||
<checkbox label="&engine.passwords.label;"
|
||||
accesskey="&engine.passwords.accesskey;"
|
||||
preference="engine.passwords"/>
|
||||
<checkbox label="&engine.history.label;"
|
||||
accesskey="&engine.history.accesskey;"
|
||||
preference="engine.history"/>
|
||||
<checkbox label="&engine.addons.label;"
|
||||
accesskey="&engine.addons.accesskey;"
|
||||
preference="engine.addons"/>
|
||||
<checkbox label="&engine.prefs.label;"
|
||||
accesskey="&engine.prefs.accesskey;"
|
||||
preference="engine.prefs"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
<hbox align="center">
|
||||
|
@ -1186,6 +1186,8 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
}
|
||||
case "status": {
|
||||
let node = $(".requests-menu-status", target);
|
||||
let codeNode = $(".requests-menu-status-code", target);
|
||||
codeNode.setAttribute("value", aValue);
|
||||
node.setAttribute("code", aValue);
|
||||
break;
|
||||
}
|
||||
|
@ -148,6 +148,8 @@
|
||||
<hbox class="requests-menu-subitem requests-menu-status-and-method"
|
||||
align="center">
|
||||
<box class="requests-menu-status"/>
|
||||
<label class="plain requests-menu-status-code"
|
||||
crop="end"/>
|
||||
<label class="plain requests-menu-method"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
|
@ -248,10 +248,13 @@ function verifyRequestItemTarget(aRequestItem, aMethod, aUrl, aData = {}) {
|
||||
|
||||
if (status !== undefined) {
|
||||
let value = target.querySelector(".requests-menu-status").getAttribute("code");
|
||||
let codeValue = target.querySelector(".requests-menu-status-code").getAttribute("value");
|
||||
let tooltip = target.querySelector(".requests-menu-status-and-method").getAttribute("tooltiptext");
|
||||
info("Displayed status: " + value);
|
||||
info("Displayed code: " + codeValue);
|
||||
info("Tooltip status: " + tooltip);
|
||||
is(value, status, "The displayed status is incorrect.");
|
||||
is(codeValue, status, "The displayed status code is incorrect.");
|
||||
is(tooltip, status + " " + statusText, "The tooltip status is incorrect.");
|
||||
}
|
||||
if (type !== undefined) {
|
||||
|
@ -268,7 +268,6 @@ StyleEditorUI.prototype = {
|
||||
new StyleSheetEditor(styleSheet, this._window, file, isNew, this._walker);
|
||||
|
||||
editor.on("property-change", this._summaryChange.bind(this, editor));
|
||||
editor.on("style-applied", this._summaryChange.bind(this, editor));
|
||||
editor.on("linked-css-file", this._summaryChange.bind(this, editor));
|
||||
editor.on("linked-css-file-error", this._summaryChange.bind(this, editor));
|
||||
editor.on("error", this._onError);
|
||||
|
@ -596,9 +596,9 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
-moz-padding-end: 5px;
|
||||
}
|
||||
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([buttonover]):not([open]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled]):hover > .toolbarbutton-icon {
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):hover > .toolbarbutton-icon {
|
||||
background-color: hsla(0,0%,100%,.3);
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.2));
|
||||
border: 1px solid rgb(154,154,154);
|
||||
@ -613,9 +613,9 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover:active > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled]):hover:active > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover:active > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):hover:active > .toolbarbutton-icon,
|
||||
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[open="true"] > .toolbarbutton-icon {
|
||||
background-color: rgba(154,154,154,.5);
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.4));
|
||||
@ -750,7 +750,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menu-dropmarker,
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-dropmarker,
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#main-window:not([customizing]) .toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled] > .toolbarbutton-icon {
|
||||
#main-window:not([customizing]) .toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled=true] > .toolbarbutton-icon {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
|
@ -2914,18 +2914,18 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover,
|
||||
#TabsToolbar .toolbarbutton-1:not([type="menu-button"]):not([disabled]):not([open]):hover,
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover,
|
||||
#TabsToolbar .toolbarbutton-1:not([disabled]):not([buttonover]):hover > .toolbarbutton-menubutton-dropmarker {
|
||||
#TabsToolbar .toolbarbutton-1:not([type="menu-button"]):not([disabled=true]):not([open]):hover,
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover,
|
||||
#TabsToolbar .toolbarbutton-1:not([disabled=true]):not([buttonover]):hover > .toolbarbutton-menubutton-dropmarker {
|
||||
background-image: linear-gradient(transparent, rgba(0,0,0,.15)) !important;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover:active,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover:active,
|
||||
#TabsToolbar .toolbarbutton-1:not([type="menu-button"]):not([disabled]):hover:active,
|
||||
#TabsToolbar .toolbarbutton-1:not([type="menu-button"]):not([disabled=true]):hover:active,
|
||||
#TabsToolbar .toolbarbutton-1[type="menu"][open],
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover:active,
|
||||
#TabsToolbar .toolbarbutton-1[open]:not([disabled]):hover > .toolbarbutton-menubutton-dropmarker {
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover:active,
|
||||
#TabsToolbar .toolbarbutton-1[open]:not([disabled=true]):hover > .toolbarbutton-menubutton-dropmarker {
|
||||
background-image: linear-gradient(transparent, rgba(0,0,0,.3)) !important;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@
|
||||
/* Network requests table: specific column dimensions */
|
||||
|
||||
.requests-menu-status-and-method {
|
||||
width: 8em;
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.requests-menu-status {
|
||||
@ -177,6 +177,12 @@ box.requests-menu-status {
|
||||
transition: box-shadow 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
label.requests-menu-status-code {
|
||||
-moz-margin-start: 3px !important;
|
||||
width: 3em;
|
||||
-moz-margin-end: -3em !important;
|
||||
}
|
||||
|
||||
.theme-dark box.requests-menu-status:not([code]) {
|
||||
background-color: rgba(95, 115, 135, 1); /* dark grey */
|
||||
}
|
||||
@ -282,22 +288,22 @@ box.requests-menu-status {
|
||||
}
|
||||
|
||||
.theme-dark .requests-menu-timings-division[division-scale=second] {
|
||||
-moz-border-start-color: #d99b28 !important; /* Light orange highlight color */
|
||||
-moz-border-start-color: #f5f7fa !important; /* Light foreground text */
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.theme-light .requests-menu-timings-division[division-scale=second] {
|
||||
-moz-border-start-color: #d97e00 !important; /* Light orange highlight color */
|
||||
-moz-border-start-color: #585959 !important; /* Grey foreground text */
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.theme-dark .requests-menu-timings-division[division-scale=minute] {
|
||||
-moz-border-start-color: #eb5368 !important; /* Red highlight color */
|
||||
-moz-border-start-color: #f5f7fa !important; /* Light foreground text */
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.theme-light .requests-menu-timings-division[division-scale=minute] {
|
||||
-moz-border-start-color: #ed2655 !important; /* Red highlight color */
|
||||
-moz-border-start-color: #585959 !important; /* Grey foreground text */
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ menuitem.bookmark-item {
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menu-dropmarker,
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-dropmarker,
|
||||
#main-window:not([customizing]) .toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#main-window:not([customizing]) .toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled] > .toolbarbutton-icon {
|
||||
#main-window:not([customizing]) .toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled=true] > .toolbarbutton-icon {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
@ -584,7 +584,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1:not(:hover):not(:active):not([open]) > .toolbarbutton-menubutton-dropmarker::before,
|
||||
#nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled]) + .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled])::before {
|
||||
#nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled=true]) + .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled=true])::before {
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
width: 1px;
|
||||
@ -610,12 +610,12 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):-moz-any(:hover,[open]) > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-text,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-container,
|
||||
@conditionalForwardWithUrlbar@ > .toolbarbutton-1:-moz-any([disabled],:not([open]):not([disabled]):not(:active)) > .toolbarbutton-icon {
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any(:hover,[open]) > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-text,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-container,
|
||||
@conditionalForwardWithUrlbar@ > .toolbarbutton-1:-moz-any([disabled=true],:not([open]):not([disabled=true]):not(:active)) > .toolbarbutton-icon {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.2) hsla(210,54%,20%,.25);
|
||||
box-shadow: 0 1px hsla(0,0%,100%,.3) inset,
|
||||
@ -623,20 +623,20 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
0 0 2px hsla(210,54%,20%,.1);
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):not([open]):not(:active):hover > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon,
|
||||
@conditionalForwardWithUrlbar@ > #forward-button:not([open]):not(:active):not([disabled]):hover > .toolbarbutton-icon {
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):not([open]):not(:active):hover > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon,
|
||||
@conditionalForwardWithUrlbar@ > #forward-button:not([open]):not(:active):not([disabled=true]):hover > .toolbarbutton-icon {
|
||||
border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4);
|
||||
background-color: hsla(210,48%,96%,.75);
|
||||
box-shadow: 0 0 1px hsla(210,54%,20%,.03),
|
||||
0 0 2px hsla(210,54%,20%,.1);
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover:active > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-text,
|
||||
#nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-container {
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover:active > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-text,
|
||||
#nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-container {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
background-color: hsla(210,54%,20%,.15);
|
||||
border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4);
|
||||
@ -649,7 +649,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1:-moz-any(:hover,[open]) > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon {
|
||||
#nav-bar .toolbarbutton-1:-moz-any(:hover,[open]) > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon {
|
||||
-moz-border-start-color: hsla(210,54%,20%,.35);
|
||||
}
|
||||
|
||||
@ -667,11 +667,11 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
#TabsToolbar .toolbarbutton-1:not([disabled]):hover,
|
||||
#TabsToolbar .toolbarbutton-1:not([disabled=true]):hover,
|
||||
#TabsToolbar .toolbarbutton-1[open],
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover {
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):hover,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled=true]):hover,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled=true]):hover {
|
||||
background-image: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.5)),
|
||||
linear-gradient(transparent, rgba(0,0,0,.25) 30%),
|
||||
linear-gradient(transparent, rgba(0,0,0,.25) 30%);
|
||||
|
@ -25,29 +25,33 @@ ANDROID=$(ANDROID_SDK)/../../tools/android
|
||||
TARGET= $(notdir $(ANDROID_SDK))
|
||||
|
||||
PACKAGE_DEPS = \
|
||||
build.xml \
|
||||
res/layout/main.xml \
|
||||
AndroidManifest.xml \
|
||||
src/org/mozilla/geckoviewexample/GeckoViewExample.java \
|
||||
assets/libxul.so \
|
||||
build.xml \
|
||||
src/org/mozilla/geckoviewexample/GeckoViewExample.java \
|
||||
$(CURDIR)/res/layout/main.xml \
|
||||
$(CURDIR)/AndroidManifest.xml \
|
||||
$(NULL)
|
||||
|
||||
res/layout/main.xml: $(srcdir)/main.xml
|
||||
$(CURDIR)/res/layout/main.xml: $(srcdir)/main.xml
|
||||
$(NSINSTALL) $(srcdir)/main.xml res/layout/
|
||||
|
||||
AndroidManifest.xml: $(srcdir)/AndroidManifest.xml
|
||||
$(NSINSTALL) $(srcdir)/AndroidManifest.xml .
|
||||
$(CURDIR)/AndroidManifest.xml: $(srcdir)/AndroidManifest.xml
|
||||
$(NSINSTALL) $(srcdir)/AndroidManifest.xml $(CURDIR)
|
||||
|
||||
src/org/mozilla/geckoviewexample/GeckoViewExample.java: $(srcdir)/GeckoViewExample.java
|
||||
$(NSINSTALL) $(srcdir)/GeckoViewExample.java src/org/mozilla/geckoviewexample/
|
||||
|
||||
assets/libxul.so: $(DIST)/geckoview_library/geckoview_assets.zip
|
||||
assets/libxul.so: $(DIST)/geckoview_library/geckoview_assets.zip FORCE
|
||||
$(UNZIP) -o $(DIST)/geckoview_library/geckoview_assets.zip
|
||||
|
||||
build.xml:
|
||||
$(ANDROID) create project --name GeckoViewExample --target $(TARGET) --path $(CURDIR) --activity GeckoViewExample --package org.mozilla.geckoviewexample
|
||||
$(ANDROID) update project --target $(TARGET) --path $(CURDIR) --library $(DEPTH)/mobile/android/geckoview_library
|
||||
$(RM) $(CURDIR)/res/layout/main.xml
|
||||
$(NSINSTALL) $(srcdir)/main.xml res/layout/
|
||||
$(RM) $(CURDIR)/AndroidManifest.xml
|
||||
$(NSINSTALL) $(srcdir)/AndroidManifest.xml $(CURDIR)
|
||||
echo jar.libs.dir=libs >> project.properties
|
||||
|
||||
package: $(PACKAGE_DEPS)
|
||||
package: $(PACKAGE_DEPS) FORCE
|
||||
ant debug
|
||||
|
@ -138,6 +138,7 @@ public class HomeBanner extends LinearLayout
|
||||
public void run() {
|
||||
mTextView.setText(text);
|
||||
setVisibility(VISIBLE);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("HomeBanner:Shown", (String) getTag()));
|
||||
|
||||
// Animate the banner if it is currently active.
|
||||
if (mActive) {
|
||||
|
@ -42,13 +42,11 @@ public class testHomeBanner extends UITest {
|
||||
* Note: This test does not remove the message after it is done.
|
||||
*/
|
||||
private void addBannerTest() {
|
||||
addBannerMessage();
|
||||
|
||||
// Load about:home again, and make sure the onshown handler is called.
|
||||
// Load about:home and make sure the onshown handler is called.
|
||||
Actions.EventExpecter eventExpecter = getActions().expectGeckoEvent("TestHomeBanner:MessageShown");
|
||||
addBannerMessage();
|
||||
NavigationHelper.enterAndLoadUrl("about:home");
|
||||
// TODO: Add shown event passing from Java: bug 974723
|
||||
// eventExpecter.blockForEvent();
|
||||
eventExpecter.blockForEvent();
|
||||
|
||||
// Verify that the banner is visible with the correct text.
|
||||
mAboutHome.assertBannerText(TEXT);
|
||||
|
@ -33,7 +33,7 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_ABS_DIST = $(abspath $(DIST))
|
||||
|
||||
package: $(properties_deps)
|
||||
package: $(properties_deps) FORCE
|
||||
# Make directory for the zips
|
||||
$(MKDIR) -p $(_ABS_DIST)/geckoview_library
|
||||
|
||||
|
@ -69,7 +69,10 @@ let HomeBanner = (function () {
|
||||
text: message.text,
|
||||
iconURI: message.iconURI
|
||||
});
|
||||
};
|
||||
|
||||
let _handleShown = function(id) {
|
||||
let message = _messages[id];
|
||||
if (message.onshown)
|
||||
message.onshown();
|
||||
};
|
||||
@ -93,13 +96,17 @@ let HomeBanner = (function () {
|
||||
_handleGet();
|
||||
break;
|
||||
|
||||
case "HomeBanner:Shown":
|
||||
_handleShown(data);
|
||||
break;
|
||||
|
||||
case "HomeBanner:Click":
|
||||
_handleClick(data);
|
||||
break;
|
||||
|
||||
case "HomeBanner:Dismiss":
|
||||
_handleDismiss(data);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
@ -119,6 +126,7 @@ let HomeBanner = (function () {
|
||||
// observers to listen for requests from the Java UI.
|
||||
if (Object.keys(_messages).length == 1) {
|
||||
Services.obs.addObserver(this, "HomeBanner:Get", false);
|
||||
Services.obs.addObserver(this, "HomeBanner:Shown", false);
|
||||
Services.obs.addObserver(this, "HomeBanner:Click", false);
|
||||
Services.obs.addObserver(this, "HomeBanner:Dismiss", false);
|
||||
|
||||
@ -149,6 +157,7 @@ let HomeBanner = (function () {
|
||||
// If there are no more messages, remove the observers.
|
||||
if (Object.keys(_messages).length == 0) {
|
||||
Services.obs.removeObserver(this, "HomeBanner:Get");
|
||||
Services.obs.removeObserver(this, "HomeBanner:Shown");
|
||||
Services.obs.removeObserver(this, "HomeBanner:Click");
|
||||
Services.obs.removeObserver(this, "HomeBanner:Dismiss");
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ loader.lazyGetter(this, "CssLogic", () => require("devtools/styleinspector/css-l
|
||||
|
||||
let TRANSITION_CLASS = "moz-styleeditor-transitioning";
|
||||
let TRANSITION_DURATION_MS = 500;
|
||||
let TRANSITION_BUFFER_MS = 1000;
|
||||
let TRANSITION_RULE = "\
|
||||
:root.moz-styleeditor-transitioning, :root.moz-styleeditor-transitioning * {\
|
||||
transition-duration: " + TRANSITION_DURATION_MS + "ms !important; \
|
||||
@ -751,10 +752,10 @@ let StyleSheetActor = protocol.ActorClass({
|
||||
|
||||
this._transitionRefCount++;
|
||||
|
||||
// Set up clean up and commit after transition duration (+10% buffer)
|
||||
// Set up clean up and commit after transition duration (+buffer)
|
||||
// @see _onTransitionEnd
|
||||
this.window.setTimeout(this._onTransitionEnd.bind(this),
|
||||
Math.floor(TRANSITION_DURATION_MS * 1.1));
|
||||
TRANSITION_DURATION_MS + TRANSITION_BUFFER_MS);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -579,6 +579,9 @@ LoadExtensionDirectories(nsINIParser &parser,
|
||||
void
|
||||
nsXREDirProvider::LoadExtensionBundleDirectories()
|
||||
{
|
||||
if (!mozilla::Preferences::GetBool("extensions.defaultProviders.enabled", true))
|
||||
return;
|
||||
|
||||
if (mProfileDir && !gSafeMode) {
|
||||
nsCOMPtr<nsIFile> extensionsINI;
|
||||
mProfileDir->Clone(getter_AddRefs(extensionsINI));
|
||||
|
Loading…
Reference in New Issue
Block a user