https://bugs.webkit.org/show_bug.cgi?id=135785
<rdar://problem/
17969843>
Reviewed by Brady Eidson.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::drawSelectionHighlight):
We can't early return in the rich-content-but-no-rich-services case
if we have telephone numbers in the selection, because we want to offer
them up in the combined menu.
* UIProcess/mac/WebContextMenuProxyMac.mm:
If we end up with no menu, because there were no services available,
make a fresh one that we can fill with combined telephone number items.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172374
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-08-09 Tim Horton <timothy_horton@apple.com>
+
+ REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
+ https://bugs.webkit.org/show_bug.cgi?id=135785
+ <rdar://problem/17969843>
+
+ Reviewed by Brady Eidson.
+
+ * WebProcess/WebPage/mac/ServicesOverlayController.mm:
+ (WebKit::ServicesOverlayController::drawSelectionHighlight):
+ We can't early return in the rich-content-but-no-rich-services case
+ if we have telephone numbers in the selection, because we want to offer
+ them up in the combined menu.
+
+ * UIProcess/mac/WebContextMenuProxyMac.mm:
+ If we end up with no menu, because there were no services available,
+ make a fresh one that we can fill with combined telephone number items.
+
2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
// Explicitly add a menu item for each telephone number that is in the selection.
const Vector<String>& selectedTelephoneNumbers = context.selectedTelephoneNumbers();
if (!selectedTelephoneNumbers.isEmpty()) {
- [m_servicesMenu.get() addItem:[NSMenuItem separatorItem]];
+ if (m_servicesMenu)
+ [m_servicesMenu addItem:[NSMenuItem separatorItem]];
+ else
+ m_servicesMenu = adoptNS([[NSMenu alloc] init]);
for (auto& telephoneNumber : selectedTelephoneNumbers) {
if (NSMenuItem *item = menuItemForTelephoneNumber(telephoneNumber))
[m_servicesMenu addItem:item];
{
// It's possible to end up drawing the selection highlight before we've actually received the selection rects.
// If that happens we'll end up here again once we have the rects.
- if (m_currentSelectionRects.isEmpty() || (!WebProcess::shared().hasRichContentServices() && !m_isTextOnly))
+ if (m_currentSelectionRects.isEmpty())
return;
- // If there are no installed selection services and we have no phone numbers detected, then we have nothing to draw.
- if (!WebProcess::shared().hasSelectionServices() && m_currentTelephoneNumberRanges.isEmpty())
+ // If there are no appropriate installed selection services and we have no phone numbers detected, then we have nothing to draw.
+ if ((!WebProcess::shared().hasSelectionServices() || (!WebProcess::shared().hasRichContentServices() && !m_isTextOnly)) && m_currentTelephoneNumberRanges.isEmpty())
return;
if (!m_selectionHighlight)