<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166658] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166658">166658</a></dd>
<dt>Author</dt> <dd>alice.liu@apple.com</dd>
<dt>Date</dt> <dd>2014-04-02 12:51:43 -0700 (Wed, 02 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adding Objective-C SPI for Find in Page.
https://bugs.webkit.org/show_bug.cgi?id=131000 Need an Objective-C API or SPI for Find in Page

Patch by Alice Barraclough &lt;alice.liu@apple.com&gt; on 2014-04-02
Reviewed by Dan Bernstein.

Find-on-page SPI added to WKWebView, which funnels the messages through the WebPageProxy.
Returning messages are designated by _WKFindDelegate protocol.
Also provide FindDelegate access on WKWebView.
WebPageProxy gets a new-style API::FindClient.
Also had to replicate WKFindOptions as _WKFindOptions in Cocoa SPI. This is unfortunate, but it 
does follow the pattern of other options &amp; enums related to classes that are SPI-for-now.
        
PageClientImplIOS handles setFindIndicator function by forwarding to its WKContentView, 
but WKContentView _setFindIndicator remains unimplemented for now.
        
* UIProcess/API/APIFindClient.h: Added.
(API::FindClient::~FindClient):
(API::FindClient::didCountStringMatches):
(API::FindClient::didFindString):
(API::FindClient::didFailToFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _findDelegate]):
(-[WKWebView _setFindDelegate:]):
(toFindOptions):
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
(-[WKWebView _hostForFindUI]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
* UIProcess/API/Cocoa/_WKFindDelegate.h: Added.
* UIProcess/Cocoa/FindClient.h: Added.
* UIProcess/Cocoa/FindClient.mm: Added.
(WebKit::FindClient::FindClient):
(WebKit::FindClient::delegate):
(WebKit::FindClient::setDelegate):
(WebKit::FindClient::didCountStringMatches):
(WebKit::FindClient::didFindString):
(WebKit::FindClient::didFailToFindString):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setFindClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didCountStringMatches):
(WebKit::WebPageProxy::didFindString):
(WebKit::WebPageProxy::didFailToFindString):
(WebKit::WebPageProxy::initializeFindClient): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::findClient):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]):
* WebKit2.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewh">trunk/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIFindClienth">trunk/Source/WebKit2/UIProcess/API/APIFindClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKFindDelegateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFindDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaFindClienth">trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaFindClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2014-04-02  Alice Barraclough  &lt;alice.liu@apple.com&gt;
+
+        Adding Objective-C SPI for Find in Page.
+        https://bugs.webkit.org/show_bug.cgi?id=131000 Need an Objective-C API or SPI for Find in Page
+
+        Reviewed by Dan Bernstein.
+
+        Find-on-page SPI added to WKWebView, which funnels the messages through the WebPageProxy.
+        Returning messages are designated by _WKFindDelegate protocol.
+        Also provide FindDelegate access on WKWebView.
+        WebPageProxy gets a new-style API::FindClient.
+        Also had to replicate WKFindOptions as _WKFindOptions in Cocoa SPI. This is unfortunate, but it 
+        does follow the pattern of other options &amp; enums related to classes that are SPI-for-now.
+        
+        PageClientImplIOS handles setFindIndicator function by forwarding to its WKContentView, 
+        but WKContentView _setFindIndicator remains unimplemented for now.
+        
+        * UIProcess/API/APIFindClient.h: Added.
+        (API::FindClient::~FindClient):
+        (API::FindClient::didCountStringMatches):
+        (API::FindClient::didFindString):
+        (API::FindClient::didFailToFindString):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageFindClient):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]):
+        (-[WKWebView _findDelegate]):
+        (-[WKWebView _setFindDelegate:]):
+        (toFindOptions):
+        (-[WKWebView _countStringMatches:options:maxCount:]):
+        (-[WKWebView _findString:options:maxCount:]):
+        (-[WKWebView _hideFindUI]):
+        (-[WKWebView _hostForFindUI]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        (NS_OPTIONS):
+        * UIProcess/API/Cocoa/_WKFindDelegate.h: Added.
+        * UIProcess/Cocoa/FindClient.h: Added.
+        * UIProcess/Cocoa/FindClient.mm: Added.
+        (WebKit::FindClient::FindClient):
+        (WebKit::FindClient::delegate):
+        (WebKit::FindClient::setDelegate):
+        (WebKit::FindClient::didCountStringMatches):
+        (WebKit::FindClient::didFindString):
+        (WebKit::FindClient::didFailToFindString):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::setFindClient):
+        (WebKit::WebPageProxy::close):
+        (WebKit::WebPageProxy::didCountStringMatches):
+        (WebKit::WebPageProxy::didFindString):
+        (WebKit::WebPageProxy::didFailToFindString):
+        (WebKit::WebPageProxy::initializeFindClient): Deleted.
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::findClient):
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::setFindIndicator):
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]):
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2014-04-02  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename -[WKBackForwardListItem originalURL] to -[WKBackForwardListItem initialURL]
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIFindClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/APIFindClient.h (0 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIFindClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIFindClient.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 APIFindClient_h
+#define APIFindClient_h
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+class WebPageProxy;
+}
+
+namespace API {
+
+class FindClient {
+public:
+    virtual ~FindClient() { }
+
+    virtual void didCountStringMatches(WebKit::WebPageProxy*, const WTF::String&amp;, uint32_t matchCount) { }
+    virtual void didFindString(WebKit::WebPageProxy*, const WTF::String&amp;, uint32_t matchCount) { }
+    virtual void didFailToFindString(WebKit::WebPageProxy*, const WTF::String&amp;) { }
+};
+
+} // namespace API
+
+#endif // APIFindClient_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIArray.h&quot;
</span><span class="cx"> #include &quot;APIData.h&quot;
</span><ins>+#include &quot;APIFindClient.h&quot;
</ins><span class="cx"> #include &quot;APILoaderClient.h&quot;
</span><span class="cx"> #include &quot;APIPolicyClient.h&quot;
</span><span class="cx"> #include &quot;APIUIClient.h&quot;
</span><span class="lines">@@ -676,7 +677,40 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageFindClient(WKPageRef pageRef, const WKPageFindClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    toImpl(pageRef)-&gt;initializeFindClient(wkClient);
</del><ins>+    class FindClient : public API::Client&lt;WKPageFindClientBase&gt;, public API::FindClient {
+    public:
+        explicit FindClient(const WKPageFindClientBase* client)
+        {
+            initialize(client);
+        }
+
+    private:
+        virtual void didFindString(WebPageProxy* page, const String&amp; string, uint32_t matchCount) override
+        {
+            if (!m_client.didFindString)
+                return;
+            
+            m_client.didFindString(toAPI(page), toAPI(string.impl()), matchCount, m_client.base.clientInfo);
+        }
+
+        virtual void didFailToFindString(WebPageProxy* page, const String&amp; string) override
+        {
+            if (!m_client.didFailToFindString)
+                return;
+            
+            m_client.didFailToFindString(toAPI(page), toAPI(string.impl()), m_client.base.clientInfo);
+        }
+
+        virtual void didCountStringMatches(WebPageProxy* page, const String&amp; string, uint32_t matchCount) override
+        {
+            if (m_client.didCountStringMatches)
+                return;
+            
+            m_client.didCountStringMatches(toAPI(page), toAPI(string.impl()), matchCount, m_client.base.clientInfo);
+        }
+    };
+
+    toImpl(pageRef)-&gt;setFindClient(std::make_unique&lt;FindClient&gt;(wkClient));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageFindMatchesClient(WKPageRef pageRef, const WKPageFindMatchesClientBase* wkClient)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;FindClient.h&quot;
</ins><span class="cx"> #import &quot;NavigationState.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeTransaction.h&quot;
</span><span class="cx"> #import &quot;RemoteObjectRegistry.h&quot;
</span><span class="lines">@@ -53,6 +54,7 @@
</span><span class="cx"> #import &quot;WebPageGroup.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><ins>+#import &quot;_WKFindDelegate.h&quot;
</ins><span class="cx"> #import &quot;_WKRemoteObjectRegistryInternal.h&quot;
</span><span class="cx"> #import &quot;_WKUserContentController.h&quot;
</span><span class="cx"> #import &quot;_WKVisitedLinkProviderInternal.h&quot;
</span><span class="lines">@@ -197,9 +199,8 @@
</span><span class="cx">     _navigationState = std::make_unique&lt;WebKit::NavigationState&gt;(self);
</span><span class="cx">     _page-&gt;setPolicyClient(_navigationState-&gt;createPolicyClient());
</span><span class="cx">     _page-&gt;setLoaderClient(_navigationState-&gt;createLoaderClient());
</span><del>-
</del><span class="cx">     _page-&gt;setUIClient(std::make_unique&lt;WebKit::UIClient&gt;(self));
</span><del>-
</del><ins>+    _page-&gt;setFindClient(std::make_unique&lt;WebKit::FindClient&gt;(self));
</ins><span class="cx">     return self;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1082,6 +1083,55 @@
</span><span class="cx">     _page-&gt;setPageZoomFactor(zoomFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (id &lt;_WKFindDelegate&gt;)_findDelegate
+{
+    return [static_cast&lt;WebKit::FindClient&amp;&gt;(_page-&gt;findClient()).delegate().leakRef() autorelease];
+}
+
+- (void)_setFindDelegate:(id&lt;_WKFindDelegate&gt;)findDelegate
+{
+    static_cast&lt;WebKit::FindClient&amp;&gt;(_page-&gt;findClient()).setDelegate(findDelegate);
+}
+
+static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
+{
+    unsigned findOptions = 0;
+
+    if (wkFindOptions &amp; _WKFindOptionsCaseInsensitive)
+        findOptions |= WebKit::FindOptionsCaseInsensitive;
+    if (wkFindOptions &amp; _WKFindOptionsAtWordStarts)
+        findOptions |= WebKit::FindOptionsAtWordStarts;
+    if (wkFindOptions &amp; _WKFindOptionsTreatMedialCapitalAsWordStart)
+        findOptions |= WebKit::FindOptionsTreatMedialCapitalAsWordStart;
+    if (wkFindOptions &amp; _WKFindOptionsBackwards)
+        findOptions |= WebKit::FindOptionsBackwards;
+    if (wkFindOptions &amp; _WKFindOptionsWrapAround)
+        findOptions |= WebKit::FindOptionsWrapAround;
+    if (wkFindOptions &amp; _WKFindOptionsShowOverlay)
+        findOptions |= WebKit::FindOptionsShowOverlay;
+    if (wkFindOptions &amp; _WKFindOptionsShowFindIndicator)
+        findOptions |= WebKit::FindOptionsShowFindIndicator;
+    if (wkFindOptions &amp; _WKFindOptionsShowHighlight)
+        findOptions |= WebKit::FindOptionsShowHighlight;
+
+    return static_cast&lt;WebKit::FindOptions&gt;(findOptions);
+}
+
+- (void)_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount
+{
+    _page-&gt;countStringMatches(string, toFindOptions(options), maxCount);
+}
+
+- (void)_findString:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount
+{
+    _page-&gt;findString(string, toFindOptions(options), maxCount);
+}
+
+- (void)_hideFindUI
+{
+    _page-&gt;hideFindUI();
+}
+
</ins><span class="cx"> #pragma mark iOS-specific methods
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -1176,6 +1226,11 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (UIView *)_viewForFindUI
+{
+    return [self viewForZoomingInScrollView:[self scrollView]];
+}
+
</ins><span class="cx"> - (BOOL)_isDisplayingPDF
</span><span class="cx"> {
</span><span class="cx">     return [_customContentView isKindOfClass:[WKPDFView class]];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -40,10 +40,22 @@
</span><span class="cx">     _WKPaginationModeBottomToTop,
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+typedef NS_OPTIONS(NSUInteger, _WKFindOptions) {
+    _WKFindOptionsCaseInsensitive = 1 &lt;&lt; 0,
+    _WKFindOptionsAtWordStarts = 1 &lt;&lt; 1,
+    _WKFindOptionsTreatMedialCapitalAsWordStart = 1 &lt;&lt; 2,
+    _WKFindOptionsBackwards = 1 &lt;&lt; 3,
+    _WKFindOptionsWrapAround = 1 &lt;&lt; 4,
+    _WKFindOptionsShowOverlay = 1 &lt;&lt; 5,
+    _WKFindOptionsShowFindIndicator = 1 &lt;&lt; 6,
+    _WKFindOptionsShowHighlight = 1 &lt;&lt; 7,
+};
+
</ins><span class="cx"> @class WKBrowsingContextHandle;
</span><span class="cx"> @class _WKRemoteObjectRegistry;
</span><span class="cx"> 
</span><span class="cx"> @protocol WKHistoryDelegatePrivate;
</span><ins>+@protocol _WKFindDelegate;
</ins><span class="cx"> @protocol _WKScriptMessageHandler;
</span><span class="cx"> 
</span><span class="cx"> @interface WKWebView (WKPrivate)
</span><span class="lines">@@ -97,6 +109,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler;
</span><span class="cx"> 
</span><ins>+- (UIView *)_viewForFindUI;
+
</ins><span class="cx"> // FIXME: Remove this once nobody uses it.
</span><span class="cx"> @property (nonatomic, readonly) NSURL *activeURL;
</span><span class="cx"> 
</span><span class="lines">@@ -121,6 +135,11 @@
</span><span class="cx"> @property (nonatomic, setter=_setTextZoomFactor:) double _textZoomFactor;
</span><span class="cx"> @property (nonatomic, setter=_setPageZoomFactor:) double _pageZoomFactor;
</span><span class="cx"> 
</span><ins>+@property (nonatomic, weak, setter=_setFindDelegate:) id &lt;_WKFindDelegate&gt; _findDelegate;
+- (void)_findString:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
+- (void)_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
+- (void)_hideFindUI;
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKFindDelegateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFindDelegate.h (0 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFindDelegate.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFindDelegate.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import &lt;WebKit2/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &lt;Foundation/Foundation.h&gt;
+
+@protocol _WKFindDelegate &lt;NSObject&gt;
+
+@optional
+
+- (void)_webView:(WKWebView *)webView didCountMatches:(NSUInteger)matches forString:(NSString *)string;
+- (void)_webView:(WKWebView *)webView didFindMatches:(NSUInteger)matches forString:(NSString *)string;
+- (void)_webView:(WKWebView *)webView didFailToFindString:(NSString *)string;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaFindClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.h (0 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 FindClient_h
+#define FindClient_h
+
+#import &quot;WKFoundation.h&quot;
+
+#if WK_API_ENABLED
+
+#import &quot;APIFindClient.h&quot;
+#import &quot;WeakObjCPtr.h&quot;
+
+@class WKWebView;
+@protocol _WKFindDelegate;
+
+namespace WebKit {
+
+class FindClient final : public API::FindClient {
+public:
+    explicit FindClient(WKWebView *);
+    
+    RetainPtr&lt;id &lt;_WKFindDelegate&gt;&gt; delegate();
+    void setDelegate(id &lt;_WKFindDelegate&gt;);
+    
+private:
+    // From API::FindClient
+    virtual void didCountStringMatches(WebPageProxy*, const String&amp;, uint32_t matchCount);
+    virtual void didFindString(WebPageProxy*, const String&amp;, uint32_t matchCount);
+    virtual void didFailToFindString(WebPageProxy*, const String&amp;);
+    
+    WKWebView *m_webView;
+    WeakObjCPtr&lt;id &lt;_WKFindDelegate&gt;&gt; m_delegate;
+    
+    struct {
+        bool webviewDidCountStringMatches : 1;
+        bool webviewDidFindString : 1;
+        bool webviewDidFailToFindString : 1;
+    } m_delegateMethods;
+};
+    
+} // namespace WebKit
+
+#endif // WK_API_ENABLED
+
+#endif // FindClient_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaFindClientmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.mm (0 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/FindClient.mm        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;FindClient.h&quot;
+
+#if WK_API_ENABLED
+
+#import &quot;_WKFindDelegate.h&quot;
+
+namespace WebKit {
+
+FindClient::FindClient(WKWebView *webView)
+    : m_webView(webView)
+{
+}
+    
+RetainPtr&lt;id &lt;_WKFindDelegate&gt;&gt; FindClient::delegate()
+{
+    return m_delegate.get();
+}
+
+void FindClient::setDelegate(id &lt;_WKFindDelegate&gt; delegate)
+{
+    m_delegate = delegate;
+
+    m_delegateMethods.webviewDidCountStringMatches = [delegate respondsToSelector:@selector(_webView:didCountMatches:forString:)];
+    m_delegateMethods.webviewDidFindString = [delegate respondsToSelector:@selector(_webView:didFindMatches:forString:)];
+    m_delegateMethods.webviewDidFailToFindString = [delegate respondsToSelector:@selector(_webView:didFailToFindString:)];
+}
+    
+void FindClient::didCountStringMatches(WebPageProxy*, const String&amp; string, uint32_t matchCount)
+{
+    if (m_delegateMethods.webviewDidCountStringMatches)
+        [m_delegate.get() _webView:m_webView didCountMatches:matchCount forString:string];
+}
+
+void FindClient::didFindString(WebPageProxy*, const String&amp; string, uint32_t matchCount)
+{
+    if (m_delegateMethods.webviewDidFindString)
+        [m_delegate.get() _webView:m_webView didFindMatches:matchCount forString:string];
+}
+
+void FindClient::didFailToFindString(WebPageProxy*, const String&amp; string)
+{
+    if (m_delegateMethods.webviewDidFailToFindString)
+        [m_delegate.get() _webView:m_webView didFailToFindString:string];
+}
+
+} // namespace WebKit
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIArray.h&quot;
</span><ins>+#include &quot;APIFindClient.h&quot;
</ins><span class="cx"> #include &quot;APILoaderClient.h&quot;
</span><span class="cx"> #include &quot;APIPolicyClient.h&quot;
</span><span class="cx"> #include &quot;APIUIClient.h&quot;
</span><span class="lines">@@ -257,6 +258,7 @@
</span><span class="cx">     , m_loaderClient(std::make_unique&lt;API::LoaderClient&gt;())
</span><span class="cx">     , m_policyClient(std::make_unique&lt;API::PolicyClient&gt;())
</span><span class="cx">     , m_uiClient(std::make_unique&lt;API::UIClient&gt;())
</span><ins>+    , m_findClient(std::make_unique&lt;API::FindClient&gt;())
</ins><span class="cx">     , m_process(process)
</span><span class="cx">     , m_pageGroup(*configuration.pageGroup)
</span><span class="cx">     , m_preferences(*configuration.preferences)
</span><span class="lines">@@ -473,9 +475,14 @@
</span><span class="cx">     setCanRunModal(m_uiClient-&gt;canRunModal());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::initializeFindClient(const WKPageFindClientBase* client)
</del><ins>+void WebPageProxy::setFindClient(std::unique_ptr&lt;API::FindClient&gt; findClient)
</ins><span class="cx"> {
</span><del>-    m_findClient.initialize(client);
</del><ins>+    if (!findClient) {
+        m_findClient = std::make_unique&lt;API::FindClient&gt;();
+        return;
+    }
+    
+    m_findClient = std::move(findClient);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::initializeFindMatchesClient(const WKPageFindMatchesClientBase* client)
</span><span class="lines">@@ -606,7 +613,7 @@
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     m_uiPopupMenuClient.initialize(0);
</span><span class="cx"> #endif
</span><del>-    m_findClient.initialize(0);
</del><ins>+    m_findClient = std::make_unique&lt;API::FindClient&gt;();
</ins><span class="cx">     m_findMatchesClient.initialize(0);
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     m_contextMenuClient.initialize(0);
</span><span class="lines">@@ -3191,7 +3198,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didCountStringMatches(const String&amp; string, uint32_t matchCount)
</span><span class="cx"> {
</span><del>-    m_findClient.didCountStringMatches(this, string, matchCount);
</del><ins>+    m_findClient-&gt;didCountStringMatches(this, string, matchCount);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didGetImageForFindMatch(const ShareableBitmap::Handle&amp; contentImageHandle, uint32_t matchIndex)
</span><span class="lines">@@ -3207,7 +3214,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didFindString(const String&amp; string, uint32_t matchCount)
</span><span class="cx"> {
</span><del>-    m_findClient.didFindString(this, string, matchCount);
</del><ins>+    m_findClient-&gt;didFindString(this, string, matchCount);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didFindStringMatches(const String&amp; string, Vector&lt;Vector&lt;WebCore::IntRect&gt;&gt; matchRects, int32_t firstIndexAfterSelection)
</span><span class="lines">@@ -3230,7 +3237,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didFailToFindString(const String&amp; string)
</span><span class="cx"> {
</span><del>-    m_findClient.didFailToFindString(this, string);
</del><ins>+    m_findClient-&gt;didFailToFindString(this, string);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::sendMessage(std::unique_ptr&lt;IPC::MessageEncoder&gt; encoder, unsigned messageSendFlags)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace API {
</span><ins>+class FindClient;
</ins><span class="cx"> class LoaderClient;
</span><span class="cx"> class PolicyClient;
</span><span class="cx"> class UIClient;
</span><span class="lines">@@ -476,7 +477,8 @@
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     void initializeContextMenuClient(const WKPageContextMenuClientBase*);
</span><span class="cx"> #endif
</span><del>-    void initializeFindClient(const WKPageFindClientBase*);
</del><ins>+    API::FindClient&amp; findClient() { return *m_findClient; }
+    void setFindClient(std::unique_ptr&lt;API::FindClient&gt;);
</ins><span class="cx">     void initializeFindMatchesClient(const WKPageFindMatchesClientBase*);
</span><span class="cx">     void initializeFormClient(const WKPageFormClientBase*);
</span><span class="cx">     void setLoaderClient(std::unique_ptr&lt;API::LoaderClient&gt;);
</span><span class="lines">@@ -1373,7 +1375,7 @@
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     WebUIPopupMenuClient m_uiPopupMenuClient;
</span><span class="cx"> #endif
</span><del>-    WebFindClient m_findClient;
</del><ins>+    std::unique_ptr&lt;API::FindClient&gt; m_findClient;
</ins><span class="cx">     WebFindMatchesClient m_findMatchesClient;
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     WebPageContextMenuClient m_contextMenuClient;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #import &quot;_WKDownloadInternal.h&quot;
</span><span class="cx"> #import &quot;DataReference.h&quot;
</span><span class="cx"> #import &quot;DownloadProxy.h&quot;
</span><ins>+#import &quot;FindIndicator.h&quot;
</ins><span class="cx"> #import &quot;NativeWebKeyboardEvent.h&quot;
</span><span class="cx"> #import &quot;InteractionInformationAtPosition.h&quot;
</span><span class="cx"> #import &quot;WKContentView.h&quot;
</span><span class="lines">@@ -303,9 +304,9 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::setFindIndicator(PassRefPtr&lt;FindIndicator&gt;, bool, bool)
</del><ins>+void PageClientImpl::setFindIndicator(PassRefPtr&lt;FindIndicator&gt; findIndicator, bool fadeOut, bool animate)
</ins><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    [m_contentView _setFindIndicator:findIndicator fadeOut:fadeOut animate:animate];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> class DrawingAreaProxy;
</span><ins>+class FindIndicator;
</ins><span class="cx"> class GeolocationPermissionRequestProxy;
</span><span class="cx"> class RemoteLayerTreeTransaction;
</span><span class="cx"> class WebContext;
</span><span class="lines">@@ -84,4 +85,6 @@
</span><span class="cx"> - (BOOL)_zoomToRect:(CGRect)targetRect withOrigin:(CGPoint)origin fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale minimumScrollDistance:(CGFloat)minimumScrollDistance;
</span><span class="cx"> - (void)_zoomOutWithOrigin:(CGPoint)origin;
</span><span class="cx"> 
</span><ins>+- (void)_setFindIndicator:(PassRefPtr&lt;WebKit::FindIndicator&gt;)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
+
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #import &quot;WebSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebKitSystemInterfaceIOS.h&quot;
</span><span class="cx"> #import &lt;WebCore/FrameView.h&gt;
</span><ins>+#import &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> #import &lt;UIKit/UIWindow_Private.h&gt;
</span><span class="cx"> #import &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="lines">@@ -484,6 +485,11 @@
</span><span class="cx">     _page-&gt;applicationDidBecomeActive();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_setFindIndicator:(PassRefPtr&lt;WebKit::FindIndicator&gt;)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
+{
+    notImplemented();
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (166657 => 166658)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-04-02 19:34:17 UTC (rev 166657)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-04-02 19:51:43 UTC (rev 166658)
</span><span class="lines">@@ -47,6 +47,10 @@
</span><span class="cx"> /* End PBXAggregateTarget section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXBuildFile section */
</span><ins>+                005D158F18E4C4EB00734619 /* _WKFindDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 005D158E18E4C4EB00734619 /* _WKFindDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                00B9661618E24CBA00CE1F88 /* APIFindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B9661518E24CBA00CE1F88 /* APIFindClient.h */; };
+                00B9661918E25AE100CE1F88 /* FindClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 00B9661718E25AE100CE1F88 /* FindClient.mm */; };
+                00B9661A18E25AE100CE1F88 /* FindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B9661818E25AE100CE1F88 /* FindClient.h */; };
</ins><span class="cx">                 0F0C365818C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F0C365718C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm */; };
</span><span class="cx">                 0F0C365A18C0555800F607D7 /* LayerRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0C365918C0555800F607D7 /* LayerRepresentation.h */; };
</span><span class="cx">                 0F0C365C18C05CA100F607D7 /* RemoteScrollingCoordinatorProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F0C365B18C05CA100F607D7 /* RemoteScrollingCoordinatorProxyIOS.mm */; };
</span><span class="lines">@@ -1788,6 +1792,10 @@
</span><span class="cx"> /* End PBXCopyFilesBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXFileReference section */
</span><ins>+                005D158E18E4C4EB00734619 /* _WKFindDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKFindDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                00B9661518E24CBA00CE1F88 /* APIFindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIFindClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                00B9661718E25AE100CE1F88 /* FindClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindClient.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                00B9661818E25AE100CE1F88 /* FindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
</span><span class="cx">                 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F0C365718C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteLayerTreeHostIOS.mm; path = ios/RemoteLayerTreeHostIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4246,6 +4254,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 A1DF631118E0B7C8003A3E2A /* DownloadClient.h */,
</span><span class="cx">                                 A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */,
</span><ins>+                                00B9661818E25AE100CE1F88 /* FindClient.h */,
+                                00B9661718E25AE100CE1F88 /* FindClient.mm */,
</ins><span class="cx">                                 1A422F8D18B29C6400D8CD96 /* HistoryClient.h */,
</span><span class="cx">                                 1A422F8C18B29C6400D8CD96 /* HistoryClient.mm */,
</span><span class="cx">                                 0F0C365918C0555800F607D7 /* LayerRepresentation.h */,
</span><span class="lines">@@ -4630,6 +4640,7 @@
</span><span class="cx">                                 A1A4FE5718DCE9FA00B5EA8A /* _WKDownload.h */,
</span><span class="cx">                                 A1A4FE5818DCE9FA00B5EA8A /* _WKDownload.mm */,
</span><span class="cx">                                 A1A4FE6018DD54A400B5EA8A /* _WKDownloadDelegate.h */,
</span><ins>+                                005D158E18E4C4EB00734619 /* _WKFindDelegate.h */,
</ins><span class="cx">                                 A1A4FE5918DCE9FA00B5EA8A /* _WKDownloadInternal.h */,
</span><span class="cx">                                 379A873818BBFE0F00588AF2 /* _WKElementAction.h */,
</span><span class="cx">                                 379A873718BBFE0F00588AF2 /* _WKElementAction.mm */,
</span><span class="lines">@@ -5494,6 +5505,7 @@
</span><span class="cx">                                 2DA944771884E3AB00ED86DB /* ios */,
</span><span class="cx">                                 BC111B47112F616900337BAB /* mac */,
</span><span class="cx">                                 1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
</span><ins>+                                00B9661518E24CBA00CE1F88 /* APIFindClient.h */,
</ins><span class="cx">                                 1A6637D618B2831F00C0BCF3 /* APIHistoryClient.h */,
</span><span class="cx">                                 1A2464F21891E45100234C5B /* APILoaderClient.h */,
</span><span class="cx">                                 1AFDD3141891B54000153970 /* APIPolicyClient.h */,
</span><span class="lines">@@ -6912,6 +6924,7 @@
</span><span class="cx">                                 1A422F8B18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h in Headers */,
</span><span class="cx">                                 370F34A71829CFF3009027C8 /* WKBrowsingContextHistoryDelegate.h in Headers */,
</span><span class="cx">                                 1AF05D8714688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.h in Headers */,
</span><ins>+                                00B9661A18E25AE100CE1F88 /* FindClient.h in Headers */,
</ins><span class="cx">                                 1A64245E12DE29A100CAAE2C /* UpdateInfo.h in Headers */,
</span><span class="cx">                                 BCB0B0E012305AB100B1341E /* UserMessageCoders.h in Headers */,
</span><span class="cx">                                 1A0F29E4120B44420053D1B9 /* VisitedLinkProvider.h in Headers */,
</span><span class="lines">@@ -6955,6 +6968,7 @@
</span><span class="cx">                                 BC032D7710F4378D0058C15A /* WebContextMenuClient.h in Headers */,
</span><span class="cx">                                 75E749EC180DBB9800088BA6 /* WebOriginDataManagerProxyMessages.h in Headers */,
</span><span class="cx">                                 512935D81288D19400A4B695 /* WebContextMenuItem.h in Headers */,
</span><ins>+                                00B9661618E24CBA00CE1F88 /* APIFindClient.h in Headers */,
</ins><span class="cx">                                 510FBB9B1288C95E00AFFDF4 /* WebContextMenuItemData.h in Headers */,
</span><span class="cx">                                 51ACBB82127A8BAD00D203B9 /* WebContextMenuProxy.h in Headers */,
</span><span class="cx">                                 1AB8A1F418400B8F00E9AE69 /* WKPageFindClient.h in Headers */,
</span><span class="lines">@@ -7253,6 +7267,7 @@
</span><span class="cx">                                 7CD5EBB91746A15B000C1C45 /* WKObjCTypeWrapperRef.h in Headers */,
</span><span class="cx">                                 378E1A40181EDA010031007A /* WKObject.h in Headers */,
</span><span class="cx">                                 BC857FE612B843D800EDEB2E /* WKOpenPanelParameters.h in Headers */,
</span><ins>+                                005D158F18E4C4EB00734619 /* _WKFindDelegate.h in Headers */,
</ins><span class="cx">                                 BC1DFE8F12B31CA8005DF730 /* WKOpenPanelResultListener.h in Headers */,
</span><span class="cx">                                 BCD597D7112B56DC00EC8C23 /* WKPage.h in Headers */,
</span><span class="cx">                                 2D6CD119189058A500E5A4A0 /* ViewSnapshotStore.h in Headers */,
</span><span class="lines">@@ -8192,6 +8207,7 @@
</span><span class="cx">                                 DF58C6361371ACA000F9A37C /* NativeWebWheelEventMac.mm in Sources */,
</span><span class="cx">                                 1A6FBA2B11E6862700DB1371 /* NetscapeBrowserFuncs.cpp in Sources */,
</span><span class="cx">                                 1A6FBD2911E69BC200DB1371 /* NetscapePlugin.cpp in Sources */,
</span><ins>+                                00B9661918E25AE100CE1F88 /* FindClient.mm in Sources */,
</ins><span class="cx">                                 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
</span><span class="cx">                                 1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
</span><span class="cx">                                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>