Title: [195324] trunk/Source/WebKit/mac
Revision
195324
Author
[email protected]
Date
2016-01-19 16:46:38 -0800 (Tue, 19 Jan 2016)

Log Message

Move away from NSSpellChecker's showCandidates method
https://bugs.webkit.org/show_bug.cgi?id=153254
-and corresponding-
rdar://problem/24216292

Reviewed by Tim Horton.

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::handleRequestedCandidates):
* WebView/WebView.mm:
(-[WebView updateWebViewAdditions]):
(-[WebView showCandidates:forString:inRect:view:completionHandler:]):
* WebView/WebViewInternal.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (195323 => 195324)


--- trunk/Source/WebKit/mac/ChangeLog	2016-01-20 00:45:39 UTC (rev 195323)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-01-20 00:46:38 UTC (rev 195324)
@@ -1,3 +1,19 @@
+2016-01-19  Beth Dakin  <[email protected]>
+
+        Move away from NSSpellChecker's showCandidates method
+        https://bugs.webkit.org/show_bug.cgi?id=153254
+        -and corresponding-
+        rdar://problem/24216292
+
+        Reviewed by Tim Horton.
+
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::handleRequestedCandidates):
+        * WebView/WebView.mm:
+        (-[WebView updateWebViewAdditions]):
+        (-[WebView showCandidates:forString:inRect:view:completionHandler:]):
+        * WebView/WebViewInternal.h:
+
 2016-01-19  Enrica Casucci  <[email protected]>
 
         Add support for DataDetectors in WK (iOS).

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (195323 => 195324)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2016-01-20 00:45:39 UTC (rev 195323)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2016-01-20 00:46:38 UTC (rev 195324)
@@ -1169,7 +1169,7 @@
         rectForSelectionCandidates = frame->view()->contentsToWindow(quads[0].enclosingBoundingBox());
 
     auto weakEditor = m_weakPtrFactory.createWeakPtr();
-    [[NSSpellChecker sharedSpellChecker] showCandidates:candidates forString:frame->editor().stringForCandidateRequest() inRect:rectForSelectionCandidates view:m_webView completionHandler:[weakEditor](NSTextCheckingResult *acceptedCandidate) {
+    [m_webView showCandidates:candidates forString:frame->editor().stringForCandidateRequest() inRect:rectForSelectionCandidates view:m_webView completionHandler:[weakEditor](NSTextCheckingResult *acceptedCandidate) {
         dispatch_async(dispatch_get_main_queue(), ^{
             if (!weakEditor)
                 return;

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (195323 => 195324)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2016-01-20 00:45:39 UTC (rev 195323)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2016-01-20 00:46:38 UTC (rev 195324)
@@ -6605,6 +6605,10 @@
 {
 }
 
+- (void)showCandidates:(NSArray<NSTextCheckingResult *> *)candidates forString:(NSString *)string inRect:(NSRect)rectOfTypedString view:(NSView *)view completionHandler:(void (^)(NSTextCheckingResult *acceptedCandidate))completionBlock
+{
+}
+
 @end
 #endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 && USE(APPLE_INTERNAL_SDK)
 

Modified: trunk/Source/WebKit/mac/WebView/WebViewInternal.h (195323 => 195324)


--- trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2016-01-20 00:45:39 UTC (rev 195323)
+++ trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2016-01-20 00:46:38 UTC (rev 195324)
@@ -291,4 +291,5 @@
 
 @interface WebView (WebUpdateWebViewAdditions)
 - (void)updateWebViewAdditions;
+- (void)showCandidates:(NSArray<NSTextCheckingResult *> *)candidates forString:(NSString *)string inRect:(NSRect)rectOfTypedString view:(NSView *)view completionHandler:(void (^)(NSTextCheckingResult *acceptedCandidate))completionBlock;
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to