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

@@ -3187,7 +3187,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, bool aScroll,
// Select the anchor
RefPtr<Selection> sel = mSelection->GetSelection(SelectionType::eNormal);
if (sel) {
sel->RemoveAllRanges();
sel->RemoveAllRanges(IgnoreErrors());
sel->AddRange(*jumpToRange, IgnoreErrors());
if (!selectAnchor) {
// Use a caret (collapsed selection) at the start of the anchor