Title: [176351] trunk/Source
Revision
176351
Author
[email protected]
Date
2014-11-19 15:00:48 -0800 (Wed, 19 Nov 2014)

Log Message

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
-and corresponding-
rdar://problem/18971616

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 (176350 => 176351)


--- trunk/Source/WebKit/mac/ChangeLog	2014-11-19 22:58:43 UTC (rev 176350)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-11-19 23:00:48 UTC (rev 176351)
@@ -1,3 +1,16 @@
+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
+        -and corresponding-
+        rdar://problem/18971616
+
+        Reviewed by Tim Horton.
+
+        * WebView/WebActionMenuController.mm:
+        (-[WebActionMenuController _defaultMenuItems]):
+
 2014-11-19  Daniel Bates  <[email protected]>
 
         [iOS] Make WebKit build with public iOS SDK

Modified: trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm (176350 => 176351)


--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm	2014-11-19 22:58:43 UTC (rev 176350)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm	2014-11-19 23:00:48 UTC (rev 176351)
@@ -852,7 +852,12 @@
     Node* node = _hitTestResult.innerNode();
     if (node && node->isTextNode()) {
         NSArray *dataDetectorMenuItems = [self _defaultMenuItemsForDataDetectedText];
-        if (dataDetectorMenuItems.count) {
+        if (_currentActionContext) {
+            // If this is a data detected item with no menu items, we should not fall back to regular text options.
+            if (!dataDetectorMenuItems.count) {
+                _type = WebActionMenuNone;
+                return @[ ];
+            }
             _type = WebActionMenuDataDetectedItem;
             return dataDetectorMenuItems;
         }

Modified: trunk/Source/WebKit2/ChangeLog (176350 => 176351)


--- trunk/Source/WebKit2/ChangeLog	2014-11-19 22:58:43 UTC (rev 176350)
+++ trunk/Source/WebKit2/ChangeLog	2014-11-19 23:00:48 UTC (rev 176351)
@@ -1,3 +1,16 @@
+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
+        -and corresponding-
+        rdar://problem/18971616
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/mac/WKActionMenuController.mm:
+        (-[WKActionMenuController _defaultMenuItems]):
+
 2014-11-19  Daniel Bates  <[email protected]>
 
         [iOS] Make WebKit build with public iOS SDK

Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176350 => 176351)


--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm	2014-11-19 22:58:43 UTC (rev 176350)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm	2014-11-19 23:00:48 UTC (rev 176351)
@@ -920,7 +920,12 @@
 
     if (hitTestResult->isTextNode()) {
         NSArray *dataDetectorMenuItems = [self _defaultMenuItemsForDataDetectedText];
-        if (dataDetectorMenuItems.count) {
+        if (_currentActionContext) {
+            // If this is a data detected item with no menu items, we should not fall back to regular text options.
+            if (!dataDetectorMenuItems.count) {
+                _type = kWKActionMenuNone;
+                return @[ ];
+            }
             _type = kWKActionMenuDataDetectedItem;
             return dataDetectorMenuItems;
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to