зеркало из 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.
|
* Note that getNodeFromActor was added later and can now be used instead.
|
||||||
*/
|
*/
|
||||||
getStyleSheetOwnerNode(resourceId) {
|
getStyleSheetOwnerNode(resourceId) {
|
||||||
const manager = this.targetActor.getStyleSheetManager();
|
const manager = this.targetActor.getStyleSheetsManager();
|
||||||
const ownerNode = manager.getOwnerNode(resourceId);
|
const ownerNode = manager.getOwnerNode(resourceId);
|
||||||
return this.attachElement(ownerNode);
|
return this.attachElement(ownerNode);
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,7 +106,7 @@ var PageStyleActor = protocol.ActorClassWithSpec(pageStyleSpec, {
|
||||||
this._observedRules = [];
|
this._observedRules = [];
|
||||||
this._styleApplied = this._styleApplied.bind(this);
|
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._onStylesheetUpdated = this._onStylesheetUpdated.bind(this);
|
||||||
this.styleSheetsManager.on("stylesheet-updated", this._onStylesheetUpdated);
|
this.styleSheetsManager.on("stylesheet-updated", this._onStylesheetUpdated);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class StyleSheetWatcher {
|
||||||
this._onAvailable = onAvailable;
|
this._onAvailable = onAvailable;
|
||||||
this._onUpdated = onUpdated;
|
this._onUpdated = onUpdated;
|
||||||
|
|
||||||
this._styleSheetsManager = targetActor.getStyleSheetManager();
|
this._styleSheetsManager = targetActor.getStyleSheetsManager();
|
||||||
|
|
||||||
// Add event listener for new additions and updates
|
// Add event listener for new additions and updates
|
||||||
this._styleSheetsManager.on(
|
this._styleSheetsManager.on(
|
||||||
|
|
|
@ -77,7 +77,7 @@ var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
|
||||||
},
|
},
|
||||||
|
|
||||||
_getStyleSheetsManager() {
|
_getStyleSheetsManager() {
|
||||||
return this.parentActor.getStyleSheetManager();
|
return this.parentActor.getStyleSheetsManager();
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleDisabled(resourceId) {
|
toggleDisabled(resourceId) {
|
||||||
|
|
|
@ -99,11 +99,11 @@ module.exports = function(targetType, targetActorSpec, implementation) {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
getStyleSheetManager() {
|
getStyleSheetsManager() {
|
||||||
if (!this._styleSheetManager) {
|
if (!this._styleSheetsManager) {
|
||||||
this._styleSheetManager = new StyleSheetsManager(this);
|
this._styleSheetsManager = new StyleSheetsManager(this);
|
||||||
}
|
}
|
||||||
return this._styleSheetManager;
|
return this._styleSheetsManager;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// Use getOwnPropertyDescriptors in order to prevent calling getter from implementation
|
// Use getOwnPropertyDescriptors in order to prevent calling getter from implementation
|
||||||
|
@ -117,9 +117,9 @@ module.exports = function(targetType, targetActorSpec, implementation) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
proto.destroy = function() {
|
proto.destroy = function() {
|
||||||
if (this._styleSheetManager) {
|
if (this._styleSheetsManager) {
|
||||||
this._styleSheetManager.destroy();
|
this._styleSheetsManager.destroy();
|
||||||
this._styleSheetManager = null;
|
this._styleSheetsManager = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof implementation.destroy == "function") {
|
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.
|
* the target gets destroyed.
|
||||||
*/
|
*/
|
||||||
destroy() {
|
destroy() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче