Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2251)

Unified Diff: Source/web/TextFinder.cpp

Issue 422443004: Fix incorrect number of matches and misleading highlighting in "Find on Page" results (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/TextFinder.cpp
diff --git a/Source/web/TextFinder.cpp b/Source/web/TextFinder.cpp
index 597fdc45dfe16344f146a61627aa9ecf99bef1ee..1cd37fc1bc3328b96ac9aa10c11426602d363327 100644
--- a/Source/web/TextFinder.cpp
+++ b/Source/web/TextFinder.cpp
@@ -242,7 +242,7 @@ void TextFinder::scopeStringMatches(int identifier, const WebString& searchText,
// 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->startPosition();
if (searchStart.document() != searchEnd.document())
return;
}
@@ -318,7 +318,7 @@ void TextFinder::scopeStringMatches(int identifier, const WebString& searchText,
// 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);
timedOut = (currentTime() - startTime) >= maxScopingDuration;
« no previous file with comments | « no previous file | Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698