Bug 1808870 - [devtools] Rename all occurrences of styleSheetManager to styleSheetsManager r=nchevobbe

Depends on D166311

Differential Revision: https://phabricator.services.mozilla.com/D166312
This commit is contained in:
Julian Descottes 2023-01-17 08:06:16 +00:00
Родитель d71c146658
Коммит 8c925316a6
6 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -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);
},

Просмотреть файл

@ -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);

Просмотреть файл

@ -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(

Просмотреть файл

@ -77,7 +77,7 @@ var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
},
_getStyleSheetsManager() {
return this.parentActor.getStyleSheetManager();
return this.parentActor.getStyleSheetsManager();
},
toggleDisabled(resourceId) {

Просмотреть файл

@ -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") {

Просмотреть файл

@ -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() {