mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
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:
parent
b9c7c1d62b
commit
be454cdf36
@ -987,25 +987,22 @@ var gHistorySwipeAnimation = {
|
|||||||
|
|
||||||
let canvas = null;
|
let canvas = null;
|
||||||
|
|
||||||
try {
|
let browser = gBrowser.selectedBrowser;
|
||||||
let browser = gBrowser.selectedBrowser;
|
let r = browser.getBoundingClientRect();
|
||||||
let r = browser.getBoundingClientRect();
|
canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
|
||||||
canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
|
"canvas");
|
||||||
"canvas");
|
canvas.mozOpaque = true;
|
||||||
canvas.mozOpaque = true;
|
let scale = window.devicePixelRatio;
|
||||||
let scale = window.devicePixelRatio;
|
canvas.width = r.width * scale;
|
||||||
canvas.width = r.width * scale;
|
canvas.height = r.height * scale;
|
||||||
canvas.height = r.height * scale;
|
let ctx = canvas.getContext("2d");
|
||||||
let ctx = canvas.getContext("2d");
|
let zoom = browser.markupDocumentViewer.fullZoom * scale;
|
||||||
let zoom = browser.markupDocumentViewer.fullZoom * scale;
|
ctx.scale(zoom, zoom);
|
||||||
ctx.scale(zoom, zoom);
|
ctx.drawWindow(browser.contentWindow,
|
||||||
ctx.drawWindow(browser.contentWindow,
|
0, 0, canvas.width / zoom, canvas.height / zoom, "white",
|
||||||
0, 0, canvas.width / zoom, canvas.height / zoom, "white",
|
ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_VIEW |
|
||||||
ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_VIEW |
|
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
||||||
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
||||||
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
|
||||||
} finally {
|
|
||||||
}
|
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
|
TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
|
||||||
try {
|
try {
|
||||||
|
@ -738,7 +738,7 @@ nsDefaultCommandLineHandler.prototype = {
|
|||||||
this._haveProfile = true;
|
this._haveProfile = true;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
while ((ar = cmdLine.handleFlagWithParam("url", false))) { }
|
while ((ar = cmdLine.handleFlagWithParam("url", false)));
|
||||||
cmdLine.preventDefault = true;
|
cmdLine.preventDefault = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
"no-else-return": 2,
|
"no-else-return": 2,
|
||||||
|
|
||||||
// No empty statements
|
// No empty statements
|
||||||
// "no-empty": 2,
|
"no-empty": [2, "allowEmptyCatch": true],
|
||||||
|
|
||||||
// No empty character classes in regex
|
// No empty character classes in regex
|
||||||
"no-empty-character-class": 2,
|
"no-empty-character-class": 2,
|
||||||
|
@ -216,7 +216,11 @@ Narrator.prototype = {
|
|||||||
let tw = this._treeWalker;
|
let tw = this._treeWalker;
|
||||||
if (!this._isParagraphInView(tw.currentNode)) {
|
if (!this._isParagraphInView(tw.currentNode)) {
|
||||||
tw.currentNode = tw.root;
|
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
|
// _speakInner will advance to the next node for us, so we need
|
||||||
// to have it one paragraph back from the first visible one.
|
// to have it one paragraph back from the first visible one.
|
||||||
tw.previousNode();
|
tw.previousNode();
|
||||||
|
@ -39,15 +39,13 @@ function run_test() {
|
|||||||
do_execute_soon(() => {
|
do_execute_soon(() => {
|
||||||
// Cause a hang lasting 1 second (transient hang).
|
// Cause a hang lasting 1 second (transient hang).
|
||||||
let startTime = Date.now();
|
let startTime = Date.now();
|
||||||
while ((Date.now() - startTime) < 1000) {
|
while ((Date.now() - startTime) < 1000);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
do_execute_soon(() => {
|
do_execute_soon(() => {
|
||||||
// Cause a hang lasting 10 seconds (permanent hang).
|
// Cause a hang lasting 10 seconds (permanent hang).
|
||||||
let startTime = Date.now();
|
let startTime = Date.now();
|
||||||
while ((Date.now() - startTime) < 10000) {
|
while ((Date.now() - startTime) < 10000);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
do_execute_soon(() => {
|
do_execute_soon(() => {
|
||||||
|
@ -68,8 +68,6 @@ this.GMPUtils = {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (aPlugin.id == EME_ADOBE_ID) {
|
if (aPlugin.id == EME_ADOBE_ID) {
|
||||||
if (Services.appinfo.OS != "WINNT") {
|
|
||||||
}
|
|
||||||
// Windows Vista and later only supported by Adobe EME.
|
// Windows Vista and later only supported by Adobe EME.
|
||||||
return AppConstants.isPlatformAndVersionAtLeast("win", "6");
|
return AppConstants.isPlatformAndVersionAtLeast("win", "6");
|
||||||
} else if (aPlugin.id == WIDEVINE_ID) {
|
} else if (aPlugin.id == WIDEVINE_ID) {
|
||||||
|
Loading…
Reference in New Issue
Block a user