Title: [176356] trunk/Source
- Revision
- 176356
- Author
- [email protected]
- Date
- 2014-11-19 15:48:53 -0800 (Wed, 19 Nov 2014)
Log Message
Invoking an action menu on a selection should result in the text menu
https://bugs.webkit.org/show_bug.cgi?id=138892
-and corresponding-
rdar://problem/18996776
Reviewed by Tim Horton.
Source/WebKit/mac:
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItems]):
Source/WebKit2:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (176355 => 176356)
--- trunk/Source/WebKit/mac/ChangeLog 2014-11-19 23:43:09 UTC (rev 176355)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-11-19 23:48:53 UTC (rev 176356)
@@ -1,5 +1,17 @@
2014-11-19 Beth Dakin <[email protected]>
+ Invoking an action menu on a selection should result in the text menu
+ https://bugs.webkit.org/show_bug.cgi?id=138892
+ -and corresponding-
+ rdar://problem/18996776
+
+ Reviewed by Tim Horton.
+
+ * WebView/WebActionMenuController.mm:
+ (-[WebActionMenuController _defaultMenuItems]):
+
+2014-11-19 Beth Dakin <[email protected]>
+
Data detected results with no menu items should not fall through to regular text
action menus
https://bugs.webkit.org/show_bug.cgi?id=138887
Modified: trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm (176355 => 176356)
--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-19 23:43:09 UTC (rev 176355)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-19 23:48:53 UTC (rev 176356)
@@ -882,6 +882,13 @@
return [self _defaultMenuItemsForWhitespaceInEditableArea];
}
+ if (_hitTestResult.isSelected()) {
+ // A selection should present the read-only text menu. It might make more sense to present a new
+ // type of menu with just copy, but for the time being, we should stay consistent with text.
+ _type = WebActionMenuReadOnlyText;
+ return [self _defaultMenuItemsForText];
+ }
+
_type = WebActionMenuNone;
return @[ ];
}
Modified: trunk/Source/WebKit2/ChangeLog (176355 => 176356)
--- trunk/Source/WebKit2/ChangeLog 2014-11-19 23:43:09 UTC (rev 176355)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-19 23:48:53 UTC (rev 176356)
@@ -1,3 +1,15 @@
+2014-11-19 Beth Dakin <[email protected]>
+
+ Invoking an action menu on a selection should result in the text menu
+ https://bugs.webkit.org/show_bug.cgi?id=138892
+ -and corresponding-
+ rdar://problem/18996776
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItems]):
+
2014-11-19 Anders Carlsson <[email protected]>
Fix iOS build.
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176355 => 176356)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-19 23:43:09 UTC (rev 176355)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-19 23:48:53 UTC (rev 176356)
@@ -950,6 +950,13 @@
return [self _defaultMenuItemsForWhitespaceInEditableArea];
}
+ if (hitTestResult->isSelected()) {
+ // A selection should present the read-only text menu. It might make more sense to present a new
+ // type of menu with just copy, but for the time being, we should stay consistent with text.
+ _type = kWKActionMenuReadOnlyText;
+ return [self _defaultMenuItemsForText];
+ }
+
_type = kWKActionMenuNone;
return _state != ActionMenuState::Ready ? @[ [NSMenuItem separatorItem] ] : @[ ];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes