// This is a continuation of a scoping operation that timed out and didn't
// complete last time around, so we should start from where we left off.
ASSERT(m_resumeScopingFromRange->collapsed());
- searchStart = m_resumeScopingFromRange->startPosition().next();
+ searchStart = m_resumeScopingFromRange->endPosition();
if (searchStart.document() != searchEnd.document())
return;
}
if (resultRange->collapsed()) {
// resultRange will be collapsed if the matched text spans over multiple TreeScopes.
// FIXME: Show such matches to users.
- searchStart = resultStart.next();
+ searchStart = resultEnd;
continue;
}
// result range. There is no need to use a VisiblePosition here,
// since findPlainText will use a TextIterator to go over the visible
// text nodes.
- searchStart = resultStart.next();
+ searchStart = resultEnd;
- m_resumeScopingFromRange = Range::create(*resultStart.document(), resultStart, resultStart);
+ m_resumeScopingFromRange = Range::create(*resultStart.document(), resultEnd, resultEnd);
timedOut = (currentTime() - startTime) >= maxScopingDuration;
} while (!timedOut);