<!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  &lt;enrica@apple.com&gt;
+
+        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  &lt;cdumez@apple.com&gt;
</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-&gt;m_alwaysRunsAtForegroundPriority = this-&gt;m_alwaysRunsAtForegroundPriority;
</span><span class="cx"> #endif
</span><ins>+    copy-&gt;m_initialCapitalizationEnabled = this-&gt;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)-&gt;setWebsiteDataStore(toImpl(websiteDataStore));
</span><span class="cx"> }
</span><ins>+
+void WKPageConfigurationSetInitialCapitalizationEnabled(WKPageConfigurationRef configuration, bool enabled)
+{
+    toImpl(configuration)-&gt;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-&gt;preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
</span><del>-    
</del><ins>+    pageConfiguration-&gt;setInitialCapitalizationEnabled([_configuration _initialCapitalizationEnabled]);
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::showsURLsInToolTipsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _showsURLsInToolTips]));
</span><span class="cx">     pageConfiguration-&gt;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 &lt;WebKitAdditions/WKWebViewConfigurationIvars.mm&gt;
</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-&gt;_attachmentElementEnabled = self-&gt;_attachmentElementEnabled;
</span><span class="cx">     configuration-&gt;_mediaTypesRequiringUserActionForPlayback = self-&gt;_mediaTypesRequiringUserActionForPlayback;
</span><span class="cx">     configuration-&gt;_mainContentUserGestureOverrideEnabled = self-&gt;_mainContentUserGestureOverrideEnabled;
</span><ins>+    configuration-&gt;_initialCapitalizationEnabled = self-&gt;_initialCapitalizationEnabled;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     configuration-&gt;_allowsInlineMediaPlayback = self-&gt;_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&lt;WebCore::TextCheckingResult&gt; checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes);
</del><ins>+    static Vector&lt;WebCore::TextCheckingResult&gt; 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&amp; misspellingLocation, int32_t&amp; misspellingLength);
</span><span class="cx">     static void checkGrammarOfString(int64_t spellDocumentTag, StringView text, Vector&lt;WebCore::GrammarDetail&gt;&amp;, int32_t&amp; badGrammarLocation, int32_t&amp; 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&amp; misspelledWord);
</span><span class="cx">     static void updateSpellingUIWithGrammarString(int64_t spellDocumentTag, const String&amp; badGrammarPhrase, const WebCore::GrammarDetail&amp;);
</span><del>-    static void getGuessesForWord(int64_t spellDocumentTag, const String&amp; word, const String&amp; context, int32_t insertionPoint, Vector&lt;String&gt;&amp; guesses);
</del><ins>+    static void getGuessesForWord(int64_t spellDocumentTag, const String&amp; word, const String&amp; context, int32_t insertionPoint, Vector&lt;String&gt;&amp; guesses, bool initialCapitalizationEnabled);
</ins><span class="cx">     static void learnWord(int64_t spellDocumentTag, const String&amp; word);
</span><span class="cx">     static void ignoreWord(int64_t spellDocumentTag, const String&amp; word);
</span><span class="cx">     static void requestCheckingOfString(PassRefPtr&lt;TextCheckerCompletion&gt;, 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-&gt;alwaysRunsAtForegroundPriority())
</span><span class="cx"> #endif
</span><ins>+    , m_initialCapitalizationEnabled(m_configuration-&gt;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&amp; text, uint64_t checkingTypes, int32_t insertionPoint, Vector&lt;TextCheckingResult&gt;&amp; 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&amp; word, const String&amp; context, int32_t insertionPoint, Vector&lt;String&gt;&amp; 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&amp; 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&lt;WebBackForwardList&gt; 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&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector&lt;TextCheckingResult&gt; 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&amp; word, const String&amp; , int32_t insertionPoint, Vector&lt;String&gt;&amp; guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String&amp; word, const String&amp; , int32_t insertionPoint, Vector&lt;String&gt;&amp; 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-&gt;didFinishCheckingText(checkTextOfParagraph(completion-&gt;spellDocumentTag(), request.text(), insertionPoint, request.mask()));
</del><ins>+    completion-&gt;didFinishCheckingText(checkTextOfParagraph(completion-&gt;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&amp; word, const String&amp; /* context */, int32_t /* insertionPoint */, Vector&lt;String&gt;&amp; guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t /* spellDocumentTag */, const String&amp; word, const String&amp; /* context */, int32_t /* insertionPoint */, Vector&lt;String&gt;&amp; 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-&gt;didFinishCheckingText(checkTextOfParagraph(completion-&gt;spellDocumentTag(), request.text(), insertionPoint, request.mask()));
</del><ins>+    completion-&gt;didFinishCheckingText(checkTextOfParagraph(completion-&gt;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&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector&lt;TextCheckingResult&gt; 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&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t, StringView, int32_t, uint64_t)
</del><ins>+Vector&lt;TextCheckingResult&gt; 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&lt;TextCheckingResult&gt;();
</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&amp;, const String&amp;, int32_t, Vector&lt;String&gt;&amp;)
</del><ins>+void TextChecker::getGuessesForWord(int64_t, const String&amp;, const String&amp;, int32_t, Vector&lt;String&gt;&amp;, 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 = @&quot;WebAutomaticLinkDetectionEnabled&quot;;
</span><span class="cx"> static NSString* const WebAutomaticTextReplacementEnabled = @&quot;WebAutomaticTextReplacementEnabled&quot;;
</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 = @&quot;SuppressInitialCapitalization&quot;;
+#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&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes)
</del><ins>+Vector&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t spellDocumentTag, StringView text, int32_t insertionPoint, uint64_t checkingTypes, bool initialCapitalizationEnabled)
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;TextCheckingResult&gt; results;
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;NSString&gt; 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&amp; word, const String&amp; context, int32_t insertionPoint, Vector&lt;String&gt;&amp; guesses)
</del><ins>+void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String&amp; word, const String&amp; context, int32_t insertionPoint, Vector&lt;String&gt;&amp; 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:&amp;orthography wordCount:0];
</span></span></pre>
</div>
</div>

</body>
</html>