Title: [206702] trunk/Source/WebKit2
Revision
206702
Author
m...@apple.com
Date
2016-09-30 18:27:35 -0700 (Fri, 30 Sep 2016)

Log Message

[iOS] Editing menu omits the Share command if the selected text is longer than 200 characters
https://bugs.webkit.org/show_bug.cgi?id=162821
<rdar://problem/28409828>

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformAction:withSender:]): Changed to return YES for the _share:
  action even if the selection is longer than 200 characters. While Define should not have
  been available for longer selections, Share does not have such a limitation.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (206701 => 206702)


--- trunk/Source/WebKit2/ChangeLog	2016-10-01 01:26:10 UTC (rev 206701)
+++ trunk/Source/WebKit2/ChangeLog	2016-10-01 01:27:35 UTC (rev 206702)
@@ -1,3 +1,16 @@
+2016-09-30  Dan Bernstein  <m...@apple.com>
+
+        [iOS] Editing menu omits the Share command if the selected text is longer than 200 characters
+        https://bugs.webkit.org/show_bug.cgi?id=162821
+        <rdar://problem/28409828>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView canPerformAction:withSender:]): Changed to return YES for the _share:
+          action even if the selection is longer than 200 characters. While Define should not have
+          been available for longer selections, Share does not have such a limitation.
+
 2016-09-30  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Turn variation fonts on by default

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (206701 => 206702)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-10-01 01:26:10 UTC (rev 206701)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-10-01 01:27:35 UTC (rev 206702)
@@ -1862,12 +1862,7 @@
         if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange))
             return NO;
 
-        NSUInteger textLength = _page->editorState().postLayoutData().selectedTextLength;
-        // See FIXME above for _define.
-        if (!textLength || textLength > 200)
-            return NO;
-        
-        return YES;
+        return _page->editorState().postLayoutData().selectedTextLength > 0;
     }
 
     if (action == @selector(_addShortcut:)) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to