From dd91e772430dc294e3bf478c119ef8d43c0a3358 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 12 Mar 2012 14:11:15 +0100 Subject: Imported WebKit commit 3db4eb1820ac8fb03065d7ea73a4d9db1e8fea1a (http://svn.webkit.org/repository/webkit/trunk@110422) This includes build fixes for the latest qtbase/qtdeclarative as well as the final QML2 API. --- Source/WebKit2/WebProcess/WebPage/FindController.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 10cfdfc83..6b6156934 100644 --- a/Source/WebKit2/WebProcess/WebPage/FindController.cpp +++ b/Source/WebKit2/WebProcess/WebPage/FindController.cpp @@ -109,24 +109,25 @@ void FindController::findString(const String& string, FindOptions options, unsig m_webPage->send(Messages::WebPageProxy::DidFailToFindString(string)); } else { shouldShowOverlay = options & FindOptionsShowOverlay; + bool shouldShowHighlight = options & FindOptionsShowHighlight; + unsigned matchCount = 1; - if (shouldShowOverlay) { - bool shouldShowHighlight = options & FindOptionsShowHighlight; + if (shouldShowOverlay || shouldShowHighlight) { if (maxMatchCount == numeric_limits::max()) --maxMatchCount; - - unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1); + + matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1); // Check if we have more matches than allowed. if (matchCount > maxMatchCount) { shouldShowOverlay = false; matchCount = static_cast(kWKMoreThanMaximumMatchCount); } - - m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount)); } + m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount)); + if (!(options & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) { // Either we shouldn't show the find indicator, or we couldn't update it. hideFindIndicator(); -- cgit v1.2.1