Bug 1634663: part 5) Declare callers of Selection::GetRangeAt around toolkit/components/find const. r=masayuki

Depends on D73447

Differential Revision: https://phabricator.services.mozilla.com/D73448
This commit is contained in:
Mirko Brodesser 2020-05-02 23:48:06 +00:00
parent a060e2efd4
commit b547d18451
2 changed files with 3 additions and 3 deletions

View File

@ -444,7 +444,7 @@ nsresult nsWebBrowserFind::GetSearchLimits(nsRange* aSearchRange,
// There are four possible range endpoints we might use:
// DocumentStart, SelectionStart, SelectionEnd, DocumentEnd.
RefPtr<nsRange> range;
RefPtr<const nsRange> range;
nsCOMPtr<nsINode> node;
uint32_t offset;

View File

@ -776,7 +776,7 @@ nsresult nsTypeAheadFind::GetSearchContainers(
// Consider current selection as null if
// it's not in the currently focused document
RefPtr<nsRange> currentSelectionRange;
RefPtr<const nsRange> currentSelectionRange;
RefPtr<PresShell> selectionPresShell = GetPresShell();
if (aSelectionController && selectionPresShell &&
selectionPresShell == presShell) {
@ -1058,7 +1058,7 @@ nsresult nsTypeAheadFind::FindInternal(uint32_t aMode,
mStartFindRange = nullptr;
if (selection) {
RefPtr<nsRange> startFindRange = selection->GetRangeAt(0);
RefPtr<const nsRange> startFindRange = selection->GetRangeAt(0);
if (startFindRange) {
mStartFindRange = startFindRange->CloneRange();
}