summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-03-05 17:07:13 -0800
committerVictoria Lease <violets@google.com>2012-03-16 13:22:01 -0700
commite2e14129682e13146903edf80c205b3c90fd6c90 (patch)
treee179255ddbddb314a4ee179048287515a1f2dea6 /Source/WebKit/android/jni/WebViewCore.cpp
parenta9cb027a0b6e5a76a39be3702d3c67f3d162a21f (diff)
downloadexternal_webkit-e2e14129682e13146903edf80c205b3c90fd6c90.zip
external_webkit-e2e14129682e13146903edf80c205b3c90fd6c90.tar.gz
external_webkit-e2e14129682e13146903edf80c205b3c90fd6c90.tar.bz2
only report actual changes to matchCount
Bug: 6052412 Change-Id: If188ea2e54b52f16767d8df8d66c4a80f5a400c0
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 4fbf6ed..9aaec25 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -4232,13 +4232,14 @@ int WebViewCore::findTextOnPage(const WTF::String &text)
frame->document()->markers()->removeMarkers(DocumentMarker::TextMatch);
m_matchCount += frame->editor()->countMatchesForText(text, findOptions,
0, true);
- updateMatchCount();
frame->editor()->setMarkedTextMatchesAreHighlighted(true);
frame = frame->tree()->traverseNextWithWrap(false);
} while (frame);
-
m_activeMatchIndex = m_matchCount - 1; // prime first findNext
- findNextOnPage(true);
+ if (!m_matchCount) // send at least one update, even if no hits
+ updateMatchCount();
+ else
+ findNextOnPage(true);
return m_matchCount;
}