From 4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 16 Jul 2012 14:51:15 +0200 Subject: Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676) --- Source/WebKit2/WebProcess/WebPage/FindController.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/WebKit2/WebProcess/WebPage/FindController.cpp') diff --git a/Source/WebKit2/WebProcess/WebPage/FindController.cpp b/Source/WebKit2/WebProcess/WebPage/FindController.cpp index 8955709ce..a3d1d8feb 100644 --- a/Source/WebKit2/WebProcess/WebPage/FindController.cpp +++ b/Source/WebKit2/WebProcess/WebPage/FindController.cpp @@ -97,6 +97,8 @@ void FindController::updateFindUIAfterPageScroll(bool found, const String& strin bool shouldShowOverlay = false; if (!found) { + m_webPage->corePage()->unmarkAllTextMatches(); + // Clear the selection. if (selectedFrame) selectedFrame->selection()->clear(); @@ -114,6 +116,7 @@ void FindController::updateFindUIAfterPageScroll(bool found, const String& strin if (maxMatchCount == numeric_limits::max()) --maxMatchCount; + m_webPage->corePage()->unmarkAllTextMatches(); matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1); // Check if we have more matches than allowed. @@ -152,8 +155,6 @@ void FindController::updateFindUIAfterPageScroll(bool found, const String& strin void FindController::findString(const String& string, FindOptions options, unsigned maxMatchCount) { - m_webPage->corePage()->unmarkAllTextMatches(); - bool found = m_webPage->corePage()->findString(string, core(options)); m_webPage->drawingArea()->dispatchAfterEnsuringUpdatedScrollPosition(WTF::bind(&FindController::updateFindUIAfterPageScroll, this, found, string, options, maxMatchCount)); -- cgit v1.2.1