Changeset 70510 in webkit
- Timestamp:
- Oct 25, 2010 6:51:53 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70506 r70510 1 2010-10-25 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded 6 https://bugs.webkit.org/show_bug.cgi?id=48285 7 <rdar://problem/8576318> 8 9 * UIProcess/API/C/WKPage.h: 10 Add a kWKMoreThanMaximumMatchCount constant. 11 12 * WebProcess/WebPage/FindController.cpp: 13 (WebKit::FindController::findString): 14 If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant. 15 1 16 2010-10-25 Dan Bernstein <mitz@apple.com> 2 17 -
trunk/WebKit2/UIProcess/API/C/WKPage.h
r70504 r70510 179 179 typedef struct WKPageFindClient WKPageFindClient; 180 180 181 enum { 182 kWKMoreThanMaximumMatchCount = -1 183 }; 184 181 185 WK_EXPORT WKTypeID WKPageGetTypeID(); 182 186 -
trunk/WebKit2/WebProcess/WebPage/FindController.cpp
r70491 r70510 28 28 #include "BackingStore.h" 29 29 #include "FindPageOverlay.h" 30 #include "WKPage.h" 30 31 #include "WebPage.h" 31 32 #include "WebPageProxyMessages.h" … … 90 91 91 92 if (shouldShowOverlay) { 92 unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, caseSensitivity, false, maxMatchCount );93 unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, caseSensitivity, false, maxMatchCount + 1); 93 94 94 95 // Check if we have more matches than allowed. 95 if (matchCount > maxMatchCount) 96 if (matchCount > maxMatchCount) { 96 97 shouldShowOverlay = false; 98 matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount); 99 } 97 100 98 101 WebProcess::shared().connection()->send(Messages::WebPageProxy::DidFindString(string, matchCount), m_webPage->pageID());
Note: See TracChangeset
for help on using the changeset viewer.