Skip to content

Commit

Permalink
Merge mozilla-central to mozilla-inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed May 9, 2017
2 parents b3802bb + 7057a51 commit 76ca853
Show file tree
Hide file tree
Showing 879 changed files with 81,635 additions and 64,897 deletions.
5 changes: 0 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ devtools/client/webconsole/webconsole-connection-proxy.js
devtools/client/webconsole/webconsole.js
devtools/client/webide/**
!devtools/client/webide/components/webideCli.js
devtools/server/actors/webconsole.js
devtools/server/actors/object.js
devtools/server/actors/script.js
devtools/server/actors/styleeditor.js
devtools/server/actors/stylesheets.js
devtools/server/tests/browser/storage-*.html
!devtools/server/tests/browser/storage-unsecured-iframe.html
devtools/server/tests/browser/stylesheets-nested-iframes.html
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ module.exports = {
"mozilla/no-useless-removeEventListener": "error",
"mozilla/use-default-preference-values": "error",
"mozilla/use-ownerGlobal": "error",

// No (!foo in bar) or (!object instanceof Class)
"no-unsafe-negation": "error",
// No eval() and no strings in the first param of setTimeout or setInterval
"no-implied-eval": "error",
"no-eval": "error",
},
"env": {
"es6": true
Expand Down
1 change: 0 additions & 1 deletion browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ pref("services.sync.prefs.sync.dom.event.contextmenu.enabled", true);
pref("services.sync.prefs.sync.extensions.personas.current", true);
pref("services.sync.prefs.sync.extensions.update.enabled", true);
pref("services.sync.prefs.sync.intl.accept_languages", true);
pref("services.sync.prefs.sync.javascript.enabled", true);
pref("services.sync.prefs.sync.layout.spellcheckDefault", true);
pref("services.sync.prefs.sync.lightweightThemes.selectedThemeID", true);
pref("services.sync.prefs.sync.lightweightThemes.usedThemes", true);
Expand Down
8 changes: 1 addition & 7 deletions browser/base/content/browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "EnsureFxAccountsWebChannel",
"resource://gre/modules/FxAccountsWebChannel.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Weave",
"resource://services-sync/main.js");
if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
"resource://gre/modules/CloudSync.jsm");
}

const MIN_STATUS_ANIMATION_DURATION = 1600;

Expand Down Expand Up @@ -223,9 +219,7 @@ var gSync = {
document.getElementById("sync-setup-state").hidden = true;
document.getElementById("sync-syncnow-state").hidden = true;

if (CloudSync && CloudSync.ready && CloudSync().adapters.count) {
document.getElementById("sync-syncnow-state").hidden = false;
} else if (status == UIState.STATUS_LOGIN_FAILED) {
if (status == UIState.STATUS_LOGIN_FAILED) {
// unhiding this element makes the menubar show the login failure state.
document.getElementById("sync-reauth-state").hidden = false;
} else if (status == UIState.STATUS_NOT_CONFIGURED ||
Expand Down
11 changes: 0 additions & 11 deletions browser/base/content/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -999,17 +999,6 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads-
display: none;
}

#downloads-button.withProgressBar:-moz-any([progress], [counter], [paused]) #downloads-indicator-icon,
#downloads-button:not(:-moz-any([progress], [counter], [paused])) #downloads-indicator-progress-area {
visibility: hidden;
}

/* Hide elements for another type of progressmeter if it's not in use. */
#downloads-button.withProgressBar #downloads-indicator-progress-icon,
#downloads-button:not(.withProgressBar) #downloads-indicator-progress-area {
visibility: hidden;
}

/* Combobox dropdown renderer */
#ContentSelectDropdown > menupopup {
/* The menupopup itself should always be rendered LTR to ensure the scrollbar aligns with
Expand Down
8 changes: 8 additions & 0 deletions browser/base/content/nsContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ function openContextMenu(aMessage) {
};
let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
let event = gContextMenuContentData.event;

// Set touch mode to get larger menu items.
if (event.mozInputSource == MouseEvent.MOZ_SOURCE_TOUCH) {
popup.setAttribute("touchmode", "true");
} else {
popup.removeAttribute("touchmode");
}

popup.openPopupAtScreen(event.screenX, event.screenY, true);
}

Expand Down
57 changes: 3 additions & 54 deletions browser/base/content/sync/aboutSyncTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,13 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/Promise.jsm");

if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
"resource://gre/modules/CloudSync.jsm");
}

var RemoteTabViewer = {
_tabsList: null,

init() {
Services.obs.addObserver(this, "weave:service:login:finish");
Services.obs.addObserver(this, "weave:engine:sync:finish");

Services.obs.addObserver(this, "cloudsync:tabs:update");

this._tabsList = document.getElementById("tabsList");

this.buildList(true);
Expand All @@ -39,8 +32,6 @@ var RemoteTabViewer = {
uninit() {
Services.obs.removeObserver(this, "weave:service:login:finish");
Services.obs.removeObserver(this, "weave:engine:sync:finish");

Services.obs.removeObserver(this, "cloudsync:tabs:update");
},

createItem(attrs) {
Expand Down Expand Up @@ -178,18 +169,9 @@ var RemoteTabViewer = {
// or tell the appropriate condition. (bug 583344)
}

let complete = () => {
this._waitingForBuildList = false;
if (this._buildListRequested) {
CommonUtils.nextTick(this.buildList, this);
}
}

if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
this._generateCloudSyncTabList()
.then(complete, complete);
} else {
complete();
this._waitingForBuildList = false;
if (this._buildListRequested) {
CommonUtils.nextTick(this.buildList, this);
}
},

Expand Down Expand Up @@ -246,36 +228,6 @@ var RemoteTabViewer = {
}
},

_generateCloudSyncTabList() {
let updateTabList = remoteTabs => {
let list = this._tabsList;

for (let client of remoteTabs) {
let clientAttrs = {
type: "client",
clientName: client.name,
};

let clientEnt = this.createItem(clientAttrs);
list.appendChild(clientEnt);

for (let tab of client.tabs) {
let tabAttrs = {
type: "tab",
title: tab.title,
url: tab.url,
icon: this.getIcon(tab.icon),
};
let tabEnt = this.createItem(tabAttrs);
list.appendChild(tabEnt);
}
}
};

return CloudSync().tabs.getRemoteTabs()
.then(updateTabList, Promise.reject.bind(Promise));
},

adjustContextMenu(event) {
let mode = "all";
switch (this._tabsList.selectedItems.length) {
Expand Down Expand Up @@ -335,9 +287,6 @@ var RemoteTabViewer = {
this.buildList(false);
}
break;
case "cloudsync:tabs:update":
this.buildList(false);
break;
}
},

Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/tabbrowser.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
}

.tab-label-container[textoverflow]:not([pinned]) {
mask-image: linear-gradient(to left, transparent, black 1em);
mask-image: linear-gradient(to left, transparent, black 2em);
}

.tab-label-container[textoverflow]:not([pinned]):-moz-locale-dir(rtl) {
mask-image: linear-gradient(to right, transparent, black 1em);
mask-image: linear-gradient(to right, transparent, black 2em);
}

.tab-stack {
Expand Down
1 change: 1 addition & 0 deletions browser/base/content/test/general/browser_aboutHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ function* withSnippetsMap(setupFn, testFn, testArgs = null, parentFn = null) {
document.addEventListener("AboutHomeLoadSnippets", function() {
let updateSnippets;
if (args.setupFnSource) {
// eslint-disable-next-line no-eval
updateSnippets = eval(`(() => (${args.setupFnSource}))()`);
}

Expand Down
2 changes: 2 additions & 0 deletions browser/base/content/test/general/browser_bug633691.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ add_task(function* test() {

yield loadError;

/* eslint-disable no-eval */
let is_hidden = eval(`(() => ${is_hidden_})()`);
let is_element_hidden = eval(`(() => ${is_element_hidden_})()`);
/* eslint-enable no-eval */
let doc = content.document.getElementsByTagName("iframe")[0].contentDocument;
let aP = doc.getElementById("badCertAdvancedPanel");
ok(aP, "Advanced content should exist");
Expand Down
1 change: 1 addition & 0 deletions browser/base/content/test/newtab/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function performOnCell(aIndex, aFn) {
return ContentTask.spawn(gWindow.gBrowser.selectedBrowser,
{ index: aIndex, fn: aFn.toString() }, function* (args) {
let cell = content.gGrid.cells[args.index];
// eslint-disable-next-line no-eval
return eval(args.fn)(cell);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ var whitelist = new Set([
{file: "chrome://global/locale/printjoboptions.dtd",
platforms: ["macosx", "win"]},

// services/cloudsync/CloudSyncLocal.jsm
{file: "chrome://weave/locale/errors.properties"},

// devtools/client/inspector/bin/dev-server.js
Expand Down
Loading

0 comments on commit 76ca853

Please sign in to comment.