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

@@ -2732,11 +2732,13 @@ NS_IMETHODIMP nsDocumentViewer::SelectAll()
}
if (!bodyNode) return NS_ERROR_FAILURE;
nsresult rv = selection->RemoveAllRanges();
if (NS_FAILED(rv)) return rv;
ErrorResult err;
selection->RemoveAllRanges(err);
if (err.Failed()) {
return err.StealNSResult();
}
mozilla::dom::Selection::AutoUserInitiated userSelection(selection);
ErrorResult err;
selection->SelectAllChildren(*bodyNode, err);
return err.StealNSResult();
}