Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor

MozReview-Commit-ID: EeMje9KW6An
This commit is contained in:
Boris Zbarsky
2018-03-27 00:35:23 -04:00
parent 60cebc0348
commit 2f03e52f54
18 changed files with 71 additions and 69 deletions

View File

@@ -103,6 +103,7 @@
#include "nsIImageDocument.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "mozilla/dom/HTMLDocumentBinding.h"
#include "mozilla/dom/Selection.h"
#include "nsCharsetSource.h"
#include "nsIStringBundle.h"
#include "nsDOMClassInfo.h"
@@ -2548,12 +2549,11 @@ nsHTMLDocument::EditingStateChanged()
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsISelection> spellCheckSelection;
rv = selectionController->GetSelection(
nsISelectionController::SELECTION_SPELLCHECK,
getter_AddRefs(spellCheckSelection));
if (NS_SUCCEEDED(rv)) {
spellCheckSelection->RemoveAllRanges();
RefPtr<Selection> spellCheckSelection =
selectionController->GetDOMSelection(
nsISelectionController::SELECTION_SPELLCHECK);
if (spellCheckSelection) {
spellCheckSelection->RemoveAllRanges(IgnoreErrors());
}
}
htmlEditor->SyncRealTimeSpell();