Update UIKit when a cut causes a selection change
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 21:57:48 +0000 (21:57 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 21:57:48 +0000 (21:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197047
<rdar://problem/36311563>

Reviewed by Wenson Hsieh.

We need to let UIKit know when a cut causes a selection change (always),
so that is can appropriately update the button on the keyboard bar.

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

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

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

index bb73700..6e39343 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-18  Megan Gardner  <megan_gardner@apple.com>
+
+        Update UIKit when a cut causes a selection change
+        https://bugs.webkit.org/show_bug.cgi?id=197047
+        <rdar://problem/36311563>
+
+        Reviewed by Wenson Hsieh.
+
+        We need to let UIKit know when a cut causes a selection change (always),
+        so that is can appropriately update the button on the keyboard bar.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView cutForWebView:]):
+
 2019-04-18  Brent Fulgham  <bfulgham@apple.com>
 
         InjectedBundle parameters often need initialization function called before unarchiving
index a0d3f74..a77a2b1 100644 (file)
@@ -3023,7 +3023,7 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 
 - (void)cutForWebView:(id)sender
 {
-    _page->executeEditCommand("cut"_s);
+    [self executeEditCommandWithCallback:@"cut"];
 }
 
 - (void)pasteForWebView:(id)sender