From 3ee91b842218c7adccbbfe9616c59124804ad778 Mon Sep 17 00:00:00 2001 From: Razvan Maries Date: Thu, 26 Mar 2020 19:25:30 +0200 Subject: [PATCH] Backed out changeset 0bf2517f7a99 (bug 1623402) for build bustages. CLOSED TREE --- accessible/mac/mozAccessible.mm | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index 07239d680506..ecb23f5acfac 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -20,7 +20,6 @@ #include "mozilla/a11y/PDocAccessible.h" #include "mozilla/dom/BrowserParent.h" #include "OuterDocAccessible.h" -#include "nsChildView.h" #include "nsRect.h" #include "nsCocoaUtils.h" @@ -519,7 +518,8 @@ static inline NSMutableArray* ConvertToNSArray(nsTArray& aArra // action, it will be first in the list. We append other // actions here to maintain that invariant. [actions addObject:NSAccessibilityScrollToVisibleAction]; - [actions addObject:NSAccessibilityShowMenuAction]; + // XXX(morgan): we should implement `show menu` as + // an "always performable" action. See bug 1623402. return actions; } @@ -584,26 +584,6 @@ static inline NSMutableArray* ConvertToNSArray(nsTArray& aArra } else if (proxy) { proxy->ScrollTo(nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE); } - } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) { - DesktopIntRect geckoRect; - id objOrView = nil; - if (accWrap) { - geckoRect = DesktopIntRect::FromUnknownRect(accWrap->Bounds()); - objOrView = - GetObjectOrRepresentedView(GetNativeFromGeckoAccessible(accWrap->RootAccessible())); - } else if (proxy) { - geckoRect = DesktopIntRect::FromUnknownRect(proxy->Bounds()); - objOrView = GetObjectOrRepresentedView( - GetNativeFromGeckoAccessible(proxy->OuterDocOfRemoteBrowser()->RootAccessible())); - } - - NSRect cocoaRect = - NSMakeRect(geckoRect.x, geckoRect.YMost(), geckoRect.width, geckoRect.height); - LayoutDeviceIntPoint p = - LayoutDeviceIntPoint(NSToIntRound(NSMidX(cocoaRect)), NSToIntRound(NSMidY(cocoaRect))); - nsIWidget* widget = [objOrView widget]; - widget->SynthesizeNativeMouseEvent(p, NSEventTypeRightMouseDown, 0, nullptr); - } else { if (accWrap) { accWrap->DoAction(0);