зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d71c146658
Коммит
8c925316a6
|
@ -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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче