Bug 1349178 Make nsIEditor.transactionManager readonly r=m_kato

There are no app which replaces transaction manager of editor.  Additionally, replacing transaction manager of an editor with different editor or same editor but after initialized again due to some reasons may cause unexpected problems.

Therefore, this patch makes it readonly.

MozReview-Commit-ID: K7zepOjrzvC
This commit is contained in:
Masayuki Nakano
2017-03-21 20:57:15 +09:00
parent b0a496de16
commit 97096baf47
2 changed files with 1 additions and 11 deletions

View File

@@ -787,16 +787,6 @@ EditorBase::GetTransactionManager(nsITransactionManager** aTxnManager)
return NS_OK;
}
NS_IMETHODIMP
EditorBase::SetTransactionManager(nsITransactionManager* aTxnManager)
{
NS_ENSURE_TRUE(aTxnManager, NS_ERROR_FAILURE);
// nsITransactionManager is builtinclass, so this is safe
mTxnMgr = static_cast<nsTransactionManager*>(aTxnManager);
return NS_OK;
}
NS_IMETHODIMP
EditorBase::Undo(uint32_t aCount)
{

View File

@@ -172,7 +172,7 @@ interface nsIEditor : nsISupports
/** transactionManager Get the transaction manager the editor is using.
*/
attribute nsITransactionManager transactionManager;
readonly attribute nsITransactionManager transactionManager;
/** doTransaction() fires a transaction.
* It is provided here so clients can create their own transactions.