From 719213828d7e9815a7fc17ce9f72bcc41eb52e27 Mon Sep 17 00:00:00 2001 From: "timothy_horton@apple.com" Date: Tue, 12 Aug 2014 20:03:26 +0000 Subject: [PATCH] Don't show the combined menu if there are no services available https://bugs.webkit.org/show_bug.cgi?id=135846 Reviewed by Enrica Casucci. * WebProcess/WebPage/ServicesOverlayController.h: Add a FIXME. * WebProcess/WebPage/mac/ServicesOverlayController.mm: (WebKit::ServicesOverlayController::determineActiveHighlight): Don't allow a selection Highlight to become active if there is no service available to handle it. Previously we showed the combined menu with just phone numbers in it if any were detected. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172484 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 17 +++++++++++++++++ .../WebPage/ServicesOverlayController.h | 1 + .../WebPage/mac/ServicesOverlayController.mm | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 6ff0b28baa77..425a37e1f59b 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,20 @@ +2014-08-12 Tim Horton + + Don't show the combined menu if there are no services available + https://bugs.webkit.org/show_bug.cgi?id=135846 + + + Reviewed by Enrica Casucci. + + * WebProcess/WebPage/ServicesOverlayController.h: + Add a FIXME. + + * WebProcess/WebPage/mac/ServicesOverlayController.mm: + (WebKit::ServicesOverlayController::determineActiveHighlight): + Don't allow a selection Highlight to become active if there is no + service available to handle it. Previously we showed the combined menu + with just phone numbers in it if any were detected. + 2014-08-12 Tim Horton Add a fade transition to services highlights diff --git a/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h b/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h index 00ec39942e0c..329d08f5935a 100644 --- a/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h +++ b/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h @@ -143,6 +143,7 @@ private: HashSet m_highlights; + // FIXME: These should move onto Highlight. Vector m_currentSelectionRects; bool m_isTextOnly; diff --git a/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm b/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm index 6004b8ad4f80..098b579ac518 100644 --- a/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm +++ b/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm @@ -589,8 +589,8 @@ void ServicesOverlayController::determineActiveHighlight(bool& mouseIsOverActive if (newActiveHighlight && newActiveHighlight->type() == Highlight::Type::TelephoneNumber) continue; - // If this highlight has no compatible services, it can't be active, unless we have telephone number highlights to show in the combined menu. - if (telephoneNumberRangesForFocusedFrame().isEmpty() && !hasRelevantSelectionServices()) + // If this highlight has no compatible services, it can't be active. + if (!hasRelevantSelectionServices()) continue; } -- 2.36.0