From 8c925316a6c01db2b663e2ac75d2cb313f8a955b Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 17 Jan 2023 08:06:16 +0000 Subject: [PATCH] Bug 1808870 - [devtools] Rename all occurrences of styleSheetManager to styleSheetsManager r=nchevobbe Depends on D166311 Differential Revision: https://phabricator.services.mozilla.com/D166312 --- devtools/server/actors/inspector/walker.js | 2 +- devtools/server/actors/page-style.js | 2 +- devtools/server/actors/resources/stylesheets.js | 2 +- devtools/server/actors/style-sheets.js | 2 +- .../server/actors/targets/target-actor-mixin.js | 14 +++++++------- .../server/actors/utils/stylesheets-manager.js | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/devtools/server/actors/inspector/walker.js b/devtools/server/actors/inspector/walker.js index b05381c3291c..799149294e98 100644 --- a/devtools/server/actors/inspector/walker.js +++ b/devtools/server/actors/inspector/walker.js @@ -2665,7 +2665,7 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, { * Note that getNodeFromActor was added later and can now be used instead. */ getStyleSheetOwnerNode(resourceId) { - const manager = this.targetActor.getStyleSheetManager(); + const manager = this.targetActor.getStyleSheetsManager(); const ownerNode = manager.getOwnerNode(resourceId); return this.attachElement(ownerNode); }, diff --git a/devtools/server/actors/page-style.js b/devtools/server/actors/page-style.js index a2ccbce6c29b..8794ec3466c8 100644 --- a/devtools/server/actors/page-style.js +++ b/devtools/server/actors/page-style.js @@ -106,7 +106,7 @@ var PageStyleActor = protocol.ActorClassWithSpec(pageStyleSpec, { this._observedRules = []; this._styleApplied = this._styleApplied.bind(this); - this.styleSheetsManager = this.inspector.targetActor.getStyleSheetManager(); + this.styleSheetsManager = this.inspector.targetActor.getStyleSheetsManager(); this._onStylesheetUpdated = this._onStylesheetUpdated.bind(this); this.styleSheetsManager.on("stylesheet-updated", this._onStylesheetUpdated); diff --git a/devtools/server/actors/resources/stylesheets.js b/devtools/server/actors/resources/stylesheets.js index 9c5e32cd3d46..e8df38b8b838 100644 --- a/devtools/server/actors/resources/stylesheets.js +++ b/devtools/server/actors/resources/stylesheets.js @@ -37,7 +37,7 @@ class StyleSheetWatcher { this._onAvailable = onAvailable; this._onUpdated = onUpdated; - this._styleSheetsManager = targetActor.getStyleSheetManager(); + this._styleSheetsManager = targetActor.getStyleSheetsManager(); // Add event listener for new additions and updates this._styleSheetsManager.on( diff --git a/devtools/server/actors/style-sheets.js b/devtools/server/actors/style-sheets.js index da69dc0c8192..8d4847bf9399 100644 --- a/devtools/server/actors/style-sheets.js +++ b/devtools/server/actors/style-sheets.js @@ -77,7 +77,7 @@ var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, { }, _getStyleSheetsManager() { - return this.parentActor.getStyleSheetManager(); + return this.parentActor.getStyleSheetsManager(); }, toggleDisabled(resourceId) { diff --git a/devtools/server/actors/targets/target-actor-mixin.js b/devtools/server/actors/targets/target-actor-mixin.js index 8ff016d9520d..6a2d7b6dff17 100644 --- a/devtools/server/actors/targets/target-actor-mixin.js +++ b/devtools/server/actors/targets/target-actor-mixin.js @@ -99,11 +99,11 @@ module.exports = function(targetType, targetActorSpec, implementation) { ); }, - getStyleSheetManager() { - if (!this._styleSheetManager) { - this._styleSheetManager = new StyleSheetsManager(this); + getStyleSheetsManager() { + if (!this._styleSheetsManager) { + this._styleSheetsManager = new StyleSheetsManager(this); } - return this._styleSheetManager; + return this._styleSheetsManager; }, }; // Use getOwnPropertyDescriptors in order to prevent calling getter from implementation @@ -117,9 +117,9 @@ module.exports = function(targetType, targetActorSpec, implementation) { } }; proto.destroy = function() { - if (this._styleSheetManager) { - this._styleSheetManager.destroy(); - this._styleSheetManager = null; + if (this._styleSheetsManager) { + this._styleSheetsManager.destroy(); + this._styleSheetsManager = null; } if (typeof implementation.destroy == "function") { diff --git a/devtools/server/actors/utils/stylesheets-manager.js b/devtools/server/actors/utils/stylesheets-manager.js index b20426c4c875..adfc6e079e35 100644 --- a/devtools/server/actors/utils/stylesheets-manager.js +++ b/devtools/server/actors/utils/stylesheets-manager.js @@ -822,7 +822,7 @@ class StyleSheetsManager extends EventEmitter { } /** - * The StyleSheetManager instance is managed by the target, so this will be called when + * The StyleSheetsManager instance is managed by the target, so this will be called when * the target gets destroyed. */ destroy() {