Title: [192500] trunk/Source/WebKit2
Revision
192500
Author
timothy_hor...@apple.com
Date
2015-11-16 17:21:06 -0800 (Mon, 16 Nov 2015)

Log Message

Multi-WKWebView find completes after the first view
https://bugs.webkit.org/show_bug.cgi?id=151325

Reviewed by Anders Carlsson.

* UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
Update progress before calling the completion handler; NSTextFinder assumes
that if the progress doesn't change, the search is complete.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (192499 => 192500)


--- trunk/Source/WebKit2/ChangeLog	2015-11-17 01:19:10 UTC (rev 192499)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-17 01:21:06 UTC (rev 192500)
@@ -1,3 +1,15 @@
+2015-11-16  Tim Horton  <timothy_hor...@apple.com>
+
+        Multi-WKWebView find completes after the first view
+        https://bugs.webkit.org/show_bug.cgi?id=151325
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/mac/WKTextFinderClient.mm:
+        (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
+        Update progress before calling the completion handler; NSTextFinder assumes
+        that if the progress doesn't change, the search is complete.
+
 2015-11-16  Ryuan Choi  <ryuan.c...@navercorp.com>
 
         WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from

Modified: trunk/Source/WebKit2/UIProcess/mac/WKTextFinderClient.mm (192499 => 192500)


--- trunk/Source/WebKit2/UIProcess/mac/WKTextFinderClient.mm	2015-11-17 01:19:10 UTC (rev 192499)
+++ trunk/Source/WebKit2/UIProcess/mac/WKTextFinderClient.mm	2015-11-17 01:21:06 UTC (rev 192500)
@@ -186,10 +186,9 @@
     RetainPtr<NSProgress> progress = [NSProgress progressWithTotalUnitCount:1];
     auto copiedResultCollector = Block_copy(resultCollector);
     _findReplyCallbacks.append([progress, copiedResultCollector] (NSArray *matches, bool didWrap) {
+        [progress setCompletedUnitCount:1];
         copiedResultCollector(matches, didWrap);
         Block_release(copiedResultCollector);
-
-        [progress setCompletedUnitCount:1];
     });
 
     if (maxResults == 1)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to