Bug 158860 - Support configurable autocapitalization
Summary: Support configurable autocapitalization
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 17:54 PDT by Enrica Casucci
Modified: 2016-07-26 09:33 PDT (History)
1 user (show)

See Also:


Attachments
Patch (19.95 KB, patch)
2016-06-16 18:01 PDT, Enrica Casucci
no flags Details | Formatted Diff | Diff
Patch2 (21.00 KB, patch)
2016-06-16 18:12 PDT, Enrica Casucci
thorton: review+
Details | Formatted Diff | Diff
Patch (2.81 KB, patch)
2016-07-25 17:11 PDT, Enrica Casucci
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2016-06-16 17:54:53 PDT
rdar://problem/26231403
Comment 1 Enrica Casucci 2016-06-16 18:01:00 PDT
Created attachment 281514 [details]
Patch
Comment 2 WebKit Commit Bot 2016-06-16 18:02:39 PDT
Attachment 281514 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:309:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:451:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Enrica Casucci 2016-06-16 18:12:40 PDT
Created attachment 281515 [details]
Patch2

Fixes GTK and EFL builds.
Comment 4 WebKit Commit Bot 2016-06-16 18:15:32 PDT
Attachment 281515 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:309:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:451:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Tim Horton 2016-06-17 12:54:56 PDT
Comment on attachment 281515 [details]
Patch2

View in context: https://bugs.webkit.org/attachment.cgi?id=281515&action=review

Please fix the iOS build before landing. Also, have you tested this on iOS?

> Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp:107
> +void WKPageConfigurationSetIntialCapitalizationEnabled(WKPageConfigurationRef configuration, bool enabled)

Intial should read "Initial"

> Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h:57
> +WK_EXPORT void WKPageConfigurationSetIntialCapitalizationEnabled(WKPageConfigurationRef configuration, bool enabled);

Intial should read "Initial"

> Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:51
> +// FIXME: this needs to be removed and NSTextCheckingSuppressInitialCapitalizationKey as soon as

Something weird about the grammar here.

> Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:309
> +    options = @{ NSTextCheckingInsertionPointKey :  [NSNumber numberWithUnsignedInteger:insertionPoint],
> +                 WebTextCheckingSuppressInitialCapitalizationKey : [NSNumber numberWithBool:!initialCapitalizationEnabled] };

If we're using @{}, we should be able to use @() instead of numberWithBlah: here, like so:

options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
             WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };

> Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:450
> +    options = @{ NSTextCheckingInsertionPointKey :  [NSNumber numberWithUnsignedInteger:insertionPoint],

Ditto.
Comment 6 Enrica Casucci 2016-06-17 16:32:41 PDT
Committed revision 202185.
Comment 7 Enrica Casucci 2016-07-25 17:00:21 PDT
This should be done when we use advance spelling and when we don't.
Comment 8 Enrica Casucci 2016-07-25 17:11:05 PDT
Created attachment 284551 [details]
Patch
Comment 9 Enrica Casucci 2016-07-26 09:33:40 PDT
Committed revision 203724.