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/styleeditor | |
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/styleeditor')
4 files changed, 4 insertions, 33 deletions
diff --git a/devtools/client/styleeditor/StyleEditorUI.sys.mjs b/devtools/client/styleeditor/StyleEditorUI.sys.mjs index d48c50f556..e00a88c3ad 100644 --- a/devtools/client/styleeditor/StyleEditorUI.sys.mjs +++ b/devtools/client/styleeditor/StyleEditorUI.sys.mjs @@ -1576,7 +1576,7 @@ export class StyleEditorUI extends EventEmitter { // onAvailable is a mandatory argument for watchTargets, // but we don't do anything when a new target gets created. - #onTargetAvailable = ({ targetFront }) => {}; + #onTargetAvailable = () => {}; #onTargetDestroyed = ({ targetFront }) => { // Iterate over a copy of the list in order to prevent skipping diff --git a/devtools/client/styleeditor/StyleEditorUtil.sys.mjs b/devtools/client/styleeditor/StyleEditorUtil.sys.mjs index 739dc55fc5..11dae675d9 100644 --- a/devtools/client/styleeditor/StyleEditorUtil.sys.mjs +++ b/devtools/client/styleeditor/StyleEditorUtil.sys.mjs @@ -51,23 +51,6 @@ export function getString(name) { } /** - * Assert an expression is true or throw if false. - * - * @param expression - * @param message - * Optional message. - * @return expression - */ -export function assert(expression, message) { - if (!expression) { - const msg = message ? "ASSERTION FAILURE:" + message : "ASSERTION FAILURE"; - log(msg); - throw new Error(msg); - } - return expression; -} - -/** * Retrieve or set the text content of an element. * * @param DOMElement root @@ -94,18 +77,6 @@ export function text(root, selector, textContent) { } /** - * Log a message to the console. - * - * @param ...rest - * One or multiple arguments to log. - * If multiple arguments are given, they will be joined by " " - * in the log. - */ -export function log() { - console.logStringMessage(Array.prototype.slice.call(arguments).join(" ")); -} - -/** * Show file picker and return the file user selected. * * @param mixed file @@ -171,7 +142,7 @@ export function showFilePicker( fp.defaultString = suggestedFilename; } - fp.init(parentWindow, getString(key + ".title"), mode); + fp.init(parentWindow.browsingContext, getString(key + ".title"), mode); fp.appendFilter(getString(key + ".filter"), "*.css"); fp.appendFilters(fp.filterAll); fp.open(fpCallback); diff --git a/devtools/client/styleeditor/StyleSheetEditor.sys.mjs b/devtools/client/styleeditor/StyleSheetEditor.sys.mjs index d84854a0ae..bf43bf0268 100644 --- a/devtools/client/styleeditor/StyleSheetEditor.sys.mjs +++ b/devtools/client/styleeditor/StyleSheetEditor.sys.mjs @@ -274,7 +274,7 @@ StyleSheetEditor.prototype = { * * This will set |this._state.text| to the new text. */ - async _fetchSourceText(options = {}) { + async _fetchSourceText() { const styleSheetsFront = await this._getStyleSheetsFront(); let longStr = null; diff --git a/devtools/client/styleeditor/test/iframe_with_service_worker.html b/devtools/client/styleeditor/test/iframe_with_service_worker.html index 690515775e..b66e1e74a8 100644 --- a/devtools/client/styleeditor/test/iframe_with_service_worker.html +++ b/devtools/client/styleeditor/test/iframe_with_service_worker.html @@ -12,7 +12,7 @@ function waitForActive(swr) { resolve(swr); return; } - sw.addEventListener("statechange", function onStateChange(evt) { + sw.addEventListener("statechange", function onStateChange() { if (sw.state === "activated") { sw.removeEventListener("statechange", onStateChange); resolve(swr); |