[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:23:38 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8e1e8f873d24039cf42b686944d6a9c6393f63d5
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 7 18:19:32 2010 +0000
Start stubbing out the find API
https://bugs.webkit.org/show_bug.cgi?id=47366
<rdar://problem/8524998>
Reviewed by John Sullivan.
* Shared/FindOptions.h: Added.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toFindDirection):
(WebKit::toFindOptions):
* UIProcess/API/C/WKPage.cpp:
(WKPageFindString):
(WKPageHideFindUI):
(WKPageCountStringMatches):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findString):
(WebKit::WebPageProxy::hideFindUI):
(WebKit::WebPageProxy::countStringMatches):
* UIProcess/WebPageProxy.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bdc1de7..fc1b2d7 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,26 @@
+2010-10-07 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by John Sullivan.
+
+ Start stubbing out the find API
+ https://bugs.webkit.org/show_bug.cgi?id=47366
+ <rdar://problem/8524998>
+
+ * Shared/FindOptions.h: Added.
+ * UIProcess/API/C/WKAPICast.h:
+ (WebKit::toFindDirection):
+ (WebKit::toFindOptions):
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageFindString):
+ (WKPageHideFindUI):
+ (WKPageCountStringMatches):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::findString):
+ (WebKit::WebPageProxy::hideFindUI):
+ (WebKit::WebPageProxy::countStringMatches):
+ * UIProcess/WebPageProxy.h:
+
2010-10-07 Jocelyn Turcotte <jocelyn.turcotte at nokia.com>, Andras Becsi <abecsi at webkit.org>, Balazs Kelemen <kbalazs at webkit.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit2/Shared/FindOptions.h b/WebKit2/Shared/FindOptions.h
new file mode 100644
index 0000000..efe671e
--- /dev/null
+++ b/WebKit2/Shared/FindOptions.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FindOptions_h
+#define FindOptions_h
+
+namespace WebKit {
+
+enum FindDirection {
+ FindDirectionForward,
+ FindDirectionBackward
+};
+
+enum FindOptions {
+ FindOptionsCaseInsensitive = 1 << 0,
+ FindOptionsWrapAround = 1 << 1,
+ FindOptionsShowOverlay = 1 << 2,
+ FindOptionsShowFindIndicator = 1 << 3,
+};
+
+} // namespace WebKit
+
+#endif // FindOptions_h
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index ddda4fd..92a803d 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -27,6 +27,7 @@
#define WKAPICast_h
#include "CacheModel.h"
+#include "FindOptions.h"
#include "WKContext.h"
#include "WKPage.h"
#include "WKSharedAPICast.h"
@@ -115,6 +116,33 @@ inline WKCacheModel toAPI(CacheModel cacheModel)
return kWKCacheModelDocumentViewer;
}
+inline FindDirection toFindDirection(WKFindDirection wkFindDirection)
+{
+ switch (wkFindDirection) {
+ case kWKFindDirectionForward:
+ return FindDirectionForward;
+ case kWKFindDirectionBackward:
+ return FindDirectionBackward;
+ }
+
+ ASSERT_NOT_REACHED();
+ return FindDirectionForward;
+}
+
+inline FindOptions toFindOptions(WKFindOptions wkFindOptions)
+{
+ unsigned findOptions = 0;
+
+ if (wkFindOptions & kWKFindOptionsCaseInsensitive)
+ findOptions |= FindOptionsCaseInsensitive;
+ if (wkFindOptions & kWKFindOptionsWrapAround)
+ findOptions |= FindOptionsWrapAround;
+ if (wkFindOptions & kWKFindOptionsShowOverlay)
+ findOptions |= FindOptionsShowOverlay;
+
+ return static_cast<FindOptions>(findOptions);
+}
+
} // namespace WebKit
#if defined(WIN32) || defined(_WIN32)
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index 27d74e6..7abf1e3 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -188,6 +188,21 @@ void WKPageSetPageAndTextZoomFactors(WKPageRef pageRef, double pageZoomFactor, d
toImpl(pageRef)->setPageAndTextZoomFactors(pageZoomFactor, textZoomFactor);
}
+void WKPageFindString(WKPageRef pageRef, WKStringRef string, WKFindDirection findDirection, WKFindOptions findOptions, unsigned maxNumMatches)
+{
+ toImpl(pageRef)->findString(toImpl(string)->string(), toFindDirection(findDirection), toFindOptions(findOptions), maxNumMatches);
+}
+
+void WKPageHideFindUI(WKPageRef pageRef)
+{
+ toImpl(pageRef)->hideFindUI();
+}
+
+void WKPageCountStringMatches(WKPageRef pageRef, WKStringRef string, bool caseInsensitive, unsigned maxNumMatches)
+{
+ toImpl(pageRef)->countStringMatches(toImpl(string)->string(), caseInsensitive, maxNumMatches);
+}
+
void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClient* wkClient)
{
if (wkClient && wkClient->version)
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 94d8a8b..ae3f3e0 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -197,6 +197,25 @@ WK_EXPORT double WKPageGetPageZoomFactor(WKPageRef page);
WK_EXPORT void WKPageSetPageZoomFactor(WKPageRef page, double zoomFactor);
WK_EXPORT void WKPageSetPageAndTextZoomFactors(WKPageRef page, double pageZoomFactor, double textZoomFactor);
+// Find.
+enum {
+ kWKFindDirectionForward,
+ kWKFindDirectionBackward
+};
+typedef uint32_t WKFindDirection;
+
+enum {
+ kWKFindOptionsCaseInsensitive = 1 << 0,
+ kWKFindOptionsWrapAround = 1 << 1,
+ kWKFindOptionsShowOverlay = 1 << 2,
+ kWKFindOptionsShowFindIndicator = 1 << 3
+};
+typedef uint32_t WKFindOptions;
+
+WK_EXPORT void WKPageFindString(WKPageRef page, WKStringRef string, WKFindDirection findDirection, WKFindOptions findOptions, unsigned maxNumMatches);
+WK_EXPORT void WKPageHideFindUI(WKPageRef page);
+WK_EXPORT void WKPageCountStringMatches(WKPageRef page, WKStringRef string, bool caseInsensitive, unsigned maxNumMatches);
+
WK_EXPORT void WKPageSetPageLoaderClient(WKPageRef page, const WKPageLoaderClient* client);
WK_EXPORT void WKPageSetPagePolicyClient(WKPageRef page, const WKPagePolicyClient* client);
WK_EXPORT void WKPageSetPageFormClient(WKPageRef page, const WKPageFormClient* client);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index b2521e7..cdaece3 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -494,6 +494,21 @@ void WebPageProxy::setPageAndTextZoomFactors(double pageZoomFactor, double textZ
process()->send(Messages::WebPage::SetPageAndTextZoomFactors(m_pageZoomFactor, m_textZoomFactor), m_pageID);
}
+void WebPageProxy::findString(const String&, WKFindDirection, WKFindOptions, unsigned maxNumMatches)
+{
+ // FIXME: Implement.
+}
+
+void WebPageProxy::hideFindUI()
+{
+ // FIXME: Implement.
+}
+
+void WebPageProxy::countStringMatches(const String& string, bool caseInsensitive, unsigned maxNumMatches)
+{
+ // FIXME: Implement.
+}
+
void WebPageProxy::runJavaScriptInMainFrame(const String& script, PassRefPtr<ScriptReturnValueCallback> prpCallback)
{
RefPtr<ScriptReturnValueCallback> callback = prpCallback;
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 79203c9..73fe1a9 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -28,6 +28,7 @@
#include "APIObject.h"
#include "DrawingAreaProxy.h"
+#include "FindOptions.h"
#include "GenericCallback.h"
#include "WKBase.h"
#include "WebEvent.h"
@@ -169,6 +170,11 @@ public:
void setPageZoomFactor(double);
void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
+ // Find.
+ void findString(const String&, WKFindDirection, WKFindOptions, unsigned maxNumMatches);
+ void hideFindUI();
+ void countStringMatches(const String&, bool caseInsensitive, unsigned maxNumMatches);
+
void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptReturnValueCallback>);
void getRenderTreeExternalRepresentation(PassRefPtr<RenderTreeExternalRepresentationCallback>);
void getSourceForFrame(WebFrameProxy*, PassRefPtr<FrameSourceCallback>);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list