diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 7 |
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; } |