diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
commit | dd91e772430dc294e3bf478c119ef8d43c0a3358 (patch) | |
tree | 6f33ce4d5872a5691e0291eb45bf6ab373a5f567 /Source/WebKit2/WebProcess/WebPage/FindController.cpp | |
parent | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (diff) | |
download | qtwebkit-dd91e772430dc294e3bf478c119ef8d43c0a3358.tar.gz |
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.
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/FindController.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/FindController.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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<unsigned>::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<unsigned>(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(); |