зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1436575 - Add exceptions for cases that cannot be simplified by negation or !! coercion. r=standard8
MozReview-Commit-ID: 8uiZAPq4N2h --HG-- extra : rebase_source : 3ad599ec2af62769bd3440e42ac6e165eaae609d
This commit is contained in:
Родитель
9788800512
Коммит
04a1ae5cee
|
@ -200,7 +200,8 @@ function setVCRangeInvoker(aDocAcc, aTextAccessible, aTextOffsets) {
|
|||
*/
|
||||
function setVCPosInvoker(aDocAcc, aPivotMoveMethod, aRule, aIdOrNameOrAcc,
|
||||
aIsFromUserInput) {
|
||||
var expectMove = !!aIdOrNameOrAcc;
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
var expectMove = aIdOrNameOrAcc != false;
|
||||
this.invoke = function virtualCursorChangedInvoker_invoke() {
|
||||
VCChangedChecker.
|
||||
storePreviousPosAndOffset(aDocAcc.virtualCursor);
|
||||
|
@ -260,7 +261,8 @@ function setVCPosInvoker(aDocAcc, aPivotMoveMethod, aRule, aIdOrNameOrAcc,
|
|||
*/
|
||||
function setVCTextInvoker(aDocAcc, aPivotMoveMethod, aBoundary, aTextOffsets,
|
||||
aIdOrNameOrAcc, aIsFromUserInput) {
|
||||
var expectMove = !!aIdOrNameOrAcc;
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
var expectMove = aIdOrNameOrAcc != false;
|
||||
this.invoke = function virtualCursorChangedInvoker_invoke() {
|
||||
VCChangedChecker.storePreviousPosAndOffset(aDocAcc.virtualCursor);
|
||||
SimpleTest.info(aDocAcc.virtualCursor.position);
|
||||
|
@ -306,7 +308,8 @@ function setVCTextInvoker(aDocAcc, aPivotMoveMethod, aBoundary, aTextOffsets,
|
|||
*/
|
||||
function moveVCCoordInvoker(aDocAcc, aX, aY, aIgnoreNoMatch,
|
||||
aRule, aIdOrNameOrAcc) {
|
||||
var expectMove = !!aIdOrNameOrAcc;
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
var expectMove = aIdOrNameOrAcc != false;
|
||||
this.invoke = function virtualCursorChangedInvoker_invoke() {
|
||||
VCChangedChecker.
|
||||
storePreviousPosAndOffset(aDocAcc.virtualCursor);
|
||||
|
|
|
@ -499,12 +499,14 @@
|
|||
if (!aBrowser)
|
||||
aBrowser = this.mCurrentBrowser;
|
||||
|
||||
if (aCallGlobalListeners &&
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
if (aCallGlobalListeners != false &&
|
||||
aBrowser == this.mCurrentBrowser) {
|
||||
callListeners(this.mProgressListeners, aArguments);
|
||||
}
|
||||
|
||||
if (aCallTabsListeners) {
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
if (aCallTabsListeners != false) {
|
||||
aArguments.unshift(aBrowser);
|
||||
|
||||
callListeners(this.mTabsProgressListeners, aArguments);
|
||||
|
|
|
@ -139,7 +139,8 @@ function initializeAutoCompletion(ctx, options = {}) {
|
|||
|
||||
let cycle = reverse => {
|
||||
if (popup && popup.isOpen) {
|
||||
cycleSuggestions(ed, !!reverse);
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
cycleSuggestions(ed, reverse == true);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,8 @@
|
|||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
|
||||
var rv = fn.call(aTarget, event);
|
||||
if (!rv)
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
if (rv == false)
|
||||
cancel = true;
|
||||
}
|
||||
return !cancel;
|
||||
|
@ -486,7 +487,8 @@
|
|||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
|
||||
var rv = fn.call(aTarget, event);
|
||||
if (!rv)
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
if (rv == false)
|
||||
cancel = true;
|
||||
}
|
||||
return !cancel;
|
||||
|
|
|
@ -420,7 +420,8 @@
|
|||
if (handler != "") {
|
||||
var fn = new Function("event", handler);
|
||||
var returned = fn(event);
|
||||
if (!returned)
|
||||
// eslint-disable-next-line mozilla/no-compare-against-boolean-literals
|
||||
if (returned == false)
|
||||
noCancel = false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче