mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 861893 - Do not hold on to nsITextServicesDocument unnecessarily in the editor and the spell checker code; r=roc
This commit is contained in:
parent
ba2695f44e
commit
9483f3383d
@ -162,7 +162,6 @@ nsHTMLEditor::HideAnonymousEditingUIs()
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsHTMLEditor, nsPlaintextEditor)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTypeInState)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mStyleSheets)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTextServices)
|
||||
|
||||
tmp->HideAnonymousEditingUIs();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
@ -170,7 +169,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsHTMLEditor, nsPlaintextEditor)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTypeInState)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheets)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTextServices)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTopLeftHandle)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTopHandle)
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "nsITableEditor.h"
|
||||
#include "nsIEditorMailSupport.h"
|
||||
#include "nsIEditorStyleSheets.h"
|
||||
#include "nsITextServicesDocument.h"
|
||||
|
||||
#include "nsEditor.h"
|
||||
#include "nsIDOMElement.h"
|
||||
@ -766,9 +765,6 @@ protected:
|
||||
// an array for holding default style settings
|
||||
nsTArray<PropItem*> mDefaultStyles;
|
||||
|
||||
// for real-time spelling
|
||||
nsCOMPtr<nsITextServicesDocument> mTextServices;
|
||||
|
||||
protected:
|
||||
|
||||
/* ANONYMOUS UTILS */
|
||||
|
@ -481,9 +481,8 @@ NS_INTERFACE_MAP_END
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(mozInlineSpellChecker)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(mozInlineSpellChecker)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_4(mozInlineSpellChecker,
|
||||
NS_IMPL_CYCLE_COLLECTION_3(mozInlineSpellChecker,
|
||||
mSpellCheck,
|
||||
mTextServicesDocument,
|
||||
mTreeWalker,
|
||||
mCurrentSelectionAnchorNode)
|
||||
|
||||
@ -675,16 +674,6 @@ mozInlineSpellChecker::SetEnableRealTimeSpell(bool aEnabled)
|
||||
res = spellchecker->InitSpellChecker(editor, false);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
nsCOMPtr<nsITextServicesDocument> tsDoc = do_CreateInstance("@mozilla.org/textservices/textservicesdocument;1", &res);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
res = tsDoc->SetFilter(filter);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
res = tsDoc->InitWithEditor(editor);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
mTextServicesDocument = tsDoc;
|
||||
mSpellCheck = spellchecker;
|
||||
|
||||
// spell checking is enabled, register our event listeners to track navigation
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "nsIEditorSpellCheck.h"
|
||||
#include "nsIEditActionListener.h"
|
||||
#include "nsIInlineSpellChecker.h"
|
||||
#include "nsITextServicesDocument.h"
|
||||
#include "nsIDOMTreeWalker.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsEditor.h"
|
||||
@ -130,7 +129,6 @@ private:
|
||||
|
||||
nsWeakPtr mEditor;
|
||||
nsCOMPtr<nsIEditorSpellCheck> mSpellCheck;
|
||||
nsCOMPtr<nsITextServicesDocument> mTextServicesDocument;
|
||||
nsCOMPtr<nsIDOMTreeWalker> mTreeWalker;
|
||||
nsCOMPtr<mozISpellI18NUtil> mConverter;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user