From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../server/actors/highlighters/css/highlighters.css | 4 ++-- devtools/server/actors/highlighters/shapes.js | 19 +++++-------------- devtools/server/actors/highlighters/tabbing-order.js | 8 +++----- 3 files changed, 10 insertions(+), 21 deletions(-) (limited to 'devtools/server/actors/highlighters') diff --git a/devtools/server/actors/highlighters/css/highlighters.css b/devtools/server/actors/highlighters/css/highlighters.css index 33c8a04aae..04584e4bf1 100644 --- a/devtools/server/actors/highlighters/css/highlighters.css +++ b/devtools/server/actors/highlighters/css/highlighters.css @@ -1010,12 +1010,12 @@ button.paused-dbg-resume-button { } .accessible-infobar-audit .accessible-audit.WARNING::before { - background-image: url(chrome://devtools/skin/images/alert-small.svg); + background-image: url(resource://devtools-shared-images/alert-small.svg); fill: var(--yellow-60); } .accessible-infobar-audit .accessible-audit.BEST_PRACTICES::before { - background-image: url(chrome://devtools/skin/images/info-small.svg); + background-image: url(resource://devtools-shared-images/info-small.svg); } .accessible-infobar-name { diff --git a/devtools/server/actors/highlighters/shapes.js b/devtools/server/actors/highlighters/shapes.js index a77e8c31be..6cc9194f57 100644 --- a/devtools/server/actors/highlighters/shapes.js +++ b/devtools/server/actors/highlighters/shapes.js @@ -519,7 +519,7 @@ class ShapesHighlighter extends AutoRefreshHighlighter { } // eslint-disable-next-line complexity - handleEvent(event, id) { + handleEvent(event) { // No event handling if the highlighter is hidden if (this.areShapesHidden()) { return; @@ -1222,7 +1222,7 @@ class ShapesHighlighter extends AutoRefreshHighlighter { coordinates.splice(point, 1); let polygonDef = this.fillRule ? `${this.fillRule}, ` : ""; polygonDef += coordinates - .map((coords, i) => { + .map(coords => { return `${coords[0]} ${coords[1]}`; }) .join(", "); @@ -2735,11 +2735,8 @@ class ShapesHighlighter extends AutoRefreshHighlighter { /** * Update the SVG polygon to fit the CSS polygon. - * @param {Number} width the width of the element quads - * @param {Number} height the height of the element quads - * @param {Number} zoom the zoom level of the window */ - _updatePolygonShape(width, height, zoom) { + _updatePolygonShape() { // Draw and show the polygon. const points = this.coordinates.map(point => point.join(",")).join(" "); @@ -2758,11 +2755,8 @@ class ShapesHighlighter extends AutoRefreshHighlighter { /** * Update the SVG ellipse to fit the CSS circle or ellipse. - * @param {Number} width the width of the element quads - * @param {Number} height the height of the element quads - * @param {Number} zoom the zoom level of the window */ - _updateEllipseShape(width, height, zoom) { + _updateEllipseShape() { const { rx, ry, cx, cy } = this.coordinates; const ellipseEl = this.getElement("ellipse"); ellipseEl.setAttribute("rx", rx); @@ -2788,11 +2782,8 @@ class ShapesHighlighter extends AutoRefreshHighlighter { /** * Update the SVG rect to fit the CSS inset. - * @param {Number} width the width of the element quads - * @param {Number} height the height of the element quads - * @param {Number} zoom the zoom level of the window */ - _updateInsetShape(width, height, zoom) { + _updateInsetShape() { const { top, left, right, bottom } = this.coordinates; const rectEl = this.getElement("rect"); rectEl.setAttribute("x", left); diff --git a/devtools/server/actors/highlighters/tabbing-order.js b/devtools/server/actors/highlighters/tabbing-order.js index ab96d30fe6..ccc70779bb 100644 --- a/devtools/server/actors/highlighters/tabbing-order.js +++ b/devtools/server/actors/highlighters/tabbing-order.js @@ -11,11 +11,9 @@ loader.lazyGetter( () => ChromeUtils.importESModule( "resource://gre/modules/ContentDOMReference.sys.mjs", - { - // ContentDOMReference needs to be retrieved from the shared global - // since it is a shared singleton. - loadInDevToolsLoader: false, - } + // ContentDOMReference needs to be retrieved from the shared global + // since it is a shared singleton. + { global: "shared" } ).ContentDOMReference ); loader.lazyRequireGetter( -- cgit v1.2.3