Bug 1864896: Autofix unused function arguments (widget). r=spohl

Differential Revision: https://phabricator.services.mozilla.com/D203001
This commit is contained in:
Dave Townsend 2024-03-02 15:25:59 +00:00
Родитель 418e53f33c
Коммит 34f00cfba5
17 изменённых файлов: 26 добавлений и 26 удалений

Просмотреть файл

@ -22,7 +22,7 @@ registerCleanupFunction(() => {
const progressListeners = new Map();
function loadContentWindow(windowlessBrowser, uri) {
return new Promise((resolve, reject) => {
return new Promise(resolve => {
let loadURIOptions = {
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
};
@ -46,7 +46,7 @@ function loadContentWindow(windowlessBrowser, uri) {
progressListeners.delete(progressListener);
contentWindow.addEventListener(
"load",
event => {
() => {
resolve(contentWindow);
},
{ once: true }

Просмотреть файл

@ -63,7 +63,7 @@ async function clipboardAsyncGetData(aBrowser, aClipboardType) {
"nsIAsyncClipboardGetCallback",
]),
// nsIAsyncClipboardGetCallback
onSuccess: aAsyncGetClipboardData => {
onSuccess: () => {
resolve();
},
onError: aResult => {

Просмотреть файл

@ -1131,7 +1131,7 @@ add_task(async () => {
// Set up an APZ aware event listener and...
await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
content.document.documentElement.addEventListener("wheel", e => {}, {
content.document.documentElement.addEventListener("wheel", () => {}, {
passive: false,
});
await content.wrappedJSObject.promiseApzFlushedRepaints();

Просмотреть файл

@ -94,7 +94,7 @@ clipboardTypes.forEach(function (type) {
() => {
ok(false, "asyncClipboardRequestGetData should not success");
},
e => {
() => {
ok(true, "asyncClipboardRequestGetData should reject");
}
);
@ -133,7 +133,7 @@ clipboardTypes.forEach(function (type) {
() => {
ok(false, "asyncClipboardRequestGetData should not success");
},
e => {
() => {
ok(true, "asyncClipboardRequestGetData should reject");
}
);

Просмотреть файл

@ -141,13 +141,13 @@
let popupShowingFired = false;
let itemActivated = false;
menupopup.addEventListener("popupshowing", function (e) {
menupopup.addEventListener("popupshowing", function () {
popupShowingFired = true;
let menuitem = document.createElementNS(XUL_NS, "menuitem");
menuitem.setAttribute("label", "detached menu item");
/* eslint-disable-next-line no-shadow */
menuitem.addEventListener("command", function (e) {
menuitem.addEventListener("command", function () {
itemActivated = true;
})
menupopup.appendChild(menuitem);

Просмотреть файл

@ -30,7 +30,7 @@ SimpleTest.waitForExplicitFinish();
var idleObserver =
{
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
observe: function _observe(subject, topic, data)
observe: function _observe(subject, topic)
{
if (topic != "idle")
return;

Просмотреть файл

@ -20,7 +20,7 @@ function testClipboardOwner(aClipboardType, aAsync) {
const clipboardOwner = {
QueryInterface: ChromeUtils.generateQI(["nsIClipboardOwner"]),
// nsIClipboardOwner
LosingOwnership(aTransferable) {
LosingOwnership() {
losingOwnership = true;
},
};

Просмотреть файл

@ -60,7 +60,7 @@ async function process_contextmenu_event({ isMousedown, preventEvent }) {
is(count++, 1, "The second event is contextmenu");
e.preventDefault();
}, { once: true });
target.addEventListener("mouseup", e => {
target.addEventListener("mouseup", () => {
is(count++, 2, "The third event is mouseup");
resolve();
}, { once: true} );

Просмотреть файл

@ -38,7 +38,7 @@ add_task(async function test_modify_contenteditable_on_focused_element() {
const div2 = document.getElementById("div2");
const div3 = document.getElementById("div3");
div1.addEventListener("mousedown", e => {
div1.addEventListener("mousedown", () => {
div2.contentEditable = true;
});
div3.addEventListener("mousedown", e => {

Просмотреть файл

@ -96,7 +96,7 @@ function runTestPasswordFieldOnDialog() {
WindowObserver.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
observe(subject, topic, data) {
observe(subject, topic) {
if (topic === "domwindowopened") {
ok(true, "dialog window is created");
dialog = subject;

Просмотреть файл

@ -24,7 +24,7 @@
var gKeyPressEventCount = 0;
var gKeyDownEventCount = 0;
function onKeyDown(e)
function onKeyDown()
{
gKeyDownEventCount++;
}

Просмотреть файл

@ -4802,7 +4802,7 @@ function* runAccessKeyTests()
var button = document.getElementById("button");
var activationCount;
function onClick(e)
function onClick()
{
++activationCount;
}

Просмотреть файл

@ -292,7 +292,7 @@
aElement.id + ": Incorrect selection end");
}
function* testRun(aElement, aSelectionCheck, aCallback) {
function* testRun(aElement, aSelectionCheck) {
if (document.activeElement) {
document.activeElement.blur();
}

Просмотреть файл

@ -31,7 +31,7 @@ const kAsyncChanges = kIsLinux || kIsMacOS;
let gSizeModeDidChange = false;
let gSizeModeDidChangeTo = 0;
function sizemodeChanged(e) {
function sizemodeChanged() {
gSizeModeDidChange = true;
gSizeModeDidChangeTo = gWindow.windowState;
}

Просмотреть файл

@ -177,7 +177,7 @@ function fireWheelScrollEvent(aForward)
}, window);
}
function onScrollView(aEvent)
function onScrollView()
{
if (gIgnoreScrollEvent)
return;
@ -187,7 +187,7 @@ function onScrollView(aEvent)
gTimer = setTimeout(runNextTest, 0);
}
function onMouseScrollFailed(aEvent)
function onMouseScrollFailed()
{
clearTimer();
gIgnoreScrollEvent = true;
@ -197,7 +197,7 @@ function onMouseScrollFailed(aEvent)
runNextTest();
}
function onTransactionTimeout(aEvent)
function onTransactionTimeout()
{
if (!gTimer)
return;

Просмотреть файл

@ -6270,7 +6270,7 @@ function runQueryContentEventRelativeToInsertionPoint()
synthesizeComposition({ type: "compositioncommitasis" });
// Move start of composition at first compositionupdate event.
function onCompositionUpdate(aEvent)
function onCompositionUpdate()
{
startOffset = textarea.selectionStart = textarea.selectionEnd = textarea.selectionStart - 1;
textarea.removeEventListener("compositionupdate", onCompositionUpdate);

Просмотреть файл

@ -214,7 +214,7 @@ var gPreparingSteps = [
target: gP1, x: 10, y: 10, window,
modifiers: 0,
additionalFlags: 0,
onLineScrollEvent(aEvent) {
onLineScrollEvent() {
return true;
},
onPixelScrollEvent(aEvent) {
@ -234,7 +234,7 @@ var gPreparingSteps = [
target: gP1, x: 10, y: 10, window,
modifiers: 0,
additionalFlags: 0,
onLineScrollEvent(aEvent) {
onLineScrollEvent() {
return true;
},
onPixelScrollEvent(aEvent) {
@ -250,7 +250,7 @@ var gPreparingSteps = [
target: gP1, x: 10, y: 10, window,
modifiers: 0,
additionalFlags: 0,
onLineScrollEvent(aEvent) {
onLineScrollEvent() {
return true;
},
onPixelScrollEvent(aEvent) {
@ -270,7 +270,7 @@ var gPreparingSteps = [
target: gP1, x: 10, y: 10, window,
modifiers: 0,
additionalFlags: 0,
onLineScrollEvent(aEvent) {
onLineScrollEvent() {
return true;
},
onPixelScrollEvent(aEvent) {
@ -1100,7 +1100,7 @@ var gDeactiveWindowTests = [
SpecialPowers.setIntPref(kVAmountPref, 3);
SpecialPowers.setIntPref(kHAmountPref, 3);
},
onLineScrollEvent(aEvent) {
onLineScrollEvent() {
var fm = Services.focus;
is(fm.activeWindow, gOtherWindow, "The other window isn't activated");
},