[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 14:57:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 18936ecb691716f96ce17e662446f47a59ba87ae
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 26 01:51:53 2010 +0000

    WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
    https://bugs.webkit.org/show_bug.cgi?id=48285
    <rdar://problem/8576318>
    
    Reviewed by Sam Weinig.
    
    * UIProcess/API/C/WKPage.h:
    Add a kWKMoreThanMaximumMatchCount constant.
    
    * WebProcess/WebPage/FindController.cpp:
    (WebKit::FindController::findString):
    If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 3ccd775..d0008d2 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-25  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
+        https://bugs.webkit.org/show_bug.cgi?id=48285
+        <rdar://problem/8576318>
+
+        * UIProcess/API/C/WKPage.h:
+        Add a kWKMoreThanMaximumMatchCount constant.
+
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::findString):
+        If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.
+
 2010-10-25  Dan Bernstein  <mitz at apple.com>
 
         Non-Carbon build fix.
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 8834b37..1251a89 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -178,6 +178,10 @@ struct WKPageFindClient {
 };
 typedef struct WKPageFindClient WKPageFindClient;
 
+enum {
+    kWKMoreThanMaximumMatchCount = -1
+};
+
 WK_EXPORT WKTypeID WKPageGetTypeID();
 
 WK_EXPORT WKPageNamespaceRef WKPageGetPageNamespace(WKPageRef page);
diff --git a/WebKit2/WebProcess/WebPage/FindController.cpp b/WebKit2/WebProcess/WebPage/FindController.cpp
index d9f12c7..4792e33 100644
--- a/WebKit2/WebProcess/WebPage/FindController.cpp
+++ b/WebKit2/WebProcess/WebPage/FindController.cpp
@@ -27,6 +27,7 @@
 
 #include "BackingStore.h"
 #include "FindPageOverlay.h"
+#include "WKPage.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
@@ -89,11 +90,13 @@ void FindController::findString(const String& string, FindDirection findDirectio
         shouldShowOverlay = findOptions & FindOptionsShowOverlay;
 
         if (shouldShowOverlay) {
-            unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, caseSensitivity, false, maxMatchCount);
+            unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, caseSensitivity, false, maxMatchCount + 1);
 
             // Check if we have more matches than allowed.
-            if (matchCount > maxMatchCount)
+            if (matchCount > maxMatchCount) {
                 shouldShowOverlay = false;
+                matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount);
+            }
 
             WebProcess::shared().connection()->send(Messages::WebPageProxy::DidFindString(string, matchCount), m_webPage->pageID());
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list