Bug 1489790 - Part 4: Remove the XPCOM component registration for NS_EDITINGCOMMANDTABLE_CID; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D5359
This commit is contained in:
Ehsan Akhgari
2018-09-07 09:48:17 -04:00
parent e80628a994
commit c45bc1e02c
3 changed files with 20 additions and 26 deletions

View File

@@ -213,6 +213,22 @@ nsControllerCommandTable::CreateEditorCommandTable()
return commandTable.forget();
}
// static
already_AddRefed<nsIControllerCommandTable>
nsControllerCommandTable::CreateEditingCommandTable()
{
nsCOMPtr<nsIControllerCommandTable> commandTable =
new nsControllerCommandTable();
nsresult rv = EditorController::RegisterEditingCommands(commandTable);
if (NS_FAILED(rv)) return nullptr;
// we don't know here whether we're being created as an instance,
// or a service, so we can't become immutable
return commandTable.forget();
}
// static
already_AddRefed<nsIControllerCommandTable>
nsControllerCommandTable::CreateHTMLEditorCommandTable()