зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 0bf2517f7a99 (bug 1623402) for build bustages. CLOSED TREE
This commit is contained in:
Родитель
b994ab8896
Коммит
3ee91b8422
|
@ -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<ProxyAccessible*>& 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<ProxyAccessible*>& 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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче