Loading devtools/client/inspector/rules/test/browser_rules_shapes-toggle_01.js +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ add_task(async function() { "Shapes highlighter toggle is active." ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading devtools/client/inspector/rules/test/browser_rules_shapes-toggle_03.js +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ add_task(async function() { "shapes highlighter toggle is active." ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading devtools/client/inspector/rules/test/browser_rules_shapes-toggle_07.js +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is on" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading @@ -67,7 +67,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is off" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading @@ -91,7 +91,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is on" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading devtools/client/inspector/rules/test/browser_rules_shapes-toggle_basic-shapes-default.js +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ add_task(async function() { `Shapes highlighter toggle active for ${selector}` ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, `Shapes highlighter instance created for ${selector}` ); ok( Loading devtools/client/inspector/shared/highlighters-overlay.js +12 −6 Original line number Diff line number Diff line Loading @@ -726,7 +726,7 @@ class HighlightersOverlay { * TextProperty where to write changes. */ async toggleShapesHighlighter(node, options, textProperty) { const shapesEditor = await this.getInContextEditor("shapesEditor"); const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading @@ -743,7 +743,7 @@ class HighlightersOverlay { * Object used for passing options to the shapes highlighter. */ async showShapesHighlighter(node, options) { const shapesEditor = await this.getInContextEditor("shapesEditor"); const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading @@ -770,9 +770,11 @@ class HighlightersOverlay { * Hide the shapes highlighter if visible. * This method delegates the to the in-context shapes editor which wraps * the shapes highlighter with additional functionality. * * @param {NodeFront} node. */ async hideShapesHighlighter() { const shapesEditor = await this.getInContextEditor("shapesEditor"); async hideShapesHighlighter(node) { const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading Loading @@ -1388,12 +1390,13 @@ class HighlightersOverlay { * need to write value changes back to something, like to properties in the Rule view. * They typically exist in the context of the page, like the ShapesInContextEditor. * * @param {NodeFront} node. * @param {String} type * Type of in-context editor. Currently supported: "shapesEditor" * @return {Object|null} * Reference to instance for given type of in-context editor or null. */ async getInContextEditor(type) { async getInContextEditor(node, type) { if (this.editors[type]) { return this.editors[type]; } Loading @@ -1402,7 +1405,10 @@ class HighlightersOverlay { switch (type) { case "shapesEditor": const highlighter = await this._getHighlighter("ShapesHighlighter"); const highlighter = await this._getHighlighterTypeForNode( "ShapesHighlighter", node ); if (!highlighter) { return null; } Loading Loading
devtools/client/inspector/rules/test/browser_rules_shapes-toggle_01.js +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ add_task(async function() { "Shapes highlighter toggle is active." ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading
devtools/client/inspector/rules/test/browser_rules_shapes-toggle_03.js +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ add_task(async function() { "shapes highlighter toggle is active." ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading
devtools/client/inspector/rules/test/browser_rules_shapes-toggle_07.js +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is on" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading @@ -67,7 +67,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is off" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading @@ -91,7 +91,7 @@ add_task(async function() { "Checking the CSS shapes highlighter is created and transform mode is on" ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, "CSS shapes highlighter created in the rule-view." ); ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown."); Loading
devtools/client/inspector/rules/test/browser_rules_shapes-toggle_basic-shapes-default.js +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ add_task(async function() { `Shapes highlighter toggle active for ${selector}` ); ok( highlighters.highlighters[HIGHLIGHTER_TYPE], inspector.inspectorFront.getKnownHighlighter(HIGHLIGHTER_TYPE).actorID, `Shapes highlighter instance created for ${selector}` ); ok( Loading
devtools/client/inspector/shared/highlighters-overlay.js +12 −6 Original line number Diff line number Diff line Loading @@ -726,7 +726,7 @@ class HighlightersOverlay { * TextProperty where to write changes. */ async toggleShapesHighlighter(node, options, textProperty) { const shapesEditor = await this.getInContextEditor("shapesEditor"); const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading @@ -743,7 +743,7 @@ class HighlightersOverlay { * Object used for passing options to the shapes highlighter. */ async showShapesHighlighter(node, options) { const shapesEditor = await this.getInContextEditor("shapesEditor"); const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading @@ -770,9 +770,11 @@ class HighlightersOverlay { * Hide the shapes highlighter if visible. * This method delegates the to the in-context shapes editor which wraps * the shapes highlighter with additional functionality. * * @param {NodeFront} node. */ async hideShapesHighlighter() { const shapesEditor = await this.getInContextEditor("shapesEditor"); async hideShapesHighlighter(node) { const shapesEditor = await this.getInContextEditor(node, "shapesEditor"); if (!shapesEditor) { return; } Loading Loading @@ -1388,12 +1390,13 @@ class HighlightersOverlay { * need to write value changes back to something, like to properties in the Rule view. * They typically exist in the context of the page, like the ShapesInContextEditor. * * @param {NodeFront} node. * @param {String} type * Type of in-context editor. Currently supported: "shapesEditor" * @return {Object|null} * Reference to instance for given type of in-context editor or null. */ async getInContextEditor(type) { async getInContextEditor(node, type) { if (this.editors[type]) { return this.editors[type]; } Loading @@ -1402,7 +1405,10 @@ class HighlightersOverlay { switch (type) { case "shapesEditor": const highlighter = await this._getHighlighter("ShapesHighlighter"); const highlighter = await this._getHighlighterTypeForNode( "ShapesHighlighter", node ); if (!highlighter) { return null; } Loading