Title: [231533] trunk/Source/WebKit
Revision
231533
Author
megan_gard...@apple.com
Date
2018-05-08 17:41:51 -0700 (Tue, 08 May 2018)

Log Message

Don't clear selection until we are actually interacting with a Node.
https://bugs.webkit.org/show_bug.cgi?id=185455

Reviewed by Wenson Hsieh.

The presence of TextInteractionAssistant should not be used as a proxy for it we are actually editing content.
We need to check to see if we have an active node, and then we should clear the selection.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setSelectedTextRange:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (231532 => 231533)


--- trunk/Source/WebKit/ChangeLog	2018-05-09 00:40:29 UTC (rev 231532)
+++ trunk/Source/WebKit/ChangeLog	2018-05-09 00:41:51 UTC (rev 231533)
@@ -1,3 +1,16 @@
+2018-05-08  Megan Gardner  <megan_gard...@apple.com>
+
+        Don't clear selection until we are actually interacting with a Node.
+        https://bugs.webkit.org/show_bug.cgi?id=185455
+
+        Reviewed by Wenson Hsieh.
+        
+        The presence of TextInteractionAssistant should not be used as a proxy for it we are actually editing content.
+        We need to check to see if we have an active node, and then we should clear the selection.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setSelectedTextRange:]):
+
 2018-05-08  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r231486.

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (231532 => 231533)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-05-09 00:40:29 UTC (rev 231532)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-05-09 00:41:51 UTC (rev 231533)
@@ -3220,7 +3220,7 @@
 
 - (void)setSelectedTextRange:(UITextRange *)range
 {
-    if (_textSelectionAssistant && !range)
+    if (hasAssistedNode(_assistedNodeInformation) && !range)
         [self clearSelection];
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to