Title: [240125] trunk/Source
- Revision
- 240125
- Author
- [email protected]
- Date
- 2019-01-17 13:12:12 -0800 (Thu, 17 Jan 2019)
Log Message
Adopt NSTextCheckingSuppressInitialCapitalizationKey
https://bugs.webkit.org/show_bug.cgi?id=193545
Reviewed by Dean Jackson.
Source/WebCore/PAL:
* pal/spi/mac/NSSpellCheckerSPI.h:
Source/WebKit:
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):
Modified Paths
Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (240124 => 240125)
--- trunk/Source/WebCore/PAL/ChangeLog 2019-01-17 20:46:05 UTC (rev 240124)
+++ trunk/Source/WebCore/PAL/ChangeLog 2019-01-17 21:12:12 UTC (rev 240125)
@@ -1,3 +1,12 @@
+2019-01-17 Tim Horton <[email protected]>
+
+ Adopt NSTextCheckingSuppressInitialCapitalizationKey
+ https://bugs.webkit.org/show_bug.cgi?id=193545
+
+ Reviewed by Dean Jackson.
+
+ * pal/spi/mac/NSSpellCheckerSPI.h:
+
2019-01-17 Jer Noble <[email protected]>
SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSSpellCheckerSPI.h (240124 => 240125)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSSpellCheckerSPI.h 2019-01-17 20:46:05 UTC (rev 240124)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSSpellCheckerSPI.h 2019-01-17 21:12:12 UTC (rev 240125)
@@ -35,6 +35,8 @@
extern NSString *NSTextCheckingInsertionPointKey;
#endif
+extern NSString *NSTextCheckingSuppressInitialCapitalizationKey;
+
@interface NSSpellChecker ()
#if HAVE(ADVANCED_SPELL_CHECKING)
Modified: trunk/Source/WebKit/ChangeLog (240124 => 240125)
--- trunk/Source/WebKit/ChangeLog 2019-01-17 20:46:05 UTC (rev 240124)
+++ trunk/Source/WebKit/ChangeLog 2019-01-17 21:12:12 UTC (rev 240125)
@@ -1,3 +1,14 @@
+2019-01-17 Tim Horton <[email protected]>
+
+ Adopt NSTextCheckingSuppressInitialCapitalizationKey
+ https://bugs.webkit.org/show_bug.cgi?id=193545
+
+ Reviewed by Dean Jackson.
+
+ * UIProcess/mac/TextCheckerMac.mm:
+ (WebKit::TextChecker::checkTextOfParagraph):
+ (WebKit::TextChecker::getGuessesForWord):
+
2019-01-17 Jer Noble <[email protected]>
SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
Modified: trunk/Source/WebKit/UIProcess/mac/TextCheckerMac.mm (240124 => 240125)
--- trunk/Source/WebKit/UIProcess/mac/TextCheckerMac.mm 2019-01-17 20:46:05 UTC (rev 240124)
+++ trunk/Source/WebKit/UIProcess/mac/TextCheckerMac.mm 2019-01-17 21:12:12 UTC (rev 240125)
@@ -48,11 +48,6 @@
static NSString* const WebAutomaticLinkDetectionEnabled = @"WebAutomaticLinkDetectionEnabled";
static NSString* const WebAutomaticTextReplacementEnabled = @"WebAutomaticTextReplacementEnabled";
-// FIXME: this needs to be removed and replaced with NSTextCheckingSuppressInitialCapitalizationKey as soon as
-// rdar://problem/26800924 is fixed.
-
-static NSString* const WebTextCheckingSuppressInitialCapitalizationKey = @"SuppressInitialCapitalization";
-
namespace WebKit {
using namespace WebCore;
@@ -328,10 +323,12 @@
RetainPtr<NSString> textString = text.createNSStringWithoutCopying();
NSDictionary *options = nil;
#if HAVE(ADVANCED_SPELL_CHECKING)
- options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
- WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+ options = @{
+ NSTextCheckingInsertionPointKey : @(insertionPoint),
+ NSTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled)
+ };
#else
- options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+ options = @{ NSTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
#endif
NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString.get()
range:NSMakeRange(0, text.length())
@@ -470,10 +467,12 @@
NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
NSDictionary *options = nil;
#if HAVE(ADVANCED_SPELL_CHECKING)
- options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
- WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+ options = @{
+ NSTextCheckingInsertionPointKey : @(insertionPoint),
+ NSTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled)
+ };
#else
- options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+ options = @{ NSTextCheckingSuppressInitialCapitalizationKey : @(!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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes