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:
Nicolas Chevobbe 2020-12-09 13:17:32 +00:00
parent aa45f21d3f
commit f04e61747b
2 changed files with 2 additions and 19 deletions

View File

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

View File

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