Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor
MozReview-Commit-ID: EeMje9KW6An
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user