diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/jsonview | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/jsonview')
18 files changed, 33 insertions, 33 deletions
diff --git a/devtools/client/jsonview/Sniffer.sys.mjs b/devtools/client/jsonview/Sniffer.sys.mjs index d585ce8ab2..8deeece706 100644 --- a/devtools/client/jsonview/Sniffer.sys.mjs +++ b/devtools/client/jsonview/Sniffer.sys.mjs @@ -35,7 +35,7 @@ function getContentDisposition(channel) { * a compartment at startup when no JSON is being viewed. */ export class Sniffer { - getMIMETypeFromContent(request, data, length) { + getMIMETypeFromContent(request) { if (request instanceof Ci.nsIChannel) { // JSON View is enabled only for top level loads only. if ( diff --git a/devtools/client/jsonview/components/Headers.js b/devtools/client/jsonview/components/Headers.js index 7477627328..01b6160718 100644 --- a/devtools/client/jsonview/components/Headers.js +++ b/devtools/client/jsonview/components/Headers.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { createFactory, Component, diff --git a/devtools/client/jsonview/components/HeadersPanel.js b/devtools/client/jsonview/components/HeadersPanel.js index 0e9e17190e..45f216afb5 100644 --- a/devtools/client/jsonview/components/HeadersPanel.js +++ b/devtools/client/jsonview/components/HeadersPanel.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const dom = require("devtools/client/shared/vendor/react-dom-factories"); diff --git a/devtools/client/jsonview/components/HeadersToolbar.js b/devtools/client/jsonview/components/HeadersToolbar.js index f9122c3a31..4033b6f1e4 100644 --- a/devtools/client/jsonview/components/HeadersToolbar.js +++ b/devtools/client/jsonview/components/HeadersToolbar.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const { createFactories } = require("devtools/client/shared/react-utils"); @@ -31,7 +31,7 @@ define(function (require, exports, module) { // Commands - onCopy(event) { + onCopy() { this.props.actions.onCopyHeaders(); } diff --git a/devtools/client/jsonview/components/JsonPanel.js b/devtools/client/jsonview/components/JsonPanel.js index f569aad4c6..6e7aef1f16 100644 --- a/devtools/client/jsonview/components/JsonPanel.js +++ b/devtools/client/jsonview/components/JsonPanel.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { createFactory, Component, @@ -71,7 +71,7 @@ define(function (require, exports, module) { document.removeEventListener("keypress", this.onKeyPress, true); } - onKeyPress(e) { + onKeyPress() { // XXX shortcut for focusing the Filter field (see Bug 1178771). } diff --git a/devtools/client/jsonview/components/JsonToolbar.js b/devtools/client/jsonview/components/JsonToolbar.js index 34e6ed285b..2e3a074538 100644 --- a/devtools/client/jsonview/components/JsonToolbar.js +++ b/devtools/client/jsonview/components/JsonToolbar.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); @@ -42,19 +42,19 @@ define(function (require, exports, module) { // Commands - onSave(event) { + onSave() { this.props.actions.onSaveJson(); } - onCopy(event) { + onCopy() { this.props.actions.onCopyJson(); } - onCollapse(event) { + onCollapse() { this.props.actions.onCollapse(); } - onExpand(event) { + onExpand() { this.props.actions.onExpand(); } diff --git a/devtools/client/jsonview/components/LiveText.js b/devtools/client/jsonview/components/LiveText.js index d90c099340..8e3563d2da 100644 --- a/devtools/client/jsonview/components/LiveText.js +++ b/devtools/client/jsonview/components/LiveText.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const { findDOMNode } = require("devtools/client/shared/vendor/react-dom"); diff --git a/devtools/client/jsonview/components/MainTabbedArea.js b/devtools/client/jsonview/components/MainTabbedArea.js index 5341e590ce..d800a1f58c 100644 --- a/devtools/client/jsonview/components/MainTabbedArea.js +++ b/devtools/client/jsonview/components/MainTabbedArea.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const { createFactories } = require("devtools/client/shared/react-utils"); diff --git a/devtools/client/jsonview/components/SearchBox.js b/devtools/client/jsonview/components/SearchBox.js index cb736db85b..45b9ac8752 100644 --- a/devtools/client/jsonview/components/SearchBox.js +++ b/devtools/client/jsonview/components/SearchBox.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const dom = require("devtools/client/shared/vendor/react-dom-factories"); diff --git a/devtools/client/jsonview/components/TextPanel.js b/devtools/client/jsonview/components/TextPanel.js index b5b674b6ce..30cfede326 100644 --- a/devtools/client/jsonview/components/TextPanel.js +++ b/devtools/client/jsonview/components/TextPanel.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const dom = require("devtools/client/shared/vendor/react-dom-factories"); diff --git a/devtools/client/jsonview/components/TextToolbar.js b/devtools/client/jsonview/components/TextToolbar.js index 0ab16ef192..e0bbee2d0f 100644 --- a/devtools/client/jsonview/components/TextToolbar.js +++ b/devtools/client/jsonview/components/TextToolbar.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const { createFactories } = require("devtools/client/shared/react-utils"); @@ -33,15 +33,15 @@ define(function (require, exports, module) { // Commands - onPrettify(event) { + onPrettify() { this.props.actions.onPrettify(); } - onSave(event) { + onSave() { this.props.actions.onSaveJson(); } - onCopy(event) { + onCopy() { this.props.actions.onCopyJson(); } diff --git a/devtools/client/jsonview/components/reps/Toolbar.js b/devtools/client/jsonview/components/reps/Toolbar.js index 458acf236f..bed0a77799 100644 --- a/devtools/client/jsonview/components/reps/Toolbar.js +++ b/devtools/client/jsonview/components/reps/Toolbar.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require, exports) { const { Component } = require("devtools/client/shared/vendor/react"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const dom = require("devtools/client/shared/vendor/react-dom-factories"); diff --git a/devtools/client/jsonview/converter-child.js b/devtools/client/jsonview/converter-child.js index 79fd4a68cd..e249de0180 100644 --- a/devtools/client/jsonview/converter-child.js +++ b/devtools/client/jsonview/converter-child.js @@ -65,14 +65,14 @@ Converter.prototype = { * 5. convert does nothing, it's just the synchronous version * of asyncConvertData */ - convert(fromStream, fromType, toType, ctx) { + convert(fromStream) { return fromStream; }, - asyncConvertData(fromType, toType, listener, ctx) { + asyncConvertData(fromType, toType, listener) { this.listener = listener; }, - getConvertedType(fromType, channel) { + getConvertedType() { return "text/html"; }, @@ -395,7 +395,7 @@ function keepThemeUpdated(win) { addThemeObserver(listener); win.addEventListener( "unload", - function (event) { + function () { removeThemeObserver(listener); win = null; }, diff --git a/devtools/client/jsonview/json-viewer.js b/devtools/client/jsonview/json-viewer.js index 131307302e..cefeb7b8f6 100644 --- a/devtools/client/jsonview/json-viewer.js +++ b/devtools/client/jsonview/json-viewer.js @@ -4,7 +4,7 @@ "use strict"; -define(function (require, exports, module) { +define(function (require) { const { render } = require("devtools/client/shared/vendor/react-dom"); const { createFactories } = require("devtools/client/shared/react-utils"); const { MainTabbedArea } = createFactories( @@ -79,7 +79,7 @@ define(function (require, exports, module) { theApp.setState({ searchFilter: value }); }, - onPrettify(data) { + onPrettify() { if (input.json instanceof Error) { // Cannot prettify invalid JSON return; @@ -96,12 +96,12 @@ define(function (require, exports, module) { input.prettified = !input.prettified; }, - onCollapse(data) { + onCollapse() { input.expandedNodes.clear(); theApp.forceUpdate(); }, - onExpand(data) { + onExpand() { input.expandedNodes = TreeViewClass.getExpandedNodes(input.json); theApp.setState({ expandedNodes: input.expandedNodes }); }, diff --git a/devtools/client/jsonview/test/browser_jsonview_content_type.js b/devtools/client/jsonview/test/browser_jsonview_content_type.js index c3298cc7d9..f72ac14b5d 100644 --- a/devtools/client/jsonview/test/browser_jsonview_content_type.js +++ b/devtools/client/jsonview/test/browser_jsonview_content_type.js @@ -34,7 +34,7 @@ add_task(async function () { ); SpecialPowers.setBoolPref("browser.download.useDownloadDir", false); const { MockFilePicker } = SpecialPowers; - MockFilePicker.init(window); + MockFilePicker.init(window.browsingContext); MockFilePicker.returnValue = MockFilePicker.returnCancel; for (const kind of Object.keys(contentTypes)) { diff --git a/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js b/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js index 46ce800b1f..04e0834f2a 100644 --- a/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js +++ b/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js @@ -45,7 +45,7 @@ add_task(async function () { const json = JSON.stringify({ data: Array(1e5) .fill() - .map(x => "hoot"), + .map(() => "hoot"), status: "ok", }); Assert.greater( diff --git a/devtools/client/jsonview/test/browser_jsonview_save_json.js b/devtools/client/jsonview/test/browser_jsonview_save_json.js index 506967df00..d83741685e 100644 --- a/devtools/client/jsonview/test/browser_jsonview_save_json.js +++ b/devtools/client/jsonview/test/browser_jsonview_save_json.js @@ -8,7 +8,7 @@ const saveButton = "button.save"; const prettifyButton = "button.prettyprint"; const { MockFilePicker } = SpecialPowers; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); MockFilePicker.returnValue = MockFilePicker.returnOK; Services.scriptloader.loadSubScript( diff --git a/devtools/client/jsonview/test/browser_jsonview_serviceworker.js b/devtools/client/jsonview/test/browser_jsonview_serviceworker.js index 3d68cad065..c8be1a939a 100644 --- a/devtools/client/jsonview/test/browser_jsonview_serviceworker.js +++ b/devtools/client/jsonview/test/browser_jsonview_serviceworker.js @@ -34,7 +34,7 @@ add_task(async function () { resolve(); return; } - worker.addEventListener("statechange", evt => { + worker.addEventListener("statechange", () => { if (worker.state === "activated") { resolve(); } |