<!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>[190797] branches/safari-601.1.46-branch/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/190797">190797</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-09 07:22:10 -0700 (Fri, 09 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/190568">r190568</a>. rdar://problem/22974825</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchSourceWebKit2ChangeLog">branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageWebPageh">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagemessagesin">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -1,5 +1,57 @@
</span><span class="cx"> 2015-10-08  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r190568. rdar://problem/22974825
+
+    2015-10-05  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+            Cannot select certain text on Wikipedia homepage even when zoomed in.
+            https://bugs.webkit.org/show_bug.cgi?id=149758
+            rdar://problem/22407947
+
+            Reviewed by Dan Bernstein.
+
+            Several functions that handle gestures for text selection are used for both
+            editable and non editable content. When used on editable content, the point
+            where the gesture occurs needs to be constrained within the boundaries of the
+            editable element. In the WebProcess we decide whether to constrain the point or not only based
+            on the presence of the assisted node.
+            That unfortunately does not guarantee that the user is actually editing the element,
+            but only that the element is focused. Since the knowledge about the interaction exists reliably
+            in the UI process, this patch adds a parameter to each gesture handler that tries to clip
+            the point, to indicate whether the user is actually interacting with the element so that
+            in the WebProcess the assisted node information can be used to constrain the point.
+
+            * UIProcess/WebPageProxy.h:
+            (WebKit::WebPageProxy::deviceOrientation):
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKContentView _isInteractingWithAssistedNode]):
+            (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
+            (-[WKContentView selectPositionAtPoint:completionHandler:]):
+            (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
+            (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
+            (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
+            (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
+            * UIProcess/ios/WebPageProxyIOS.mm:
+            (WebKit::WebPageProxy::selectWithGesture):
+            (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
+            (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
+            (WebKit::WebPageProxy::selectPositionAtPoint):
+            (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
+            (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
+            * WebProcess/WebPage/WebPage.h:
+            * WebProcess/WebPage/WebPage.messages.in:
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::selectWithGesture):
+            (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
+            (WebKit::WebPage::selectPositionAtPoint):
+            (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
+            (WebKit::WebPage::rangeForGranularityAtPoint):
+            (WebKit::WebPage::selectTextWithGranularityAtPoint):
+            (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
+            (WebKit::WebPage::updateSelectionWithExtentPoint):
+
+2015-10-08  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r190512. rdar://problem/22974818
</span><span class="cx"> 
</span><span class="cx">     2015-10-02  Enrica Casucci  &lt;enrica@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -478,20 +478,20 @@
</span><span class="cx">     int32_t deviceOrientation() const { return m_deviceOrientation; }
</span><span class="cx">     void willCommitLayerTree(uint64_t transactionID);
</span><span class="cx"> 
</span><del>-    void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt;);
</del><ins>+    void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt;);
</ins><span class="cx">     void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, CallbackBase::Error)&gt;);
</span><span class="cx">     void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt;);
</span><span class="cx">     void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
</span><span class="cx">     void extendSelection(WebCore::TextGranularity);
</span><span class="cx">     void selectWordBackward();
</span><span class="cx">     void moveSelectionByOffset(int32_t offset, std::function&lt;void (CallbackBase::Error)&gt;);
</span><del>-    void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, std::function&lt;void (CallbackBase::Error)&gt;);
-    void selectPositionAtPoint(const WebCore::IntPoint, std::function&lt;void (CallbackBase::Error)&gt;);
-    void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, std::function&lt;void (CallbackBase::Error)&gt;);
</del><ins>+    void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt;);
+    void selectPositionAtPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt;);
+    void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt;);
</ins><span class="cx">     void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function&lt;void(CallbackBase::Error)&gt;);
</span><span class="cx">     void beginSelectionInDirection(WebCore::SelectionDirection, std::function&lt;void (uint64_t, CallbackBase::Error)&gt;);
</span><del>-    void updateSelectionWithExtentPoint(const WebCore::IntPoint, std::function&lt;void (uint64_t, CallbackBase::Error)&gt;);
-    void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, std::function&lt;void(uint64_t, CallbackBase::Error)&gt;);
</del><ins>+    void updateSelectionWithExtentPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function&lt;void (uint64_t, CallbackBase::Error)&gt;);
+    void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function&lt;void(uint64_t, CallbackBase::Error)&gt;);
</ins><span class="cx">     void requestAutocorrectionData(const String&amp; textForAutocorrection, std::function&lt;void (const Vector&lt;WebCore::FloatRect&gt;&amp;, const String&amp;, double, uint64_t, CallbackBase::Error)&gt;);
</span><span class="cx">     void applyAutocorrection(const String&amp; correction, const String&amp; originalText, std::function&lt;void (const String&amp;, CallbackBase::Error)&gt;);
</span><span class="cx">     bool applyAutocorrection(const String&amp; correction, const String&amp; originalText);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -1907,10 +1907,15 @@
</span><span class="cx">         _usingGestureForSelection = NO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)_isInteractingWithAssistedNode
+{
+    return _textSelectionAssistant != nil;
+}
+
</ins><span class="cx"> - (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state
</span><span class="cx"> {
</span><span class="cx">     _usingGestureForSelection = YES;
</span><del>-    _page-&gt;selectWithGesture(WebCore::IntPoint(point), CharacterGranularity, static_cast&lt;uint32_t&gt;(toGestureType(gestureType)), static_cast&lt;uint32_t&gt;(toGestureRecognizerState(state)), [self, state](const WebCore::IntPoint&amp; point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;selectWithGesture(WebCore::IntPoint(point), CharacterGranularity, static_cast&lt;uint32_t&gt;(toGestureType(gestureType)), static_cast&lt;uint32_t&gt;(toGestureRecognizerState(state)), [self _isInteractingWithAssistedNode], [self, state](const WebCore::IntPoint&amp; point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionChangedWithGesture(self, point, gestureType, gestureState, flags, error);
</span><span class="cx">         if (state == UIGestureRecognizerStateEnded || state == UIGestureRecognizerStateCancelled)
</span><span class="cx">             _usingGestureForSelection = NO;
</span><span class="lines">@@ -1996,7 +2001,7 @@
</span><span class="cx">     UIWKSelectionCompletionHandler selectionHandler = [completionHandler copy];
</span><span class="cx">     RetainPtr&lt;WKContentView&gt; view = self;
</span><span class="cx">     
</span><del>-    _page-&gt;selectPositionAtPoint(WebCore::IntPoint(point), [view, selectionHandler](WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;selectPositionAtPoint(WebCore::IntPoint(point), [self _isInteractingWithAssistedNode], [view, selectionHandler](WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionHandler();
</span><span class="cx">         view-&gt;_usingGestureForSelection = NO;
</span><span class="cx">         [selectionHandler release];
</span><span class="lines">@@ -2009,7 +2014,7 @@
</span><span class="cx">     UIWKSelectionCompletionHandler selectionHandler = [completionHandler copy];
</span><span class="cx">     RetainPtr&lt;WKContentView&gt; view = self;
</span><span class="cx">     
</span><del>-    _page-&gt;selectPositionAtBoundaryWithDirection(WebCore::IntPoint(point), toWKTextGranularity(granularity), toWKSelectionDirection(direction), [view, selectionHandler](WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;selectPositionAtBoundaryWithDirection(WebCore::IntPoint(point), toWKTextGranularity(granularity), toWKSelectionDirection(direction), [self _isInteractingWithAssistedNode], [view, selectionHandler](WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionHandler();
</span><span class="cx">         view-&gt;_usingGestureForSelection = NO;
</span><span class="cx">         [selectionHandler release];
</span><span class="lines">@@ -2035,7 +2040,7 @@
</span><span class="cx">     UIWKSelectionCompletionHandler selectionHandler = [completionHandler copy];
</span><span class="cx">     RetainPtr&lt;WKContentView&gt; view = self;
</span><span class="cx"> 
</span><del>-    _page-&gt;selectTextWithGranularityAtPoint(WebCore::IntPoint(point), toWKTextGranularity(granularity), [view, selectionHandler](WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;selectTextWithGranularityAtPoint(WebCore::IntPoint(point), toWKTextGranularity(granularity), [self _isInteractingWithAssistedNode], [view, selectionHandler](WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionHandler();
</span><span class="cx">         view-&gt;_usingGestureForSelection = NO;
</span><span class="cx">         [selectionHandler release];
</span><span class="lines">@@ -2056,7 +2061,7 @@
</span><span class="cx"> {
</span><span class="cx">     UIWKSelectionWithDirectionCompletionHandler selectionHandler = [completionHandler copy];
</span><span class="cx">     
</span><del>-    _page-&gt;updateSelectionWithExtentPoint(WebCore::IntPoint(point), [selectionHandler](bool endIsMoving, WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;updateSelectionWithExtentPoint(WebCore::IntPoint(point), [self _isInteractingWithAssistedNode], [selectionHandler](bool endIsMoving, WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionHandler(endIsMoving);
</span><span class="cx">         [selectionHandler release];
</span><span class="cx">     });
</span><span class="lines">@@ -2066,7 +2071,7 @@
</span><span class="cx"> {
</span><span class="cx">     UIWKSelectionWithDirectionCompletionHandler selectionHandler = [completionHandler copy];
</span><span class="cx">     
</span><del>-    _page-&gt;updateSelectionWithExtentPointAndBoundary(WebCore::IntPoint(point), toWKTextGranularity(granularity), [selectionHandler](bool endIsMoving, WebKit::CallbackBase::Error error) {
</del><ins>+    _page-&gt;updateSelectionWithExtentPointAndBoundary(WebCore::IntPoint(point), toWKTextGranularity(granularity), [self _isInteractingWithAssistedNode], [selectionHandler](bool endIsMoving, WebKit::CallbackBase::Error error) {
</ins><span class="cx">         selectionHandler(endIsMoving);
</span><span class="cx">         [selectionHandler release];
</span><span class="cx">     });
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -359,7 +359,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::selectWithGesture(const WebCore::IntPoint point, WebCore::TextGranularity granularity, uint32_t gestureType, uint32_t gestureState, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::selectWithGesture(const WebCore::IntPoint point, WebCore::TextGranularity granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(WebCore::IntPoint(), 0, 0, 0, CallbackBase::Error::Unknown);
</span><span class="lines">@@ -367,7 +367,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::SelectWithGesture(point, (uint32_t)granularity, gestureType, gestureState, callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::SelectWithGesture(point, (uint32_t)granularity, gestureType, gestureState, isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::updateSelectionWithTouches(const WebCore::IntPoint point, uint32_t touches, bool baseIsStart, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, CallbackBase::Error)&gt; callbackFunction)
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx">     return autocorrectionApplied;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::selectTextWithGranularityAtPoint(const WebCore::IntPoint point, WebCore::TextGranularity granularity, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::selectTextWithGranularityAtPoint(const WebCore::IntPoint point, WebCore::TextGranularity granularity, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(CallbackBase::Error::Unknown);
</span><span class="lines">@@ -439,10 +439,10 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::SelectTextWithGranularityAtPoint(point, static_cast&lt;uint32_t&gt;(granularity), callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::SelectTextWithGranularityAtPoint(point, static_cast&lt;uint32_t&gt;(granularity), isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::selectPositionAtBoundaryWithDirection(const WebCore::IntPoint point, WebCore::TextGranularity granularity, WebCore::SelectionDirection direction, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::selectPositionAtBoundaryWithDirection(const WebCore::IntPoint point, WebCore::TextGranularity granularity, WebCore::SelectionDirection direction, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(CallbackBase::Error::Unknown);
</span><span class="lines">@@ -450,7 +450,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::SelectPositionAtBoundaryWithDirection(point, static_cast&lt;uint32_t&gt;(granularity), static_cast&lt;uint32_t&gt;(direction), callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::SelectPositionAtBoundaryWithDirection(point, static_cast&lt;uint32_t&gt;(granularity), static_cast&lt;uint32_t&gt;(direction), isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity granularity, WebCore::SelectionDirection direction, std::function&lt;void(CallbackBase::Error)&gt; callbackFunction)
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::MoveSelectionAtBoundaryWithDirection(static_cast&lt;uint32_t&gt;(granularity), static_cast&lt;uint32_t&gt;(direction), callbackID), m_pageID);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-void WebPageProxy::selectPositionAtPoint(const WebCore::IntPoint point, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::selectPositionAtPoint(const WebCore::IntPoint point, bool isInteractingWithAssistedNode, std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(CallbackBase::Error::Unknown);
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::SelectPositionAtPoint(point, callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::SelectPositionAtPoint(point, isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::beginSelectionInDirection(WebCore::SelectionDirection direction, std::function&lt;void (uint64_t, CallbackBase::Error)&gt; callbackFunction)
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::BeginSelectionInDirection(direction, callbackID), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateSelectionWithExtentPoint(const WebCore::IntPoint point, std::function&lt;void (uint64_t, CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::updateSelectionWithExtentPoint(const WebCore::IntPoint point, bool isInteractingWithAssistedNode, std::function&lt;void (uint64_t, CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(0, CallbackBase::Error::Unknown);
</span><span class="lines">@@ -494,11 +494,11 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::UpdateSelectionWithExtentPoint(point, callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::UpdateSelectionWithExtentPoint(point, isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx">     
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint point, WebCore::TextGranularity granularity, std::function&lt;void(uint64_t, CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint point, WebCore::TextGranularity granularity, bool isInteractingWithAssistedNode, std::function&lt;void(uint64_t, CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(0, CallbackBase::Error::Unknown);
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::UpdateSelectionWithExtentPointAndBoundary(point, granularity, callbackID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::UpdateSelectionWithExtentPointAndBoundary(point, granularity, isInteractingWithAssistedNode, callbackID), m_pageID);
</ins><span class="cx">     
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -498,20 +498,20 @@
</span><span class="cx">     void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&amp;);
</span><span class="cx"> 
</span><span class="cx">     void blurAssistedNode();
</span><del>-    void selectWithGesture(const WebCore::IntPoint&amp;, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
</del><ins>+    void selectWithGesture(const WebCore::IntPoint&amp;, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID);
</ins><span class="cx">     void updateSelectionWithTouches(const WebCore::IntPoint&amp; point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
</span><span class="cx">     void updateBlockSelectionWithTouch(const WebCore::IntPoint&amp;, uint32_t touch, uint32_t handlePosition);
</span><span class="cx">     void selectWithTwoTouches(const WebCore::IntPoint&amp; from, const WebCore::IntPoint&amp; to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
</span><span class="cx">     void extendSelection(uint32_t granularity);
</span><span class="cx">     void selectWordBackward();
</span><span class="cx">     void moveSelectionByOffset(int32_t offset, uint64_t callbackID);
</span><del>-    void selectTextWithGranularityAtPoint(const WebCore::IntPoint&amp;, uint32_t granularity, uint64_t callbackID);
-    void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&amp;, uint32_t granularity, uint32_t direction, uint64_t callbackID);
</del><ins>+    void selectTextWithGranularityAtPoint(const WebCore::IntPoint&amp;, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
+    void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&amp;, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID);
</ins><span class="cx">     void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, uint64_t callbackID);
</span><del>-    void selectPositionAtPoint(const WebCore::IntPoint&amp;, uint64_t callbackID);
</del><ins>+    void selectPositionAtPoint(const WebCore::IntPoint&amp;, bool isInteractingWithAssistedNode, uint64_t callbackID);
</ins><span class="cx">     void beginSelectionInDirection(uint32_t direction, uint64_t callbackID);
</span><del>-    void updateSelectionWithExtentPoint(const WebCore::IntPoint&amp;, uint64_t callbackID);
-    void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&amp;, uint32_t granularity, uint64_t callbackID);
</del><ins>+    void updateSelectionWithExtentPoint(const WebCore::IntPoint&amp;, bool isInteractingWithAssistedNode, uint64_t callbackID);
+    void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&amp;, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
</ins><span class="cx"> 
</span><span class="cx">     void elementDidFocus(WebCore::Node*);
</span><span class="cx">     void elementDidBlur(WebCore::Node*);
</span><span class="lines">@@ -934,8 +934,8 @@
</span><span class="cx">     void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location);
</span><span class="cx">     void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
</span><span class="cx">     void resetTextAutosizingBeforeLayoutIfNeeded(const WebCore::FloatSize&amp; oldSize, const WebCore::FloatSize&amp; newSize);
</span><del>-    WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&amp;, const WebCore::IntPoint&amp;);
-    PassRefPtr&lt;WebCore::Range&gt; rangeForGranularityAtPoint(const WebCore::Frame&amp;, const WebCore::IntPoint&amp;, uint32_t granularity);
</del><ins>+    WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&amp;, const WebCore::IntPoint&amp;, bool isInteractingWithAssistedNode);
+    PassRefPtr&lt;WebCore::Range&gt; rangeForGranularityAtPoint(const WebCore::Frame&amp;, const WebCore::IntPoint&amp;, uint32_t granularity, bool isInteractingWithAssistedNode);
</ins><span class="cx">     void volatilityTimerFired();
</span><span class="cx"> #endif
</span><span class="cx"> #if !PLATFORM(COCOA)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -57,20 +57,20 @@
</span><span class="cx">     InspectorNodeSearchMovedToPosition(WebCore::FloatPoint point)
</span><span class="cx">     InspectorNodeSearchEndedAtPosition(WebCore::FloatPoint point)
</span><span class="cx">     BlurAssistedNode()
</span><del>-    SelectWithGesture(WebCore::IntPoint point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
</del><ins>+    SelectWithGesture(WebCore::IntPoint point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx">     UpdateSelectionWithTouches(WebCore::IntPoint point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
</span><span class="cx">     UpdateBlockSelectionWithTouch(WebCore::IntPoint point, uint32_t touch, uint32_t handlePosition)
</span><span class="cx">     SelectWithTwoTouches(WebCore::IntPoint from, WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
</span><span class="cx">     ExtendSelection(uint32_t granularity)
</span><span class="cx">     SelectWordBackward()
</span><span class="cx">     MoveSelectionByOffset(int32_t offset, uint64_t callbackID)
</span><del>-    SelectTextWithGranularityAtPoint(WebCore::IntPoint point, uint32_t granularity, uint64_t callbackID)
-    SelectPositionAtBoundaryWithDirection(WebCore::IntPoint point, uint32_t granularity, uint32_t direction, uint64_t callbackID)
</del><ins>+    SelectTextWithGranularityAtPoint(WebCore::IntPoint point, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID)
+    SelectPositionAtBoundaryWithDirection(WebCore::IntPoint point, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx">     MoveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, uint64_t callbackID)
</span><del>-    SelectPositionAtPoint(WebCore::IntPoint point, uint64_t callbackID)
</del><ins>+    SelectPositionAtPoint(WebCore::IntPoint point, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx">     BeginSelectionInDirection(uint32_t direction, uint64_t callbackID)
</span><del>-    UpdateSelectionWithExtentPoint(WebCore::IntPoint point, uint64_t callbackID)
-    UpdateSelectionWithExtentPointAndBoundary(WebCore::IntPoint point, uint32_t granularity, uint64_t callbackID)
</del><ins>+    UpdateSelectionWithExtentPoint(WebCore::IntPoint point, bool isInteractingWithAssistedNode, uint64_t callbackID)
+    UpdateSelectionWithExtentPointAndBoundary(WebCore::IntPoint point, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx">     RequestDictationContext(uint64_t callbackID)
</span><span class="cx">     ReplaceDictatedText(String oldText, String newText)
</span><span class="cx">     ReplaceSelectedText(String oldText, String newText)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (190796 => 190797)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-10-09 14:22:04 UTC (rev 190796)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-10-09 14:22:10 UTC (rev 190797)
</span><span class="lines">@@ -951,10 +951,10 @@
</span><span class="cx">     return range;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::selectWithGesture(const IntPoint&amp; point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
</del><ins>+void WebPage::selectWithGesture(const IntPoint&amp; point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
</ins><span class="cx"> 
</span><span class="cx">     if (position.isNull()) {
</span><span class="cx">         send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
</span><span class="lines">@@ -1692,27 +1692,27 @@
</span><span class="cx">     send(Messages::WebPageProxy::VoidCallback(callbackID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-VisiblePosition WebPage::visiblePositionInFocusedNodeForPoint(const Frame&amp; frame, const IntPoint&amp; point)
</del><ins>+VisiblePosition WebPage::visiblePositionInFocusedNodeForPoint(const Frame&amp; frame, const IntPoint&amp; point, bool isInteractingWithAssistedNode)
</ins><span class="cx"> {
</span><span class="cx">     IntPoint adjustedPoint(frame.view()-&gt;rootViewToContents(point));
</span><del>-    IntPoint constrainedPoint = m_assistedNode ? constrainPoint(adjustedPoint, frame, *m_assistedNode) : adjustedPoint;
</del><ins>+    IntPoint constrainedPoint = m_assistedNode &amp;&amp; isInteractingWithAssistedNode ? constrainPoint(adjustedPoint, frame, *m_assistedNode) : adjustedPoint;
</ins><span class="cx">     return frame.visiblePositionForPoint(constrainedPoint);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::selectPositionAtPoint(const WebCore::IntPoint&amp; point, uint64_t callbackID)
</del><ins>+void WebPage::selectPositionAtPoint(const WebCore::IntPoint&amp; point, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
</ins><span class="cx">     
</span><span class="cx">     if (position.isNotNull())
</span><span class="cx">         frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).ptr(), position.affinity(), true);
</span><span class="cx">     send(Messages::WebPageProxy::VoidCallback(callbackID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&amp; point, uint32_t granularity, uint32_t direction, uint64_t callbackID)
</del><ins>+void WebPage::selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&amp; point, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
</ins><span class="cx"> 
</span><span class="cx">     if (position.isNotNull()) {
</span><span class="cx">         position = positionOfNextBoundaryOfGranularity(position, static_cast&lt;WebCore::TextGranularity&gt;(granularity), static_cast&lt;SelectionDirection&gt;(direction));
</span><span class="lines">@@ -1736,9 +1736,9 @@
</span><span class="cx">     send(Messages::WebPageProxy::VoidCallback(callbackID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Range&gt; WebPage::rangeForGranularityAtPoint(const Frame&amp; frame, const WebCore::IntPoint&amp; point, uint32_t granularity)
</del><ins>+PassRefPtr&lt;Range&gt; WebPage::rangeForGranularityAtPoint(const Frame&amp; frame, const WebCore::IntPoint&amp; point, uint32_t granularity, bool isInteractingWithAssistedNode)
</ins><span class="cx"> {
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Range&gt; range;
</span><span class="cx">     switch (static_cast&lt;WebCore::TextGranularity&gt;(granularity)) {
</span><span class="lines">@@ -1760,10 +1760,10 @@
</span><span class="cx">     return range;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::selectTextWithGranularityAtPoint(const WebCore::IntPoint&amp; point, uint32_t granularity, uint64_t callbackID)
</del><ins>+void WebPage::selectTextWithGranularityAtPoint(const WebCore::IntPoint&amp; point, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    RefPtr&lt;Range&gt; range = rangeForGranularityAtPoint(frame, point, granularity);
</del><ins>+    RefPtr&lt;Range&gt; range = rangeForGranularityAtPoint(frame, point, granularity, isInteractingWithAssistedNode);
</ins><span class="cx"> 
</span><span class="cx">     if (range)
</span><span class="cx">         frame.selection().setSelectedRange(range.get(), UPSTREAM, true);
</span><span class="lines">@@ -1777,11 +1777,11 @@
</span><span class="cx">     send(Messages::WebPageProxy::UnsignedCallback(m_selectionAnchor == Start, callbackID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&amp; point, uint32_t granularity, uint64_t callbackID)
</del><ins>+void WebPage::updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&amp; point, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
-    RefPtr&lt;Range&gt; newRange = rangeForGranularityAtPoint(frame, point, granularity);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
+    RefPtr&lt;Range&gt; newRange = rangeForGranularityAtPoint(frame, point, granularity, isInteractingWithAssistedNode);
</ins><span class="cx">     
</span><span class="cx">     if (position.isNull() || !m_initialSelection || !newRange) {
</span><span class="cx">         send(Messages::WebPageProxy::UnsignedCallback(false, callbackID));
</span><span class="lines">@@ -1806,10 +1806,10 @@
</span><span class="cx">     send(Messages::WebPageProxy::UnsignedCallback(selectionStart == m_initialSelection-&gt;startPosition(), callbackID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::updateSelectionWithExtentPoint(const WebCore::IntPoint&amp; point, uint64_t callbackID)
</del><ins>+void WebPage::updateSelectionWithExtentPoint(const WebCore::IntPoint&amp; point, bool isInteractingWithAssistedNode, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     const Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><del>-    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point);
</del><ins>+    VisiblePosition position = visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode);
</ins><span class="cx"> 
</span><span class="cx">     if (position.isNull()) {
</span><span class="cx">         send(Messages::WebPageProxy::UnsignedCallback(false, callbackID));
</span></span></pre>
</div>
</div>

</body>
</html>