[iOS] Selection handles "Lollipops" can become gray and stay gray
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jul 2019 22:07:11 +0000 (22:07 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jul 2019 22:07:11 +0000 (22:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198852
<rdar://problem/51736130>

Reviewed by Wenson Hsieh.

Tell the text interaction assistant to update the selection UI when the tint color changes.
We do this by way of deactivating and activating selection.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247328 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

index f19f86a..9a30637 100644 (file)
@@ -1,3 +1,17 @@
+2019-07-10  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Selection handles "Lollipops" can become gray and stay gray
+        https://bugs.webkit.org/show_bug.cgi?id=198852
+        <rdar://problem/51736130>
+
+        Reviewed by Wenson Hsieh.
+
+        Tell the text interaction assistant to update the selection UI when the tint color changes.
+        We do this by way of deactivating and activating selection.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView tintColorDidChange]):
+
 2019-07-10  Dean Jackson  <dino@apple.com>
 
         Share or Copy image from context menu does not share the correct data
index 656a192..1040cef 100644 (file)
@@ -2941,7 +2941,13 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 - (void)tintColorDidChange
 {
     [super tintColorDidChange];
+
+    BOOL shouldUpdateTextSelection = self.isFirstResponder && [self canShowNonEmptySelectionView];
+    if (shouldUpdateTextSelection)
+        [_textSelectionAssistant deactivateSelection];
     [self _updateInteractionTintColor];
+    if (shouldUpdateTextSelection)
+        [_textSelectionAssistant activateSelection];
 }
 
 - (BOOL)canPerformAction:(SEL)action withSender:(id)sender