diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/inspector/markup/markup.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/inspector/markup/markup.js')
-rw-r--r-- | devtools/client/inspector/markup/markup.js | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 5d10b003c9..7975d442f8 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -1218,19 +1218,15 @@ MarkupView.prototype = { } else if (type == "idref") { // Select the node in the same document. nodeFront.walkerFront - .document(nodeFront) - .then(doc => { - return nodeFront.walkerFront - .querySelector(doc, "#" + CSS.escape(link)) - .then(node => { - if (!node) { - this.emit("idref-attribute-link-failed"); - return; - } - this.inspector.selection.setNodeFront(node, { - reason: "markup-attribute-link", - }); - }); + .getIdrefNode(nodeFront, CSS.escape(link)) + .then(node => { + if (!node) { + this.emitForTests("idref-attribute-link-failed"); + return; + } + this.inspector.selection.setNodeFront(node, { + reason: "markup-attribute-link", + }); }) .catch(console.error); } @@ -1555,7 +1551,7 @@ MarkupView.prototype = { } }, - _onTargetAvailable({ targetFront }) {}, + _onTargetAvailable() {}, _onTargetDestroyed({ targetFront, isModeSwitching }) { // Bug 1776250: We only watch targets in order to update containers which @@ -2103,14 +2099,12 @@ MarkupView.prototype = { * Mark the given node selected, and update the inspector.selection * object's NodeFront to keep consistent state between UI and selection. * - * @param {NodeFront} aNode + * @param {NodeFront} node * The NodeFront to mark as selected. - * @param {String} reason - * The reason for marking the node as selected. * @return {Boolean} False if the node is already marked as selected, true * otherwise. */ - markNodeAsSelected(node, reason = "nodeselected") { + markNodeAsSelected(node) { const container = this.getContainer(node); return this._markContainerAsSelected(container); }, |