From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../layout-debug/src/nsLayoutDebuggingTools.cpp | 2 -- layout/tools/layout-debug/ui/content/layoutdebug.js | 2 +- layout/tools/reftest/api.js | 2 +- layout/tools/reftest/reftest-content.js | 20 ++++++++------------ layout/tools/reftest/reftest.sys.mjs | 14 +++++++------- layout/tools/reftest/runreftest.py | 2 +- 6 files changed, 18 insertions(+), 24 deletions(-) (limited to 'layout/tools') diff --git a/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp b/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp index 05ad47356d..6df2ad5d71 100644 --- a/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp +++ b/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp @@ -21,8 +21,6 @@ #include "nsViewManager.h" #include "nsIFrame.h" -#include "nsLayoutCID.h" - #include "mozilla/dom/Document.h" #include "mozilla/dom/Element.h" #include "mozilla/Preferences.h" diff --git a/layout/tools/layout-debug/ui/content/layoutdebug.js b/layout/tools/layout-debug/ui/content/layoutdebug.js index 0c68f0155c..b381822c3c 100644 --- a/layout/tools/layout-debug/ui/content/layoutdebug.js +++ b/layout/tools/layout-debug/ui/content/layoutdebug.js @@ -443,7 +443,7 @@ function toggle(menuitem) { function openFile() { var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker); - fp.init(window, "Select a File", Ci.nsIFilePicker.modeOpen); + fp.init(window.browsingContext, "Select a File", Ci.nsIFilePicker.modeOpen); fp.appendFilters(Ci.nsIFilePicker.filterHTML | Ci.nsIFilePicker.filterAll); fp.open(rv => { if ( diff --git a/layout/tools/reftest/api.js b/layout/tools/reftest/api.js index 36b9cba32a..285bba3e55 100644 --- a/layout/tools/reftest/api.js +++ b/layout/tools/reftest/api.js @@ -110,7 +110,7 @@ this.reftest = class extends ExtensionAPI { // find it by its type nor will domwindowcreated be fired. // So we listen to either initial-document-element-inserted which // indicates when it's okay to search for the main window by type again. - Services.obs.addObserver(function observer(aSubject, aTopic, aData) { + Services.obs.addObserver(function observer(aSubject, aTopic) { Services.obs.removeObserver(observer, aTopic); startAndroid(GetMainWindow()); }, "initial-document-element-inserted"); diff --git a/layout/tools/reftest/reftest-content.js b/layout/tools/reftest/reftest-content.js index 4fdd5de26f..9aab933ed0 100644 --- a/layout/tools/reftest/reftest-content.js +++ b/layout/tools/reftest/reftest-content.js @@ -83,7 +83,7 @@ function IDForEventTarget(event) { } var progressListener = { - onStateChange(webprogress, request, flags, status) { + onStateChange(webprogress, request, flags) { let uri; try { request.QueryInterface(Ci.nsIChannel); @@ -286,7 +286,7 @@ function setupViewport(contentRootElement) { // XXX support viewconfig when needed } -function setupDisplayport(contentRootElement) { +function setupDisplayport() { let promise = content.windowGlobalChild .getActor("ReftestFission") .SetupDisplayportRoot(); @@ -896,7 +896,7 @@ function WaitForTestEnd( LogInfo("MakeProgress: STATE_WAITING_FOR_APZ_FLUSH"); gFailureReason = "timed out waiting for APZ flush to complete"; - var flushWaiter = function (aSubject, aTopic, aData) { + var flushWaiter = function (aSubject, aTopic) { if (aTopic) { LogInfo("MakeProgress: apz-repaints-flushed fired"); } @@ -1357,9 +1357,7 @@ function SynchronizeForSnapshot(flags) { // Setup async scroll offsets now, because any scrollable layers should // have had their AsyncPanZoomControllers created. - return setupAsyncScrollOffsets({ allowFailure: false }).then(function ( - result - ) { + return setupAsyncScrollOffsets({ allowFailure: false }).then(function () { setupAsyncZoom({ allowFailure: false }); }); }, @@ -1370,9 +1368,7 @@ function SynchronizeForSnapshot(flags) { // Setup async scroll offsets now, because any scrollable layers should // have had their AsyncPanZoomControllers created. - return setupAsyncScrollOffsets({ allowFailure: false }).then(function ( - result - ) { + return setupAsyncScrollOffsets({ allowFailure: false }).then(function () { setupAsyncZoom({ allowFailure: false }); }); } @@ -1380,7 +1376,7 @@ function SynchronizeForSnapshot(flags) { } function RegisterMessageListeners() { - addMessageListener("reftest:Clear", function (m) { + addMessageListener("reftest:Clear", function () { RecvClear(); }); addMessageListener("reftest:LoadScriptTest", function (m) { @@ -1392,7 +1388,7 @@ function RegisterMessageListeners() { addMessageListener("reftest:LoadTest", function (m) { RecvLoadTest(m.json.type, m.json.uri, m.json.uriTargetType, m.json.timeout); }); - addMessageListener("reftest:ResetRenderingState", function (m) { + addMessageListener("reftest:ResetRenderingState", function () { RecvResetRenderingState(); }); addMessageListener("reftest:PrintDone", function (m) { @@ -1552,7 +1548,7 @@ function SendPrintResult(runtimeMs, status, fileName) { }); } -function SendExpectProcessCrash(runtimeMs) { +function SendExpectProcessCrash() { sendAsyncMessage("reftest:ExpectProcessCrash"); } diff --git a/layout/tools/reftest/reftest.sys.mjs b/layout/tools/reftest/reftest.sys.mjs index f0ed677273..1040470967 100644 --- a/layout/tools/reftest/reftest.sys.mjs +++ b/layout/tools/reftest/reftest.sys.mjs @@ -1770,19 +1770,19 @@ function RegisterMessageListenersAndLoadContentScript(aReload) { ); g.browserMessageManager.addMessageListener( "reftest:FailedNoPaint", - function (m) { + function () { RecvFailedNoPaint(); } ); g.browserMessageManager.addMessageListener( "reftest:FailedNoDisplayList", - function (m) { + function () { RecvFailedNoDisplayList(); } ); g.browserMessageManager.addMessageListener( "reftest:FailedDisplayList", - function (m) { + function () { RecvFailedDisplayList(); } ); @@ -1800,7 +1800,7 @@ function RegisterMessageListenersAndLoadContentScript(aReload) { ); g.browserMessageManager.addMessageListener( "reftest:InitCanvasWithSnapshot", - function (m) { + function () { RecvInitCanvasWithSnapshot(); } ); @@ -1836,13 +1836,13 @@ function RegisterMessageListenersAndLoadContentScript(aReload) { ); g.browserMessageManager.addMessageListener( "reftest:UpdateWholeCanvasForInvalidation", - function (m) { + function () { RecvUpdateWholeCanvasForInvalidation(); } ); g.browserMessageManager.addMessageListener( "reftest:ExpectProcessCrash", - function (m) { + function () { RecvExpectProcessCrash(); } ); @@ -2018,7 +2018,7 @@ async function RecvUpdateWholeCanvasForInvalidation() { SendUpdateCurrentCanvasWithSnapshotDone(true); } -function OnProcessCrashed(subject, topic, data) { +function OnProcessCrashed(subject, topic) { let id; let additionalDumps; let propbag = subject.QueryInterface(Ci.nsIPropertyBag2); diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index b42e8e0238..cf314c99b5 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -252,7 +252,7 @@ class ReftestResolver(object): rv = [ ( os.path.join(dirname, default_manifest), - r".*%s(?:[#?].*)?$" % pathname.replace("?", "\?"), + r".*%s(?:[#?].*)?$" % pathname.replace("?", r"\?"), ) ] -- cgit v1.2.3