<!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>[192834] trunk/Source</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/192834">192834</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-11-30 15:06:17 -0800 (Mon, 30 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
https://bugs.webkit.org/show_bug.cgi?id=151673

Reviewed by Anders Carlsson.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::resignFirstResponder): Deleted.
(WebKit::WebViewImpl::interpretKeyEvent): Deleted.
(WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted.
(WebKit::WebViewImpl::doCommandBySelector): Deleted.
(WebKit::WebViewImpl::insertText): Deleted.
(WebKit::WebViewImpl::inputContext): Deleted.
(WebKit::WebViewImpl::selectedRange): Deleted.
(WebKit::WebViewImpl::hasMarkedText): Deleted.
(WebKit::WebViewImpl::unmarkText): Deleted.
(WebKit::WebViewImpl::setMarkedText): Deleted.
(WebKit::WebViewImpl::markedRange): Deleted.
(WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted.
(WebKit::WebViewImpl::characterIndexForPoint): Deleted.
(WebKit::WebViewImpl::firstRectForCharacterRange): Deleted.
(WebKit::WebViewImpl::performKeyEquivalent): Deleted.
(WebKit::WebViewImpl::keyUp): Deleted.
(WebKit::WebViewImpl::keyDown): Deleted.
(WebKit::WebViewImpl::flagsChanged): Deleted.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition): Deleted.
(WebKit::WebPageProxy::confirmComposition): Deleted.
(WebKit::WebPageProxy::insertText): Deleted.
(WebKit::WebPageProxy::insertDictatedText): Deleted.
(WebKit::WebPageProxy::getMarkedRange): Deleted.
(WebKit::WebPageProxy::getSelectedRange): Deleted.
(WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted.
(WebKit::WebPageProxy::characterIndexForPoint): Deleted.
(WebKit::WebPageProxy::firstRectForCharacterRange): Deleted.
(WebKit::WebPageProxy::executeKeypressCommands): Deleted.
(WebKit::WebPageProxy::cancelComposition): Deleted.
(WebKit::WebPageProxy::editorStateChanged): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition): Deleted.
(WebKit::WebPage::confirmComposition): Deleted.
(WebKit::WebPage::insertText): Deleted.
(WebKit::WebPage::insertDictatedText): Deleted.
(WebKit::WebPage::getMarkedRange): Deleted.
(WebKit::WebPage::getSelectedRange): Deleted.
(WebKit::WebPage::getAttributedSubstringFromRange): Deleted.
(WebKit::WebPage::characterIndexForPoint): Deleted.
(WebKit::WebPage::firstRectForCharacterRange): Deleted.
(WebKit::WebPage::executeKeypressCommands): Deleted.
(WebKit::WebPage::cancelComposition): Deleted.

Source/WTF:

* wtf/Platform.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformh">trunk/Source/WTF/wtf/Platform.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.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="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WTF/ChangeLog        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-11-30  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
+        https://bugs.webkit.org/show_bug.cgi?id=151673
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/Platform.h:
+
</ins><span class="cx"> 2015-11-30  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GLIB] Remove GMainLoopSource and GThreadSafeMainLoopSource
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Platform.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Platform.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WTF/wtf/Platform.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -1110,10 +1110,6 @@
</span><span class="cx"> #define HAVE_NS_ACTIVITY 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-#define USE_ASYNC_NSTEXTINPUTCLIENT 1
-#endif
-
</del><span class="cx"> #if (OS(DARWIN) &amp;&amp; USE(CG)) || USE(FREETYPE) || (PLATFORM(WIN) &amp;&amp; (USE(CG) || USE(CAIRO)))
</span><span class="cx"> #undef ENABLE_OPENTYPE_MATH
</span><span class="cx"> #define ENABLE_OPENTYPE_MATH 1
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/ChangeLog        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -1,5 +1,72 @@
</span><span class="cx"> 2015-11-30  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
+        https://bugs.webkit.org/show_bug.cgi?id=151673
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        * UIProcess/API/mac/WKView.mm:
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::resignFirstResponder): Deleted.
+        (WebKit::WebViewImpl::interpretKeyEvent): Deleted.
+        (WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted.
+        (WebKit::WebViewImpl::doCommandBySelector): Deleted.
+        (WebKit::WebViewImpl::insertText): Deleted.
+        (WebKit::WebViewImpl::inputContext): Deleted.
+        (WebKit::WebViewImpl::selectedRange): Deleted.
+        (WebKit::WebViewImpl::hasMarkedText): Deleted.
+        (WebKit::WebViewImpl::unmarkText): Deleted.
+        (WebKit::WebViewImpl::setMarkedText): Deleted.
+        (WebKit::WebViewImpl::markedRange): Deleted.
+        (WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted.
+        (WebKit::WebViewImpl::characterIndexForPoint): Deleted.
+        (WebKit::WebViewImpl::firstRectForCharacterRange): Deleted.
+        (WebKit::WebViewImpl::performKeyEquivalent): Deleted.
+        (WebKit::WebViewImpl::keyUp): Deleted.
+        (WebKit::WebViewImpl::keyDown): Deleted.
+        (WebKit::WebViewImpl::flagsChanged): Deleted.
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy): Deleted.
+        (WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted.
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::setComposition): Deleted.
+        (WebKit::WebPageProxy::confirmComposition): Deleted.
+        (WebKit::WebPageProxy::insertText): Deleted.
+        (WebKit::WebPageProxy::insertDictatedText): Deleted.
+        (WebKit::WebPageProxy::getMarkedRange): Deleted.
+        (WebKit::WebPageProxy::getSelectedRange): Deleted.
+        (WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted.
+        (WebKit::WebPageProxy::characterIndexForPoint): Deleted.
+        (WebKit::WebPageProxy::firstRectForCharacterRange): Deleted.
+        (WebKit::WebPageProxy::executeKeypressCommands): Deleted.
+        (WebKit::WebPageProxy::cancelComposition): Deleted.
+        (WebKit::WebPageProxy::editorStateChanged): Deleted.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didChangeSelection):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::setComposition): Deleted.
+        (WebKit::WebPage::confirmComposition): Deleted.
+        (WebKit::WebPage::insertText): Deleted.
+        (WebKit::WebPage::insertDictatedText): Deleted.
+        (WebKit::WebPage::getMarkedRange): Deleted.
+        (WebKit::WebPage::getSelectedRange): Deleted.
+        (WebKit::WebPage::getAttributedSubstringFromRange): Deleted.
+        (WebKit::WebPage::characterIndexForPoint): Deleted.
+        (WebKit::WebPage::firstRectForCharacterRange): Deleted.
+        (WebKit::WebPage::executeKeypressCommands): Deleted.
+        (WebKit::WebPage::cancelComposition): Deleted.
+
+2015-11-30  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
</ins><span class="cx">         Remove some unused synchronous drawing SPI
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=151672
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -2400,8 +2400,6 @@
</span><span class="cx">     return _impl-&gt;firstRectForCharacterRange(theRange, actualRange);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> - (void)selectedRangeWithCompletionHandler:(void(^)(NSRange selectedRange))completionHandlerPtr
</span><span class="cx"> {
</span><span class="cx">     _impl-&gt;selectedRangeWithCompletionHandler(completionHandlerPtr);
</span><span class="lines">@@ -2432,8 +2430,6 @@
</span><span class="cx">     _impl-&gt;characterIndexForPoint(thePoint, completionHandlerPtr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> - (NSArray *)validAttributesForMarkedText
</span><span class="cx"> {
</span><span class="cx">     return _impl-&gt;validAttributesForMarkedText();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -630,8 +630,6 @@
</span><span class="cx">     return _data-&gt;_impl-&gt;firstRectForCharacterRange(theRange, actualRange);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> - (void)selectedRangeWithCompletionHandler:(void(^)(NSRange selectedRange))completionHandlerPtr
</span><span class="cx"> {
</span><span class="cx">     _data-&gt;_impl-&gt;selectedRangeWithCompletionHandler(completionHandlerPtr);
</span><span class="lines">@@ -662,8 +660,6 @@
</span><span class="cx">     _data-&gt;_impl-&gt;characterIndexForPoint(thePoint, completionHandlerPtr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> - (NSArray *)validAttributesForMarkedText
</span><span class="cx"> {
</span><span class="cx">     return _data-&gt;_impl-&gt;validAttributesForMarkedText();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -95,15 +95,6 @@
</span><span class="cx"> typedef Vector&lt;RetainPtr&lt;ValidationItem&gt;&gt; ValidationVector;
</span><span class="cx"> typedef HashMap&lt;String, ValidationVector&gt; ValidationMap;
</span><span class="cx"> 
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-struct WKViewInterpretKeyEventsParameters {
-    bool eventInterpretationHadSideEffects;
-    bool consumedByIM;
-    bool executingSavedKeypressCommands;
-    Vector&lt;WebCore::KeypressCommand&gt;* commands;
-};
-#endif
-
</del><span class="cx"> class WebViewImpl {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(WebViewImpl);
</span><span class="lines">@@ -448,14 +439,12 @@
</span><span class="cx">     // support them via the key bindings mechanism.
</span><span class="cx">     static bool wantsKeyDownForEvent(NSEvent *) { return true; }
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx">     void selectedRangeWithCompletionHandler(void(^)(NSRange));
</span><span class="cx">     void hasMarkedTextWithCompletionHandler(void(^)(BOOL hasMarkedText));
</span><span class="cx">     void markedRangeWithCompletionHandler(void(^)(NSRange));
</span><span class="cx">     void attributedSubstringForProposedRange(NSRange, void(^)(NSAttributedString *attrString, NSRange actualRange));
</span><span class="cx">     void firstRectForCharacterRange(NSRange, void(^)(NSRect firstRect, NSRange actualRange));
</span><span class="cx">     void characterIndexForPoint(NSPoint, void(^)(NSUInteger));
</span><del>-#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx"> 
</span><span class="cx">     void mouseMoved(NSEvent *);
</span><span class="cx">     void mouseDown(NSEvent *);
</span><span class="lines">@@ -489,13 +478,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setUserInterfaceItemState(NSString *commandName, bool enabled, int state);
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx">     Vector&lt;WebCore::KeypressCommand&gt; collectKeyboardLayoutCommandsForEvent(NSEvent *);
</span><span class="cx">     void interpretKeyEvent(NSEvent *, void(^completionHandler)(BOOL handled, const Vector&lt;WebCore::KeypressCommand&gt;&amp;));
</span><del>-#else
-    void executeSavedKeypressCommands();
-    bool interpretKeyEvent(NSEvent *, Vector&lt;WebCore::KeypressCommand&gt;&amp;);
-#endif
</del><span class="cx"> 
</span><span class="cx">     void mouseMovedInternal(NSEvent *);
</span><span class="cx">     void mouseDownInternal(NSEvent *);
</span><span class="lines">@@ -615,11 +599,7 @@
</span><span class="cx">     // the application to distinguish the case of a new event from one
</span><span class="cx">     // that has been already sent to WebCore.
</span><span class="cx">     RetainPtr&lt;NSEvent&gt; m_keyDownEventBeingResent;
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx">     Vector&lt;WebCore::KeypressCommand&gt;* m_collectedKeypressCommands { nullptr };
</span><del>-#else
-    WKViewInterpretKeyEventsParameters* m_interpretKeyEventsParameters { nullptr };
-#endif
</del><span class="cx"> };
</span><span class="cx">     
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -93,13 +93,11 @@
</span><span class="cx"> SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *)
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Move to an SPI header.
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx"> @interface NSTextInputContext (WKNSTextInputContextDetails)
</span><span class="cx"> - (void)handleEvent:(NSEvent *)event completionHandler:(void(^)(BOOL handled))completionHandler;
</span><span class="cx"> - (void)handleEventByInputMethod:(NSEvent *)event completionHandler:(void(^)(BOOL handled))completionHandler;
</span><span class="cx"> - (BOOL)handleEventByKeyboardLayout:(NSEvent *)event;
</span><span class="cx"> @end
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> @interface WKWindowVisibilityObserver : NSObject {
</span><span class="cx">     NSView *_view;
</span><span class="lines">@@ -607,12 +605,7 @@
</span><span class="cx">     m_willBecomeFirstResponderAgain = false;
</span><span class="cx">     m_inResignFirstResponder = true;
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx">     m_page-&gt;confirmCompositionAsync();
</span><del>-#else
-    if (m_page-&gt;editorState().hasComposition &amp;&amp; !m_page-&gt;editorState().shouldIgnoreCompositionSelectionChange)
-        m_page-&gt;cancelComposition();
-#endif
</del><span class="cx"> 
</span><span class="cx">     notifyInputContextAboutDiscardedComposition();
</span><span class="cx"> 
</span><span class="lines">@@ -3265,8 +3258,6 @@
</span><span class="cx">     return !keyCode || keyCode == 10 || keyCode == 63;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> Vector&lt;WebCore::KeypressCommand&gt; WebViewImpl::collectKeyboardLayoutCommandsForEvent(NSEvent *event)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;WebCore::KeypressCommand&gt; commands;
</span><span class="lines">@@ -3721,459 +3712,6 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#else // USE(ASYNC_NSTEXTINPUTCLIENT)
-
-bool WebViewImpl::interpretKeyEvent(NSEvent *event, Vector&lt;WebCore::KeypressCommand&gt;&amp; commands)
-{
-    ASSERT(!m_interpretKeyEventsParameters);
-    ASSERT(commands.isEmpty());
-
-    if ([event type] == NSFlagsChanged)
-        return NO;
-
-    WKViewInterpretKeyEventsParameters parameters;
-    parameters.eventInterpretationHadSideEffects = false;
-    parameters.executingSavedKeypressCommands = false;
-    // We assume that an input method has consumed the event, and only change this assumption if one of the NSTextInput methods is called.
-    // We assume the IM will *not* consume hotkey sequences.
-    parameters.consumedByIM = !([event modifierFlags] &amp; NSCommandKeyMask);
-    parameters.commands = &amp;commands;
-    m_interpretKeyEventsParameters = &amp;parameters;
-
-    LOG(TextInput, &quot;-&gt; interpretKeyEvents:%p %@&quot;, event, event);
-    [m_view interpretKeyEvents:[NSArray arrayWithObject:event]];
-
-    m_interpretKeyEventsParameters = nullptr;
-
-    // An input method may consume an event and not tell us (e.g. when displaying a candidate window),
-    // in which case we should not bubble the event up the DOM.
-    if (parameters.consumedByIM) {
-        ASSERT(commands.isEmpty());
-        LOG(TextInput, &quot;...event %p was consumed by an input method&quot;, event);
-        return YES;
-    }
-
-    LOG(TextInput, &quot;...interpretKeyEvents for event %p done, returns %d&quot;, event, parameters.eventInterpretationHadSideEffects);
-
-    // If we have already executed all or some of the commands, the event is &quot;handled&quot;. Note that there are additional checks on web process side.
-    return parameters.eventInterpretationHadSideEffects;
-}
-
-void WebViewImpl::executeSavedKeypressCommands()
-{
-    auto* parameters = m_interpretKeyEventsParameters;
-    if (!parameters || parameters-&gt;commands-&gt;isEmpty())
-        return;
-
-    // We could be called again if the execution of one command triggers a call to selectedRange.
-    // In this case, the state is up to date, and we don't need to execute any more saved commands to return a result.
-    if (parameters-&gt;executingSavedKeypressCommands)
-        return;
-
-    LOG(TextInput, &quot;Executing %u saved keypress commands...&quot;, parameters-&gt;commands-&gt;size());
-
-    parameters-&gt;executingSavedKeypressCommands = true;
-    parameters-&gt;eventInterpretationHadSideEffects |= m_page-&gt;executeKeypressCommands(*parameters-&gt;commands);
-    parameters-&gt;commands-&gt;clear();
-    parameters-&gt;executingSavedKeypressCommands = false;
-
-    LOG(TextInput, &quot;...done executing saved keypress commands.&quot;);
-}
-
-void WebViewImpl::doCommandBySelector(SEL selector)
-{
-    LOG(TextInput, &quot;doCommandBySelector:\&quot;%s\&quot;&quot;, sel_getName(selector));
-
-    auto* parameters = m_interpretKeyEventsParameters;
-    if (parameters)
-        parameters-&gt;consumedByIM = false;
-
-    // As in insertText:replacementRange:, we assume that the call comes from an input method if there is marked text.
-    bool isFromInputMethod = m_page-&gt;editorState().hasComposition;
-
-    if (parameters &amp;&amp; !isFromInputMethod) {
-        WebCore::KeypressCommand command(NSStringFromSelector(selector));
-        parameters-&gt;commands-&gt;append(command);
-        LOG(TextInput, &quot;...stored&quot;);
-        m_page-&gt;registerKeypressCommandName(command.commandName);
-    } else {
-        // FIXME: Send the command to Editor synchronously and only send it along the
-        // responder chain if it's a selector that does not correspond to an editing command.
-        [m_view _web_superDoCommandBySelector:selector];
-    }
-}
-
-void WebViewImpl::insertText(id string)
-{
-    // Unlike an NSTextInputClient variant with replacementRange, this NSResponder method is called when there is no input context,
-    // so text input processing isn't performed. We are not going to actually insert any text in that case, but saving an insertText
-    // command ensures that a keypress event is dispatched as appropriate.
-    insertText(string, NSMakeRange(NSNotFound, 0));
-}
-
-void WebViewImpl::insertText(id string, NSRange replacementRange)
-{
-    bool isAttributedString = [string isKindOfClass:[NSAttributedString class]];
-    ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]);
-
-    if (replacementRange.location != NSNotFound)
-        LOG(TextInput, &quot;insertText:\&quot;%@\&quot; replacementRange:(%u, %u)&quot;, isAttributedString ? [string string] : string, replacementRange.location, replacementRange.length);
-    else
-        LOG(TextInput, &quot;insertText:\&quot;%@\&quot;&quot;, isAttributedString ? [string string] : string);
-    auto* parameters = m_interpretKeyEventsParameters;
-    if (parameters)
-        parameters-&gt;consumedByIM = false;
-
-    NSString *text;
-    bool isFromInputMethod = m_page-&gt;editorState().hasComposition;
-
-    Vector&lt;WebCore::TextAlternativeWithRange&gt; dictationAlternatives;
-
-    if (isAttributedString) {
-#if USE(DICTATION_ALTERNATIVES)
-        WebCore::collectDictationTextAlternatives(string, dictationAlternatives);
-#endif
-        // FIXME: We ignore most attributes from the string, so for example inserting from Character Palette loses font and glyph variation data.
-        text = [string string];
-    } else
-        text = string;
-
-    // insertText can be called for several reasons:
-    // - If it's from normal key event processing (including key bindings), we may need to save the action to perform it later.
-    // - If it's from an input method, then we should insert the text now. We assume it's from the input method if we have marked text.
-    // FIXME: In theory, this could be wrong for some input methods, so we should try to find another way to determine if the call is from the input method.
-    // - If it's sent outside of keyboard event processing (e.g. from Character Viewer, or when confirming an inline input area with a mouse),
-    // then we also execute it immediately, as there will be no other chance.
-    if (parameters &amp;&amp; !isFromInputMethod) {
-        // FIXME: Handle replacementRange in this case, too. It's known to occur in practice when canceling Press and Hold (see &lt;rdar://11940670&gt;).
-        ASSERT(replacementRange.location == NSNotFound);
-        WebCore::KeypressCommand command(&quot;insertText:&quot;, text);
-        parameters-&gt;commands-&gt;append(command);
-        m_page-&gt;registerKeypressCommandName(command.commandName);
-        return;
-    }
-
-    String eventText = text;
-    eventText.replace(NSBackTabCharacter, NSTabCharacter); // same thing is done in KeyEventMac.mm in WebCore
-    bool eventHandled;
-    if (!dictationAlternatives.isEmpty())
-        eventHandled = m_page-&gt;insertDictatedText(eventText, replacementRange, dictationAlternatives);
-    else
-        eventHandled = m_page-&gt;insertText(eventText, replacementRange);
-
-    if (parameters)
-        parameters-&gt;eventInterpretationHadSideEffects |= eventHandled;
-}
-
-NSTextInputContext *WebViewImpl::inputContext()
-{
-    auto* parameters = m_interpretKeyEventsParameters;
-
-    if (pluginComplexTextInputIdentifier() &amp;&amp; !parameters)
-        return [[WKTextInputWindowController sharedTextInputWindowController] inputContext];
-
-    // Disable text input machinery when in non-editable content. An invisible inline input area affects performance, and can prevent Expose from working.
-    if (!m_page-&gt;editorState().isContentEditable)
-        return nil;
-
-    return [m_view _web_superInputContext];
-}
-
-NSRange WebViewImpl::selectedRange()
-{
-    executeSavedKeypressCommands();
-
-    EditingRange selectedRange;
-    m_page-&gt;getSelectedRange(selectedRange);
-
-    NSRange result = selectedRange;
-    if (result.location == NSNotFound)
-        LOG(TextInput, &quot;selectedRange -&gt; (NSNotFound, %u)&quot;, result.length);
-    else
-        LOG(TextInput, &quot;selectedRange -&gt; (%u, %u)&quot;, result.location, result.length);
-
-    return result;
-}
-
-bool WebViewImpl::hasMarkedText()
-{
-    auto* parameters = m_interpretKeyEventsParameters;
-
-    BOOL result;
-    if (parameters) {
-        result = m_page-&gt;editorState().hasComposition;
-        if (result) {
-            // A saved command can confirm a composition, but it cannot start a new one.
-            executeSavedKeypressCommands();
-            result = m_page-&gt;editorState().hasComposition;
-        }
-    } else {
-        EditingRange markedRange;
-        m_page-&gt;getMarkedRange(markedRange);
-        result = markedRange.location != notFound;
-    }
-
-    LOG(TextInput, &quot;hasMarkedText -&gt; %u&quot;, result);
-    return result;
-}
-
-void WebViewImpl::unmarkText()
-{
-    executeSavedKeypressCommands();
-
-    LOG(TextInput, &quot;unmarkText&quot;);
-
-    auto* parameters = m_interpretKeyEventsParameters;
-
-    if (parameters) {
-        parameters-&gt;eventInterpretationHadSideEffects = true;
-        parameters-&gt;consumedByIM = false;
-    }
-
-    m_page-&gt;confirmComposition();
-}
-
-void WebViewImpl::setMarkedText(id string, NSRange newSelectedRange, NSRange replacementRange)
-{
-    executeSavedKeypressCommands();
-
-    BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]];
-    ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]);
-
-    LOG(TextInput, &quot;setMarkedText:\&quot;%@\&quot; selectedRange:(%u, %u)&quot;, isAttributedString ? [string string] : string, newSelectedRange.location, newSelectedRange.length);
-
-    auto* parameters = m_interpretKeyEventsParameters;
-
-    if (parameters) {
-        parameters-&gt;eventInterpretationHadSideEffects = true;
-        parameters-&gt;consumedByIM = false;
-    }
-    
-    Vector&lt;WebCore::CompositionUnderline&gt; underlines;
-    NSString *text;
-
-    if (isAttributedString) {
-        // FIXME: We ignore most attributes from the string, so an input method cannot specify e.g. a font or a glyph variation.
-        text = [string string];
-        underlines = extractUnderlines(string);
-    } else
-        text = string;
-
-    if (m_page-&gt;editorState().isInPasswordField) {
-        // In password fields, we only allow ASCII dead keys, and don't allow inline input, matching NSSecureTextInputField.
-        // Allowing ASCII dead keys is necessary to enable full Roman input when using a Vietnamese keyboard.
-        ASSERT(!m_page-&gt;editorState().hasComposition);
-        notifyInputContextAboutDiscardedComposition();
-        if ([text length] == 1 &amp;&amp; [[text decomposedStringWithCanonicalMapping] characterAtIndex:0] &lt; 0x80) {
-            m_page-&gt;insertText(text, replacementRange);
-        } else
-            NSBeep();
-        return;
-    }
-
-    m_page-&gt;setComposition(text, underlines, newSelectedRange, replacementRange);
-}
-
-NSRange WebViewImpl::markedRange()
-{
-    executeSavedKeypressCommands();
-
-    EditingRange markedRange;
-    m_page-&gt;getMarkedRange(markedRange);
-
-    NSRange result = markedRange;
-    if (result.location == NSNotFound)
-        LOG(TextInput, &quot;markedRange -&gt; (NSNotFound, %u)&quot;, result.length);
-    else
-        LOG(TextInput, &quot;markedRange -&gt; (%u, %u)&quot;, result.location, result.length);
-
-    return result;
-}
-
-NSAttributedString *WebViewImpl::attributedSubstringForProposedRange(NSRange proposedRange, NSRangePointer actualRange)
-{
-    executeSavedKeypressCommands();
-
-    if (!m_page-&gt;editorState().isContentEditable) {
-        LOG(TextInput, &quot;attributedSubstringFromRange:(%u, %u) -&gt; nil&quot;, proposedRange.location, proposedRange.length);
-        return nil;
-    }
-
-    if (m_page-&gt;editorState().isInPasswordField)
-        return nil;
-
-    AttributedString result;
-    m_page-&gt;getAttributedSubstringFromRange(proposedRange, result);
-
-    if (actualRange) {
-        *actualRange = proposedRange;
-        actualRange-&gt;length = [result.string length];
-    }
-
-    LOG(TextInput, &quot;attributedSubstringFromRange:(%u, %u) -&gt; \&quot;%@\&quot;&quot;, proposedRange.location, proposedRange.length, [result.string string]);
-    return [[result.string retain] autorelease];
-}
-
-NSUInteger WebViewImpl::characterIndexForPoint(NSPoint point)
-{
-    executeSavedKeypressCommands();
-
-    NSWindow *window = m_view.window;
-    
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
-    if (window)
-        point = [window convertScreenToBase:point];
-#pragma clang diagnostic pop
-    point = [m_view convertPoint:point fromView:nil];  // the point is relative to the main frame
-    
-    uint64_t result = m_page-&gt;characterIndexForPoint(WebCore::IntPoint(point));
-    if (result == notFound)
-        result = NSNotFound;
-    LOG(TextInput, &quot;characterIndexForPoint:(%f, %f) -&gt; %u&quot;, point.x, point.y, result);
-    return result;
-}
-
-NSRect WebViewImpl::firstRectForCharacterRange(NSRange range, NSRangePointer actualRange)
-{
-    executeSavedKeypressCommands();
-
-    // Just to match NSTextView's behavior. Regression tests cannot detect this;
-    // to reproduce, use a test application from http://bugs.webkit.org/show_bug.cgi?id=4682
-    // (type something; try ranges (1, -1) and (2, -1).
-    if ((range.location + range.length &lt; range.location) &amp;&amp; (range.location + range.length != 0))
-        range.length = 0;
-
-    if (range.location == NSNotFound) {
-        if (actualRange)
-            *actualRange = range;
-        LOG(TextInput, &quot;firstRectForCharacterRange:(NSNotFound, %u) -&gt; NSZeroRect&quot;, range.length);
-        return NSZeroRect;
-    }
-
-    NSRect resultRect = m_page-&gt;firstRectForCharacterRange(range);
-    resultRect = [m_view convertRect:resultRect toView:nil];
-    resultRect = [m_view.window convertRectToScreen:resultRect];
-
-    if (actualRange) {
-        // FIXME: Update actualRange to match the range of first rect.
-        *actualRange = range;
-    }
-
-    LOG(TextInput, &quot;firstRectForCharacterRange:(%u, %u) -&gt; (%f, %f, %f, %f)&quot;, range.location, range.length, resultRect.origin.x, resultRect.origin.y, resultRect.size.width, resultRect.size.height);
-    return resultRect;
-}
-
-bool WebViewImpl::performKeyEquivalent(NSEvent *event)
-{
-    if (ignoresNonWheelEvents())
-        return false;
-
-    // There's a chance that responding to this event will run a nested event loop, and
-    // fetching a new event might release the old one. Retaining and then autoreleasing
-    // the current event prevents that from causing a problem inside WebKit or AppKit code.
-    [[event retain] autorelease];
-
-    // We get Esc key here after processing either Esc or Cmd+period. The former starts as a keyDown, and the latter starts as a key equivalent,
-    // but both get transformed to a cancelOperation: command, executing which passes an Esc key event to -performKeyEquivalent:.
-    // Don't interpret this event again, avoiding re-entrancy and infinite loops.
-    if ([[event charactersIgnoringModifiers] isEqualToString:@&quot;\e&quot;] &amp;&amp; !([event modifierFlags] &amp; NSDeviceIndependentModifierFlagsMask))
-        return [m_view _web_superPerformKeyEquivalent:event];
-
-    if (m_keyDownEventBeingResent) {
-        // WebCore has already seen the event, no need for custom processing.
-        // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit
-        // first performs the original key equivalent, and if that isn't handled, it dispatches a synthetic Cmd+'+'.
-        return [m_view _web_superPerformKeyEquivalent:event];
-    }
-
-    ASSERT(event == [NSApp currentEvent]);
-
-    disableComplexTextInputIfNecessary();
-
-    // Pass key combos through WebCore if there is a key binding available for
-    // this event. This lets webpages have a crack at intercepting key-modified keypresses.
-    // FIXME: Why is the firstResponder check needed?
-    if (m_view == m_view.window.firstResponder) {
-        Vector&lt;WebCore::KeypressCommand&gt; commands;
-        bool handledByInputMethod = interpretKeyEvent(event, commands);
-        m_page-&gt;handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
-        return true;
-    }
-    
-    return [m_view _web_superPerformKeyEquivalent:event];
-}
-
-void WebViewImpl::keyUp(NSEvent *event)
-{
-    if (ignoresNonWheelEvents())
-        return;
-
-    LOG(TextInput, &quot;keyUp:%p %@&quot;, event, event);
-    // We don't interpret the keyUp event, as this breaks key bindings (see &lt;https://bugs.webkit.org/show_bug.cgi?id=130100&gt;).
-    m_page-&gt;handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
-}
-
-void WebViewImpl::keyDown(NSEvent *event)
-{
-    if (ignoresNonWheelEvents())
-        return;
-
-    LOG(TextInput, &quot;keyDown:%p %@%s&quot;, event, event, (event == m_keyDownEventBeingResent) ? &quot; (re-sent)&quot; : &quot;&quot;);
-
-    // There's a chance that responding to this event will run a nested event loop, and
-    // fetching a new event might release the old one. Retaining and then autoreleasing
-    // the current event prevents that from causing a problem inside WebKit or AppKit code.
-    [[event retain] autorelease];
-
-    if (tryHandlePluginComplexTextInputKeyDown(event)) {
-        LOG(TextInput, &quot;...handled by plug-in&quot;);
-        return;
-    }
-
-    // We could be receiving a key down from AppKit if we have re-sent an event
-    // that maps to an action that is currently unavailable (for example a copy when
-    // there is no range selection).
-    // If this is the case we should ignore the key down.
-    if (m_keyDownEventBeingResent == event) {
-        [m_view _web_superKeyDown:event];
-        return;
-    }
-
-    Vector&lt;WebCore::KeypressCommand&gt; commands;
-    bool handledByInputMethod = interpretKeyEvent(event, commands);
-    if (!commands.isEmpty()) {
-        // An input method may make several actions per keypress. For example, pressing Return with Korean IM both confirms it and sends a newline.
-        // IM-like actions are handled immediately (so the return value from UI process is true), but there are saved commands that
-        // should be handled like normal text input after DOM event dispatch.
-        handledByInputMethod = false;
-    }
-
-    m_page-&gt;handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
-}
-
-void WebViewImpl::flagsChanged(NSEvent *event)
-{
-    if (ignoresNonWheelEvents())
-        return;
-
-    LOG(TextInput, &quot;flagsChanged:%p %@&quot;, event, event);
-
-    // There's a chance that responding to this event will run a nested event loop, and
-    // fetching a new event might release the old one. Retaining and then autoreleasing
-    // the current event prevents that from causing a problem inside WebKit or AppKit code.
-    [[event retain] autorelease];
-
-    // Don't make an event from the num lock and function keys
-    if (eventKeyCodeIsZeroOrNumLockOrFn(event))
-        return;
-
-    m_page-&gt;handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
-}
-
-#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
-
-#if USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx"> #define NATIVE_MOUSE_EVENT_HANDLER(EventName) \
</span><span class="cx">     void WebViewImpl::EventName(NSEvent *event) \
</span><span class="cx">     { \
</span><span class="lines">@@ -4220,33 +3758,6 @@
</span><span class="cx">         NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
</span><span class="cx">         m_page-&gt;handleMouseEvent(webEvent); \
</span><span class="cx">     }
</span><del>-    
-#else // USE(ASYNC_NSTEXTINPUTCLIENT)
-#define NATIVE_MOUSE_EVENT_HANDLER(EventName) \
-    void WebViewImpl::EventName(NSEvent *event) \
-    { \
-        if (m_ignoresNonWheelEvents) \
-            return; \
-        if ([m_view.inputContext handleEvent:event]) { \
-            LOG(TextInput, &quot;%s was handled by text input context&quot;, String(#EventName).substring(0, String(#EventName).find(&quot;Internal&quot;)).ascii().data()); \
-            return; \
-        } \
-        NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
-        m_page-&gt;handleMouseEvent(webEvent); \
-    }
-#define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(EventName) \
-    void WebViewImpl::EventName(NSEvent *event) \
-    { \
-        if (m_ignoresNonWheelEvents) \
-            return; \
-        if ([m_view.inputContext handleEvent:event]) { \
-            LOG(TextInput, &quot;%s was handled by text input context&quot;, String(#EventName).substring(0, String(#EventName).find(&quot;Internal&quot;)).ascii().data()); \
-            return; \
-        } \
-        NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
-        m_page-&gt;handleMouseEvent(webEvent); \
-    }
-#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
</del><span class="cx"> 
</span><span class="cx"> NATIVE_MOUSE_EVENT_HANDLER(mouseEntered)
</span><span class="cx"> NATIVE_MOUSE_EVENT_HANDLER(mouseExited)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -194,10 +194,6 @@
</span><span class="cx">     virtual void selectionDidChange() = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    virtual void notifyApplicationAboutInputContextChange() = 0;
-#endif
-
</del><span class="cx"> #if USE(APPKIT)
</span><span class="cx">     virtual void setPromisedDataForImage(const String&amp; pasteboardName, PassRefPtr&lt;WebCore::SharedBuffer&gt; imageBuffer, const String&amp; filename, const String&amp; extension, const String&amp; title,
</span><span class="cx">                                  const String&amp; url, const String&amp; visibleUrl, PassRefPtr&lt;WebCore::SharedBuffer&gt; archiveBuffer) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -345,9 +345,6 @@
</span><span class="cx">     , m_backForwardList(WebBackForwardList::create(*this))
</span><span class="cx">     , m_maintainsInactiveSelection(false)
</span><span class="cx">     , m_isEditable(false)
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    , m_temporarilyClosedComposition(false)
-#endif
</del><span class="cx">     , m_textZoomFactor(1)
</span><span class="cx">     , m_pageZoomFactor(1)
</span><span class="cx">     , m_pageScaleFactor(1)
</span><span class="lines">@@ -5043,9 +5040,6 @@
</span><span class="cx">     m_isPageSuspended = false;
</span><span class="cx"> 
</span><span class="cx">     m_editorState = EditorState();
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    m_temporarilyClosedComposition = false;
-#endif
</del><span class="cx"> 
</span><span class="cx">     m_pageClient.processDidExit();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -568,20 +568,6 @@
</span><span class="cx">     void setFont(const String&amp; fontFamily, double fontSize, uint64_t fontTraits);
</span><span class="cx">     void fontAtSelection(std::function&lt;void (const String&amp;, double, bool, CallbackBase::Error)&gt;);
</span><span class="cx"> 
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-    bool insertText(const String&amp; text, const EditingRange&amp; replacementRange);
-    void setComposition(const String&amp; text, Vector&lt;WebCore::CompositionUnderline&gt; underlines, const EditingRange&amp; selectionRange, const EditingRange&amp; replacementRange);
-    void confirmComposition();
-    bool insertDictatedText(const String&amp; text, const EditingRange&amp; replacementRange, const Vector&lt;WebCore::TextAlternativeWithRange&gt;&amp; dictationAlternatives);
-    void getAttributedSubstringFromRange(const EditingRange&amp;, AttributedString&amp;);
-    void getMarkedRange(EditingRange&amp;);
-    void getSelectedRange(EditingRange&amp;);
-    uint64_t characterIndexForPoint(const WebCore::IntPoint);
-    WebCore::IntRect firstRectForCharacterRange(const EditingRange&amp;);
-    bool executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp;);
-    void cancelComposition();
-#endif // !USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx">     void startWindowDrag();
</span><span class="cx">     NSWindow *platformWindow();
</span><span class="cx"> 
</span><span class="lines">@@ -1583,9 +1569,6 @@
</span><span class="cx"> 
</span><span class="cx">     EditorState m_editorState;
</span><span class="cx">     bool m_isEditable;
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    bool m_temporarilyClosedComposition; // Editor state changed from hasComposition to !hasComposition, but that was only with shouldIgnoreCompositionSelectionChange yet.
-#endif
</del><span class="cx"> 
</span><span class="cx">     double m_textZoomFactor;
</span><span class="cx">     double m_pageZoomFactor;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -108,9 +108,6 @@
</span><span class="cx">     virtual void resetSecureInputState() override;
</span><span class="cx">     virtual void notifyInputContextAboutDiscardedComposition() override;
</span><span class="cx">     virtual void selectionDidChange() override;
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    virtual void notifyApplicationAboutInputContextChange() override;
-#endif
</del><span class="cx"> 
</span><span class="cx">     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&amp;) override;
</span><span class="cx">     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&amp;) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -390,13 +390,6 @@
</span><span class="cx">     m_impl-&gt;notifyInputContextAboutDiscardedComposition();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-void PageClientImpl::notifyApplicationAboutInputContextChange()
-{
-    [NSApp updateWindows];
-}
-#endif
-
</del><span class="cx"> FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><span class="cx">     return toDeviceSpace(rect, [m_view window]);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -143,142 +143,6 @@
</span><span class="cx">     process().send(Messages::WebPage::SetMainFrameIsScrollable(isScrollable), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-
-void WebPageProxy::setComposition(const String&amp; text, Vector&lt;CompositionUnderline&gt; underlines, const EditingRange&amp; selectionRange, const EditingRange&amp; replacementRange)
-{
-    if (!isValid()) {
-        // If this fails, we should call -discardMarkedText on input context to notify the input method.
-        // This will happen naturally later, as part of reloading the page.
-        return;
-    }
-
-    process().sendSync(Messages::WebPage::SetComposition(text, underlines, selectionRange, replacementRange), Messages::WebPage::SetComposition::Reply(m_editorState), m_pageID);
-}
-
-void WebPageProxy::confirmComposition()
-{
-    if (!isValid())
-        return;
-
-    process().sendSync(Messages::WebPage::ConfirmComposition(), Messages::WebPage::ConfirmComposition::Reply(m_editorState), m_pageID);
-}
-
-bool WebPageProxy::insertText(const String&amp; text, const EditingRange&amp; replacementRange)
-{
-    if (!isValid())
-        return true;
-
-    bool handled = true;
-    process().sendSync(Messages::WebPage::InsertText(text, replacementRange), Messages::WebPage::InsertText::Reply(handled, m_editorState), m_pageID);
-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    m_temporarilyClosedComposition = false;
-#endif
-
-    return handled;
-}
-
-bool WebPageProxy::insertDictatedText(const String&amp; text, const EditingRange&amp; replacementRange, const Vector&lt;TextAlternativeWithRange&gt;&amp; dictationAlternativesWithRange)
-{
-#if USE(DICTATION_ALTERNATIVES)
-    if (dictationAlternativesWithRange.isEmpty())
-        return insertText(text, replacementRange);
-
-    if (!isValid())
-        return true;
-
-    Vector&lt;DictationAlternative&gt; dictationAlternatives;
-
-    for (size_t i = 0; i &lt; dictationAlternativesWithRange.size(); ++i) {
-        const TextAlternativeWithRange&amp; alternativeWithRange = dictationAlternativesWithRange[i];
-        uint64_t dictationContext = m_pageClient.addDictationAlternatives(alternativeWithRange.alternatives);
-        if (dictationContext)
-            dictationAlternatives.append(DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext));
-    }
-
-    if (dictationAlternatives.isEmpty())
-        return insertText(text, replacementRange);
-
-    bool handled = true;
-    process().sendSync(Messages::WebPage::InsertDictatedText(text, replacementRange, dictationAlternatives), Messages::WebPage::InsertDictatedText::Reply(handled, m_editorState), m_pageID);
-    return handled;
-#else
-    return insertText(text, replacementRange);
-#endif
-}
-
-void WebPageProxy::getMarkedRange(EditingRange&amp; result)
-{
-    result = EditingRange();
-
-    if (!isValid())
-        return;
-
-    process().sendSync(Messages::WebPage::GetMarkedRange(), Messages::WebPage::GetMarkedRange::Reply(result), m_pageID);
-    MESSAGE_CHECK(result.isValid());
-}
-
-void WebPageProxy::getSelectedRange(EditingRange&amp; result)
-{
-    result = EditingRange();
-
-    if (!isValid())
-        return;
-
-    process().sendSync(Messages::WebPage::GetSelectedRange(), Messages::WebPage::GetSelectedRange::Reply(result), m_pageID);
-    MESSAGE_CHECK(result.isValid());
-}
-
-void WebPageProxy::getAttributedSubstringFromRange(const EditingRange&amp; range, AttributedString&amp; result)
-{
-    if (!isValid())
-        return;
-    process().sendSync(Messages::WebPage::GetAttributedSubstringFromRange(range), Messages::WebPage::GetAttributedSubstringFromRange::Reply(result), m_pageID);
-}
-
-uint64_t WebPageProxy::characterIndexForPoint(const IntPoint point)
-{
-    if (!isValid())
-        return 0;
-
-    uint64_t result = 0;
-    process().sendSync(Messages::WebPage::CharacterIndexForPoint(point), Messages::WebPage::CharacterIndexForPoint::Reply(result), m_pageID);
-    return result;
-}
-
-IntRect WebPageProxy::firstRectForCharacterRange(const EditingRange&amp; range)
-{
-    if (!isValid())
-        return IntRect();
-
-    IntRect resultRect;
-    process().sendSync(Messages::WebPage::FirstRectForCharacterRange(range), Messages::WebPage::FirstRectForCharacterRange::Reply(resultRect), m_pageID);
-    return resultRect;
-}
-
-bool WebPageProxy::executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp; commands)
-{
-    if (!isValid())
-        return false;
-
-    bool result = false;
-    process().sendSync(Messages::WebPage::ExecuteKeypressCommands(commands), Messages::WebPage::ExecuteKeypressCommands::Reply(result, m_editorState), m_pageID);
-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    m_temporarilyClosedComposition = false;
-#endif
-    return result;
-}
-
-void WebPageProxy::cancelComposition()
-{
-    if (!isValid())
-        return;
-
-    process().sendSync(Messages::WebPage::CancelComposition(), Messages::WebPage::CancelComposition::Reply(m_editorState), m_pageID);
-}
-
-#endif // !USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> void WebPageProxy::insertDictatedTextAsync(const String&amp; text, const EditingRange&amp; replacementRange, const Vector&lt;TextAlternativeWithRange&gt;&amp; dictationAlternativesWithRange, bool registerUndoGroup)
</span><span class="cx"> {
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="lines">@@ -697,11 +561,6 @@
</span><span class="cx"> void WebPageProxy::editorStateChanged(const EditorState&amp; editorState)
</span><span class="cx"> {
</span><span class="cx">     bool couldChangeSecureInputState = m_editorState.isInPasswordField != editorState.isInPasswordField || m_editorState.selectionIsNone;
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-    bool closedComposition = !editorState.shouldIgnoreCompositionSelectionChange &amp;&amp; !editorState.hasComposition &amp;&amp; (m_editorState.hasComposition || m_temporarilyClosedComposition);
-    m_temporarilyClosedComposition = editorState.shouldIgnoreCompositionSelectionChange &amp;&amp; (m_temporarilyClosedComposition || m_editorState.hasComposition) &amp;&amp; !editorState.hasComposition;
-    bool editabilityChanged = m_editorState.isContentEditable != editorState.isContentEditable;
-#endif
</del><span class="cx">     
</span><span class="cx">     m_editorState = editorState;
</span><span class="cx">     
</span><span class="lines">@@ -713,21 +572,6 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     m_pageClient.selectionDidChange();
</span><del>-
-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-    if (closedComposition)
-        m_pageClient.notifyInputContextAboutDiscardedComposition();
-    if (editabilityChanged) {
-        // This is only needed in sync code path, because AppKit automatically refreshes input context for async clients (&lt;rdar://problem/18604360&gt;).
-        m_pageClient.notifyApplicationAboutInputContextChange();
-    }
-    if (editorState.hasComposition) {
-        // Abandon the current inline input session if selection changed for any other reason but an input method changing the composition.
-        // FIXME: This logic should be in WebCore, no need to round-trip to UI process to cancel the composition.
-        cancelComposition();
-        m_pageClient.notifyInputContextAboutDiscardedComposition();
-    }
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::startWindowDrag()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -4470,7 +4470,7 @@
</span><span class="cx">     auto editorState = this-&gt;editorState(view &amp;&amp; view-&gt;needsLayout() ? IncludePostLayoutDataHint::No : IncludePostLayoutDataHint::Yes);
</span><span class="cx">     m_isEditorStateMissingPostLayoutData = editorState.isMissingPostLayoutData;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; USE(ASYNC_NSTEXTINPUTCLIENT)
</del><ins>+#if PLATFORM(MAC)
</ins><span class="cx">     // Abandon the current inline input session if selection changed for any other reason but an input method direct action.
</span><span class="cx">     // FIXME: This logic should be in WebCore.
</span><span class="cx">     // FIXME: Many changes that affect composition node do not go through didChangeSelection(). We need to do something when DOM manipulation affects the composition, because otherwise input method's idea about it will be different from Editor's.
</span><span class="lines">@@ -4480,8 +4480,6 @@
</span><span class="cx">         send(Messages::WebPageProxy::CompositionWasCanceled(editorState));
</span><span class="cx">     } else
</span><span class="cx">         send(Messages::WebPageProxy::EditorStateChanged(editorState));
</span><del>-#else
-    send(Messages::WebPageProxy::EditorStateChanged(editorState), pageID(), IPC::DispatchMessageEvenWhenWaitingForSyncReply);
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -653,20 +653,7 @@
</span><span class="cx">     void insertDictatedTextAsync(const String&amp; text, const EditingRange&amp; replacementRange, const Vector&lt;WebCore::DictationAlternative&gt;&amp; dictationAlternativeLocations, bool registerUndoGroup = false);
</span><span class="cx">     void attributedSubstringForCharacterRangeAsync(const EditingRange&amp;, uint64_t callbackID);
</span><span class="cx">     void fontAtSelection(uint64_t callbackID);
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-    void insertText(const String&amp; text, const EditingRange&amp; replacementRange, bool&amp; handled, EditorState&amp; newState);
-    void setComposition(const String&amp; text, Vector&lt;WebCore::CompositionUnderline&gt; underlines, const EditingRange&amp; selectionRange, const EditingRange&amp; replacementRange, EditorState&amp; newState);
-    void confirmComposition(EditorState&amp; newState);
-    void insertDictatedText(const String&amp; text, const EditingRange&amp; replacementRange, const Vector&lt;WebCore::DictationAlternative&gt;&amp; dictationAlternativeLocations, bool&amp; handled, EditorState&amp; newState);
-    void getAttributedSubstringFromRange(const EditingRange&amp;, AttributedString&amp;);
-    void getMarkedRange(EditingRange&amp;);
-    void getSelectedRange(EditingRange&amp;);
-    void characterIndexForPoint(const WebCore::IntPoint point, uint64_t&amp; result);
-    void firstRectForCharacterRange(const EditingRange&amp;, WebCore::IntRect&amp; resultRect);
-    void executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp;, bool&amp; handled, EditorState&amp; newState);
-    void cancelComposition(EditorState&amp; newState);
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     void readSelectionFromPasteboard(const WTF::String&amp; pasteboardName, bool&amp; result);
</span><span class="cx">     void getStringSelectionForPasteboard(WTF::String&amp; stringValue);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -368,19 +368,6 @@
</span><span class="cx">     AttributedSubstringForCharacterRangeAsync(struct WebKit::EditingRange range, uint64_t callbackID);
</span><span class="cx">     FontAtSelection(uint64_t callbackID);
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC) &amp;&amp; !USE(ASYNC_NSTEXTINPUTCLIENT)
-    InsertText(String text, struct WebKit::EditingRange replacementRange) -&gt; (bool handled, struct WebKit::EditorState newState)
-    SetComposition(String text, Vector&lt;WebCore::CompositionUnderline&gt; underlines, struct WebKit::EditingRange selectionRange, struct WebKit::EditingRange replacementRange) -&gt; (struct WebKit::EditorState newState)
-    ConfirmComposition() -&gt; (struct WebKit::EditorState newState)
-    InsertDictatedText(String text, struct WebKit::EditingRange replacementRange, Vector&lt;WebCore::DictationAlternative&gt; dictationAlternatives) -&gt; (bool handled, struct WebKit::EditorState newState)
-    GetAttributedSubstringFromRange(struct WebKit::EditingRange range) -&gt; (struct WebKit::AttributedString result)
-    GetMarkedRange() -&gt; (struct WebKit::EditingRange range)
-    GetSelectedRange() -&gt; (struct WebKit::EditingRange range)
-    CharacterIndexForPoint(WebCore::IntPoint point) -&gt; (uint64_t result)
-    FirstRectForCharacterRange(struct WebKit::EditingRange range) -&gt; (WebCore::IntRect resultRect)
-    ExecuteKeypressCommands(Vector&lt;WebCore::KeypressCommand&gt; savedCommands) -&gt; (bool handled, struct WebKit::EditorState newState)
-    CancelComposition() -&gt; (struct WebKit::EditorState newState)
-#endif
</del><span class="cx"> 
</span><span class="cx">     SetMinimumLayoutSize(WebCore::IntSize minimumLayoutSize)
</span><span class="cx">     SetAutoSizingShouldExpandToViewHeight(bool shouldExpand)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (192833 => 192834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-11-30 23:02:00 UTC (rev 192833)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-11-30 23:06:17 UTC (rev 192834)
</span><span class="lines">@@ -269,167 +269,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !USE(ASYNC_NSTEXTINPUTCLIENT)
-
-void WebPage::setComposition(const String&amp; text, Vector&lt;CompositionUnderline&gt; underlines, const EditingRange&amp; selectionRange, const EditingRange&amp; replacementEditingRange, EditorState&amp; newState)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    if (frame.selection().selection().isContentEditable()) {
-        RefPtr&lt;Range&gt; replacementRange;
-        if (replacementEditingRange.location != notFound) {
-            replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
-            if (replacementRange)
-                frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
-        }
-
-        frame.editor().setComposition(text, underlines, selectionRange.location, selectionRange.location + selectionRange.length);
-    }
-
-    newState = editorState();
-}
-
-void WebPage::confirmComposition(EditorState&amp; newState)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-    frame.editor().confirmComposition();
-    newState = editorState();
-}
-
-void WebPage::insertText(const String&amp; text, const EditingRange&amp; replacementEditingRange, bool&amp; handled, EditorState&amp; newState)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    if (replacementEditingRange.location != notFound) {
-        RefPtr&lt;Range&gt; replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
-        if (replacementRange)
-            frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
-    }
-
-    if (!frame.editor().hasComposition()) {
-        // An insertText: might be handled by other responders in the chain if we don't handle it.
-        // One example is space bar that results in scrolling down the page.
-        handled = frame.editor().insertText(text, nullptr);
-    } else {
-        handled = true;
-        frame.editor().confirmComposition(text);
-    }
-
-    newState = editorState();
-}
-
-void WebPage::insertDictatedText(const String&amp; text, const EditingRange&amp; replacementEditingRange, const Vector&lt;WebCore::DictationAlternative&gt;&amp; dictationAlternativeLocations, bool&amp; handled, EditorState&amp; newState)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    if (replacementEditingRange.location != notFound) {
-        RefPtr&lt;Range&gt; replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
-        if (replacementRange)
-            frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
-    }
-
-    ASSERT(!frame.editor().hasComposition());
-    handled = frame.editor().insertDictatedText(text, dictationAlternativeLocations, nullptr);
-    newState = editorState();
-}
-
-void WebPage::getMarkedRange(EditingRange&amp; result)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    RefPtr&lt;Range&gt; range = frame.editor().compositionRange();
-    size_t locationSize;
-    size_t lengthSize;
-    if (range &amp;&amp; TextIterator::getLocationAndLengthFromRange(frame.selection().rootEditableElementOrDocumentElement(), range.get(), locationSize, lengthSize))
-        result = EditingRange(static_cast&lt;uint64_t&gt;(locationSize), static_cast&lt;uint64_t&gt;(lengthSize));
-    else
-        result = EditingRange();
-}
-
-void WebPage::getSelectedRange(EditingRange&amp; result)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    size_t locationSize;
-    size_t lengthSize;
-    RefPtr&lt;Range&gt; range = frame.selection().toNormalizedRange();
-    if (range &amp;&amp; TextIterator::getLocationAndLengthFromRange(frame.selection().rootEditableElementOrDocumentElement(), range.get(), locationSize, lengthSize))
-        result = EditingRange(static_cast&lt;uint64_t&gt;(locationSize), static_cast&lt;uint64_t&gt;(lengthSize));
-    else
-        result = EditingRange();
-}
-
-void WebPage::getAttributedSubstringFromRange(const EditingRange&amp; editingRange, AttributedString&amp; result)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-
-    const VisibleSelection&amp; selection = frame.selection().selection();
-    if (selection.isNone() || !selection.isContentEditable() || selection.isInPasswordField())
-        return;
-
-    RefPtr&lt;Range&gt; range = rangeFromEditingRange(frame, editingRange);
-    if (!range)
-        return;
-
-    result.string = editingAttributedStringFromRange(*range);
-    NSAttributedString* attributedString = result.string.get();
-    
-    // WebCore::editingAttributedStringFromRange() insists on inserting a trailing
-    // whitespace at the end of the string which breaks the ATOK input method.  &lt;rdar://problem/5400551&gt;
-    // To work around this we truncate the resultant string to the correct length.
-    if ([attributedString length] &gt; editingRange.length) {
-        ASSERT([attributedString length] == editingRange.length + 1);
-        ASSERT([[attributedString string] characterAtIndex:editingRange.length] == '\n' || [[attributedString string] characterAtIndex:editingRange.length] == ' ');
-        result.string = [attributedString attributedSubstringFromRange:NSMakeRange(0, editingRange.length)];
-    }
-}
-
-void WebPage::characterIndexForPoint(IntPoint point, uint64_t&amp; index)
-{
-    index = notFound;
-
-    HitTestResult result = m_page-&gt;mainFrame().eventHandler().hitTestResultAtPoint(point);
-    Frame* frame = result.innerNonSharedNode() ? result.innerNodeFrame() : &amp;m_page-&gt;focusController().focusedOrMainFrame();
-    
-    RefPtr&lt;Range&gt; range = frame-&gt;rangeForPoint(result.roundedPointInInnerNodeFrame());
-    if (!range)
-        return;
-
-    size_t location;
-    size_t length;
-    if (TextIterator::getLocationAndLengthFromRange(frame-&gt;selection().rootEditableElementOrDocumentElement(), range.get(), location, length))
-        index = static_cast&lt;uint64_t&gt;(location);
-}
-    
-void WebPage::firstRectForCharacterRange(const EditingRange&amp; editingRange, WebCore::IntRect&amp; resultRect)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-    resultRect.setLocation(IntPoint(0, 0));
-    resultRect.setSize(IntSize(0, 0));
-    
-    RefPtr&lt;Range&gt; range = rangeFromEditingRange(frame, editingRange);
-    if (!range)
-        return;
-     
-    IntRect rect = frame.editor().firstRectForRange(range.get());
-    resultRect = frame.view()-&gt;contentsToWindow(rect);
-}
-
-void WebPage::executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp; commands, bool&amp; handled, EditorState&amp; newState)
-{
-    handled = executeKeypressCommandsInternal(commands, nullptr);
-    newState = editorState();
-}
-
-void WebPage::cancelComposition(EditorState&amp; newState)
-{
-    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
-    frame.editor().cancelComposition();
-    newState = editorState();
-}
-
-#endif // !USE(ASYNC_NSTEXTINPUTCLIENT)
-
</del><span class="cx"> void WebPage::insertDictatedTextAsync(const String&amp; text, const EditingRange&amp; replacementEditingRange, const Vector&lt;WebCore::DictationAlternative&gt;&amp; dictationAlternativeLocations, bool registerUndoGroup)
</span><span class="cx"> {
</span><span class="cx">     Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span></span></pre>
</div>
</div>

</body>
</html>