Title: [176366] branches/safari-600.3-branch/Source

Diff

Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (176365 => 176366)


--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog	2014-11-20 00:17:41 UTC (rev 176365)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog	2014-11-20 00:28:56 UTC (rev 176366)
@@ -1,5 +1,22 @@
 2014-11-19  Dana Burkart  <[email protected]>
 
+        Merge r176351. rdar://problem/18971616
+
+    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  Dana Burkart  <[email protected]>
+
         Merge r176288. rdar://problem/18840382
 
     2014-11-18  Tim Horton  <[email protected]>

Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm (176365 => 176366)


--- branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm	2014-11-20 00:17:41 UTC (rev 176365)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm	2014-11-20 00:28:56 UTC (rev 176366)
@@ -848,7 +848,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: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176365 => 176366)


--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-11-20 00:17:41 UTC (rev 176365)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-11-20 00:28:56 UTC (rev 176366)
@@ -1,5 +1,22 @@
 2014-11-19  Dana Burkart  <[email protected]>
 
+        Merge r176351. rdar://problem/18971616
+
+    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  Dana Burkart  <[email protected]>
+
         Merge r176299. rdar://problem/19024541
 
     2014-11-18  Conrad Shultz  <[email protected]>

Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176365 => 176366)


--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm	2014-11-20 00:17:41 UTC (rev 176365)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm	2014-11-20 00:28:56 UTC (rev 176366)
@@ -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