<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202185] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202185">202185</a></dd>
<dt>Author</dt> <dd>enrica@apple.com</dd>
<dt>Date</dt> <dd>2016-06-17 16:31:42 -0700 (Fri, 17 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Support configurable autocapitalization.
https://bugs.webkit.org/show_bug.cgi?id=158860
rdar://problem/26231403
Reviewed by Tim Horton.
The behavior of spellchecker should be configurable to avoid
unwanted autocapitalization.
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::copy):
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::initialCapitalizationEnabled):
(API::PageConfiguration::setInitialCapitalizationEnabled):
* UIProcess/API/C/WKPageConfigurationRef.cpp:
(WKPageConfigurationSetIntialCapitalizationEnabled):
* UIProcess/API/C/WKPageConfigurationRef.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _initialCapitalizationEnabled]):
(-[WKWebViewConfiguration _setInitialCapitalizationEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/TextChecker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::checkTextOfParagraph):
(WebKit::WebPageProxy::getGuessesForWord):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::checkTextOfParagraph):
* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIPageConfigurationcpp">trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIPageConfigurationh">trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageConfigurationRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageConfigurationRefh">trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessTextCheckerh">trunk/Source/WebKit2/UIProcess/TextChecker.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflTextCheckerEflcpp">trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkTextCheckerGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosTextCheckerIOSmm">trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTextCheckerMacmm">trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/ChangeLog        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-06-16 Enrica Casucci <enrica@apple.com>
+
+ Support configurable autocapitalization.
+ https://bugs.webkit.org/show_bug.cgi?id=158860
+ rdar://problem/26231403
+
+ Reviewed by Tim Horton.
+
+ The behavior of spellchecker should be configurable to avoid
+ unwanted autocapitalization.
+
+ * UIProcess/API/APIPageConfiguration.cpp:
+ (API::PageConfiguration::copy):
+ * UIProcess/API/APIPageConfiguration.h:
+ (API::PageConfiguration::initialCapitalizationEnabled):
+ (API::PageConfiguration::setInitialCapitalizationEnabled):
+ * UIProcess/API/C/WKPageConfigurationRef.cpp:
+ (WKPageConfigurationSetIntialCapitalizationEnabled):
+ * UIProcess/API/C/WKPageConfigurationRef.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration copyWithZone:]):
+ (-[WKWebViewConfiguration _initialCapitalizationEnabled]):
+ (-[WKWebViewConfiguration _setInitialCapitalizationEnabled:]):
+ * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+ * UIProcess/TextChecker.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::checkTextOfParagraph):
+ (WebKit::WebPageProxy::getGuessesForWord):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/efl/TextCheckerEfl.cpp:
+ (WebKit::TextChecker::checkTextOfParagraph):
+ (WebKit::TextChecker::getGuessesForWord):
+ * UIProcess/gtk/TextCheckerGtk.cpp:
+ (WebKit::TextChecker::getGuessesForWord):
+ (WebKit::TextChecker::checkTextOfParagraph):
+ * UIProcess/ios/TextCheckerIOS.mm:
+ (WebKit::TextChecker::checkTextOfParagraph):
+ (WebKit::TextChecker::getGuessesForWord):
+ * UIProcess/mac/TextCheckerMac.mm:
+ (WebKit::TextChecker::checkTextOfParagraph):
+ (WebKit::TextChecker::getGuessesForWord):
+
</ins><span class="cx"> 2016-06-17 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Use WTF::NoncopyableFunction in NetworkDataTaskClient
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIPageConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> copy->m_alwaysRunsAtForegroundPriority = this->m_alwaysRunsAtForegroundPriority;
</span><span class="cx"> #endif
</span><ins>+ copy->m_initialCapitalizationEnabled = this->m_initialCapitalizationEnabled;
</ins><span class="cx">
</span><span class="cx"> return copy;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIPageConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.h (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.h        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.h        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -89,6 +89,8 @@
</span><span class="cx"> bool alwaysRunsAtForegroundPriority() { return m_alwaysRunsAtForegroundPriority; }
</span><span class="cx"> void setAlwaysRunsAtForegroundPriority(bool alwaysRunsAtForegroundPriority) { m_alwaysRunsAtForegroundPriority = alwaysRunsAtForegroundPriority; }
</span><span class="cx"> #endif
</span><ins>+ bool initialCapitalizationEnabled() { return m_initialCapitalizationEnabled; }
+ void setInitialCapitalizationEnabled(bool initialCapitalizationEnabled) { m_initialCapitalizationEnabled = initialCapitalizationEnabled; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx">
</span><span class="lines">@@ -109,6 +111,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> bool m_alwaysRunsAtForegroundPriority = false;
</span><span class="cx"> #endif
</span><ins>+ bool m_initialCapitalizationEnabled = true;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageConfigurationRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -103,3 +103,8 @@
</span><span class="cx"> {
</span><span class="cx"> toImpl(configuration)->setWebsiteDataStore(toImpl(websiteDataStore));
</span><span class="cx"> }
</span><ins>+
+void WKPageConfigurationSetInitialCapitalizationEnabled(WKPageConfigurationRef configuration, bool enabled)
+{
+ toImpl(configuration)->setInitialCapitalizationEnabled(enabled);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageConfigurationRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -54,6 +54,8 @@
</span><span class="cx"> WK_EXPORT WKWebsiteDataStoreRef WKPageConfigurationGetWebsiteDataStore(WKPageConfigurationRef configuration);
</span><span class="cx"> WK_EXPORT void WKPageConfigurationSetWebsiteDataStore(WKPageConfigurationRef configuration, WKWebsiteDataStoreRef websiteDataStore);
</span><span class="cx">
</span><ins>+WK_EXPORT void WKPageConfigurationSetInitialCapitalizationEnabled(WKPageConfigurationRef configuration, bool enabled);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -434,7 +434,8 @@
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy]));
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
</span><del>-
</del><ins>+ pageConfiguration->setInitialCapitalizationEnabled([_configuration _initialCapitalizationEnabled]);
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::showsURLsInToolTipsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _showsURLsInToolTips]));
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::serviceControlsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _serviceControlsEnabled]));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx"> BOOL _imageControlsEnabled;
</span><span class="cx"> BOOL _requiresUserActionForEditingControlsManager;
</span><span class="cx"> #endif
</span><ins>+ BOOL _initialCapitalizationEnabled;
</ins><span class="cx">
</span><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #import <WebKitAdditions/WKWebViewConfigurationIvars.mm>
</span><span class="lines">@@ -171,6 +172,7 @@
</span><span class="cx"> _imageControlsEnabled = NO;
</span><span class="cx"> _requiresUserActionForEditingControlsManager = NO;
</span><span class="cx"> #endif
</span><ins>+ _initialCapitalizationEnabled = YES;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx"> _allowsAirPlayForMediaPlayback = YES;
</span><span class="lines">@@ -278,6 +280,7 @@
</span><span class="cx"> configuration->_attachmentElementEnabled = self->_attachmentElementEnabled;
</span><span class="cx"> configuration->_mediaTypesRequiringUserActionForPlayback = self->_mediaTypesRequiringUserActionForPlayback;
</span><span class="cx"> configuration->_mainContentUserGestureOverrideEnabled = self->_mainContentUserGestureOverrideEnabled;
</span><ins>+ configuration->_initialCapitalizationEnabled = self->_initialCapitalizationEnabled;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> configuration->_allowsInlineMediaPlayback = self->_allowsInlineMediaPlayback;
</span><span class="lines">@@ -649,6 +652,16 @@
</span><span class="cx"> _mainContentUserGestureOverrideEnabled = mainContentUserGestureOverrideEnabled;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)_initialCapitalizationEnabled
+{
+ return _initialCapitalizationEnabled;
+}
+
+- (void)_setInitialCapitalizationEnabled:(BOOL)initialCapitalizationEnabled
+{
+ _initialCapitalizationEnabled = initialCapitalizationEnabled;
+}
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> - (BOOL)_showsURLsInToolTips
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> @property (nonatomic, setter=_setInvisibleAutoplayNotPermitted:) BOOL _invisibleAutoplayNotPermitted WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> @property (nonatomic, setter=_setMediaDataLoadsAutomatically:) BOOL _mediaDataLoadsAutomatically WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> @property (nonatomic, setter=_setAttachmentElementEnabled:) BOOL _attachmentElementEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><ins>+@property (nonatomic, setter=_setInitialCapitalizationEnabled:) BOOL _initialCapitalizationEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</ins><span class="cx">
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> @property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_AVAILABLE(NA, 9_0);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessTextCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/TextChecker.h (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/TextChecker.h        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/TextChecker.h        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> static int64_t uniqueSpellDocumentTag(WebPageProxy*);
</span><span class="cx"> static void closeSpellDocumentWithTag(int64_t);
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><del>- static Vector<WebCore::TextCheckingResult> checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes);
</del><ins>+ static Vector<WebCore::TextCheckingResult> checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes, bool initialCapitalizationEnabled);
</ins><span class="cx"> #endif
</span><span class="cx"> static void checkSpellingOfString(int64_t spellDocumentTag, StringView text, int32_t& misspellingLocation, int32_t& misspellingLength);
</span><span class="cx"> static void checkGrammarOfString(int64_t spellDocumentTag, StringView text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> static void toggleSpellingUIIsShowing();
</span><span class="cx"> static void updateSpellingUIWithMisspelledWord(int64_t spellDocumentTag, const String& misspelledWord);
</span><span class="cx"> static void updateSpellingUIWithGrammarString(int64_t spellDocumentTag, const String& badGrammarPhrase, const WebCore::GrammarDetail&);
</span><del>- static void getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses);
</del><ins>+ static void getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses, bool initialCapitalizationEnabled);
</ins><span class="cx"> static void learnWord(int64_t spellDocumentTag, const String& word);
</span><span class="cx"> static void ignoreWord(int64_t spellDocumentTag, const String& word);
</span><span class="cx"> static void requestCheckingOfString(PassRefPtr<TextCheckerCompletion>, int32_t insertionPoint);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -348,6 +348,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> , m_alwaysRunsAtForegroundPriority(m_configuration->alwaysRunsAtForegroundPriority())
</span><span class="cx"> #endif
</span><ins>+ , m_initialCapitalizationEnabled(m_configuration->initialCapitalizationEnabled())
</ins><span class="cx"> , m_backForwardList(WebBackForwardList::create(*this))
</span><span class="cx"> , m_maintainsInactiveSelection(false)
</span><span class="cx"> , m_isEditable(false)
</span><span class="lines">@@ -4510,7 +4511,7 @@
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><span class="cx"> void WebPageProxy::checkTextOfParagraph(const String& text, uint64_t checkingTypes, int32_t insertionPoint, Vector<TextCheckingResult>& results)
</span><span class="cx"> {
</span><del>- results = TextChecker::checkTextOfParagraph(spellDocumentTag(), text, insertionPoint, checkingTypes);
</del><ins>+ results = TextChecker::checkTextOfParagraph(spellDocumentTag(), text, insertionPoint, checkingTypes, m_initialCapitalizationEnabled);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -4541,7 +4542,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses)
</span><span class="cx"> {
</span><del>- TextChecker::getGuessesForWord(spellDocumentTag(), word, context, insertionPoint, guesses);
</del><ins>+ TextChecker::getGuessesForWord(spellDocumentTag(), word, context, insertionPoint, guesses, m_initialCapitalizationEnabled);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::learnWord(const String& word)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -1616,7 +1616,7 @@
</span><span class="cx"> bool m_alwaysRunsAtForegroundPriority;
</span><span class="cx"> ProcessThrottler::ForegroundActivityToken m_activityToken;
</span><span class="cx"> #endif
</span><del>-
</del><ins>+ bool m_initialCapitalizationEnabled;
</ins><span class="cx"> Ref<WebBackForwardList> m_backForwardList;
</span><span class="cx">
</span><span class="cx"> bool m_maintainsInactiveSelection;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflTextCheckerEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> #endif // ENABLE(SPELLCHECK)
</span><span class="cx">
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><del>-Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes, bool)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(insertionPoint);
</span><span class="cx">
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& , int32_t insertionPoint, Vector<String>& guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& , int32_t insertionPoint, Vector<String>& guesses, bool)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(insertionPoint);
</span><span class="cx"> #if ENABLE(SPELLCHECK)
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx"> ASSERT(request.sequence() != unrequestedTextCheckingSequence);
</span><span class="cx"> ASSERT(request.mask() != TextCheckingTypeNone);
</span><span class="cx">
</span><del>- completion->didFinishCheckingText(checkTextOfParagraph(completion->spellDocumentTag(), request.text(), insertionPoint, request.mask()));
</del><ins>+ completion->didFinishCheckingText(checkTextOfParagraph(completion->spellDocumentTag(), request.text(), insertionPoint, request.mask(), false));
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(completion);
</span><span class="cx"> UNUSED_PARAM(insertionPoint);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkTextCheckerGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TextChecker::getGuessesForWord(int64_t /* spellDocumentTag */, const String& word, const String& /* context */, int32_t /* insertionPoint */, Vector<String>& guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t /* spellDocumentTag */, const String& word, const String& /* context */, int32_t /* insertionPoint */, Vector<String>& guesses, bool)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(SPELLCHECK)
</span><span class="cx"> guesses = enchantTextChecker().getGuessesForWord(word);
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> ASSERT(request.sequence() != unrequestedTextCheckingSequence);
</span><span class="cx"> ASSERT(request.mask() != TextCheckingTypeNone);
</span><span class="cx">
</span><del>- completion->didFinishCheckingText(checkTextOfParagraph(completion->spellDocumentTag(), request.text(), insertionPoint, request.mask()));
</del><ins>+ completion->didFinishCheckingText(checkTextOfParagraph(completion->spellDocumentTag(), request.text(), insertionPoint, request.mask(), false));
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(completion);
</span><span class="cx"> #endif
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><del>-Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes, bool)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(insertionPoint);
</span><span class="cx"> #if ENABLE(SPELLCHECK)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosTextCheckerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><span class="cx">
</span><del>-Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t, StringView, int32_t, uint64_t)
</del><ins>+Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t, StringView, int32_t, uint64_t, bool)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> return Vector<TextCheckingResult>();
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TextChecker::getGuessesForWord(int64_t, const String&, const String&, int32_t, Vector<String>&)
</del><ins>+void TextChecker::getGuessesForWord(int64_t, const String&, const String&, int32_t, Vector<String>&, bool)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTextCheckerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm (202184 => 202185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm        2016-06-17 23:27:28 UTC (rev 202184)
+++ trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm        2016-06-17 23:31:42 UTC (rev 202185)
</span><span class="lines">@@ -47,6 +47,13 @@
</span><span class="cx"> static NSString* const WebAutomaticLinkDetectionEnabled = @"WebAutomaticLinkDetectionEnabled";
</span><span class="cx"> static NSString* const WebAutomaticTextReplacementEnabled = @"WebAutomaticTextReplacementEnabled";
</span><span class="cx">
</span><ins>+#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
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -291,14 +298,17 @@
</span><span class="cx">
</span><span class="cx"> #if USE(UNIFIED_TEXT_CHECKING)
</span><span class="cx">
</span><del>-Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes, bool initialCapitalizationEnabled)
</ins><span class="cx"> {
</span><span class="cx"> Vector<TextCheckingResult> results;
</span><span class="cx">
</span><span class="cx"> RetainPtr<NSString> textString = text.createNSStringWithoutCopying();
</span><span class="cx"> NSDictionary *options = nil;
</span><span class="cx"> #if HAVE(ADVANCED_SPELL_CHECKING)
</span><del>- options = @{ NSTextCheckingInsertionPointKey : [NSNumber numberWithUnsignedInteger:insertionPoint] };
</del><ins>+ options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
+ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
+#else
+ UNUSED_PARAM(initialCapitalizationEnabled);
</ins><span class="cx"> #endif
</span><span class="cx"> NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString.get()
</span><span class="cx"> range:NSMakeRange(0, text.length())
</span><span class="lines">@@ -430,14 +440,15 @@
</span><span class="cx"> [[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithGrammarString:badGrammarPhrase detail:grammarDetailDict.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses, bool initialCapitalizationEnabled)
</ins><span class="cx"> {
</span><span class="cx"> NSString* language = nil;
</span><span class="cx"> NSOrthography* orthography = nil;
</span><span class="cx"> NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
</span><span class="cx"> NSDictionary *options = nil;
</span><span class="cx"> #if HAVE(ADVANCED_SPELL_CHECKING)
</span><del>- options = @{ NSTextCheckingInsertionPointKey : [NSNumber numberWithUnsignedInteger:insertionPoint] };
</del><ins>+ options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint),
+ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) };
</ins><span class="cx"> #endif
</span><span class="cx"> if (context.length()) {
</span><span class="cx"> [checker checkString:context range:NSMakeRange(0, context.length()) types:NSTextCheckingTypeOrthography options:options inSpellDocumentWithTag:spellDocumentTag orthography:&orthography wordCount:0];
</span></span></pre>
</div>
</div>
</body>
</html>