зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1292008 - Enable the no-empty rule for eslint. r=markh
MozReview-Commit-ID: EfM3YOUjClW --HG-- extra : rebase_source : 47cb04f0a58df6ae810cbf41f7a09e3bb0130997
This commit is contained in:
Родитель
b9c7c1d62b
Коммит
be454cdf36
|
@ -987,25 +987,22 @@ var gHistorySwipeAnimation = {
|
|||
|
||||
let canvas = null;
|
||||
|
||||
try {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let r = browser.getBoundingClientRect();
|
||||
canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
|
||||
"canvas");
|
||||
canvas.mozOpaque = true;
|
||||
let scale = window.devicePixelRatio;
|
||||
canvas.width = r.width * scale;
|
||||
canvas.height = r.height * scale;
|
||||
let ctx = canvas.getContext("2d");
|
||||
let zoom = browser.markupDocumentViewer.fullZoom * scale;
|
||||
ctx.scale(zoom, zoom);
|
||||
ctx.drawWindow(browser.contentWindow,
|
||||
0, 0, canvas.width / zoom, canvas.height / zoom, "white",
|
||||
ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_VIEW |
|
||||
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
||||
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
||||
} finally {
|
||||
}
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let r = browser.getBoundingClientRect();
|
||||
canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
|
||||
"canvas");
|
||||
canvas.mozOpaque = true;
|
||||
let scale = window.devicePixelRatio;
|
||||
canvas.width = r.width * scale;
|
||||
canvas.height = r.height * scale;
|
||||
let ctx = canvas.getContext("2d");
|
||||
let zoom = browser.markupDocumentViewer.fullZoom * scale;
|
||||
ctx.scale(zoom, zoom);
|
||||
ctx.drawWindow(browser.contentWindow,
|
||||
0, 0, canvas.width / zoom, canvas.height / zoom, "white",
|
||||
ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_VIEW |
|
||||
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
||||
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
||||
|
||||
TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
|
||||
try {
|
||||
|
|
|
@ -738,7 +738,7 @@ nsDefaultCommandLineHandler.prototype = {
|
|||
this._haveProfile = true;
|
||||
}
|
||||
catch (e) {
|
||||
while ((ar = cmdLine.handleFlagWithParam("url", false))) { }
|
||||
while ((ar = cmdLine.handleFlagWithParam("url", false)));
|
||||
cmdLine.preventDefault = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
"no-else-return": 2,
|
||||
|
||||
// No empty statements
|
||||
// "no-empty": 2,
|
||||
"no-empty": [2, "allowEmptyCatch": true],
|
||||
|
||||
// No empty character classes in regex
|
||||
"no-empty-character-class": 2,
|
||||
|
|
|
@ -216,7 +216,11 @@ Narrator.prototype = {
|
|||
let tw = this._treeWalker;
|
||||
if (!this._isParagraphInView(tw.currentNode)) {
|
||||
tw.currentNode = tw.root;
|
||||
while (tw.nextNode() && !this._isParagraphInView(tw.currentNode)) {}
|
||||
while (tw.nextNode()) {
|
||||
if (this._isParagraphInView(tw.currentNode)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// _speakInner will advance to the next node for us, so we need
|
||||
// to have it one paragraph back from the first visible one.
|
||||
tw.previousNode();
|
||||
|
|
|
@ -39,15 +39,13 @@ function run_test() {
|
|||
do_execute_soon(() => {
|
||||
// Cause a hang lasting 1 second (transient hang).
|
||||
let startTime = Date.now();
|
||||
while ((Date.now() - startTime) < 1000) {
|
||||
}
|
||||
while ((Date.now() - startTime) < 1000);
|
||||
});
|
||||
|
||||
do_execute_soon(() => {
|
||||
// Cause a hang lasting 10 seconds (permanent hang).
|
||||
let startTime = Date.now();
|
||||
while ((Date.now() - startTime) < 10000) {
|
||||
}
|
||||
while ((Date.now() - startTime) < 10000);
|
||||
});
|
||||
|
||||
do_execute_soon(() => {
|
||||
|
|
|
@ -68,8 +68,6 @@ this.GMPUtils = {
|
|||
return true;
|
||||
}
|
||||
if (aPlugin.id == EME_ADOBE_ID) {
|
||||
if (Services.appinfo.OS != "WINNT") {
|
||||
}
|
||||
// Windows Vista and later only supported by Adobe EME.
|
||||
return AppConstants.isPlatformAndVersionAtLeast("win", "6");
|
||||
} else if (aPlugin.id == WIDEVINE_ID) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче