Merge m-c to graphics, a=merge
MozReview-Commit-ID: 8IWAJNO52ry
@ -7,7 +7,6 @@ jobs:
|
||||
job:
|
||||
type: decision-task
|
||||
treeherder-symbol: Nd
|
||||
triggered-by: nightly
|
||||
target-tasks-method: nightly_linux
|
||||
run-on-projects:
|
||||
- mozilla-central
|
||||
@ -25,7 +24,6 @@ jobs:
|
||||
job:
|
||||
type: decision-task
|
||||
treeherder-symbol: Nd-OSX
|
||||
triggered-by: nightly
|
||||
target-tasks-method: nightly_macosx
|
||||
run-on-projects:
|
||||
- date
|
||||
@ -35,7 +33,6 @@ jobs:
|
||||
job:
|
||||
type: decision-task
|
||||
treeherder-symbol: Nd-Win64
|
||||
triggered-by: nightly
|
||||
target-tasks-method: nightly_win64
|
||||
run-on-projects:
|
||||
- date
|
||||
@ -45,7 +42,6 @@ jobs:
|
||||
job:
|
||||
type: decision-task
|
||||
treeherder-symbol: Na
|
||||
triggered-by: nightly
|
||||
target-tasks-method: nightly_fennec
|
||||
run-on-projects:
|
||||
- mozilla-central
|
||||
|
@ -217,6 +217,7 @@ dom/messagechannel/**
|
||||
dom/network/**
|
||||
dom/notification/**
|
||||
dom/offline/**
|
||||
dom/payments/**
|
||||
dom/performance/**
|
||||
dom/permission/**
|
||||
dom/plugins/**
|
||||
|
@ -63,9 +63,6 @@ pref("extensions.hotfix.certs.2.sha1Fingerprint", "39:E7:2B:7A:5B:CF:37:78:F9:5D
|
||||
// Check AUS for system add-on updates.
|
||||
pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
|
||||
|
||||
// Disable screenshots for now, Shield will enable this.
|
||||
pref("extensions.screenshots.system-disabled", true);
|
||||
|
||||
// Disable add-ons that are not installed by the user in all scopes by default.
|
||||
// See the SCOPE constants in AddonManager.jsm for values to use here.
|
||||
pref("extensions.autoDisableScopes", 15);
|
||||
|
@ -1644,7 +1644,7 @@ var BookmarkingUI = {
|
||||
_hasBookmarksObserver: false,
|
||||
_itemGuids: new Set(),
|
||||
uninit: function BUI_uninit() {
|
||||
this._updateBookmarkPageMenuItem(true);
|
||||
this.updateBookmarkPageMenuItem(true);
|
||||
CustomizableUI.removeListener(this);
|
||||
|
||||
this._uninitView();
|
||||
@ -1734,7 +1734,7 @@ var BookmarkingUI = {
|
||||
* forceReset is passed when we're destroyed and the label should go back
|
||||
* to the default (Bookmark This Page) for OS X.
|
||||
*/
|
||||
_updateBookmarkPageMenuItem: function BUI__updateBookmarkPageMenuItem(forceReset) {
|
||||
updateBookmarkPageMenuItem: function BUI_updateBookmarkPageMenuItem(forceReset) {
|
||||
let isStarred = !forceReset && this._itemGuids.size > 0;
|
||||
let label = isStarred ? "editlabel" : "bookmarklabel";
|
||||
if (this.broadcaster) {
|
||||
@ -1747,7 +1747,7 @@ var BookmarkingUI = {
|
||||
if (event.target != event.currentTarget)
|
||||
return;
|
||||
|
||||
this._updateBookmarkPageMenuItem();
|
||||
this.updateBookmarkPageMenuItem();
|
||||
PlacesCommandHook.updateBookmarkAllTabsCommand();
|
||||
this._initMobileBookmarks(document.getElementById("menu_mobileBookmarks"));
|
||||
this._initRecentBookmarks(document.getElementById("menu_recentBookmarks"));
|
||||
@ -1854,7 +1854,7 @@ var BookmarkingUI = {
|
||||
},
|
||||
|
||||
onCurrentPageContextPopupShowing() {
|
||||
this._updateBookmarkPageMenuItem();
|
||||
this.updateBookmarkPageMenuItem();
|
||||
},
|
||||
|
||||
handleEvent: function BUI_handleEvent(aEvent) {
|
||||
@ -1869,7 +1869,7 @@ var BookmarkingUI = {
|
||||
},
|
||||
|
||||
onPanelMenuViewShowing: function BUI_onViewShowing(aEvent) {
|
||||
this._updateBookmarkPageMenuItem();
|
||||
this.updateBookmarkPageMenuItem();
|
||||
// Update checked status of the toolbar toggle.
|
||||
let viewToolbar = document.getElementById("panelMenu_viewBookmarksToolbar");
|
||||
let personalToolbar = document.getElementById("PersonalToolbar");
|
||||
|
@ -611,12 +611,12 @@ html|input.urlbar-input[textoverflow]:not([focused]) {
|
||||
}
|
||||
|
||||
#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] {
|
||||
visibility: collapse;
|
||||
display: none;
|
||||
transition: margin-top 100ms;
|
||||
}
|
||||
|
||||
#PopupAutoCompleteRichResult.showSearchSuggestionsNotification > deck[anonid="search-suggestions-notification"] {
|
||||
visibility: visible;
|
||||
display: -moz-deck;
|
||||
}
|
||||
|
||||
#PopupAutoCompleteRichResult > richlistbox {
|
||||
|
@ -7763,9 +7763,12 @@ var gPageActionButton = {
|
||||
},
|
||||
|
||||
_preparePanelToBeShown() {
|
||||
// Update the bookmark item's label.
|
||||
BookmarkingUI.updateBookmarkPageMenuItem();
|
||||
|
||||
// Update the send-to-device item's disabled state.
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let url = browser.currentURI.spec;
|
||||
|
||||
let sendToDeviceItem =
|
||||
document.getElementById("page-action-send-to-device-button");
|
||||
sendToDeviceItem.disabled = !gSync.isSendableURI(url);
|
||||
|
@ -333,6 +333,8 @@
|
||||
<menupopup id="toolbar-context-menu"
|
||||
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
|
||||
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
photonaccesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
|
||||
photonlabel="&customizeMenu.pinToOverflowMenu.label;"
|
||||
accesskey="&customizeMenu.moveToPanel.accesskey;"
|
||||
label="&customizeMenu.moveToPanel.label;"
|
||||
contexttype="toolbaritem"
|
||||
@ -457,6 +459,12 @@
|
||||
<panelview id="page-action-mainView"
|
||||
class="PanelUI-subView">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="page-action-bookmark-button"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
observes="bookmarkThisPageBroadcaster"
|
||||
command="Browser:AddBookmarkAs"
|
||||
onclick="gPageActionButton.panel.hidePopup();"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="page-action-copy-url-button"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
label="©URLCmd.label;"
|
||||
|
@ -1345,7 +1345,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.fullScreen || isTabEmpty(this.mCurrentTab)) {
|
||||
if (!window.fullScreen || isTabEmpty(newTab)) {
|
||||
focusAndSelectUrlBar();
|
||||
return;
|
||||
}
|
||||
@ -4106,7 +4106,7 @@
|
||||
// has just crashed and we haven't started showing the tab crashed
|
||||
// page yet.
|
||||
let fl = requestedBrowser.frameLoader;
|
||||
shouldBeBlank = (!fl.tabParent || !fl.tabParent.hasPresented);
|
||||
shouldBeBlank = !this.minimized && (!fl.tabParent || !fl.tabParent.hasPresented);
|
||||
}
|
||||
|
||||
this.log("Tab should be blank: " + shouldBeBlank);
|
||||
|
@ -1,13 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: window.location is null");
|
||||
|
||||
|
||||
add_task(async function checkIdentityOfAboutSupport() {
|
||||
let tab = gBrowser.loadOneTab("about:support", {
|
||||
referrerURI: null,
|
||||
|
@ -1,9 +1,3 @@
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: this.docShell is null");
|
||||
|
||||
function test() {
|
||||
ok(!!gBrowser, "gBrowser exists");
|
||||
is(gBrowser, getBrowser(), "both ways of getting tabbrowser work");
|
||||
|
@ -1,15 +1,3 @@
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: gBrowser._finalizeTabSwitch is not a function");
|
||||
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: gBrowser._finalizeTabSwitch is not a function");
|
||||
|
||||
function test() {
|
||||
BrowserTestUtils.addTab(gBrowser);
|
||||
BrowserTestUtils.addTab(gBrowser);
|
||||
|
@ -28,6 +28,7 @@ skip-if = (os == "mac" && debug) # temporary skip-if due to increase in intermit
|
||||
subsuite = clipboard
|
||||
[browser_newtab_drop_preview.js]
|
||||
[browser_newtab_focus.js]
|
||||
[browser_newtab_fullscreen_focus.js]
|
||||
[browser_newtab_perwindow_private_browsing.js]
|
||||
[browser_newtab_reflow_load.js]
|
||||
support-files =
|
||||
|
@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
function isFullscreenSizeMode() {
|
||||
let sizemode = document.documentElement.getAttribute("sizemode");
|
||||
return sizemode == "fullscreen";
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the URL bar is correctly focused
|
||||
* when a new tab is opened while in fullscreen
|
||||
* mode.
|
||||
*/
|
||||
add_task(async function() {
|
||||
gURLBar.blur();
|
||||
|
||||
Assert.ok(!window.fullScreen, "Should not start in fullscreen mode.");
|
||||
BrowserFullScreen();
|
||||
await BrowserTestUtils.waitForCondition(() => isFullscreenSizeMode());
|
||||
|
||||
registerCleanupFunction(async function() {
|
||||
// Exit fullscreen if we're still in it.
|
||||
if (window.fullScreen) {
|
||||
BrowserFullScreen();
|
||||
await BrowserTestUtils.waitForCondition(() => !isFullscreenSizeMode());
|
||||
}
|
||||
});
|
||||
|
||||
Assert.ok(window.fullScreen, "Should be in fullscreen mode now.");
|
||||
|
||||
let newTabOpened = BrowserTestUtils.waitForEvent(gBrowser, "TabSwitchDone");
|
||||
BrowserOpenTab();
|
||||
await newTabOpened;
|
||||
|
||||
Assert.ok(gURLBar.focused, "URL bar should be focused.");
|
||||
});
|
@ -8,6 +8,14 @@
|
||||
// unassigned port 8 because we don't want to actually load anything, we just
|
||||
// want to check that the URLs are not blocked.
|
||||
|
||||
// The following rejections should not be left uncaught. This test has been
|
||||
// whitelisted until the issue is fixed.
|
||||
if (!gMultiProcessBrowser) {
|
||||
Cu.import("resource://testing-common/PromiseTestUtils.jsm", this);
|
||||
PromiseTestUtils.expectUncaughtRejection(/NetworkError/);
|
||||
PromiseTestUtils.expectUncaughtRejection(/NetworkError/);
|
||||
}
|
||||
|
||||
const TEST_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com") + "test_no_mcb_for_loopback.html";
|
||||
|
||||
const LOOPBACK_PNG_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://127.0.0.1:8888") + "moz.png";
|
||||
|
@ -2,13 +2,6 @@
|
||||
* 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/. */
|
||||
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: Assert is null");
|
||||
|
||||
|
||||
var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
|
||||
|
||||
var tabsToRemove = [];
|
||||
|
@ -159,8 +159,6 @@ var whitelist = new Set([
|
||||
platforms: ["linux"]},
|
||||
// Bug 1348362
|
||||
{file: "chrome://global/skin/icons/warning-64.png", platforms: ["linux", "win"]},
|
||||
// Bug 1348524
|
||||
{file: "chrome://global/skin/notification/close.png", platforms: ["macosx"]},
|
||||
// Bug 1348525
|
||||
{file: "chrome://global/skin/splitter/grip-bottom.gif", platforms: ["linux"]},
|
||||
{file: "chrome://global/skin/splitter/grip-left.gif", platforms: ["linux"]},
|
||||
|
@ -106,7 +106,7 @@ let gWhitelist = [{
|
||||
type: "single-quote"
|
||||
}, {
|
||||
file: "preferences.properties",
|
||||
key: "searchResults.needHelp",
|
||||
key: "searchResults.needHelp2",
|
||||
type: "double-quote"
|
||||
}
|
||||
];
|
||||
|
@ -2,12 +2,6 @@
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
//
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
|
||||
//
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: window.location is null");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
|
||||
"resource://gre/modules/Promise.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
|
||||
|
@ -2,6 +2,72 @@
|
||||
|
||||
let gPanel = document.getElementById("page-action-panel");
|
||||
|
||||
add_task(async function bookmark() {
|
||||
// Open a unique page.
|
||||
let url = "http://example.com/browser_page_action_menu";
|
||||
await BrowserTestUtils.withNewTab(url, async () => {
|
||||
// Open the panel.
|
||||
await promisePanelOpen();
|
||||
|
||||
// The bookmark button should read "Bookmark This Page" and not be starred.
|
||||
let bookmarkButton = document.getElementById("page-action-bookmark-button");
|
||||
Assert.equal(bookmarkButton.label, "Bookmark This Page");
|
||||
Assert.ok(!bookmarkButton.hasAttribute("starred"));
|
||||
|
||||
// Click the button.
|
||||
let hiddenPromise = promisePanelHidden();
|
||||
EventUtils.synthesizeMouseAtCenter(bookmarkButton, {});
|
||||
await hiddenPromise;
|
||||
|
||||
// Make sure the edit-bookmark panel opens, then hide it.
|
||||
await new Promise(resolve => {
|
||||
if (StarUI.panel.state == "open") {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
StarUI.panel.addEventListener("popupshown", resolve, { once: true });
|
||||
});
|
||||
StarUI.panel.hidePopup();
|
||||
|
||||
// Open the panel again.
|
||||
await promisePanelOpen();
|
||||
|
||||
// The bookmark button should now read "Edit This Bookmark" and be starred.
|
||||
Assert.equal(bookmarkButton.label, "Edit This Bookmark");
|
||||
Assert.ok(bookmarkButton.hasAttribute("starred"));
|
||||
Assert.equal(bookmarkButton.getAttribute("starred"), "true");
|
||||
|
||||
// Click it again.
|
||||
hiddenPromise = promisePanelHidden();
|
||||
EventUtils.synthesizeMouseAtCenter(bookmarkButton, {});
|
||||
await hiddenPromise;
|
||||
|
||||
// The edit-bookmark panel should open again.
|
||||
await new Promise(resolve => {
|
||||
if (StarUI.panel.state == "open") {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
StarUI.panel.addEventListener("popupshown", resolve, { once: true });
|
||||
});
|
||||
|
||||
// Click the remove-bookmark button in the panel.
|
||||
StarUI._element("editBookmarkPanelRemoveButton").click();
|
||||
|
||||
// Open the panel again.
|
||||
await promisePanelOpen();
|
||||
|
||||
// The bookmark button should read "Bookmark This Page" and not be starred.
|
||||
Assert.equal(bookmarkButton.label, "Bookmark This Page");
|
||||
Assert.ok(!bookmarkButton.hasAttribute("starred"));
|
||||
|
||||
// Done.
|
||||
hiddenPromise = promisePanelHidden();
|
||||
gPanel.hidePopup();
|
||||
await hiddenPromise;
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function copyURL() {
|
||||
// Open the panel.
|
||||
await promisePanelOpen();
|
||||
|
@ -217,7 +217,8 @@ function suggestionsPresent() {
|
||||
function assertVisible(visible, win = window) {
|
||||
let style =
|
||||
win.getComputedStyle(win.gURLBar.popup.searchSuggestionsNotification);
|
||||
Assert.equal(style.visibility, visible ? "visible" : "collapse");
|
||||
let check = visible ? "notEqual" : "equal";
|
||||
Assert[check](style.display, "none");
|
||||
}
|
||||
|
||||
function promiseTransition(win = window) {
|
||||
|
@ -122,7 +122,8 @@ function suggestionsPresent() {
|
||||
function assertVisible(visible, win = window) {
|
||||
let style =
|
||||
win.getComputedStyle(win.gURLBar.popup.searchSuggestionsNotification);
|
||||
Assert.equal(style.visibility, visible ? "visible" : "collapse");
|
||||
let check = visible ? "notEqual" : "equal";
|
||||
Assert[check](style.display, "none");
|
||||
}
|
||||
function assertFooterVisible(visible, win = window) {
|
||||
let style = win.getComputedStyle(win.gURLBar.popup.footer);
|
||||
|
@ -2,6 +2,15 @@
|
||||
* 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/. */
|
||||
|
||||
// The rejection "The fetching process for the media resource was aborted by the
|
||||
// user agent at the user's request." is left unhandled in some cases. This bug
|
||||
// should be fixed, but for the moment this file is whitelisted.
|
||||
//
|
||||
// NOTE: Whitelisting a class of rejections should be limited. Normally you
|
||||
// should use "expectUncaughtRejection" to flag individual failures.
|
||||
Cu.import("resource://testing-common/PromiseTestUtils.jsm", this);
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/aborted by the user agent/);
|
||||
|
||||
const permissionError = "error: NotAllowedError: The request is not allowed " +
|
||||
"by the user agent or the platform in the current context.";
|
||||
|
||||
|
@ -12,12 +12,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "ExtensionParent",
|
||||
Cu.import("resource://gre/modules/ExtensionUtils.jsm");
|
||||
|
||||
var {
|
||||
extensionStylesheets,
|
||||
promiseEvent,
|
||||
} = ExtensionUtils;
|
||||
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
|
||||
function getBrowser(sidebar) {
|
||||
let browser = document.getElementById("webext-panels-browser");
|
||||
if (browser) {
|
||||
@ -54,6 +54,15 @@ function getBrowser(sidebar) {
|
||||
return readyPromise.then(() => {
|
||||
browser.messageManager.loadFrameScript("chrome://browser/content/content.js", false);
|
||||
ExtensionParent.apiManager.emit("extension-browser-inserted", browser);
|
||||
|
||||
if (sidebar.browserStyle) {
|
||||
browser.messageManager.loadFrameScript(
|
||||
"chrome://extensions/content/ext-browser-content.js", false);
|
||||
|
||||
browser.messageManager.sendAsyncMessage("Extension:InitBrowser", {
|
||||
stylesheets: extensionStylesheets,
|
||||
});
|
||||
}
|
||||
return browser;
|
||||
});
|
||||
}
|
||||
@ -63,6 +72,7 @@ function loadWebPanel() {
|
||||
let sidebar = {
|
||||
uri: sidebarURI.searchParams.get("panel"),
|
||||
remote: sidebarURI.searchParams.get("remote"),
|
||||
browserStyle: sidebarURI.searchParams.get("browser-style"),
|
||||
};
|
||||
getBrowser(sidebar).then(browser => {
|
||||
browser.loadURI(sidebar.uri);
|
||||
|
@ -776,7 +776,9 @@ CustomizeMode.prototype = {
|
||||
if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) {
|
||||
aNode = aNode.firstChild;
|
||||
}
|
||||
CustomizableUI.addWidgetToArea(aNode.id, CustomizableUI.AREA_PANEL);
|
||||
let panel = gPhotonStructure ? CustomizableUI.AREA_FIXED_OVERFLOW_PANEL
|
||||
: CustomizableUI.AREA_PANEL;
|
||||
CustomizableUI.addWidgetToArea(aNode.id, panel);
|
||||
if (!this._customizing) {
|
||||
CustomizableUI.dispatchToolboxEvent("customizationchange");
|
||||
}
|
||||
|
@ -218,8 +218,12 @@ this.PanelMultiView = class {
|
||||
return this.__keyNavigationMap;
|
||||
}
|
||||
|
||||
constructor(xulNode) {
|
||||
constructor(xulNode, testMode = false) {
|
||||
this.node = xulNode;
|
||||
// If `testMode` is `true`, the consumer is only interested in accessing the
|
||||
// methods of this instance. (E.g. in unit tests.)
|
||||
if (testMode)
|
||||
return;
|
||||
|
||||
this._currentSubView = this._anchorElement = this._subViewObserver = null;
|
||||
this._mainViewHeight = 0;
|
||||
@ -572,6 +576,9 @@ this.PanelMultiView = class {
|
||||
aAnchor.removeAttribute("open");
|
||||
|
||||
this._viewContainer.removeAttribute("transition-reverse");
|
||||
|
||||
evt = new window.CustomEvent("ViewShown", { bubbles: true, cancelable: false });
|
||||
viewNode.dispatchEvent(evt);
|
||||
}, { once: true });
|
||||
});
|
||||
}, { once: true });
|
||||
@ -823,15 +830,15 @@ this.PanelMultiView = class {
|
||||
let maxIdx = buttons.length - 1;
|
||||
let buttonIndex = isDown ? 0 : maxIdx;
|
||||
if (typeof navMap.selected == "number") {
|
||||
if (isDown) {
|
||||
buttonIndex = ++navMap.selected;
|
||||
if (buttonIndex > maxIdx)
|
||||
buttonIndex = 0;
|
||||
} else {
|
||||
buttonIndex = --navMap.selected;
|
||||
if (buttonIndex < 0)
|
||||
buttonIndex = maxIdx;
|
||||
}
|
||||
// Buttons may get selected whilst the panel is shown, so add an extra
|
||||
// check here.
|
||||
do {
|
||||
buttonIndex = navMap.selected = (navMap.selected + (isDown ? 1 : -1));
|
||||
} while (buttons[buttonIndex] && buttons[buttonIndex].disabled)
|
||||
if (isDown && buttonIndex > maxIdx)
|
||||
buttonIndex = 0;
|
||||
else if (!isDown && buttonIndex < 0)
|
||||
buttonIndex = maxIdx;
|
||||
}
|
||||
let button = buttons[buttonIndex];
|
||||
button.focus();
|
||||
@ -899,7 +906,11 @@ this.PanelMultiView = class {
|
||||
let buttons = Array.from(view.querySelectorAll(".subviewbutton:not([disabled])"));
|
||||
if (this._canGoBack(view))
|
||||
buttons.unshift(view.backButton);
|
||||
return buttons;
|
||||
let dwu = this._dwu;
|
||||
return buttons.filter(button => {
|
||||
let bounds = dwu.getBoundsWithoutFlushing(button);
|
||||
return bounds.width > 0 && bounds.height > 0;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -332,42 +332,6 @@
|
||||
</panelview>
|
||||
|
||||
</panelmultiview>
|
||||
<!-- These menupopups are located here to prevent flickering,
|
||||
see bug 492960 comment 20. -->
|
||||
<menupopup id="customizationPanelItemContextMenu">
|
||||
<menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
|
||||
closemenu="single"
|
||||
class="customize-context-moveToToolbar"
|
||||
accesskey="&customizeMenu.moveToToolbar.accesskey;"
|
||||
label="&customizeMenu.moveToToolbar.label;"/>
|
||||
<menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
|
||||
closemenu="single"
|
||||
class="customize-context-removeFromPanel"
|
||||
accesskey="&customizeMenu.removeFromMenu.accesskey;"
|
||||
label="&customizeMenu.removeFromMenu.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem command="cmd_CustomizeToolbars"
|
||||
class="viewCustomizeToolbar"
|
||||
accesskey="&viewCustomizeToolbar.accesskey;"
|
||||
label="&viewCustomizeToolbar.label;"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="customizationPaletteItemContextMenu">
|
||||
<menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
|
||||
class="customize-context-addToToolbar"
|
||||
accesskey="&customizeMenu.addToToolbar.accesskey;"
|
||||
label="&customizeMenu.addToToolbar.label;"/>
|
||||
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
class="customize-context-addToPanel"
|
||||
accesskey="&customizeMenu.addToPanel.accesskey;"
|
||||
label="&customizeMenu.addToPanel.label;"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="customizationPanelContextMenu">
|
||||
<menuitem command="cmd_CustomizeToolbars"
|
||||
accesskey="&customizeMenu.addMoreItems.accesskey;"
|
||||
label="&customizeMenu.addMoreItems.label;"/>
|
||||
</menupopup>
|
||||
</panel>
|
||||
|
||||
<panel id="widget-overflow"
|
||||
@ -431,6 +395,7 @@
|
||||
type="arrow"
|
||||
position="after_start"
|
||||
hidden="true"
|
||||
flip="slide"
|
||||
orient="vertical"
|
||||
noautofocus="true"
|
||||
noautohide="true"
|
||||
@ -489,6 +454,47 @@
|
||||
</popupnotification>
|
||||
</panel>
|
||||
|
||||
<menupopup id="customizationPanelItemContextMenu">
|
||||
<menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
|
||||
closemenu="single"
|
||||
class="customize-context-moveToToolbar"
|
||||
photonaccesskey="&customizeMenu.unpinFromOverflowMenu.accesskey;"
|
||||
photonlabel="&customizeMenu.unpinFromOverflowMenu.label;"
|
||||
accesskey="&customizeMenu.moveToToolbar.accesskey;"
|
||||
label="&customizeMenu.moveToToolbar.label;"/>
|
||||
<menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
|
||||
closemenu="single"
|
||||
class="customize-context-removeFromPanel"
|
||||
photonaccesskey="&customizeMenu.removeFromToolbar.accesskey;"
|
||||
photonlabel="&customizeMenu.removeFromToolbar.label;"
|
||||
accesskey="&customizeMenu.removeFromMenu.accesskey;"
|
||||
label="&customizeMenu.removeFromMenu.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem command="cmd_CustomizeToolbars"
|
||||
class="viewCustomizeToolbar"
|
||||
accesskey="&viewCustomizeToolbar.accesskey;"
|
||||
label="&viewCustomizeToolbar.label;"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="customizationPaletteItemContextMenu">
|
||||
<menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
|
||||
class="customize-context-addToToolbar"
|
||||
accesskey="&customizeMenu.addToToolbar.accesskey;"
|
||||
label="&customizeMenu.addToToolbar.label;"/>
|
||||
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
class="customize-context-addToPanel"
|
||||
photonaccesskey="&customizeMenu.addToOverflowMenu.accesskey;"
|
||||
photonlabel="&customizeMenu.addToOverflowMenu.label;"
|
||||
accesskey="&customizeMenu.addToPanel.accesskey;"
|
||||
label="&customizeMenu.addToPanel.label;"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="customizationPanelContextMenu">
|
||||
<menuitem command="cmd_CustomizeToolbars"
|
||||
accesskey="&customizeMenu.addMoreItems.accesskey;"
|
||||
label="&customizeMenu.addMoreItems.label;"/>
|
||||
</menupopup>
|
||||
|
||||
<panel id="appMenu-popup"
|
||||
class="cui-widget-panel"
|
||||
role="group"
|
||||
|
@ -70,6 +70,7 @@ const PanelUI = {
|
||||
}
|
||||
|
||||
this._initPhotonPanel();
|
||||
this._updateContextMenuLabels();
|
||||
Services.obs.notifyObservers(null, "appMenu-notifications-request", "refresh");
|
||||
|
||||
this._initialized = true;
|
||||
@ -80,6 +81,7 @@ const PanelUI = {
|
||||
// If the Photon pref changes, we need to re-init our element references.
|
||||
this._initElements();
|
||||
this._initPhotonPanel();
|
||||
this._updateContextMenuLabels();
|
||||
delete this._readyPromise;
|
||||
this._isReady = false;
|
||||
},
|
||||
@ -114,6 +116,32 @@ const PanelUI = {
|
||||
}
|
||||
},
|
||||
|
||||
_updateContextMenuLabels() {
|
||||
const kContextMenus = [
|
||||
"customizationPanelItemContextMenu",
|
||||
"customizationPaletteItemContextMenu",
|
||||
"toolbar-context-menu",
|
||||
];
|
||||
for (let menuId of kContextMenus) {
|
||||
let menu = document.getElementById(menuId);
|
||||
if (gPhotonStructure) {
|
||||
let items = menu.querySelectorAll("menuitem[photonlabel]");
|
||||
for (let item of items) {
|
||||
item.setAttribute("nonphotonlabel", item.getAttribute("label"));
|
||||
item.setAttribute("nonphotonaccesskey", item.getAttribute("accesskey"));
|
||||
item.setAttribute("label", item.getAttribute("photonlabel"));
|
||||
item.setAttribute("accesskey", item.getAttribute("photonaccesskey"));
|
||||
}
|
||||
} else {
|
||||
let items = menu.querySelectorAll("menuitem[nonphotonlabel]");
|
||||
for (let item of items) {
|
||||
item.setAttribute("label", item.getAttribute("nonphotonlabel"));
|
||||
item.setAttribute("accesskey", item.getAttribute("nonphotonaccesskey"));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_eventListenersAdded: false,
|
||||
_ensureEventListenersAdded() {
|
||||
if (this._eventListenersAdded)
|
||||
@ -541,6 +569,9 @@ const PanelUI = {
|
||||
this.navbar.setAttribute("nonemptyoverflow", "true");
|
||||
this.overflowPanel.setAttribute("hasfixeditems", "true");
|
||||
} else if (!hasKids && this.navbar.hasAttribute("nonemptyoverflow")) {
|
||||
if (this.overflowPanel.state != "closed") {
|
||||
this.overflowPanel.hidePopup();
|
||||
}
|
||||
this.overflowPanel.removeAttribute("hasfixeditems");
|
||||
this.navbar.removeAttribute("nonemptyoverflow");
|
||||
}
|
||||
@ -688,7 +719,7 @@ const PanelUI = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.fullScreen && FullScreen.navToolboxHidden) {
|
||||
if ((window.fullScreen && FullScreen.navToolboxHidden) || document.fullscreenElement) {
|
||||
this._hidePopup();
|
||||
return;
|
||||
}
|
||||
@ -706,8 +737,10 @@ const PanelUI = {
|
||||
this._showBannerItem(notifications[0]);
|
||||
}
|
||||
} else if (doorhangers.length > 0) {
|
||||
let autoHideFullScreen = Services.prefs.getBoolPref("browser.fullscreen.autohide", false) &&
|
||||
Services.appinfo.OS !== "Darwin";
|
||||
// Only show the doorhanger if the window is focused and not fullscreen
|
||||
if (window.fullScreen || Services.focus.activeWindow !== window) {
|
||||
if ((window.fullScreen && autoHideFullScreen) || Services.focus.activeWindow !== window) {
|
||||
this._hidePopup();
|
||||
this._showBadge(doorhangers[0]);
|
||||
this._showBannerItem(doorhangers[0]);
|
||||
|
@ -149,13 +149,17 @@ skip-if = os == "mac"
|
||||
[browser_customizemode_contextmenu_menubuttonstate.js]
|
||||
[browser_exit_background_customize_mode.js]
|
||||
[browser_overflow_use_subviews.js]
|
||||
[browser_panel_keyboard_navigation.js]
|
||||
[browser_panel_toggle.js]
|
||||
[browser_panelUINotifications.js]
|
||||
[browser_panelUINotifications_fullscreen.js]
|
||||
tags = fullscreen
|
||||
skip-if = os == "mac"
|
||||
[browser_panelUINotifications_multiWindow.js]
|
||||
[browser_switch_to_customize_mode.js]
|
||||
[browser_synced_tabs_menu.js]
|
||||
[browser_check_tooltips_in_navbar.js]
|
||||
[browser_editcontrols_update.js]
|
||||
subsuite = clipboard
|
||||
[browser_photon_customization_context_menus.js]
|
||||
[browser_remote_tabs_button.js]
|
||||
|
@ -3,18 +3,19 @@
|
||||
const kOverflowPanel = document.getElementById("widget-overflow");
|
||||
|
||||
var gOriginalWidth;
|
||||
registerCleanupFunction(function*() {
|
||||
registerCleanupFunction(async function() {
|
||||
kOverflowPanel.removeAttribute("animate");
|
||||
window.resizeTo(gOriginalWidth, window.outerHeight);
|
||||
await waitForCondition(() => !document.getElementById("nav-bar").hasAttribute("overflowing"));
|
||||
CustomizableUI.reset();
|
||||
});
|
||||
|
||||
/**
|
||||
* This checks that subview-compatible items show up as subviews rather than
|
||||
* re-anchored panels. If we ever remove the character encoding widget, please
|
||||
* re-anchored panels. If we ever remove the developer widget, please
|
||||
* replace this test with another subview - don't remove it.
|
||||
*/
|
||||
add_task(async function check_character_encoding_subview_in_overflow() {
|
||||
add_task(async function check_developer_subview_in_overflow() {
|
||||
kOverflowPanel.setAttribute("animate", "false");
|
||||
gOriginalWidth = window.outerWidth;
|
||||
|
||||
@ -39,8 +40,6 @@ add_task(async function check_character_encoding_subview_in_overflow() {
|
||||
is(developerView.closest("panel"), kOverflowPanel, "Should be inside the panel");
|
||||
kOverflowPanel.hidePopup();
|
||||
await Promise.resolve(); // wait for popup to hide fully.
|
||||
|
||||
CustomizableUI.reset();
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,140 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Test keyboard navigation in the app menu panel.
|
||||
*/
|
||||
|
||||
const {PanelMultiView} = Cu.import("resource:///modules/PanelMultiView.jsm", {});
|
||||
const kHelpButtonId = "appMenu-help-button";
|
||||
let gHelperInstance;
|
||||
|
||||
add_task(async function setup() {
|
||||
await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", true]]});
|
||||
gHelperInstance = new PanelMultiView(PanelUI.panel, true);
|
||||
});
|
||||
|
||||
add_task(async function testUpDownKeys() {
|
||||
let promise = promisePanelShown(window);
|
||||
PanelUI.show();
|
||||
await promise;
|
||||
|
||||
let buttons = gHelperInstance._getNavigableElements(PanelUI.mainView);
|
||||
|
||||
for (let button of buttons) {
|
||||
if (button.disabled)
|
||||
continue;
|
||||
EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
|
||||
Assert.equal(document.commandDispatcher.focusedElement, button,
|
||||
"The correct button should be focused after navigating downward");
|
||||
}
|
||||
|
||||
EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
|
||||
Assert.equal(document.commandDispatcher.focusedElement, buttons[0],
|
||||
"Pressing upwards should cycle around and select the first button again");
|
||||
|
||||
for (let i = buttons.length - 1; i >= 0; --i) {
|
||||
let button = buttons[i];
|
||||
if (button.disabled)
|
||||
continue;
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
Assert.equal(document.commandDispatcher.focusedElement, button,
|
||||
"The first button should be focused after navigating upward");
|
||||
}
|
||||
|
||||
promise = promisePanelHidden(window);
|
||||
PanelUI.hide();
|
||||
await promise;
|
||||
});
|
||||
|
||||
add_task(async function testEnterKeyBehaviors() {
|
||||
let promise = promisePanelShown(window);
|
||||
PanelUI.show();
|
||||
await promise;
|
||||
|
||||
let buttons = gHelperInstance._getNavigableElements(PanelUI.mainView);
|
||||
|
||||
// Navigate to the 'Help' button, which points to a subview.
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
let focusedElement = document.commandDispatcher.focusedElement;
|
||||
Assert.equal(focusedElement, buttons[buttons.length - 1],
|
||||
"The last button should be focused after navigating upward");
|
||||
|
||||
promise = BrowserTestUtils.waitForEvent(PanelUI.helpView, "ViewShown");
|
||||
// Make sure the Help button is in focus.
|
||||
while (!focusedElement || !focusedElement.id || focusedElement.id != kHelpButtonId) {
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
}
|
||||
EventUtils.synthesizeKey("VK_RETURN", { code: "Enter" });
|
||||
await promise;
|
||||
|
||||
let helpButtons = gHelperInstance._getNavigableElements(PanelUI.helpView);
|
||||
Assert.ok(helpButtons[0].classList.contains("subviewbutton-back"),
|
||||
"First button in help view should be a back button");
|
||||
|
||||
// For posterity, check navigating the subview using up/ down arrow keys as well.
|
||||
for (let i = helpButtons.length - 1; i >= 0; --i) {
|
||||
let button = helpButtons[i];
|
||||
if (button.disabled)
|
||||
continue;
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
Assert.equal(focusedElement, button, "The first button should be focused after navigating upward");
|
||||
}
|
||||
|
||||
// Make sure the back button is in focus again.
|
||||
while (focusedElement != helpButtons[0]) {
|
||||
EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
}
|
||||
|
||||
// The first button is the back button. Hittin Enter should navigate us back.
|
||||
promise = BrowserTestUtils.waitForEvent(PanelUI.mainView, "ViewShown");
|
||||
EventUtils.synthesizeKey("VK_RETURN", { code: "Enter" });
|
||||
await promise;
|
||||
|
||||
// Let's test a 'normal' command button.
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
const kFindButtonId = "appMenu-find-button";
|
||||
while (!focusedElement || !focusedElement.id || focusedElement.id != kFindButtonId) {
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
}
|
||||
Assert.equal(focusedElement.id, kFindButtonId, "Find button should be selected");
|
||||
|
||||
promise = promisePanelHidden(window);
|
||||
EventUtils.synthesizeKey("VK_RETURN", { code: "Enter" });
|
||||
await promise;
|
||||
|
||||
Assert.ok(!gFindBar.hidden, "Findbar should have opened");
|
||||
gFindBar.close();
|
||||
});
|
||||
|
||||
add_task(async function testLeftRightKeys() {
|
||||
let promise = promisePanelShown(window);
|
||||
PanelUI.show();
|
||||
await promise;
|
||||
|
||||
// Navigate to the 'Help' button, which points to a subview.
|
||||
let focusedElement = document.commandDispatcher.focusedElement;
|
||||
while (!focusedElement || !focusedElement.id || focusedElement.id != kHelpButtonId) {
|
||||
EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
|
||||
focusedElement = document.commandDispatcher.focusedElement;
|
||||
}
|
||||
Assert.equal(focusedElement.id, kHelpButtonId, "The last button should be focused after navigating upward");
|
||||
|
||||
// Hitting ArrowRight on a button that points to a subview should navigate us
|
||||
// there.
|
||||
promise = BrowserTestUtils.waitForEvent(PanelUI.helpView, "ViewShown");
|
||||
EventUtils.synthesizeKey("KEY_ArrowRight", { code: "ArrowRight" });
|
||||
await promise;
|
||||
|
||||
// Hitting ArrowLeft should navigate us back.
|
||||
promise = BrowserTestUtils.waitForEvent(PanelUI.mainView, "ViewShown");
|
||||
EventUtils.synthesizeKey("KEY_ArrowLeft", { code: "ArrowLeft" });
|
||||
await promise;
|
||||
|
||||
promise = promisePanelHidden(window);
|
||||
PanelUI.hide();
|
||||
await promise;
|
||||
});
|
@ -0,0 +1,431 @@
|
||||
/* 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";
|
||||
|
||||
requestLongerTimeout(2);
|
||||
|
||||
const isOSX = (Services.appinfo.OS === "Darwin");
|
||||
|
||||
const overflowButton = document.getElementById("nav-bar-overflow-button");
|
||||
const overflowPanel = document.getElementById("widget-overflow");
|
||||
|
||||
// Right-click on the home button should
|
||||
// show a context menu with options to move it.
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", true]]});
|
||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let homeButton = document.getElementById("home-button");
|
||||
EventUtils.synthesizeMouse(homeButton, 2, 2, {type: "contextmenu", button: 2 });
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToPanel", true],
|
||||
[".customize-context-removeFromToolbar", true],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
});
|
||||
|
||||
// Right-click on an empty bit of tabstrip should
|
||||
// show a context menu without options to move it,
|
||||
// but with tab-specific options instead.
|
||||
add_task(async function() {
|
||||
// ensure there are tabs to reload/bookmark:
|
||||
let extraTab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||
await promiseTabLoadEvent(extraTab, "http://example.com/");
|
||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let tabstrip = document.getElementById("tabbrowser-tabs");
|
||||
let rect = tabstrip.getBoundingClientRect();
|
||||
EventUtils.synthesizeMouse(tabstrip, rect.width - 2, 2, {type: "contextmenu", button: 2 });
|
||||
await shownPromise;
|
||||
|
||||
let closedTabsAvailable = SessionStore.getClosedTabCount(window) == 0;
|
||||
info("Closed tabs: " + closedTabsAvailable);
|
||||
let expectedEntries = [
|
||||
["#toolbar-context-reloadAllTabs", true],
|
||||
["#toolbar-context-bookmarkAllTabs", true],
|
||||
["#toolbar-context-undoCloseTab", !closedTabsAvailable],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
gBrowser.removeTab(extraTab);
|
||||
});
|
||||
|
||||
// Right-click on an empty bit of extra toolbar should
|
||||
// show a context menu with moving options disabled,
|
||||
// and a toggle option for the extra toolbar
|
||||
add_task(async function() {
|
||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let toolbar = createToolbarWithPlacements("880164_empty_toolbar", []);
|
||||
toolbar.setAttribute("context", "toolbar-context-menu");
|
||||
toolbar.setAttribute("toolbarname", "Fancy Toolbar for Context Menu");
|
||||
EventUtils.synthesizeMouseAtCenter(toolbar, {type: "contextmenu", button: 2 });
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToPanel", false],
|
||||
[".customize-context-removeFromToolbar", false],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["#toggle_880164_empty_toolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
removeCustomToolbars();
|
||||
});
|
||||
|
||||
|
||||
// Right-click on the urlbar-container should
|
||||
// show a context menu with disabled options to move it.
|
||||
add_task(async function() {
|
||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let urlBarContainer = document.getElementById("urlbar-container");
|
||||
// Need to make sure not to click within an edit field.
|
||||
EventUtils.synthesizeMouse(urlBarContainer, 100, 1, {type: "contextmenu", button: 2 });
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToPanel", false],
|
||||
[".customize-context-removeFromToolbar", false],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
});
|
||||
|
||||
// Right-click on the searchbar and moving it to the menu
|
||||
// and back should move the search-container instead.
|
||||
add_task(async function() {
|
||||
let searchbar = document.getElementById("searchbar");
|
||||
gCustomizeMode.addToPanel(searchbar);
|
||||
let placement = CustomizableUI.getPlacementOfWidget("search-container");
|
||||
is(placement.area, CustomizableUI.AREA_FIXED_OVERFLOW_PANEL, "Should be in panel");
|
||||
|
||||
let shownPanelPromise = popupShown(overflowPanel);
|
||||
overflowButton.click();
|
||||
await shownPanelPromise;
|
||||
let hiddenPanelPromise = popupHidden(overflowPanel);
|
||||
overflowButton.click();
|
||||
await hiddenPanelPromise;
|
||||
|
||||
gCustomizeMode.addToToolbar(searchbar);
|
||||
placement = CustomizableUI.getPlacementOfWidget("search-container");
|
||||
is(placement.area, CustomizableUI.AREA_NAVBAR, "Should be in navbar");
|
||||
gCustomizeMode.removeFromArea(searchbar);
|
||||
placement = CustomizableUI.getPlacementOfWidget("search-container");
|
||||
is(placement, null, "Should be in palette");
|
||||
CustomizableUI.reset();
|
||||
placement = CustomizableUI.getPlacementOfWidget("search-container");
|
||||
is(placement.area, CustomizableUI.AREA_NAVBAR, "Should be in navbar");
|
||||
});
|
||||
|
||||
// Right-click on an item within the panel should
|
||||
// show a context menu with options to move it.
|
||||
add_task(async function() {
|
||||
CustomizableUI.addWidgetToArea("new-window-button", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
let shownPanelPromise = popupShown(overflowPanel);
|
||||
overflowButton.click();
|
||||
await shownPanelPromise;
|
||||
|
||||
let contextMenu = document.getElementById("customizationPanelItemContextMenu");
|
||||
let shownContextPromise = popupShown(contextMenu);
|
||||
let newWindowButton = document.getElementById("new-window-button");
|
||||
ok(newWindowButton, "new-window-button was found");
|
||||
EventUtils.synthesizeMouse(newWindowButton, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownContextPromise;
|
||||
|
||||
is(overflowPanel.state, "open", "The overflow panel should still be open.");
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToToolbar", true],
|
||||
[".customize-context-removeFromPanel", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
];
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
|
||||
let hiddenPromise = popupHidden(overflowPanel);
|
||||
overflowButton.click();
|
||||
await hiddenPromise;
|
||||
|
||||
CustomizableUI.removeWidgetFromArea("new-window-button");
|
||||
});
|
||||
|
||||
// Right-click on the home button while in customization mode
|
||||
// should show a context menu with options to move it.
|
||||
add_task(async function() {
|
||||
await startCustomizing();
|
||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let homeButton = document.getElementById("wrapper-home-button");
|
||||
EventUtils.synthesizeMouse(homeButton, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToPanel", true],
|
||||
[".customize-context-removeFromToolbar", true],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", false]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
});
|
||||
|
||||
// Right-click on an item in the palette should
|
||||
// show a context menu with options to move it.
|
||||
add_task(async function() {
|
||||
let contextMenu = document.getElementById("customizationPaletteItemContextMenu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let openFileButton = document.getElementById("wrapper-open-file-button");
|
||||
EventUtils.synthesizeMouse(openFileButton, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-addToToolbar", true],
|
||||
[".customize-context-addToPanel", true]
|
||||
];
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
});
|
||||
|
||||
// Right-click on an item in the panel while in customization mode
|
||||
// should show a context menu with options to move it.
|
||||
add_task(async function() {
|
||||
CustomizableUI.addWidgetToArea("new-window-button", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
let contextMenu = document.getElementById("customizationPanelItemContextMenu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let newWindowButton = document.getElementById("wrapper-new-window-button");
|
||||
EventUtils.synthesizeMouse(newWindowButton, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToToolbar", true],
|
||||
[".customize-context-removeFromPanel", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", false]
|
||||
];
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
CustomizableUI.removeWidgetFromArea("new-window-button");
|
||||
await endCustomizing();
|
||||
});
|
||||
|
||||
// Test the toolbarbutton panel context menu in customization mode
|
||||
// without opening the panel before customization mode
|
||||
add_task(async function() {
|
||||
CustomizableUI.addWidgetToArea("new-window-button", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
this.otherWin = await openAndLoadWindow(null, true);
|
||||
|
||||
await new Promise(resolve => waitForFocus(resolve, this.otherWin));
|
||||
|
||||
await startCustomizing(this.otherWin);
|
||||
|
||||
let contextMenu = this.otherWin.document.getElementById("customizationPanelItemContextMenu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let newWindowButton = this.otherWin.document.getElementById("wrapper-new-window-button");
|
||||
EventUtils.synthesizeMouse(newWindowButton, 2, 2, {type: "contextmenu", button: 2}, this.otherWin);
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToToolbar", true],
|
||||
[".customize-context-removeFromPanel", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", false]
|
||||
];
|
||||
checkContextMenu(contextMenu, expectedEntries, this.otherWin);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
await endCustomizing(this.otherWin);
|
||||
CustomizableUI.removeWidgetFromArea("new-window-button");
|
||||
await promiseWindowClosed(this.otherWin);
|
||||
this.otherWin = null;
|
||||
|
||||
await new Promise(resolve => waitForFocus(resolve, window));
|
||||
});
|
||||
|
||||
// Bug 945191 - Combined buttons show wrong context menu options
|
||||
// when they are in the toolbar.
|
||||
add_task(async function() {
|
||||
CustomizableUI.addWidgetToArea("zoom-controls", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
await startCustomizing();
|
||||
let contextMenu = document.getElementById("customizationPanelItemContextMenu");
|
||||
let shownPromise = popupShown(contextMenu);
|
||||
let zoomControls = document.getElementById("wrapper-zoom-controls");
|
||||
EventUtils.synthesizeMouse(zoomControls, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownPromise;
|
||||
// Execute the command to move the item from the panel to the toolbar.
|
||||
contextMenu.childNodes[0].doCommand();
|
||||
let hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
await endCustomizing();
|
||||
|
||||
zoomControls = document.getElementById("zoom-controls");
|
||||
is(zoomControls.parentNode.id, "nav-bar-customization-target", "Zoom-controls should be on the nav-bar");
|
||||
|
||||
contextMenu = document.getElementById("toolbar-context-menu");
|
||||
shownPromise = popupShown(contextMenu);
|
||||
EventUtils.synthesizeMouse(zoomControls, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownPromise;
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToPanel", true],
|
||||
[".customize-context-removeFromToolbar", true],
|
||||
["---"]
|
||||
];
|
||||
if (!isOSX) {
|
||||
expectedEntries.push(["#toggle_toolbar-menubar", true]);
|
||||
}
|
||||
expectedEntries.push(
|
||||
["#toggle_PersonalToolbar", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
);
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
hiddenPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenPromise;
|
||||
await resetCustomization();
|
||||
});
|
||||
|
||||
// Bug 947586 - After customization, panel items show wrong context menu options
|
||||
add_task(async function() {
|
||||
info("Check panel context menu is correct after customization");
|
||||
await startCustomizing();
|
||||
await endCustomizing();
|
||||
|
||||
CustomizableUI.addWidgetToArea("new-window-button", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
let shownPanelPromise = popupShown(overflowPanel);
|
||||
overflowButton.click();
|
||||
await shownPanelPromise;
|
||||
|
||||
let contextMenu = document.getElementById("customizationPanelItemContextMenu");
|
||||
let shownContextPromise = popupShown(contextMenu);
|
||||
let newWindowButton = document.getElementById("new-window-button");
|
||||
ok(newWindowButton, "new-window-button was found");
|
||||
EventUtils.synthesizeMouse(newWindowButton, 2, 2, {type: "contextmenu", button: 2});
|
||||
await shownContextPromise;
|
||||
|
||||
is(overflowPanel.state, "open", "The panel should still be open.");
|
||||
|
||||
let expectedEntries = [
|
||||
[".customize-context-moveToToolbar", true],
|
||||
[".customize-context-removeFromPanel", true],
|
||||
["---"],
|
||||
[".viewCustomizeToolbar", true]
|
||||
];
|
||||
checkContextMenu(contextMenu, expectedEntries);
|
||||
|
||||
let hiddenContextPromise = popupHidden(contextMenu);
|
||||
contextMenu.hidePopup();
|
||||
await hiddenContextPromise;
|
||||
|
||||
let hiddenPromise = popupHidden(overflowPanel);
|
||||
overflowButton.click();
|
||||
await hiddenPromise;
|
||||
CustomizableUI.removeWidgetFromArea("new-window-button");
|
||||
});
|
||||
|
||||
|
||||
// Bug 982027 - moving icon around removes custom context menu.
|
||||
add_task(async function() {
|
||||
let widgetId = "custom-context-menu-toolbarbutton";
|
||||
let expectedContext = "myfancycontext";
|
||||
let widget = createDummyXULButton(widgetId, "Test ctxt menu");
|
||||
widget.setAttribute("context", expectedContext);
|
||||
CustomizableUI.addWidgetToArea(widgetId, CustomizableUI.AREA_NAVBAR);
|
||||
is(widget.getAttribute("context"), expectedContext, "Should have context menu when added to the toolbar.");
|
||||
|
||||
await startCustomizing();
|
||||
is(widget.getAttribute("context"), "", "Should not have own context menu in the toolbar now that we're customizing.");
|
||||
is(widget.getAttribute("wrapped-context"), expectedContext, "Should keep own context menu wrapped when in toolbar.");
|
||||
|
||||
let panel = document.getElementById("widget-overflow-fixed-list");
|
||||
simulateItemDrag(widget, panel);
|
||||
is(widget.getAttribute("context"), "", "Should not have own context menu when in the panel.");
|
||||
is(widget.getAttribute("wrapped-context"), expectedContext, "Should keep own context menu wrapped now that we're in the panel.");
|
||||
|
||||
simulateItemDrag(widget, document.getElementById("nav-bar").customizationTarget);
|
||||
is(widget.getAttribute("context"), "", "Should not have own context menu when back in toolbar because we're still customizing.");
|
||||
is(widget.getAttribute("wrapped-context"), expectedContext, "Should keep own context menu wrapped now that we're back in the toolbar.");
|
||||
|
||||
await endCustomizing();
|
||||
is(widget.getAttribute("context"), expectedContext, "Should have context menu again now that we're out of customize mode.");
|
||||
CustomizableUI.removeWidgetFromArea(widgetId);
|
||||
widget.remove();
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state after removing button.");
|
||||
});
|
@ -24,6 +24,7 @@ Cu.import("resource://gre/modules/ExtensionUtils.jsm");
|
||||
|
||||
var {
|
||||
DefaultWeakMap,
|
||||
extensionStylesheets,
|
||||
promiseEvent,
|
||||
} = ExtensionUtils;
|
||||
|
||||
@ -50,15 +51,6 @@ function promisePopupShown(popup) {
|
||||
});
|
||||
}
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "popupStylesheets", () => {
|
||||
let stylesheets = ["chrome://browser/content/extension.css"];
|
||||
|
||||
if (AppConstants.platform === "macosx") {
|
||||
stylesheets.push("chrome://browser/content/extension-mac.css");
|
||||
}
|
||||
return stylesheets;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "standaloneStylesheets", () => {
|
||||
let stylesheets = [];
|
||||
|
||||
@ -116,6 +108,8 @@ class BasePopup {
|
||||
|
||||
this.destroyed = true;
|
||||
this.browserLoadedDeferred.reject(new Error("Popup destroyed"));
|
||||
// Ignore unhandled rejections if the "attach" method is not called.
|
||||
this.browserLoaded.catch(() => {});
|
||||
|
||||
BasePopup.instances.get(this.window).delete(this.extension);
|
||||
|
||||
@ -168,7 +162,7 @@ class BasePopup {
|
||||
let sheets = [];
|
||||
|
||||
if (this.browserStyle) {
|
||||
sheets.push(...popupStylesheets);
|
||||
sheets.push(...extensionStylesheets);
|
||||
}
|
||||
if (!this.fixedWidth) {
|
||||
sheets.push(...standaloneStylesheets);
|
||||
|
@ -3,6 +3,7 @@
|
||||
"use strict";
|
||||
|
||||
var {
|
||||
ExtensionError,
|
||||
promiseObserved,
|
||||
} = ExtensionUtils;
|
||||
|
||||
@ -37,19 +38,18 @@ function getRecentlyClosed(maxResults, extension) {
|
||||
return recentlyClosed.slice(0, maxResults);
|
||||
}
|
||||
|
||||
function createSession(restored, extension, sessionId) {
|
||||
async function createSession(restored, extension, sessionId) {
|
||||
if (!restored) {
|
||||
return Promise.reject({message: `Could not restore object using sessionId ${sessionId}.`});
|
||||
throw new ExtensionError(`Could not restore object using sessionId ${sessionId}.`);
|
||||
}
|
||||
let sessionObj = {lastModified: Date.now()};
|
||||
if (restored instanceof Ci.nsIDOMChromeWindow) {
|
||||
return promiseObserved("sessionstore-single-window-restored", subject => subject == restored).then(() => {
|
||||
sessionObj.window = extension.windowManager.convert(restored, {populate: true});
|
||||
return Promise.resolve(sessionObj);
|
||||
});
|
||||
await promiseObserved("sessionstore-single-window-restored", subject => subject == restored);
|
||||
sessionObj.window = extension.windowManager.convert(restored, {populate: true});
|
||||
return sessionObj;
|
||||
}
|
||||
sessionObj.tab = extension.tabManager.convert(restored);
|
||||
return Promise.resolve(sessionObj);
|
||||
return sessionObj;
|
||||
}
|
||||
|
||||
this.sessions = class extends ExtensionAPI {
|
||||
@ -57,12 +57,14 @@ this.sessions = class extends ExtensionAPI {
|
||||
let {extension} = context;
|
||||
return {
|
||||
sessions: {
|
||||
getRecentlyClosed: function(filter) {
|
||||
async getRecentlyClosed(filter) {
|
||||
await SessionStore.promiseInitialized;
|
||||
let maxResults = filter.maxResults == undefined ? this.MAX_SESSION_RESULTS : filter.maxResults;
|
||||
return Promise.resolve(getRecentlyClosed(maxResults, extension));
|
||||
return getRecentlyClosed(maxResults, extension);
|
||||
},
|
||||
|
||||
forgetClosedTab: function(windowId, sessionId) {
|
||||
async forgetClosedTab(windowId, sessionId) {
|
||||
await SessionStore.promiseInitialized;
|
||||
let window = context.extension.windowManager.get(windowId).window;
|
||||
let closedTabData = SessionStore.getClosedTabData(window, false);
|
||||
|
||||
@ -71,14 +73,14 @@ this.sessions = class extends ExtensionAPI {
|
||||
});
|
||||
|
||||
if (closedTabIndex < 0) {
|
||||
return Promise.reject({message: `Could not find closed tab using sessionId ${sessionId}.`});
|
||||
throw new ExtensionError(`Could not find closed tab using sessionId ${sessionId}.`);
|
||||
}
|
||||
|
||||
SessionStore.forgetClosedTab(window, closedTabIndex);
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
forgetClosedWindow: function(sessionId) {
|
||||
async forgetClosedWindow(sessionId) {
|
||||
await SessionStore.promiseInitialized;
|
||||
let closedWindowData = SessionStore.getClosedWindowData(false);
|
||||
|
||||
let closedWindowIndex = closedWindowData.findIndex((closedWindow) => {
|
||||
@ -86,14 +88,14 @@ this.sessions = class extends ExtensionAPI {
|
||||
});
|
||||
|
||||
if (closedWindowIndex < 0) {
|
||||
return Promise.reject({message: `Could not find closed window using sessionId ${sessionId}.`});
|
||||
throw new ExtensionError(`Could not find closed window using sessionId ${sessionId}.`);
|
||||
}
|
||||
|
||||
SessionStore.forgetClosedWindow(closedWindowIndex);
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
restore: function(sessionId) {
|
||||
async restore(sessionId) {
|
||||
await SessionStore.promiseInitialized;
|
||||
let session, closedId;
|
||||
if (sessionId) {
|
||||
closedId = sessionId;
|
||||
|
@ -43,6 +43,10 @@ this.sidebarAction = class extends ExtensionAPI {
|
||||
this.id = `${widgetId}-sidebar-action`;
|
||||
this.menuId = `menu_${this.id}`;
|
||||
|
||||
// We default browser_style to true because this is a new API and
|
||||
// we therefore don't need to worry about breaking existing add-ons.
|
||||
this.browserStyle = options.browser_style || options.browser_style === null;
|
||||
|
||||
this.defaults = {
|
||||
enabled: true,
|
||||
title: options.default_title || extension.name,
|
||||
@ -120,10 +124,17 @@ this.sidebarAction = class extends ExtensionAPI {
|
||||
}
|
||||
|
||||
sidebarUrl(panel) {
|
||||
let url = `${sidebarURL}?panel=${encodeURIComponent(panel)}`;
|
||||
|
||||
if (this.extension.remote) {
|
||||
return `${sidebarURL}?remote=1&panel=${encodeURIComponent(panel)}`;
|
||||
url += "&remote=1";
|
||||
}
|
||||
return `${sidebarURL}?&panel=${encodeURIComponent(panel)}`;
|
||||
|
||||
if (this.browserStyle) {
|
||||
url += "&browser-style=1";
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
createMenuItem(window, details) {
|
||||
@ -138,6 +149,7 @@ this.sidebarAction = class extends ExtensionAPI {
|
||||
broadcaster.setAttribute("group", "sidebar");
|
||||
broadcaster.setAttribute("label", details.title);
|
||||
broadcaster.setAttribute("sidebarurl", this.sidebarUrl(details.panel));
|
||||
|
||||
// oncommand gets attached to menuitem, so we use the observes attribute to
|
||||
// get the command id we pass to SidebarUI.
|
||||
broadcaster.setAttribute("oncommand", "SidebarUI.toggle(this.getAttribute('observes'))");
|
||||
|
@ -22,6 +22,10 @@
|
||||
"$ref": "IconPath",
|
||||
"optional": true
|
||||
},
|
||||
"browser_style": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
},
|
||||
"default_panel": {
|
||||
"type": "string",
|
||||
"format": "strictRelativeUrl",
|
||||
|
@ -95,6 +95,7 @@ skip-if = debug || asan # Bug 1354681
|
||||
[browser_ext_sessions_getRecentlyClosed_tabs.js]
|
||||
[browser_ext_sessions_restore.js]
|
||||
[browser_ext_sidebarAction.js]
|
||||
[browser_ext_sidebarAction_browser_style.js]
|
||||
[browser_ext_sidebarAction_context.js]
|
||||
[browser_ext_sidebarAction_contextMenu.js]
|
||||
[browser_ext_sidebarAction_tabs.js]
|
||||
|
@ -0,0 +1,74 @@
|
||||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
function* testSidebarBrowserStyle(sidebarAction, assertMessage) {
|
||||
function sidebarScript() {
|
||||
browser.test.onMessage.addListener((msgName, info, assertMessage) => {
|
||||
if (msgName !== "check-style") {
|
||||
browser.test.notifyFail("options-ui-browser_style");
|
||||
}
|
||||
|
||||
let style = window.getComputedStyle(document.getElementById("button"));
|
||||
let buttonBackgroundColor = style.backgroundColor;
|
||||
let browserStyleBackgroundColor = "rgb(9, 150, 248)";
|
||||
if (!("browser_style" in info) || info.browser_style) {
|
||||
browser.test.assertEq(browserStyleBackgroundColor, buttonBackgroundColor, assertMessage);
|
||||
} else {
|
||||
browser.test.assertTrue(browserStyleBackgroundColor !== buttonBackgroundColor, assertMessage);
|
||||
}
|
||||
|
||||
browser.test.notifyPass("sidebar-browser-style");
|
||||
});
|
||||
browser.test.sendMessage("sidebar-ready");
|
||||
}
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"sidebar_action": sidebarAction,
|
||||
},
|
||||
useAddonManager: "temporary",
|
||||
|
||||
files: {
|
||||
"panel.html": `
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<button id="button" name="button" class="default">Default</button>
|
||||
<script src="panel.js" type="text/javascript"></script>
|
||||
</html>`,
|
||||
"panel.js": sidebarScript,
|
||||
},
|
||||
});
|
||||
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser);
|
||||
|
||||
yield extension.startup();
|
||||
yield extension.awaitMessage("sidebar-ready");
|
||||
|
||||
extension.sendMessage("check-style", sidebarAction, assertMessage);
|
||||
yield extension.awaitFinish("sidebar-browser-style");
|
||||
|
||||
yield extension.unload();
|
||||
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
|
||||
add_task(function* test_sidebar_without_setting_browser_style() {
|
||||
yield testSidebarBrowserStyle({
|
||||
"default_panel": "panel.html",
|
||||
}, "Expected correct style when browser_style is excluded");
|
||||
});
|
||||
|
||||
add_task(function* test_sidebar_with_browser_style_set_to_true() {
|
||||
yield testSidebarBrowserStyle({
|
||||
"default_panel": "panel.html",
|
||||
"browser_style": true,
|
||||
}, "Expected correct style when browser_style is set to `true`");
|
||||
});
|
||||
|
||||
add_task(function* test_sidebar_with_browser_style_set_to_false() {
|
||||
yield testSidebarBrowserStyle({
|
||||
"default_panel": "panel.html",
|
||||
"browser_style": false,
|
||||
}, "Expected no style when browser_style is set to `false`");
|
||||
});
|
@ -1,5 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
// Various "Missing host permission" rejections are left uncaught. This may be
|
||||
// caused by issues in the test, in the testing framework, or in production
|
||||
// code. This bug should be fixed, but for the moment this file is whitelisted.
|
||||
//
|
||||
// NOTE: Whitelisting a class of rejections should be limited. Normally you
|
||||
// should use "expectUncaughtRejection" to flag individual failures.
|
||||
Cu.import("resource://testing-common/PromiseTestUtils.jsm", this);
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/Missing host permission/);
|
||||
|
||||
// This is a pretty terrible hack, but it's the best we can do until we
|
||||
// support |executeScript| callbacks and |lastError|.
|
||||
async function testHasNoPermission(params) {
|
||||
|
@ -21,6 +21,16 @@
|
||||
* promiseAnimationFrame
|
||||
*/
|
||||
|
||||
// There are shutdown issues for which multiple rejections are left uncaught.
|
||||
// This bug should be fixed, but for the moment this directory is whitelisted.
|
||||
//
|
||||
// NOTE: Entire directory whitelisting should be kept to a minimum. Normally you
|
||||
// should use "expectUncaughtRejection" to flag individual failures.
|
||||
const {PromiseTestUtils} = Cu.import("resource://testing-common/PromiseTestUtils.jsm", {});
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/No matching message handler/);
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/Receiving end does not exist/);
|
||||
|
||||
const {AppConstants} = Cu.import("resource://gre/modules/AppConstants.jsm", {});
|
||||
const {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm", {});
|
||||
|
||||
|
@ -2180,27 +2180,35 @@ BrowserGlue.prototype = {
|
||||
chromeWindow.openPreferences(...args);
|
||||
},
|
||||
|
||||
_openURLInNewWindow(url) {
|
||||
let urlString = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
urlString.data = url;
|
||||
return new Promise(resolve => {
|
||||
let win = Services.ww.openWindow(null, Services.prefs.getCharPref("browser.chromeURL"),
|
||||
"_blank", "chrome,all,dialog=no", urlString);
|
||||
win.addEventListener("load", () => { resolve(win); }, {once: true});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Called as an observer when Sync's "display URIs" notification is fired.
|
||||
*
|
||||
* We open the received URIs in background tabs.
|
||||
*/
|
||||
_onDisplaySyncURIs: function _onDisplaySyncURIs(data) {
|
||||
async _onDisplaySyncURIs(data) {
|
||||
try {
|
||||
// The payload is wrapped weirdly because of how Sync does notifications.
|
||||
const URIs = data.wrappedJSObject.object;
|
||||
|
||||
const findWindow = () => RecentWindow.getMostRecentBrowserWindow({private: false});
|
||||
|
||||
// win can be null, but it's ok, we'll assign it later in openTab()
|
||||
let win = findWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow({private: false});
|
||||
|
||||
const openTab = URI => {
|
||||
const openTab = async (URI) => {
|
||||
let tab;
|
||||
if (!win) {
|
||||
Services.appShell.hiddenDOMWindow.open(URI.uri);
|
||||
win = findWindow();
|
||||
tab = win.gBrowser.tabs[0];
|
||||
win = await this._openURLInNewWindow(URI.uri);
|
||||
let tabs = win.gBrowser.tabs;
|
||||
tab = tabs[tabs.length - 1];
|
||||
} else {
|
||||
tab = win.gBrowser.addTab(URI.uri);
|
||||
}
|
||||
@ -2208,8 +2216,8 @@ BrowserGlue.prototype = {
|
||||
return tab;
|
||||
};
|
||||
|
||||
const firstTab = openTab(URIs[0]);
|
||||
URIs.slice(1).forEach(URI => openTab(URI));
|
||||
const firstTab = await openTab(URIs[0]);
|
||||
await Promise.all(URIs.slice(1).map(URI => openTab(URI)));
|
||||
|
||||
let title, body;
|
||||
const deviceName = Weave.Service.clientsEngine.getClientName(URIs[0].clientId);
|
||||
@ -2280,7 +2288,7 @@ BrowserGlue.prototype = {
|
||||
let url = await this.fxAccounts.promiseAccountsManageDevicesURI("device-connected-notification");
|
||||
let win = RecentWindow.getMostRecentBrowserWindow({private: false});
|
||||
if (!win) {
|
||||
Services.appShell.hiddenDOMWindow.open(url);
|
||||
this._openURLInNewWindow(url);
|
||||
} else {
|
||||
win.gBrowser.addTab(url);
|
||||
}
|
||||
|
@ -337,7 +337,7 @@
|
||||
accesskey="&allowHWAccel.accesskey;"
|
||||
preference="layers.acceleration.disabled"/>
|
||||
<hbox align="center">
|
||||
<label id="limitContentProcess" accesskey="&limitContentProcess.accesskey;" control="contentProcessCount">&limitContentProcess.label;</label>
|
||||
<label id="limitContentProcess" accesskey="&limitContentProcessOption.accesskey;" control="contentProcessCount">&limitContentProcessOption.label;</label>
|
||||
<menulist id="contentProcessCount" preference="dom.ipc.processCount">
|
||||
<menupopup>
|
||||
<menuitem label="1" value="1"/>
|
||||
@ -350,6 +350,6 @@
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<description>&limitContentProcess.description;</description>
|
||||
<description>&limitContentProcessOption.description;</description>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
@ -72,7 +72,8 @@
|
||||
class="accessory-button"
|
||||
label="&updateHistory2.label;"
|
||||
accesskey="&updateHistory2.accesskey;"
|
||||
preference="app.update.disable_button.showUpdateHistory"/>
|
||||
preference="app.update.disable_button.showUpdateHistory"
|
||||
searchkeywords="&history.title; &history.intro;"/>
|
||||
</vbox>
|
||||
#endif
|
||||
</hbox>
|
||||
|
@ -44,7 +44,7 @@ var gSearchResultsPane = {
|
||||
*/
|
||||
stringMatchesFilters(str, filter) {
|
||||
if (!filter || !str) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
let searchStr = str.toLowerCase();
|
||||
let filterStrings = filter.toLowerCase().split(/\s+/);
|
||||
@ -239,11 +239,14 @@ var gSearchResultsPane = {
|
||||
noResultsEl.hidden = false;
|
||||
|
||||
let strings = this.strings;
|
||||
document.getElementById("sorry-message").textContent =
|
||||
strings.getFormattedString("searchResults.sorryMessage2", [query]);
|
||||
|
||||
document.getElementById("sorry-message").textContent = AppConstants.platform == "win" ?
|
||||
strings.getFormattedString("searchResults.sorryMessageWin", [query]) :
|
||||
strings.getFormattedString("searchResults.sorryMessageUnix", [query]);
|
||||
let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences";
|
||||
let brandName = document.getElementById("bundleBrand").getString("brandShortName");
|
||||
document.getElementById("need-help").innerHTML =
|
||||
strings.getFormattedString("searchResults.needHelp", [brandName]);
|
||||
strings.getFormattedString("searchResults.needHelp2", [helpUrl, brandName]);
|
||||
} else {
|
||||
// Creating tooltips for all the instances found
|
||||
for (let node of this.listSearchTooltips) {
|
||||
@ -270,7 +273,7 @@ var gSearchResultsPane = {
|
||||
*/
|
||||
searchWithinNode(nodeObject, searchPhrase) {
|
||||
let matchesFound = false;
|
||||
if (nodeObject.childElementCount == 0) {
|
||||
if (nodeObject.childElementCount == 0 || nodeObject.tagName == "menulist") {
|
||||
let simpleTextNodes = this.textNodeDescendants(nodeObject);
|
||||
|
||||
for (let node of simpleTextNodes) {
|
||||
@ -282,8 +285,6 @@ var gSearchResultsPane = {
|
||||
let nodeSizes = [];
|
||||
let allNodeText = "";
|
||||
let runningSize = 0;
|
||||
let labelResult = false;
|
||||
let valueResult = false;
|
||||
let accessKeyTextNodes = this.textNodeDescendants(nodeObject.boxObject);
|
||||
|
||||
for (let node of accessKeyTextNodes) {
|
||||
@ -296,9 +297,7 @@ var gSearchResultsPane = {
|
||||
let complexTextNodesResult = this.highlightMatches(accessKeyTextNodes, nodeSizes, allNodeText.toLowerCase(), searchPhrase);
|
||||
|
||||
// Searching some elements, such as xul:button, have a 'label' attribute that contains the user-visible text.
|
||||
if (nodeObject.getAttribute("label")) {
|
||||
labelResult = this.stringMatchesFilters(nodeObject.getAttribute("label"), searchPhrase);
|
||||
}
|
||||
let labelResult = this.stringMatchesFilters(nodeObject.getAttribute("label"), searchPhrase);
|
||||
|
||||
// Creating tooltips for buttons
|
||||
if (labelResult && nodeObject.tagName === "button") {
|
||||
@ -306,20 +305,26 @@ var gSearchResultsPane = {
|
||||
}
|
||||
|
||||
// Searching some elements, such as xul:label, store their user-visible text in a "value" attribute.
|
||||
if (nodeObject.getAttribute("value")) {
|
||||
valueResult = this.stringMatchesFilters(nodeObject.getAttribute("value"), searchPhrase);
|
||||
}
|
||||
|
||||
if (nodeObject.tagName == "button" && (labelResult || valueResult)) {
|
||||
nodeObject.setAttribute("highlightable", "true");
|
||||
}
|
||||
let valueResult = this.stringMatchesFilters(nodeObject.getAttribute("value"), searchPhrase);
|
||||
|
||||
// Creating tooltips for buttons
|
||||
if (valueResult && nodeObject.tagName === "button") {
|
||||
this.listSearchTooltips.push(nodeObject);
|
||||
}
|
||||
|
||||
matchesFound = matchesFound || complexTextNodesResult || labelResult || valueResult;
|
||||
// Searching some elements, such as xul:button, buttons to open subdialogs.
|
||||
let keywordsResult = this.stringMatchesFilters(nodeObject.getAttribute("searchkeywords"), searchPhrase);
|
||||
|
||||
// Creating tooltips for buttons
|
||||
if (keywordsResult && nodeObject.tagName === "button") {
|
||||
this.listSearchTooltips.push(nodeObject);
|
||||
}
|
||||
|
||||
if (nodeObject.tagName == "button" && (labelResult || valueResult || keywordsResult)) {
|
||||
nodeObject.setAttribute("highlightable", "true");
|
||||
}
|
||||
|
||||
matchesFound = matchesFound || complexTextNodesResult || labelResult || valueResult || keywordsResult;
|
||||
}
|
||||
|
||||
for (let i = 0; i < nodeObject.childNodes.length; i++) {
|
||||
|
@ -315,7 +315,8 @@
|
||||
class="content-cell-item"
|
||||
label="&chooseBookmark.label;"
|
||||
accesskey="&chooseBookmark.accesskey;"
|
||||
preference="pref.browser.homepage.disable_button.bookmark_page"/>
|
||||
preference="pref.browser.homepage.disable_button.bookmark_page"
|
||||
searchkeywords="&selectBookmark.title; &selectBookmark.label;"/>
|
||||
<button id="restoreDefaultHomePage"
|
||||
class="content-cell-item"
|
||||
label="&restoreDefault.label;"
|
||||
@ -452,7 +453,14 @@
|
||||
<button id="chooseLanguage"
|
||||
class="accessory-button"
|
||||
label="&chooseButton.label;"
|
||||
accesskey="&chooseButton.accesskey;"/>
|
||||
accesskey="&chooseButton.accesskey;"
|
||||
searchkeywords="&languages.customize.Header;
|
||||
&languages.customize.description;
|
||||
&languages.customize.moveUp.label;
|
||||
&languages.customize.moveDown.label;
|
||||
&languages.customize.deleteButton.label;
|
||||
&languages.customize.selectLanguage.label;
|
||||
&languages.customize.addButton.label;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="translationBox" hidden="true">
|
||||
@ -529,7 +537,67 @@
|
||||
class="accessory-button"
|
||||
icon="select-font"
|
||||
label="&advancedFonts.label;"
|
||||
accesskey="&advancedFonts.accesskey;"/>
|
||||
accesskey="&advancedFonts.accesskey;"
|
||||
searchkeywords="&fontsDialog.title;
|
||||
&language.label;
|
||||
&size.label;
|
||||
&proportional.label;
|
||||
&serif.label;
|
||||
&sans-serif.label;
|
||||
&monospace.label;
|
||||
&font.langGroup.latin;
|
||||
&font.langGroup.japanese;
|
||||
&font.langGroup.trad-chinese;
|
||||
&font.langGroup.simpl-chinese;
|
||||
&font.langGroup.trad-chinese-hk;
|
||||
&font.langGroup.korean;
|
||||
&font.langGroup.cyrillic;
|
||||
&font.langGroup.el;
|
||||
&font.langGroup.other;
|
||||
&font.langGroup.thai;
|
||||
&font.langGroup.hebrew;
|
||||
&font.langGroup.arabic;
|
||||
&font.langGroup.devanagari;
|
||||
&font.langGroup.tamil;
|
||||
&font.langGroup.armenian;
|
||||
&font.langGroup.bengali;
|
||||
&font.langGroup.canadian;
|
||||
&font.langGroup.ethiopic;
|
||||
&font.langGroup.georgian;
|
||||
&font.langGroup.gujarati;
|
||||
&font.langGroup.gurmukhi;
|
||||
&font.langGroup.khmer;
|
||||
&font.langGroup.malayalam;
|
||||
&font.langGroup.math;
|
||||
&font.langGroup.odia;
|
||||
&font.langGroup.telugu;
|
||||
&font.langGroup.kannada;
|
||||
&font.langGroup.sinhala;
|
||||
&font.langGroup.tibetan;
|
||||
&minSize.label;
|
||||
&minSize.none;
|
||||
&useDefaultFontSerif.label;
|
||||
&useDefaultFontSansSerif.label;
|
||||
&allowPagesToUseOwn.label;
|
||||
&languages.customize.Fallback2.grouplabel;
|
||||
&languages.customize.Fallback2.label;
|
||||
&languages.customize.Fallback2.desc;
|
||||
&languages.customize.Fallback.auto;
|
||||
&languages.customize.Fallback.arabic;
|
||||
&languages.customize.Fallback.baltic;
|
||||
&languages.customize.Fallback.ceiso;
|
||||
&languages.customize.Fallback.cewindows;
|
||||
&languages.customize.Fallback.simplified;
|
||||
&languages.customize.Fallback.traditional;
|
||||
&languages.customize.Fallback.cyrillic;
|
||||
&languages.customize.Fallback.greek;
|
||||
&languages.customize.Fallback.hebrew;
|
||||
&languages.customize.Fallback.japanese;
|
||||
&languages.customize.Fallback.korean;
|
||||
&languages.customize.Fallback.thai;
|
||||
&languages.customize.Fallback.turkish;
|
||||
&languages.customize.Fallback.vietnamese;
|
||||
&languages.customize.Fallback.other;"/>
|
||||
</hbox>
|
||||
<hbox id="colorsSettings">
|
||||
<spacer flex="1" />
|
||||
@ -537,7 +605,15 @@
|
||||
class="accessory-button"
|
||||
icon="select-color"
|
||||
label="&colors.label;"
|
||||
accesskey="&colors.accesskey;"/>
|
||||
accesskey="&colors.accesskey;"
|
||||
searchkeywords="&overrideDefaultPageColors.label;
|
||||
&overrideDefaultPageColors.always.label;
|
||||
&overrideDefaultPageColors.auto.label;
|
||||
&overrideDefaultPageColors.never.label;
|
||||
&useSystemColors.label;
|
||||
&underlineLinks.label;
|
||||
&linkColor.label;
|
||||
&visitedLinkColor.label;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
@ -575,7 +651,7 @@
|
||||
accesskey="&allowHWAccel.accesskey;"
|
||||
preference="layers.acceleration.disabled"/>
|
||||
<hbox align="center">
|
||||
<label id="limitContentProcess" accesskey="&limitContentProcess2.accesskey;" control="contentProcessCount">&limitContentProcess2.label;</label>
|
||||
<label id="limitContentProcess" accesskey="&limitContentProcessOption.accesskey;" control="contentProcessCount">&limitContentProcessOption.label;</label>
|
||||
<menulist id="contentProcessCount" preference="dom.ipc.processCount">
|
||||
<menupopup>
|
||||
<menuitem label="1" value="1"/>
|
||||
@ -588,6 +664,6 @@
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<description>&limitContentProcess2.description;</description>
|
||||
<description>&limitContentProcessOption.description;</description>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
@ -20,6 +20,19 @@
|
||||
<!ENTITY % globalPreferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
|
||||
<!ENTITY % preferencesDTD SYSTEM
|
||||
"chrome://browser/locale/preferences/preferences.dtd">
|
||||
<!ENTITY % selectBookmarkDTD SYSTEM
|
||||
"chrome://browser/locale/preferences/selectBookmark.dtd">
|
||||
<!ENTITY % languagesDTD SYSTEM "chrome://browser/locale/preferences/languages.dtd">
|
||||
<!ENTITY % fontDTD SYSTEM "chrome://browser/locale/preferences/fonts.dtd">
|
||||
<!ENTITY % colorsDTD SYSTEM "chrome://browser/locale/preferences/colors.dtd">
|
||||
<!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd">
|
||||
<!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd">
|
||||
<!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd">
|
||||
<!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
|
||||
<!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd">
|
||||
<!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
|
||||
<!ENTITY % siteDataSettingsDTD SYSTEM
|
||||
"chrome://browser/locale/preferences/siteDataSettings.dtd" >
|
||||
<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
|
||||
<!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.dtd">
|
||||
<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
|
||||
@ -42,6 +55,17 @@
|
||||
%brandDTD;
|
||||
%globalPreferencesDTD;
|
||||
%preferencesDTD;
|
||||
%selectBookmarkDTD;
|
||||
%languagesDTD;
|
||||
%fontDTD;
|
||||
%colorsDTD;
|
||||
%permissionsDTD;
|
||||
%passwordManagerDTD;
|
||||
%historyDTD;
|
||||
%certManagerDTD;
|
||||
%deviceManangerDTD;
|
||||
%connectionDTD;
|
||||
%siteDataSettingsDTD;
|
||||
%privacyDTD;
|
||||
%tabsDTD;
|
||||
%searchDTD;
|
||||
@ -84,6 +108,10 @@
|
||||
src="chrome://branding/locale/brand.properties"/>
|
||||
<stringbundle id="bundlePreferences"
|
||||
src="chrome://browser/locale/preferences/preferences.properties"/>
|
||||
<stringbundle id="pkiBundle"
|
||||
src="chrome://pippki/locale/pippki.properties"/>
|
||||
<stringbundle id="browserBundle"
|
||||
src="chrome://browser/locale/browser.properties"/>
|
||||
|
||||
<stringbundleset id="appManagerBundleset">
|
||||
<stringbundle id="appManagerBundle"
|
||||
|
@ -150,6 +150,13 @@ var gPrivacyPane = {
|
||||
.addEventListener(aEventType, aCallback.bind(gPrivacyPane));
|
||||
}
|
||||
|
||||
function appendSearchKeywords(aId, keywords) {
|
||||
let element = document.getElementById(aId);
|
||||
let searchKeywords = element.getAttribute("searchkeywords");
|
||||
searchKeywords && keywords.push(searchKeywords);
|
||||
element.setAttribute("searchkeywords", keywords.join(" "));
|
||||
}
|
||||
|
||||
this._updateSanitizeSettingsButton();
|
||||
this.initializeHistoryMode();
|
||||
this.updateHistoryModePane();
|
||||
@ -319,6 +326,53 @@ var gPrivacyPane = {
|
||||
setEventListener("submitHealthReportBox", "command",
|
||||
gPrivacyPane.updateSubmitHealthReport);
|
||||
}
|
||||
|
||||
// Append search keywords into the elements could open subdialogs.
|
||||
let bundlePrefs = document.getElementById("bundlePreferences");
|
||||
let signonBundle = document.getElementById("signonBundle");
|
||||
let pkiBundle = document.getElementById("pkiBundle");
|
||||
let browserBundle = document.getElementById("browserBundle");
|
||||
appendSearchKeywords("passwordExceptions", [
|
||||
bundlePrefs.getString("savedLoginsExceptions_title"),
|
||||
bundlePrefs.getString("savedLoginsExceptions_desc"),
|
||||
]);
|
||||
appendSearchKeywords("showPasswords", [
|
||||
signonBundle.getString("loginsDescriptionAll"),
|
||||
]);
|
||||
appendSearchKeywords("trackingProtectionExceptions", [
|
||||
bundlePrefs.getString("trackingprotectionpermissionstitle"),
|
||||
bundlePrefs.getString("trackingprotectionpermissionstext"),
|
||||
]);
|
||||
appendSearchKeywords("changeBlockList", [
|
||||
bundlePrefs.getString("blockliststitle"),
|
||||
bundlePrefs.getString("blockliststext"),
|
||||
]);
|
||||
appendSearchKeywords("popupPolicyButton", [
|
||||
bundlePrefs.getString("popuppermissionstitle"),
|
||||
bundlePrefs.getString("popuppermissionstext"),
|
||||
]);
|
||||
appendSearchKeywords("notificationsPolicyButton", [
|
||||
bundlePrefs.getString("notificationspermissionstitle"),
|
||||
bundlePrefs.getString("notificationspermissionstext4"),
|
||||
]);
|
||||
appendSearchKeywords("addonExceptions", [
|
||||
bundlePrefs.getString("addons_permissions_title"),
|
||||
bundlePrefs.getString("addonspermissionstext"),
|
||||
]);
|
||||
appendSearchKeywords("viewSecurityDevicesButton", [
|
||||
pkiBundle.getString("enable_fips"),
|
||||
]);
|
||||
appendSearchKeywords("browserContainersSettings", [
|
||||
browserBundle.getString("userContextPersonal.label"),
|
||||
browserBundle.getString("userContextWork.label"),
|
||||
browserBundle.getString("userContextBanking.label"),
|
||||
browserBundle.getString("userContextShopping.label"),
|
||||
]);
|
||||
appendSearchKeywords("siteDataSettings", [
|
||||
bundlePrefs.getString("siteDataSettings.description"),
|
||||
bundlePrefs.getString("removeAllCookies.label"),
|
||||
bundlePrefs.getString("removeSelectedCookies.label"),
|
||||
]);
|
||||
},
|
||||
|
||||
// TRACKING PROTECTION MODE
|
||||
|
@ -171,6 +171,7 @@
|
||||
</preferences>
|
||||
|
||||
<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/>
|
||||
<stringbundle id="signonBundle" src="chrome://passwordmgr/locale/passwordmgr.properties"/>
|
||||
|
||||
<hbox id="header-privacy"
|
||||
class="header"
|
||||
@ -317,20 +318,22 @@
|
||||
class="accessory-button"
|
||||
label="&passwordExceptions.label;"
|
||||
accesskey="&passwordExceptions.accesskey;"
|
||||
preference="pref.privacy.disable_button.view_passwords_exceptions"/>
|
||||
preference="pref.privacy.disable_button.view_passwords_exceptions"
|
||||
searchkeywords="&address.label;"/>
|
||||
</hbox>
|
||||
<hbox id="showPasswordBox" pack="end">
|
||||
<button id="showPasswords"
|
||||
class="accessory-button"
|
||||
label="&savedLogins.label;" accesskey="&savedLogins.accesskey;"
|
||||
preference="pref.privacy.disable_button.view_passwords"/>
|
||||
preference="pref.privacy.disable_button.view_passwords"
|
||||
searchkeywords="&savedLogins.title;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<hbox id="masterPasswordRow">
|
||||
<checkbox id="useMasterPassword"
|
||||
label="&useMasterPassword.label;"
|
||||
accesskey="&useMasterPassword.accesskey;"
|
||||
flex="1" />
|
||||
flex="1"/>
|
||||
<button id="changeMasterPassword"
|
||||
class="accessory-button"
|
||||
label="&changeMasterPassword.label;"
|
||||
@ -359,12 +362,17 @@
|
||||
class="accessory-button"
|
||||
label="&trackingProtectionExceptions.label;"
|
||||
accesskey="&trackingProtectionExceptions.accesskey;"
|
||||
preference="pref.privacy.disable_button.tracking_protection_exceptions"/>
|
||||
preference="pref.privacy.disable_button.tracking_protection_exceptions"
|
||||
searchkeywords="&removepermission.label;
|
||||
&removeallpermissions.label;
|
||||
&button.cancel.label;
|
||||
&button.ok.label;"/>
|
||||
<button id="changeBlockList"
|
||||
class="accessory-button"
|
||||
label="&changeBlockList.label;"
|
||||
accesskey="&changeBlockList.accesskey;"
|
||||
preference="pref.privacy.disable_button.change_blocklist"/>
|
||||
preference="pref.privacy.disable_button.change_blocklist"
|
||||
searchkeywords="&button.cancel.label; &button.ok.label;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<radiogroup id="trackingProtectionRadioGroup" aria-labelledby="trackingProtectionDesc">
|
||||
@ -413,7 +421,8 @@
|
||||
<button id="popupPolicyButton"
|
||||
class="accessory-button"
|
||||
label="&popupExceptions.label;"
|
||||
accesskey="&popupExceptions.accesskey;"/>
|
||||
accesskey="&popupExceptions.accesskey;"
|
||||
searchkeywords="&address.label; &button.cancel.label; &button.ok.label;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
@ -436,7 +445,11 @@
|
||||
<button id="notificationsPolicyButton"
|
||||
class="accessory-button"
|
||||
label="¬ificationsPolicyButton.label;"
|
||||
accesskey="¬ificationsPolicyButton.accesskey;"/>
|
||||
accesskey="¬ificationsPolicyButton.accesskey;"
|
||||
searchkeywords="&removepermission.label;
|
||||
&removeallpermissions.label;
|
||||
&button.cancel.label;
|
||||
&button.ok.label;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
@ -483,7 +496,13 @@
|
||||
<button id="addonExceptions"
|
||||
class="accessory-button"
|
||||
label="&addonExceptions.label;"
|
||||
accesskey="&addonExceptions.accesskey;"/>
|
||||
accesskey="&addonExceptions.accesskey;"
|
||||
searchkeywords="&address.label;
|
||||
&allow.label;
|
||||
&removepermission.label;
|
||||
&removeallpermissions.label;
|
||||
&button.cancel.label;
|
||||
&button.ok.label;"/>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
@ -534,12 +553,36 @@
|
||||
class="accessory-button"
|
||||
label="&viewCerts.label;"
|
||||
accesskey="&viewCerts.accesskey;"
|
||||
preference="security.disable_button.openCertManager"/>
|
||||
preference="security.disable_button.openCertManager"
|
||||
searchkeywords="&certmgr.tab.mine;
|
||||
&certmgr.tab.others2;
|
||||
&certmgr.tab.websites3;
|
||||
&certmgr.tab.ca;
|
||||
&certmgr.tab.orphan2;
|
||||
&certmgr.mine;
|
||||
&certmgr.others;
|
||||
&certmgr.websites2;
|
||||
&certmgr.cas;
|
||||
&certmgr.orphans;
|
||||
&certmgr.certname;
|
||||
&certmgr.tokenname;
|
||||
&certmgr.view2.label;
|
||||
&certmgr.export.label;
|
||||
&certmgr.delete2.label;"/>
|
||||
<button id="viewSecurityDevicesButton"
|
||||
class="accessory-button"
|
||||
label="&viewSecurityDevices.label;"
|
||||
accesskey="&viewSecurityDevices.accesskey;"
|
||||
preference="security.disable_button.openDeviceManager"/>
|
||||
preference="security.disable_button.openDeviceManager"
|
||||
searchkeywords="&devmgr.title;
|
||||
&devmgr.devlist.label;
|
||||
&devmgr.details.title;
|
||||
&devmgr.details.title2;
|
||||
&devmgr.button.login.label;
|
||||
&devmgr.button.logout.label;
|
||||
&devmgr.button.changepw.label;
|
||||
&devmgr.button.load.label;
|
||||
&devmgr.button.unload.label;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
@ -583,7 +626,10 @@
|
||||
<button id="browserContainersSettings"
|
||||
class="accessory-button"
|
||||
label="&browserContainersSettings.label;"
|
||||
accesskey="&browserContainersSettings.accesskey;"/>
|
||||
accesskey="&browserContainersSettings.accesskey;"
|
||||
searchkeywords="&addButton.label;
|
||||
&preferencesButton.label;
|
||||
&removeButton.label;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
@ -599,7 +645,25 @@
|
||||
class="accessory-button"
|
||||
icon="network"
|
||||
label="&connectionSettings.label;"
|
||||
accesskey="&connectionSettings.accesskey;"/>
|
||||
accesskey="&connectionSettings.accesskey;"
|
||||
searchkeywords="&connectionsDialog.title;
|
||||
&noProxyTypeRadio.label;
|
||||
&WPADTypeRadio.label;
|
||||
&systemTypeRadio.label;
|
||||
&manualTypeRadio.label;
|
||||
&http.label;
|
||||
&ssl.label;
|
||||
&ftp.label;
|
||||
&socks.label;
|
||||
&socks4.label;
|
||||
&socks5.label;
|
||||
&noproxy.label;
|
||||
&noproxyExplain.label;
|
||||
&shareproxy.label;
|
||||
&autoTypeRadio.label;
|
||||
&reload.label;
|
||||
&autologinproxy.label;
|
||||
&socksRemoteDNS.label2;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
@ -687,7 +751,11 @@
|
||||
<button id="siteDataSettings"
|
||||
class="accessory-button"
|
||||
label="&siteDataSettings.label;"
|
||||
accesskey="&siteDataSettings.accesskey;"/>
|
||||
accesskey="&siteDataSettings.accesskey;"
|
||||
searchkeywords="&window.title;
|
||||
&hostCol.label;
|
||||
&statusCol.label;
|
||||
&usageCol.label;"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
||||
|
@ -14,6 +14,10 @@ skip-if = !updater
|
||||
[browser_bug705422.js]
|
||||
[browser_bug731866.js]
|
||||
[browser_search_within_preferences.js]
|
||||
[browser_search_subdialogs_within_preferences_1.js]
|
||||
[browser_search_subdialogs_within_preferences_2.js]
|
||||
[browser_search_subdialogs_within_preferences_3.js]
|
||||
[browser_search_subdialogs_within_preferences_4.js]
|
||||
[browser_bug795764_cachedisabled.js]
|
||||
[browser_bug1018066_resetScrollPosition.js]
|
||||
[browser_bug1020245_openPreferences_to_paneContent.js]
|
||||
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file contains tests for the Preferences search bar.
|
||||
*/
|
||||
|
||||
// Enabling Searching functionatily. Will display search bar form this testcase forward.
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [["browser.preferences.search", true]]});
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Set Home Page" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Set Home Page", "startupGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Languages" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Choose languages", "languagesGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Fonts" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Text Encoding", "fontsGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Colors" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Link Colors", "fontsGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Exceptions - Saved Logins" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("sites will not be saved", "passwordsGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file contains tests for the Preferences search bar.
|
||||
*/
|
||||
|
||||
// Enabling Searching functionatily. Will display search bar form this testcase forward.
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["browser.preferences.search", true],
|
||||
["privacy.trackingprotection.ui.enabled", true]
|
||||
]});
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Saved Logins" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("sites are stored", "passwordsGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Exceptions - Tracking Protection" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("disabled Tracking Protection", "trackingGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Block Lists" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("block Web elements", "trackingGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Allowed Sites - Pop-ups" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("open pop-up windows", "miscGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Notification Permissions" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("request permission again", "notificationsGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file contains tests for the Preferences search bar.
|
||||
*/
|
||||
|
||||
// Enabling Searching functionatily. Will display search bar form this testcase forward.
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["browser.preferences.search", true],
|
||||
["browser.storageManager.enabled", true]
|
||||
]});
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Allowed Sites - Add-ons Installation" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("allowed to install add-ons", "addonsPhishingGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Certificate Manager" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("identify these certificate authorities", "certSelection");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Device Manager" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Security Modules and Devices", "certSelection");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Connection Settings" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("Use system proxy settings", "connectionGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Settings - Site Data" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("store site data on your computer", "siteDataGroup");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* This file contains tests for the Preferences search bar.
|
||||
*/
|
||||
|
||||
// Enabling Searching functionatily. Will display search bar form this testcase forward.
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [["browser.preferences.search", true]]});
|
||||
});
|
||||
|
||||
/**
|
||||
* Test for searching for the "Update History" subdialog.
|
||||
*/
|
||||
add_task(async function() {
|
||||
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
|
||||
evaluateSearchResults("updates have been installed", "updateApp");
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
@ -89,7 +89,11 @@ add_task(async function() {
|
||||
|
||||
for (let i = 0; i < mainPrefTag.childElementCount; i++) {
|
||||
let child = mainPrefTag.children[i]
|
||||
if (child.id == "passwordsGroup" || child.id == "weavePrefsDeck" || child.id == "header-searchResults") {
|
||||
if (child.id == "passwordsGroup" ||
|
||||
child.id == "weavePrefsDeck" ||
|
||||
child.id == "header-searchResults" ||
|
||||
child.id == "certSelection" ||
|
||||
child.id == "connectionGroup") {
|
||||
is_element_visible(child, "Should be in search results");
|
||||
} else if (child.id) {
|
||||
is_element_hidden(child, "Should not be in search results");
|
||||
|
@ -218,6 +218,26 @@ function assertSitesListed(doc, hosts) {
|
||||
is(removeAllBtn.disabled, false, "Should enable the removeAllBtn button");
|
||||
}
|
||||
|
||||
function evaluateSearchResults(keyword, searchReults) {
|
||||
searchReults = Array.isArray(searchReults) ? searchReults : [searchReults];
|
||||
searchReults.push("header-searchResults");
|
||||
|
||||
let searchInput = gBrowser.contentDocument.getElementById("searchInput");
|
||||
searchInput.focus();
|
||||
searchInput.value = keyword;
|
||||
searchInput.doCommand();
|
||||
|
||||
let mainPrefTag = gBrowser.contentDocument.getElementById("mainPrefPane");
|
||||
for (let i = 0; i < mainPrefTag.childElementCount; i++) {
|
||||
let child = mainPrefTag.children[i];
|
||||
if (searchReults.includes(child.id)) {
|
||||
is_element_visible(child, "Should be in search results");
|
||||
} else if (child.id) {
|
||||
is_element_hidden(child, "Should not be in search results");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const mockSiteDataManager = {
|
||||
|
||||
_SiteDataManager: null,
|
||||
|
@ -1310,7 +1310,7 @@ var SessionStoreInternal = {
|
||||
// Let everyone know we're done.
|
||||
this._deferredInitialized.resolve();
|
||||
}
|
||||
}, console.error);
|
||||
}).catch(console.error);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,15 @@
|
||||
* notifications. The latter won't.
|
||||
*/
|
||||
|
||||
// The rejection "RecentWindow.getMostRecentBrowserWindow(...) is null" is left
|
||||
// unhandled in some cases. This bug should be fixed, but for the moment this
|
||||
// file is whitelisted.
|
||||
//
|
||||
// NOTE: Whitelisting a class of rejections should be limited. Normally you
|
||||
// should use "expectUncaughtRejection" to flag individual failures.
|
||||
Cu.import("resource://testing-common/PromiseTestUtils.jsm", this);
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/getMostRecentBrowserWindow/);
|
||||
|
||||
// Some urls that might be opened in tabs and/or popups
|
||||
// Do not use about:blank:
|
||||
// That one is reserved for special purposes in the tests
|
||||
|
@ -31,7 +31,6 @@ module.exports = {
|
||||
"SimpleTest": false,
|
||||
"SpecialPowers": false,
|
||||
"TestUtils": false,
|
||||
"thisTestLeaksUncaughtRejectionsAndShouldBeFixed": false,
|
||||
"todo": false,
|
||||
"todo_is": false,
|
||||
"todo_isnot": false,
|
||||
|
@ -11,6 +11,47 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
this.FormAutofillUtils = {
|
||||
_fieldNameInfo: {
|
||||
"name": "name",
|
||||
"given-name": "name",
|
||||
"additional-name": "name",
|
||||
"family-name": "name",
|
||||
"organization": "organization",
|
||||
"street-address": "address",
|
||||
"address-line1": "address",
|
||||
"address-line2": "address",
|
||||
"address-line3": "address",
|
||||
"address-level1": "address",
|
||||
"address-level2": "address",
|
||||
"postal-code": "address",
|
||||
"country": "address",
|
||||
"tel": "tel",
|
||||
"email": "email",
|
||||
"cc-name": "creditCard",
|
||||
"cc-number": "creditCard",
|
||||
"cc-exp-month": "creditCard",
|
||||
"cc-exp-year": "creditCard",
|
||||
},
|
||||
|
||||
isAddressField(fieldName) {
|
||||
return !!this._fieldNameInfo[fieldName] && !this.isCreditCardField(fieldName);
|
||||
},
|
||||
|
||||
isCreditCardField(fieldName) {
|
||||
return this._fieldNameInfo[fieldName] == "creditCard";
|
||||
},
|
||||
|
||||
getCategoriesFromFieldNames(fieldNames) {
|
||||
let categories = new Set();
|
||||
for (let fieldName of fieldNames) {
|
||||
let info = this._fieldNameInfo[fieldName];
|
||||
if (info) {
|
||||
categories.add(info);
|
||||
}
|
||||
}
|
||||
return categories;
|
||||
},
|
||||
|
||||
defineLazyLogGetter(scope, logPrefix) {
|
||||
XPCOMUtils.defineLazyGetter(scope, "log", () => {
|
||||
let ConsoleAPI = Cu.import("resource://gre/modules/Console.jsm", {}).ConsoleAPI;
|
||||
|
@ -0,0 +1,78 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
Cu.import("resource://formautofill/FormAutofillUtils.jsm");
|
||||
|
||||
add_task(async function test_isAddressField_isCreditCardField() {
|
||||
const TEST_CASES = {
|
||||
"given-name": {
|
||||
isAddressField: true,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"organization": {
|
||||
isAddressField: true,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"address-line2": {
|
||||
isAddressField: true,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"tel": {
|
||||
isAddressField: true,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"email": {
|
||||
isAddressField: true,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"cc-number": {
|
||||
isAddressField: false,
|
||||
isCreditCardField: true,
|
||||
},
|
||||
"UNKNOWN": {
|
||||
isAddressField: false,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
"": {
|
||||
isAddressField: false,
|
||||
isCreditCardField: false,
|
||||
},
|
||||
};
|
||||
|
||||
for (let fieldName of Object.keys(TEST_CASES)) {
|
||||
do_print("Starting testcase: " + fieldName);
|
||||
let info = TEST_CASES[fieldName];
|
||||
Assert.equal(FormAutofillUtils.isAddressField(fieldName),
|
||||
info.isAddressField,
|
||||
"isAddressField");
|
||||
Assert.equal(FormAutofillUtils.isCreditCardField(fieldName),
|
||||
info.isCreditCardField,
|
||||
"isCreditCardField");
|
||||
}
|
||||
});
|
||||
|
||||
add_task(async function test_getCategoriesFromFieldNames() {
|
||||
const TEST_CASES = [
|
||||
{
|
||||
fieldNames: ["given-name", "family-name", "name", "tel", "organization"],
|
||||
set: ["name", "tel", "organization"],
|
||||
},
|
||||
{
|
||||
fieldNames: ["address-line2", "family-name", "name", "tel", "organization", "email"],
|
||||
set: ["address", "name", "tel", "organization", "email"],
|
||||
},
|
||||
{
|
||||
fieldNames: ["address-line2", "family-name", "", "name", "tel", "UNKOWN"],
|
||||
set: ["address", "name", "tel"],
|
||||
},
|
||||
{
|
||||
fieldNames: ["tel", "family-name", "", "name", "tel", "UNKOWN"],
|
||||
set: ["tel", "name"],
|
||||
},
|
||||
];
|
||||
|
||||
for (let tc of TEST_CASES) {
|
||||
let categories = FormAutofillUtils.getCategoriesFromFieldNames(tc.fieldNames);
|
||||
Assert.deepEqual(Array.from(categories), tc.set);
|
||||
}
|
||||
});
|
@ -22,6 +22,7 @@ support-files =
|
||||
[test_collectFormFields.js]
|
||||
[test_creditCardRecords.js]
|
||||
[test_findLabelElements.js]
|
||||
[test_getCategoriesFromFieldNames.js]
|
||||
[test_getFormInputDetails.js]
|
||||
[test_isCJKName.js]
|
||||
[test_markAsAutofillField.js]
|
||||
|
@ -255,7 +255,8 @@ this.PreferenceExperiments = {
|
||||
preferenceName,
|
||||
observer(newValue) {
|
||||
if (newValue !== preferenceValue) {
|
||||
PreferenceExperiments.stop(experimentName, false);
|
||||
PreferenceExperiments.stop(experimentName, false)
|
||||
.catch(Cu.reportError);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -213,6 +213,7 @@
|
||||
@RESPATH@/components/dom_html.xpt
|
||||
@RESPATH@/components/dom_offline.xpt
|
||||
@RESPATH@/components/dom_json.xpt
|
||||
@RESPATH@/components/dom_payments.xpt
|
||||
@RESPATH@/components/dom_power.xpt
|
||||
@RESPATH@/components/dom_push.xpt
|
||||
@RESPATH@/components/dom_quota.xpt
|
||||
@ -381,6 +382,8 @@
|
||||
@RESPATH@/browser/components/nsSetDefaultBrowser.js
|
||||
@RESPATH@/browser/components/devtools-startup.manifest
|
||||
@RESPATH@/browser/components/devtools-startup.js
|
||||
@RESPATH@/browser/components/aboutdebugging-registration.js
|
||||
@RESPATH@/browser/components/aboutdebugging.manifest
|
||||
@RESPATH@/browser/components/webideCli.js
|
||||
@RESPATH@/browser/components/webideComponents.manifest
|
||||
@RESPATH@/browser/components/Experiments.manifest
|
||||
|
@ -384,15 +384,26 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||
<!ENTITY customizeMenu.addToToolbar.accesskey "A">
|
||||
<!ENTITY customizeMenu.addToPanel.label "Add to Menu">
|
||||
<!ENTITY customizeMenu.addToPanel.accesskey "M">
|
||||
<!-- LOCALIZATION NOTE (customizeMenu.addToOverflowMenu.label,
|
||||
customizeMenu.pinToOverflowMenu.label, customizeMenu.unpinFromOverflowMenu.label)
|
||||
The overflow menu is the menu that appears if you click the chevron (>> button)
|
||||
in the location bar. These labels are only used in Photon, where you can put
|
||||
items into this menu permanently (pinned). -->
|
||||
<!ENTITY customizeMenu.addToOverflowMenu.label "Add to Overflow Menu">
|
||||
<!ENTITY customizeMenu.addToOverflowMenu.accesskey "M">
|
||||
<!ENTITY customizeMenu.moveToToolbar.label "Move to Toolbar">
|
||||
<!ENTITY customizeMenu.moveToToolbar.accesskey "o">
|
||||
<!-- LOCALIZATION NOTE (customizeMenu.moveToPanel.accesskey) can appear on the
|
||||
same context menu as menubarCmd and personalbarCmd, so they should have
|
||||
different access keys. customizeMenu.moveToToolbar and
|
||||
<!-- LOCALIZATION NOTE (customizeMenu.moveToPanel.accesskey, customizeMenu.pinToOverflowMenu.accesskey)
|
||||
can appear on the same context menu as menubarCmd and personalbarCmd,
|
||||
so they should have different access keys. customizeMenu.moveToToolbar and
|
||||
customizeMenu.moveToPanel are mutually exclusive, so can share access
|
||||
keys. -->
|
||||
<!ENTITY customizeMenu.moveToPanel.label "Move to Menu">
|
||||
<!ENTITY customizeMenu.moveToPanel.accesskey "o">
|
||||
<!ENTITY customizeMenu.pinToOverflowMenu.label "Pin to Overflow Menu">
|
||||
<!ENTITY customizeMenu.pinToOverflowMenu.accesskey "P">
|
||||
<!ENTITY customizeMenu.unpinFromOverflowMenu.label "Unpin from Overflow Menu">
|
||||
<!ENTITY customizeMenu.unpinFromOverflowMenu.accesskey "U">
|
||||
<!ENTITY customizeMenu.removeFromToolbar.label "Remove from Toolbar">
|
||||
<!ENTITY customizeMenu.removeFromToolbar.accesskey "R">
|
||||
<!ENTITY customizeMenu.removeFromMenu.label "Remove from Menu">
|
||||
|
@ -133,9 +133,9 @@
|
||||
"U">
|
||||
<!ENTITY performanceSettingsLearnMore.label
|
||||
"Learn more">
|
||||
<!ENTITY limitContentProcess.label "Content process limit">
|
||||
<!ENTITY limitContentProcess.description
|
||||
"Additional content processes can improve &brandShortName; performance when using multiple tabs, but will also use more memory.">
|
||||
<!ENTITY limitContentProcess.accesskey "L">
|
||||
<!ENTITY limitContentProcessOption.label "Content process limit">
|
||||
<!ENTITY limitContentProcessOption.description
|
||||
"Additional content processes can improve performance when using multiple tabs, but will also use more memory.">
|
||||
<!ENTITY limitContentProcessOption.accesskey "L">
|
||||
<!ENTITY allowHWAccel.label "Use hardware acceleration when available">
|
||||
<!ENTITY allowHWAccel.accesskey "r">
|
||||
|
@ -146,9 +146,9 @@
|
||||
"U">
|
||||
<!ENTITY performanceSettingsLearnMore.label
|
||||
"Learn more">
|
||||
<!ENTITY limitContentProcess2.label "Content process limit">
|
||||
<!ENTITY limitContentProcess2.description
|
||||
"Additional content processes can improve &brandShortName; performance when using multiple tabs, but will also use more memory.">
|
||||
<!ENTITY limitContentProcess2.accesskey "L">
|
||||
<!ENTITY limitContentProcessOption.label "Content process limit">
|
||||
<!ENTITY limitContentProcessOption.description
|
||||
"Additional content processes can improve performance when using multiple tabs, but will also use more memory.">
|
||||
<!ENTITY limitContentProcessOption.accesskey "L">
|
||||
<!ENTITY allowHWAccel.label "Use hardware acceleration when available">
|
||||
<!ENTITY allowHWAccel.accesskey "r">
|
||||
|
@ -257,9 +257,10 @@ removeContainerButton2=Don’t remove this Container
|
||||
|
||||
# Search Results Pane
|
||||
# LOCALIZATION NOTE %S will be replaced by the word being searched
|
||||
searchResults.sorryMessage2=Sorry! There are no results in Preferences for “%S”.
|
||||
searchResults.sorryMessageWin=Sorry! There are no results in Options for “%S”.
|
||||
searchResults.sorryMessageUnix=Sorry! There are no results in Preferences for “%S”.
|
||||
# LOCALIZATION NOTE %S gets replaced with the browser name
|
||||
searchResults.needHelp=Need help? Visit <html:a id="need-help-link">%S Support</html:a>
|
||||
searchResults.needHelp2=Need help? Visit <html:a id="need-help-link" target="_blank" href="%S">%S Support</html:a>
|
||||
|
||||
# LOCALIZATION NOTE %S is the default value of the `dom.ipc.processCount` pref.
|
||||
defaultContentProcessCount=%S (default)
|
||||
|
@ -383,7 +383,7 @@ this.TabCrashHandler = {
|
||||
CrashSubmit.submit(dumpID, {
|
||||
recordSubmission: true,
|
||||
extraExtraKeyVals,
|
||||
}).then(null, Cu.reportError);
|
||||
}).catch(Cu.reportError);
|
||||
|
||||
this.prefs.setBoolPref("sendReport", true);
|
||||
this.prefs.setBoolPref("includeURL", includeURL);
|
||||
@ -881,7 +881,7 @@ this.UnsubmittedCrashHandler = {
|
||||
extraExtraKeyVals: {
|
||||
"SubmittedFromInfobar": true,
|
||||
},
|
||||
});
|
||||
}).catch(Cu.reportError);
|
||||
}
|
||||
},
|
||||
};
|
||||
@ -995,7 +995,7 @@ this.PluginCrashReporter = {
|
||||
});
|
||||
|
||||
if (browserDumpID)
|
||||
CrashSubmit.submit(browserDumpID);
|
||||
CrashSubmit.submit(browserDumpID).catch(Cu.reportError);
|
||||
|
||||
this.broadcastState(runID, "submitting");
|
||||
|
||||
|
@ -66,12 +66,12 @@ toolbar:-moz-lwtheme {
|
||||
rgba(255,255,255,0.1) 50%,
|
||||
rgba(255,255,255,0.2)) repeat-x;
|
||||
}
|
||||
%endif
|
||||
|
||||
#urlbar:-moz-lwtheme:not([focused="true"]),
|
||||
.searchbar-textbox:-moz-lwtheme:not([focused="true"]) {
|
||||
opacity: .9;
|
||||
}
|
||||
%endif
|
||||
|
||||
#navigator-toolbox::after {
|
||||
-moz-box-ordinal-group: 101; /* tabs toolbar is 100 */
|
||||
@ -320,13 +320,6 @@ toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon {
|
||||
|
||||
/* ----- BOOKMARK BUTTONS ----- */
|
||||
|
||||
.bookmark-item > .toolbarbutton-menu-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/places/arrow-down.svg");
|
||||
fill: currentColor;
|
||||
margin-top: 1px;
|
||||
margin-inline-start: 3px;
|
||||
}
|
||||
|
||||
.bookmark-item[container] {
|
||||
list-style-image: url("chrome://global/skin/tree/folder.png");
|
||||
}
|
||||
|
@ -88,6 +88,14 @@
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
#page-action-bookmark-button {
|
||||
list-style-image: url("chrome://browser/skin/bookmark-hollow.svg");
|
||||
}
|
||||
|
||||
#page-action-bookmark-button[starred] {
|
||||
list-style-image: url("chrome://browser/skin/bookmark.svg");
|
||||
}
|
||||
|
||||
#page-action-copy-url-button {
|
||||
list-style-image: url("chrome://browser/skin/link.svg");
|
||||
}
|
||||
|
@ -181,6 +181,7 @@ toolbar:-moz-lwtheme-darktext {
|
||||
#TabsToolbar {
|
||||
text-shadow: none !important;
|
||||
}
|
||||
%ifndef MOZ_PHOTON_THEME
|
||||
|
||||
/* Back and forward button */
|
||||
|
||||
@ -200,11 +201,9 @@ toolbar:-moz-lwtheme-darktext {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
%ifndef MOZ_PHOTON_THEME
|
||||
#forward-button > .toolbarbutton-icon {
|
||||
border-inline-start: none !important;
|
||||
}
|
||||
%endif
|
||||
|
||||
/* Override a box shadow for disabled back button */
|
||||
#main-window:not([customizing]) #back-button[disabled] > .toolbarbutton-icon {
|
||||
@ -228,6 +227,7 @@ toolbar:-moz-lwtheme-darktext {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
%endif
|
||||
|
||||
/* URL bar and search bar*/
|
||||
#urlbar,
|
||||
@ -246,10 +246,9 @@ toolbar:-moz-lwtheme-darktext {
|
||||
fill: rgba(255,255,255,.7);
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
%ifndef MOZ_PHOTON_THEME
|
||||
#urlbar {
|
||||
border-inline-start: none !important;
|
||||
%endif
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
@ -267,7 +266,7 @@ window:not([chromehidden~="toolbar"]) #urlbar-wrapper > #urlbar:-moz-locale-dir(
|
||||
value is set in the previous rule set. o_O */
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
%endif
|
||||
#urlbar-zoom-button:-moz-lwtheme-brighttext:hover {
|
||||
background-color: rgba(255,255,255,.2);
|
||||
}
|
||||
|
@ -340,7 +340,6 @@ panelview:not([mainview]) .toolbarbutton-text,
|
||||
|
||||
#appMenu-popup > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
@ -1244,7 +1243,7 @@ panelview:not([mainView]) .subviewbutton.panel-subview-footer > .toolbarbutton-t
|
||||
|
||||
.PanelUI-subView .subviewbutton-nav::after {
|
||||
-moz-context-properties: fill;
|
||||
content: url(chrome://browser/skin/menu-icons/back-small.svg);
|
||||
content: url(chrome://browser/skin/back-12.svg);
|
||||
fill: GrayText;
|
||||
float: right;
|
||||
}
|
||||
@ -1304,7 +1303,7 @@ photonpanelmultiview .subviewbutton {
|
||||
|
||||
photonpanelmultiview .subviewbutton[checked="true"] {
|
||||
background: none;
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/check.svg);
|
||||
list-style-image: url(chrome://browser/skin/check.svg);
|
||||
}
|
||||
|
||||
photonpanelmultiview .subviewbutton > .menu-iconic-left {
|
||||
@ -2051,7 +2050,7 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
|
||||
photonpanelmultiview .PanelUI-subView .panel-header > .subviewbutton-back {
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--arrowpanel-color);
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/back.svg);
|
||||
list-style-image: url(chrome://browser/skin/arrow-left.svg);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
@ -1,6 +1,6 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
|
||||
<path fill="context-fill" d="M 4.748 6 L 7.966 2.781 C 8.367 2.365 8.169 1.672 7.609 1.532 C 7.358 1.47 7.092 1.54 6.906 1.72 L 3.158 5.47 C 2.865 5.762 2.865 6.237 3.158 6.53 L 6.906 10.279 C 7.321 10.68 8.015 10.481 8.155 9.921 C 8.217 9.67 8.146 9.405 7.966 9.219 Z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 577 B |
@ -1,6 +1,6 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M6 14a1 1 0 0 1-.707-.293l-3-3a1 1 0 0 1 1.414-1.414l2.157 2.157 6.316-9.023a1 1 0 0 1 1.639 1.146l-7 10a1 1 0 0 1-.732.427A.863.863 0 0 1 6 14z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 482 B |
@ -1,6 +1,6 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M4 10a1.994 1.994 0 0 0-1.911 1.44c0 .01-.014.015-.017.025-.362 1.135-.705 2.11-1.759 2.573l-.023.012-.024.012A.5.5 0 0 0 0 14.5a.5.5 0 0 0 .5.5 6.974 6.974 0 0 0 4.825-1.5c.006-.006.007-.013.013-.019A1.993 1.993 0 0 0 4 10zM15.693.307a.984.984 0 0 0-1.338-.046l-8.031 7a.982.982 0 0 0-.049 1.433l1.032 1.031a.983.983 0 0 0 .693.287h.033a.982.982 0 0 0 .706-.335l7-8.031a.982.982 0 0 0-.046-1.339z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 735 B |
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
@ -1,6 +1,6 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M5 3a1 1 0 0 0-1 1v10a1 1 0 0 0 2 0V4a1 1 0 0 0-1-1zm3-1a1 1 0 0 0-1 1v11a1 1 0 0 0 2 0V3a1 1 0 0 0-1-1zm7.939 11.658l-4-11a1 1 0 1 0-1.879.684l4 11a1 1 0 1 0 1.879-.684zM2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 2 0V2a1 1 0 0 0-1-1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 560 B |
@ -48,10 +48,6 @@
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted@2x.png (../shared/customizableui/subView-arrow-back-inverted@2x.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted-rtl.png (../shared/customizableui/subView-arrow-back-inverted-rtl.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted-rtl@2x.png (../shared/customizableui/subView-arrow-back-inverted-rtl@2x.png)
|
||||
skin/classic/browser/sidebar/bookmark-filled.svg (../shared/sidebar/bookmark-filled.svg)
|
||||
skin/classic/browser/sidebar/close.svg (../shared/sidebar/close.svg)
|
||||
skin/classic/browser/sidebar/history.svg (../shared/sidebar/history.svg)
|
||||
skin/classic/browser/sidebar/sync.svg (../shared/sidebar/sync.svg)
|
||||
skin/classic/browser/customizableui/whimsy.png (../shared/customizableui/whimsy.png)
|
||||
skin/classic/browser/customizableui/whimsy@2x.png (../shared/customizableui/whimsy@2x.png)
|
||||
skin/classic/browser/downloads/contentAreaDownloadsView.css (../shared/downloads/contentAreaDownloadsView.css)
|
||||
@ -100,33 +96,44 @@
|
||||
|
||||
skin/classic/browser/addons.svg (../shared/icons/addons.svg)
|
||||
skin/classic/browser/arrow-dropdown.svg (../shared/icons/arrow-dropdown.svg)
|
||||
skin/classic/browser/arrow-left.svg (../shared/icons/arrow-left.svg)
|
||||
skin/classic/browser/back.svg (../shared/icons/back.svg)
|
||||
#ifndef MOZ_PHOTON_THEME
|
||||
skin/classic/browser/back-large.svg (../shared/icons/back-large.svg)
|
||||
#endif
|
||||
skin/classic/browser/back-12.svg (../shared/icons/back-12.svg)
|
||||
skin/classic/browser/bookmark.svg (../shared/icons/bookmark.svg)
|
||||
skin/classic/browser/bookmark-hollow.svg (../shared/icons/bookmark-hollow.svg)
|
||||
skin/classic/browser/bookmarksMenu.svg (../shared/icons/bookmarksMenu.svg)
|
||||
skin/classic/browser/characterEncoding.svg (../shared/icons/characterEncoding.svg)
|
||||
skin/classic/browser/chevron.svg (../shared/icons/chevron.svg)
|
||||
skin/classic/browser/containers.svg (../shared/icons/containers.svg)
|
||||
skin/classic/browser/check.svg (../shared/icons/check.svg)
|
||||
skin/classic/browser/containers.svg (../shared/icons/containers.svg)
|
||||
skin/classic/browser/customize.svg (../shared/icons/customize.svg)
|
||||
skin/classic/browser/developer.svg (../shared/icons/developer.svg)
|
||||
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)
|
||||
skin/classic/browser/device-desktop.svg (../shared/icons/device-desktop.svg)
|
||||
skin/classic/browser/download.svg (../shared/icons/download.svg)
|
||||
skin/classic/browser/edit-copy.svg (../shared/icons/edit-copy.svg)
|
||||
skin/classic/browser/edit-cut.svg (../shared/icons/edit-cut.svg)
|
||||
skin/classic/browser/edit-paste.svg (../shared/icons/edit-paste.svg)
|
||||
skin/classic/browser/email-link.svg (../shared/icons/email-link.svg)
|
||||
skin/classic/browser/feed.svg (../shared/icons/feed.svg)
|
||||
skin/classic/browser/find.svg (../shared/icons/find.svg)
|
||||
skin/classic/browser/forget.svg (../shared/icons/forget.svg)
|
||||
skin/classic/browser/forward.svg (../shared/icons/forward.svg)
|
||||
skin/classic/browser/fullscreen.svg (../shared/icons/fullscreen.svg)
|
||||
skin/classic/browser/help.svg (../shared/icons/help.svg)
|
||||
skin/classic/browser/history.svg (../shared/icons/history.svg)
|
||||
skin/classic/browser/home.svg (../shared/icons/home.svg)
|
||||
skin/classic/browser/library.svg (../shared/icons/library.svg)
|
||||
skin/classic/browser/link.svg (../shared/icons/link.svg)
|
||||
skin/classic/browser/mail.svg (../shared/icons/mail.svg)
|
||||
skin/classic/browser/menu.svg (../shared/icons/menu.svg)
|
||||
skin/classic/browser/new-tab.svg (../shared/icons/new-tab.svg)
|
||||
skin/classic/browser/new-window.svg (../shared/icons/new-window.svg)
|
||||
skin/classic/browser/open.svg (../shared/icons/open.svg)
|
||||
skin/classic/browser/page-action.svg (../shared/icons/page-action.svg)
|
||||
skin/classic/browser/print.svg (../shared/icons/print.svg)
|
||||
skin/classic/browser/privateBrowsing.svg (../shared/icons/privateBrowsing.svg)
|
||||
skin/classic/browser/reload.svg (../shared/icons/reload.svg)
|
||||
@ -154,6 +161,7 @@
|
||||
skin/classic/browser/search-indicator-magnifying-glass.svg (../shared/search/search-indicator-magnifying-glass.svg)
|
||||
skin/classic/browser/search-arrow-go.svg (../shared/search/search-arrow-go.svg)
|
||||
skin/classic/browser/gear.svg (../shared/search/gear.svg)
|
||||
skin/classic/browser/sidebar/close.svg (../shared/sidebar/close.svg)
|
||||
skin/classic/browser/tabbrowser/connecting.png (../shared/tabbrowser/connecting.png)
|
||||
skin/classic/browser/tabbrowser/connecting@2x.png (../shared/tabbrowser/connecting@2x.png)
|
||||
skin/classic/browser/tabbrowser/crashed.svg (../shared/tabbrowser/crashed.svg)
|
||||
@ -185,9 +193,6 @@
|
||||
skin/classic/browser/panic-panel/header-small@2x.png (../shared/panic-panel/header-small@2x.png)
|
||||
skin/classic/browser/panic-panel/icons.png (../shared/panic-panel/icons.png)
|
||||
skin/classic/browser/panic-panel/icons@2x.png (../shared/panic-panel/icons@2x.png)
|
||||
#ifndef MOZ_WIDGET_GTK
|
||||
skin/classic/browser/places/arrow-down.svg (../shared/places/arrow-down.svg)
|
||||
#endif
|
||||
skin/classic/browser/places/bookmarks-notification-finish.png (../shared/places/bookmarks-notification-finish.png)
|
||||
skin/classic/browser/places/bookmarks-notification-finish@2x.png (../shared/places/bookmarks-notification-finish@2x.png)
|
||||
skin/classic/browser/privatebrowsing/aboutPrivateBrowsing.css (../shared/privatebrowsing/aboutPrivateBrowsing.css)
|
||||
@ -200,20 +205,3 @@
|
||||
skin/classic/browser/compacttheme/urlbar-history-dropmarker.svg (../shared/compacttheme/urlbar-history-dropmarker.svg)
|
||||
skin/classic/browser/urlbar-star.svg (../shared/urlbar-star.svg)
|
||||
skin/classic/browser/urlbar-tab.svg (../shared/urlbar-tab.svg)
|
||||
skin/classic/browser/page-action.svg (../shared/icons/page-action.svg)
|
||||
skin/classic/browser/link.svg (../shared/icons/link.svg)
|
||||
skin/classic/browser/email-link.svg (../shared/icons/email-link.svg)
|
||||
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)
|
||||
skin/classic/browser/device-desktop.svg (../shared/icons/device-desktop.svg)
|
||||
skin/classic/browser/menu-icons/back.svg (../shared/menu-icons/back.svg)
|
||||
skin/classic/browser/menu-icons/back-small.svg (../shared/menu-icons/back-small.svg)
|
||||
skin/classic/browser/menu-icons/addons.svg (../shared/menu-icons/addons.svg)
|
||||
skin/classic/browser/menu-icons/check.svg (../shared/menu-icons/check.svg)
|
||||
skin/classic/browser/menu-icons/customize.svg (../shared/menu-icons/customize.svg)
|
||||
skin/classic/browser/menu-icons/find.svg (../shared/menu-icons/find.svg)
|
||||
skin/classic/browser/menu-icons/help.svg (../shared/menu-icons/help.svg)
|
||||
skin/classic/browser/menu-icons/library.svg (../shared/menu-icons/library.svg)
|
||||
skin/classic/browser/menu-icons/new-window.svg (../shared/menu-icons/new-window.svg)
|
||||
skin/classic/browser/menu-icons/print.svg (../shared/menu-icons/print.svg)
|
||||
skin/classic/browser/menu-icons/private-window.svg (../shared/menu-icons/private-window.svg)
|
||||
skin/classic/browser/menu-icons/settings.svg (../shared/menu-icons/settings.svg)
|
||||
|
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<path fill="context-fill" d="M14.5 8c-.971 0-1 1-1.75 1a.765.765 0 0 1-.75-.75V5a1 1 0 0 0-1-1H7.75A.765.765 0 0 1 7 3.25c0-.75 1-.779 1-1.75C8 .635 7.1 0 6 0S4 .635 4 1.5c0 .971 1 1 1 1.75a.765.765 0 0 1-.75.75H1a1 1 0 0 0-1 1v2.25A.765.765 0 0 0 .75 8c.75 0 .779-1 1.75-1C3.365 7 4 7.9 4 9s-.635 2-1.5 2c-.971 0-1-1-1.75-1a.765.765 0 0 0-.75.75V15a1 1 0 0 0 1 1h3.25a.765.765 0 0 0 .75-.75c0-.75-1-.779-1-1.75 0-.865.9-1.5 2-1.5s2 .635 2 1.5c0 .971-1 1-1 1.75a.765.765 0 0 0 .75.75H11a1 1 0 0 0 1-1v-3.25a.765.765 0 0 1 .75-.75c.75 0 .779 1 1.75 1 .865 0 1.5-.9 1.5-2s-.635-2-1.5-2z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 873 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M15.707 14.293l-4.822-4.822a6.019 6.019 0 1 0-1.414 1.414l4.822 4.822a1 1 0 0 0 1.414-1.414zM6 10a4 4 0 1 1 4-4 4 4 0 0 1-4 4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 464 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<path fill="context-fill" d="M14 1H2a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5a1 1 0 0 0 0-2H3a1 1 0 0 1-1-1V6h12v2a1 1 0 0 0 2 0V3a2 2 0 0 0-2-2zm0 4H2V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1zm1.5 7H13V9.5a.5.5 0 1 0-1 0V12H9.5a.5.5 0 0 0 0 1H12v2.5a.5.5 0 0 0 1 0V13h2.5a.5.5 0 0 0 0-1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 561 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<path fill="context-fill" d="M14 5h-1V1a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v4H2a2 2 0 0 0-2 2v5h3v3a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-3h3V7a2 2 0 0 0-2-2zM2.5 8a.5.5 0 1 1 .5-.5.5.5 0 0 1-.5.5zm9.5 7H4v-5h8zm0-10H4V1h8zm-6.5 7h4a.5.5 0 0 0 0-1h-4a.5.5 0 1 0 0 1zm0 2h5a.5.5 0 0 0 0-1h-5a.5.5 0 1 0 0 1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 582 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<path fill="context-fill" d="M12.377 11.961c-1.651 0-2.793-1.98-4.377-1.98s-2.824 1.98-4.377 1.98c-2.037 0-3.541-1.924-3.566-5.221-.015-2.047.6-2.7 3.242-2.7S6.719 5.12 8 5.12s2.056-1.08 4.7-1.08 3.257.653 3.242 2.7c-.024 3.297-1.528 5.221-3.565 5.221zM4.6 6.56c-1.607.07-2.269 1.025-2.269 1.26s1.066.9 2.107.9S6.7 8.339 6.7 8a1.889 1.889 0 0 0-2.1-1.44zm6.808 0A1.889 1.889 0 0 0 9.3 8c0 .339 1.228.72 2.269.72s2.107-.665 2.107-.9-.664-1.191-2.276-1.26z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 743 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||
<path fill="context-fill" d="M15 7h-2.1a4.967 4.967 0 0 0-.732-1.753l1.49-1.49a1 1 0 0 0-1.414-1.414l-1.49 1.49A4.968 4.968 0 0 0 9 3.1V1a1 1 0 1 0-2 0v2.1a4.968 4.968 0 0 0-1.753.732l-1.49-1.49a1 1 0 0 0-1.414 1.415l1.49 1.49A4.967 4.967 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1a4.968 4.968 0 0 0 .737 1.763c-.014.013-.032.017-.045.03l-1.45 1.45a1 1 0 1 0 1.414 1.414l1.45-1.45c.013-.013.018-.031.03-.045A4.968 4.968 0 0 0 7 12.9V15a1 1 0 0 0 2 0v-2.1a4.968 4.968 0 0 0 1.753-.732l1.49 1.49a1 1 0 0 0 1.414-1.414l-1.49-1.49A4.967 4.967 0 0 0 12.9 9H15a1 1 0 0 0 0-2zM5 8a3 3 0 1 1 3 3 3 3 0 0 1-3-3z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 880 B |
@ -183,39 +183,39 @@ toolbarpaletteitem[place="palette"] > #zoom-controls > #zoom-in-button {
|
||||
|
||||
|
||||
#appMenu-new-window-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/new-window.svg);
|
||||
list-style-image: url(chrome://browser/skin/new-window.svg);
|
||||
}
|
||||
|
||||
#appMenu-private-window-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/private-window.svg);
|
||||
list-style-image: url(chrome://browser/skin/privateBrowsing.svg);
|
||||
}
|
||||
|
||||
#appMenu-print-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/print.svg);
|
||||
list-style-image: url(chrome://browser/skin/print.svg);
|
||||
}
|
||||
|
||||
#appMenu-library-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/library.svg);
|
||||
list-style-image: url(chrome://browser/skin/library.svg);
|
||||
}
|
||||
|
||||
#appMenu-addons-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/addons.svg);
|
||||
list-style-image: url(chrome://browser/skin/addons.svg);
|
||||
}
|
||||
|
||||
#appMenu-preferences-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/settings.svg);
|
||||
list-style-image: url(chrome://browser/skin/settings.svg);
|
||||
}
|
||||
|
||||
#appMenu-customize-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/customize.svg);
|
||||
list-style-image: url(chrome://browser/skin/customize.svg);
|
||||
}
|
||||
|
||||
#appMenu-find-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/find.svg);
|
||||
list-style-image: url(chrome://browser/skin/find.svg);
|
||||
}
|
||||
|
||||
#appMenu-help-button {
|
||||
list-style-image: url(chrome://browser/skin/menu-icons/help.svg);
|
||||
list-style-image: url(chrome://browser/skin/help.svg);
|
||||
}
|
||||
|
||||
#appMenu-cut-button {
|
||||
|
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
||||
<path fill="context-fill" d="M0 2h8L4 6 0 2z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 349 B |
@ -104,19 +104,19 @@
|
||||
#sidebar-box #sidebar-icon {
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--icon-fill);
|
||||
list-style-image: url(chrome://browser/skin/sidebar/bookmark-filled.svg);
|
||||
list-style-image: url(chrome://browser/skin/bookmark.svg);
|
||||
}
|
||||
|
||||
#sidebar-switcher-history > .toolbarbutton-icon,
|
||||
#sidebar-box[sidebarcommand="viewHistorySidebar"] #sidebar-icon {
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--icon-fill);
|
||||
list-style-image: url(chrome://browser/skin/sidebar/history.svg);
|
||||
list-style-image: url(chrome://browser/skin/history.svg);
|
||||
}
|
||||
|
||||
#sidebar-switcher-tabs > .toolbarbutton-icon,
|
||||
#sidebar-box[sidebarcommand="viewTabsSidebar"] #sidebar-icon {
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--icon-fill);
|
||||
list-style-image: url(chrome://browser/skin/sidebar/sync.svg);
|
||||
list-style-image: url(chrome://browser/skin/sync.svg);
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M15.845 6.064A1.1 1.1 0 0 0 15 5.331L10.911 4.6 8.985.735a1.1 1.1 0 0 0-1.969 0L5.089 4.6l-4.081.729a1.1 1.1 0 0 0-.615 1.834L3.32 10.31l-.609 4.36a1.1 1.1 0 0 0 1.6 1.127L8 13.873l3.69 1.927a1.1 1.1 0 0 0 1.6-1.127l-.61-4.363 2.926-3.146a1.1 1.1 0 0 0 .239-1.1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 600 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M8 0a8 8 0 1 0 8 8 8.009 8.009 0 0 0-8-8zm0 14a6 6 0 1 1 6-6 6.007 6.007 0 0 1-6 6zm3.5-6H8V4.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 0-1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 484 B |
@ -1,6 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M14 1a1 1 0 0 0-1 1v1.146A6.948 6.948 0 0 0 1.227 6.307a1 1 0 1 0 1.94.484A4.983 4.983 0 0 1 8 3a4.919 4.919 0 0 1 3.967 2H10a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm.046 7.481a1 1 0 0 0-1.213.728A4.983 4.983 0 0 1 8 13a4.919 4.919 0 0 1-3.967-2H6a1 1 0 0 0 0-2H2a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-1.146a6.948 6.948 0 0 0 11.773-3.161 1 1 0 0 0-.727-1.212z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 698 B |
@ -459,7 +459,10 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
|
||||
display: -moz-box !important;
|
||||
}
|
||||
|
||||
.bookmark-item > .toolbarbutton-icon[label]:not([label=""]),
|
||||
.bookmark-item > .toolbarbutton-icon[type="menu"] {
|
||||
.bookmark-item > .toolbarbutton-icon[label]:not([label=""]) {
|
||||
margin-inline-end: 5px;
|
||||
}
|
||||
|
||||
.bookmark-item > .toolbarbutton-menu-dropmarker {
|
||||
display: none;
|
||||
}
|
||||
|
@ -375,13 +375,6 @@ toolbar[brighttext] {
|
||||
|
||||
/* ::::: bookmark buttons ::::: */
|
||||
|
||||
.bookmark-item > .toolbarbutton-menu-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/places/arrow-down.svg");
|
||||
fill: currentColor;
|
||||
margin-top: 1px;
|
||||
margin-inline-start: 3px;
|
||||
}
|
||||
|
||||
#bookmarks-toolbar-placeholder {
|
||||
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
|
||||
}
|
||||
|
@ -43,7 +43,6 @@
|
||||
}
|
||||
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext,
|
||||
#sidebar-header > .close-icon:-moz-lwtheme-brighttext,
|
||||
/* Tab styling - make sure to use an inverted icon for the selected tab
|
||||
(brighttext only covers the unselected tabs) */
|
||||
.tab-close-button[selected=true] {
|
||||
@ -52,7 +51,6 @@
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext,
|
||||
#sidebar-header > .close-icon:-moz-lwtheme-brighttext,
|
||||
.tab-close-button[selected=true] {
|
||||
list-style-image: url("chrome://global/skin/icons/close-inverted@2x.png");
|
||||
}
|
||||
@ -209,14 +207,6 @@
|
||||
-moz-window-dragging: no-drag;
|
||||
}
|
||||
|
||||
/* The sidebar header has no background now that the background of the #browser-panel
|
||||
* has no image and is transparent. Fix: */
|
||||
.sidebar-header:-moz-lwtheme,
|
||||
#sidebar-header {
|
||||
background-color: var(--chrome-background-color);
|
||||
color: var(--chrome-color);
|
||||
}
|
||||
|
||||
@media (-moz-os-version: windows-win7),
|
||||
(-moz-os-version: windows-win8) {
|
||||
/* And then we add them back on toolbars so that they don't look borderless: */
|
||||
|
@ -36,11 +36,6 @@ fi
|
||||
ldflags="$ldflags -Wl,-no_data_in_code_info"
|
||||
export LDFLAGS="$ldflags"
|
||||
|
||||
# Until bug 1342503 is fixed, we can't build some of the webrender dependencies
|
||||
# on buildbot OS X builders, because rustc will use some random system toolchain
|
||||
# instead of the one we package with tooltool.
|
||||
ac_add_options --disable-webrender
|
||||
|
||||
# If not set use the system default clang
|
||||
if [ -z "$CC" ]; then
|
||||
export CC=clang
|
||||
|
@ -975,8 +975,8 @@ env $(environment_cleaner) $(rustflags_override) \
|
||||
RUSTC=$(RUSTC) \
|
||||
MOZ_SRC=$(topsrcdir) \
|
||||
MOZ_DIST=$(ABS_DIST) \
|
||||
LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH) \
|
||||
CLANG_PATH=$(MOZ_CLANG_PATH) \
|
||||
LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
|
||||
CLANG_PATH="$(MOZ_CLANG_PATH)" \
|
||||
PKG_CONFIG_ALLOW_CROSS=1 \
|
||||
RUST_BACKTRACE=1 \
|
||||
MOZ_TOPOBJDIR=$(topobjdir) \
|
||||
@ -997,8 +997,11 @@ ifneq (WINNT,$(OS_ARCH))
|
||||
# some crates's build scripts (!), so disable it for now.
|
||||
ifndef MOZ_ASAN
|
||||
ifndef MOZ_TSAN
|
||||
# Cargo needs the same linker flags as the C/C++ compiler,
|
||||
# but not the final libraries. Filter those out because they
|
||||
# cause problems on macOS 10.7; see bug 1365993 for details.
|
||||
target_cargo_env_vars := \
|
||||
MOZ_CARGO_WRAP_LDFLAGS="$(LDFLAGS)" \
|
||||
MOZ_CARGO_WRAP_LDFLAGS="$(filter-out -framework Cocoa -lobjc AudioToolbox ExceptionHandling,$(LDFLAGS))" \
|
||||
MOZ_CARGO_WRAP_LD="$(CC)" \
|
||||
$(cargo_linker_env_var)=$(topsrcdir)/build/cargo-linker
|
||||
endif # MOZ_TSAN
|
||||
|
@ -6,7 +6,6 @@
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> %htmlDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!ENTITY % toolboxDTD SYSTEM "chrome://devtools/locale/toolbox.dtd"> %toolboxDTD;
|
||||
<!ENTITY % aboutdebuggingDTD SYSTEM "chrome://devtools/locale/aboutdebugging.dtd"> %aboutdebuggingDTD;
|
||||
]>
|
||||
|
||||
@ -15,7 +14,6 @@
|
||||
<title>&aboutDebugging.fullTitle;</title>
|
||||
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="chrome://devtools/content/aboutdebugging/aboutdebugging.css" type="text/css"/>
|
||||
<script type="application/javascript" src="resource://devtools/client/shared/vendor/react.js"></script>
|
||||
<script type="application/javascript" src="chrome://devtools/content/aboutdebugging/initializer.js"></script>
|
||||
</head>
|
||||
<body id="body" dir="&locale.dir;">
|
||||
|
@ -1068,6 +1068,7 @@ html .arrow.expanded svg {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sources-panel * {
|
||||
@ -1127,6 +1128,10 @@ html .arrow.expanded svg {
|
||||
padding-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
.outline-list {
|
||||
list-style-type: "-";
|
||||
}
|
||||
@ -1287,7 +1292,7 @@ html .toggle-button-end.vertical svg {
|
||||
left: 0;
|
||||
right: 1px;
|
||||
opacity: 1;
|
||||
z-index: 100;
|
||||
z-index: 1;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
height: var(--editor-footer-height);
|
||||
@ -1312,7 +1317,7 @@ html .toggle-button-end.vertical svg {
|
||||
transition: opacity 200ms;
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 8px 0.7em;
|
||||
padding: 6px 0.7em;
|
||||
}
|
||||
|
||||
.source-footer > .commands > .action i {
|
||||
@ -1440,14 +1445,10 @@ html .toggle-button-end.vertical svg {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.search-bottom-bar .search-modifiers button.disabled svg {
|
||||
fill: var(--theme-comment-alt);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.search-bottom-bar .search-type-toggles {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
max-width: 68%;
|
||||
}
|
||||
|
||||
.search-bottom-bar .search-type-toggles .search-toggle-title {
|
||||
@ -1455,10 +1456,13 @@ html .toggle-button-end.vertical svg {
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.search-bottom-bar .search-type-toggles .search-type-btn {
|
||||
margin: 0 6px;
|
||||
margin: 0 0 0 6px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--theme-comment-alt);
|
||||
@ -1594,7 +1598,7 @@ html .toggle-button-end.vertical svg {
|
||||
|
||||
.tooltip .preview {
|
||||
background: var(--theme-toolbar-background);
|
||||
max-width: 350px;
|
||||
max-width: inherit;
|
||||
min-height: 80px;
|
||||
border: 1px solid var(--theme-splitter-color);
|
||||
box-shadow: 1px 2px 4px 1px var(--theme-toolbar-background-alt);
|
||||
@ -1845,6 +1849,47 @@ html[dir="rtl"] .editor-mount {
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
.cm-highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cm-highlight::before {
|
||||
position: absolute;
|
||||
border-top-style: solid;
|
||||
border-bottom-style: solid;
|
||||
border-top-color: var(--theme-comment-alt);
|
||||
border-bottom-color: var(--theme-comment-alt);
|
||||
border-top-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
top: -1px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
content: "";
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.cm-highlight-full::before {
|
||||
border: 1px solid var(--theme-comment-alt);
|
||||
}
|
||||
|
||||
.cm-highlight-start::before {
|
||||
border-left-width: 1px;
|
||||
border-left-style: solid;
|
||||
border-left-color: var(--theme-comment-alt);
|
||||
margin: 0 0 -1px -1px;
|
||||
border-top-left-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
|
||||
.cm-highlight-end::before {
|
||||
border-right-width: 1px;
|
||||
border-right-style: solid;
|
||||
border-right-color: var(--theme-comment-alt);
|
||||
margin: 0 -1px -1px 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
.why-paused {
|
||||
background-color: var(--theme-body-background);
|
||||
|