зеркало из https://github.com/mozilla/gecko-dev.git
Now really backing out the offending mochitest, and also the patch I accidently checked in instead.
This commit is contained in:
Родитель
d17be3c2de
Коммит
25096ed723
|
@ -574,8 +574,19 @@ mozInlineSpellChecker::Init(nsIEditor *aEditor)
|
|||
nsresult mozInlineSpellChecker::Cleanup()
|
||||
{
|
||||
mNumWordsInSpellSelection = 0;
|
||||
nsCOMPtr<nsISelection> spellCheckSelection;
|
||||
nsresult rv = GetSpellCheckSelection(getter_AddRefs(spellCheckSelection));
|
||||
if (NS_FAILED(rv)) {
|
||||
// Ensure we still unregister event listeners (but return a failure code)
|
||||
UnregisterEventListeners();
|
||||
} else {
|
||||
spellCheckSelection->RemoveAllRanges();
|
||||
|
||||
rv = UnregisterEventListeners();
|
||||
}
|
||||
mEditor = nsnull;
|
||||
return UnregisterEventListeners();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
// mozInlineSpellChecker::CanEnableInlineSpellChecking
|
||||
|
@ -699,16 +710,7 @@ mozInlineSpellChecker::SetEnableRealTimeSpell(PRBool aEnabled)
|
|||
{
|
||||
if (!aEnabled) {
|
||||
mSpellCheck = nsnull;
|
||||
nsCOMPtr<nsISelection> spellCheckSelection;
|
||||
nsresult rv = GetSpellCheckSelection(getter_AddRefs(spellCheckSelection));
|
||||
if (NS_FAILED(rv)) {
|
||||
// Ensure we still unregister event listeners (but return a failure code)
|
||||
Cleanup();
|
||||
} else {
|
||||
spellCheckSelection->RemoveAllRanges();
|
||||
rv = Cleanup();
|
||||
}
|
||||
return rv;
|
||||
return Cleanup();
|
||||
}
|
||||
|
||||
if (!mSpellCheck) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче