Backed out changeset 0bf2517f7a99 (bug 1623402) for build bustages. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Thu, 26 Mar 2020 19:25:30 +0200
changeset 520609 508ff70decaa4c5a3ac5bdceac9396d89b63d820
parent 520608 bddd9bc84cd391802646fee0fdd5f0bd4d322f45
child 520610 49509cff8c94d3758e0713c26d3ed43a7762570b
push id37254
push usernerli@mozilla.com
push dateFri, 27 Mar 2020 04:48:07 +0000
treeherdermozilla-central@2d758b42bd73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1623402
milestone76.0a1
backs out0bf2517f7a99083db29b355174565aa7b6348374
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 0bf2517f7a99 (bug 1623402) for build bustages. CLOSED TREE
accessible/mac/mozAccessible.mm
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -15,17 +15,16 @@
 #include "Relation.h"
 #include "Role.h"
 #include "RootAccessible.h"
 #include "TableAccessible.h"
 #include "TableCellAccessible.h"
 #include "mozilla/a11y/PDocAccessible.h"
 #include "mozilla/dom/BrowserParent.h"
 #include "OuterDocAccessible.h"
-#include "nsChildView.h"
 
 #include "nsRect.h"
 #include "nsCocoaUtils.h"
 #include "nsCoord.h"
 #include "nsObjCExceptions.h"
 #include "nsWhitespaceTokenizer.h"
 #include <prdtoa.h>
 
@@ -514,17 +513,18 @@ static inline NSMutableArray* ConvertToN
     }
   }
 
   // Regardless of `count`, add actions that should be
   // performable on all accessibles. If we added a press
   // 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;
 }
 
 - (NSString*)accessibilityActionDescription:(NSString*)action {
   // by default we return whatever the MacOS API know about.
   // if you have custom actions, override.
   return NSAccessibilityActionDescription(action);
@@ -579,36 +579,16 @@ static inline NSMutableArray* ConvertToN
   ProxyAccessible* proxy = [self getProxyAccessible];
 
   if ([action isEqualToString:NSAccessibilityScrollToVisibleAction]) {
     if (accWrap) {
       accWrap->ScrollTo(nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE);
     } 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);
     } else if (proxy) {
       proxy->DoAction(0);
     }
   }
 }