[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:56:47 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a6a5643edfd8780a1de022da5052add233dd33f2
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 25 21:29:32 2010 +0000
Replace matchCountDidChange with didFindString/didFailToFindString
https://bugs.webkit.org/show_bug.cgi?id=48262
<rdar://problem/8568928>
Reviewed by Darin Adler.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebFindClient.cpp:
(WebKit::WebFindClient::didFindString):
(WebKit::WebFindClient::didFailToFindString):
* UIProcess/WebFindClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindString):
(WebKit::WebPageProxy::didFailToFindString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index eb9b312..e3c121c 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,26 @@
2010-10-25 Anders Carlsson <andersca at apple.com>
+ Reviewed by Darin Adler.
+
+ Replace matchCountDidChange with didFindString/didFailToFindString
+ https://bugs.webkit.org/show_bug.cgi?id=48262
+ <rdar://problem/8568928>
+
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebFindClient.cpp:
+ (WebKit::WebFindClient::didFindString):
+ (WebKit::WebFindClient::didFailToFindString):
+ * UIProcess/WebFindClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didFindString):
+ (WebKit::WebPageProxy::didFailToFindString):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::findString):
+
+2010-10-25 Anders Carlsson <andersca at apple.com>
+
Reviewed by Adam Roben.
Add a pageDidScroll BundleUIClient callback
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index db32243..8a92412 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -165,13 +165,15 @@ struct WKPageUIClient {
typedef struct WKPageUIClient WKPageUIClient;
// Find client.
-typedef void (*WKPageMatchCountDidChangeCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
+typedef void (*WKPageDidFindStringCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
+typedef void (*WKPageDidFailToFindStringCallback)(WKPageRef page, WKStringRef string, const void* clientInfo);
typedef void (*WKPageDidCountStringMatchesCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
struct WKPageFindClient {
int version;
const void * clientInfo;
- WKPageMatchCountDidChangeCallback matchCountDidChange;
+ WKPageDidFindStringCallback didFindString;
+ WKPageDidFailToFindStringCallback didFailToFindString;
WKPageDidCountStringMatchesCallback didCountStringMatches;
};
typedef struct WKPageFindClient WKPageFindClient;
diff --git a/WebKit2/UIProcess/WebFindClient.cpp b/WebKit2/UIProcess/WebFindClient.cpp
index 80029e0..e2e8de5 100644
--- a/WebKit2/UIProcess/WebFindClient.cpp
+++ b/WebKit2/UIProcess/WebFindClient.cpp
@@ -29,12 +29,21 @@
namespace WebKit {
-void WebFindClient::matchCountDidChange(WebPageProxy* page, const String& string, uint32_t matchCount)
+void WebFindClient::didFindString(WebPageProxy* page, const String& string, uint32_t matchCount)
{
- if (!m_client.matchCountDidChange)
+ if (!m_client.didFindString)
return;
- m_client.matchCountDidChange(toAPI(page), toAPI(string.impl()), matchCount, m_client.clientInfo);
+ m_client.didFindString(toAPI(page), toAPI(string.impl()), matchCount, m_client.clientInfo);
+
+}
+
+void WebFindClient::didFailToFindString(WebPageProxy* page, const String& string)
+{
+ if (!m_client.didFailToFindString)
+ return;
+
+ m_client.didFailToFindString(toAPI(page), toAPI(string.impl()), m_client.clientInfo);
}
void WebFindClient::didCountStringMatches(WebPageProxy* page, const String& string, uint32_t matchCount)
diff --git a/WebKit2/UIProcess/WebFindClient.h b/WebKit2/UIProcess/WebFindClient.h
index 3b7a561..c659c5d 100644
--- a/WebKit2/UIProcess/WebFindClient.h
+++ b/WebKit2/UIProcess/WebFindClient.h
@@ -36,7 +36,8 @@ class WebPageProxy;
class WebFindClient : public APIClient<WKPageFindClient> {
public:
- void matchCountDidChange(WebPageProxy*, const String&, uint32_t matchCount);
+ void didFindString(WebPageProxy*, const String&, uint32_t matchCount);
+ void didFailToFindString(WebPageProxy*, const String&);
void didCountStringMatches(WebPageProxy*, const String&, uint32_t matchCount);
};
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 4d259fd..5beeeea 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -988,9 +988,14 @@ void WebPageProxy::setFindIndicator(const FloatRect& selectionRect, const Vector
m_pageClient->setFindIndicator(findIndicator.release(), fadeOut);
}
-void WebPageProxy::matchCountDidChange(const String& string, uint32_t matchCount)
+void WebPageProxy::didFindString(const String& string, uint32_t matchCount)
{
- m_findClient.matchCountDidChange(this, string, matchCount);
+ m_findClient.didFindString(this, string, matchCount);
+}
+
+void WebPageProxy::didFailToFindString(const String& string)
+{
+ m_findClient.didFailToFindString(this, string);
}
void WebPageProxy::showPopupMenu(const IntRect& rect, const Vector<WebPopupItem>& items, int32_t selectedIndex)
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 69c7a72..db3a950 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -288,7 +288,8 @@ private:
// Find.
void didCountStringMatches(const String&, uint32_t matchCount);
void setFindIndicator(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle, bool fadeOut);
- void matchCountDidChange(const String&, uint32_t matchCount);
+ void didFindString(const String&, uint32_t matchCount);
+ void didFailToFindString(const String&);
// Popup Menu.
void showPopupMenu(const WebCore::IntRect& rect, const Vector<WebPopupItem>& items, int32_t selectedIndex);
diff --git a/WebKit2/UIProcess/WebPageProxy.messages.in b/WebKit2/UIProcess/WebPageProxy.messages.in
index b85342d..fcf1ff8 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -94,7 +94,8 @@ messages -> WebPageProxy {
# Find.
DidCountStringMatches(WTF::String string, uint32_t matchCount)
SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut)
- MatchCountDidChange(WTF::String string, uint32_t matchCount)
+ DidFindString(WTF::String string, uint32_t matchCount)
+ DidFailToFindString(WTF::String string)
# PopupMenu.
ShowPopupMenu(WebCore::IntRect rect, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex)
diff --git a/WebKit2/WebProcess/WebPage/FindController.cpp b/WebKit2/WebProcess/WebPage/FindController.cpp
index c1047fd..d9f12c7 100644
--- a/WebKit2/WebProcess/WebPage/FindController.cpp
+++ b/WebKit2/WebProcess/WebPage/FindController.cpp
@@ -84,7 +84,7 @@ void FindController::findString(const String& string, FindDirection findDirectio
hideFindIndicator();
- WebProcess::shared().connection()->send(Messages::WebPageProxy::MatchCountDidChange(string, 0), m_webPage->pageID());
+ WebProcess::shared().connection()->send(Messages::WebPageProxy::DidFailToFindString(string), m_webPage->pageID());
} else {
shouldShowOverlay = findOptions & FindOptionsShowOverlay;
@@ -95,7 +95,7 @@ void FindController::findString(const String& string, FindDirection findDirectio
if (matchCount > maxMatchCount)
shouldShowOverlay = false;
- WebProcess::shared().connection()->send(Messages::WebPageProxy::MatchCountDidChange(string, matchCount), m_webPage->pageID());
+ WebProcess::shared().connection()->send(Messages::WebPageProxy::DidFindString(string, matchCount), m_webPage->pageID());
}
if (!(findOptions & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list