mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1680218 - [devtools] Remove isFileNameSupported trait in StyleSheetActor. r=daisuke.
The trait was added in 81, so we can safely remove it now. Differential Revision: https://phabricator.services.mozilla.com/D98493
This commit is contained in:
parent
aa45f21d3f
commit
f04e61747b
@ -477,21 +477,7 @@ StyleEditorUI.prototype = {
|
||||
const stylesheetsFront = await this.currentTarget.getFront(
|
||||
"stylesheets"
|
||||
);
|
||||
|
||||
const traits = await stylesheetsFront.getTraits();
|
||||
if (traits.isFileNameSupported) {
|
||||
// FF81+ addStyleSheet of StyleSheetsFront supports file name parameter.
|
||||
stylesheetsFront.addStyleSheet(source, selectedFile.path);
|
||||
} else {
|
||||
const styleSheet = await stylesheetsFront.addStyleSheet(source);
|
||||
styleSheet.isNew = true;
|
||||
const editor = await this._addStyleSheet({ styleSheet });
|
||||
if (editor) {
|
||||
editor.savedFile = selectedFile;
|
||||
}
|
||||
// Just for testing purposes.
|
||||
this.emit("test:editor-updated", editor);
|
||||
}
|
||||
stylesheetsFront.addStyleSheet(source, selectedFile.path);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
@ -55,10 +55,7 @@ var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
|
||||
|
||||
getTraits() {
|
||||
return {
|
||||
traits: {
|
||||
// @backward-compat { version 81 } addStyleSheet now supports file name parameter.
|
||||
isFileNameSupported: true,
|
||||
},
|
||||
traits: {},
|
||||
};
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user