Title: [203724] trunk/Source/WebKit2
Revision
203724
Author
enr...@apple.com
Date
2016-07-26 09:32:21 -0700 (Tue, 26 Jul 2016)

Log Message

Support configurable autocapitalization.
https://bugs.webkit.org/show_bug.cgi?id=158860
rdar://problem/27536113

Reviewed by Tim Horton.

Autocapitalization should be enabled/disabled regardless of whether
we are using advance spelling feature.

* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (203723 => 203724)


--- trunk/Source/WebKit2/ChangeLog	2016-07-26 16:29:06 UTC (rev 203723)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-26 16:32:21 UTC (rev 203724)
@@ -1,3 +1,19 @@
+2016-07-26  Enrica Casucci  <enr...@apple.com>
+
+        Support configurable autocapitalization.
+        https://bugs.webkit.org/show_bug.cgi?id=158860
+        rdar://problem/27536113
+
+        Reviewed by Tim Horton.
+
+        Autocapitalization should be enabled/disabled regardless of whether
+        we are using advance spelling feature.
+
+        * UIProcess/mac/TextCheckerMac.mm:
+        (WebKit::TextChecker::checkTextOfParagraph):
+        (WebKit::TextChecker::getGuessesForWord):
+
+
 2016-07-26  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug

Modified: trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm (203723 => 203724)


--- trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm	2016-07-26 16:29:06 UTC (rev 203723)
+++ trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm	2016-07-26 16:32:21 UTC (rev 203724)
@@ -47,12 +47,10 @@
 static NSString* const WebAutomaticLinkDetectionEnabled = @"WebAutomaticLinkDetectionEnabled";
 static NSString* const WebAutomaticTextReplacementEnabled = @"WebAutomaticTextReplacementEnabled";
 
-#if HAVE(ADVANCED_SPELL_CHECKING)
 // FIXME: this needs to be removed and replaced with NSTextCheckingSuppressInitialCapitalizationKey as soon as
 // rdar://problem/26800924 is fixed.
 
 static NSString* const WebTextCheckingSuppressInitialCapitalizationKey = @"SuppressInitialCapitalization";
-#endif
 
 using namespace WebCore;
 
@@ -308,7 +306,7 @@
     options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
                  WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
 #else
-    UNUSED_PARAM(initialCapitalizationEnabled);
+    options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
 #endif
     NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString.get()
                                                                           range:NSMakeRange(0, text.length())
@@ -449,6 +447,8 @@
 #if HAVE(ADVANCED_SPELL_CHECKING)
     options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
                  WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+#else
+    options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
 #endif
     if (context.length()) {
         [checker checkString:context range:NSMakeRange(0, context.length()) types:NSTextCheckingTypeOrthography options:options inSpellDocumentWithTag:spellDocumentTag orthography:&orthography wordCount:0];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to