зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617301 - Fix accessibilityFocusedUIElement to work across processes. r=morgan
This is similar to the fix in bug 1614079 where we need to account for a descendant that might match past a process boundary. Differential Revision: https://phabricator.services.mozilla.com/D63974 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ee44ad7d4c
Коммит
f270ef49e9
|
@ -18,6 +18,7 @@
|
||||||
#include "TableAccessible.h"
|
#include "TableAccessible.h"
|
||||||
#include "TableCellAccessible.h"
|
#include "TableCellAccessible.h"
|
||||||
#include "mozilla/a11y/PDocAccessible.h"
|
#include "mozilla/a11y/PDocAccessible.h"
|
||||||
|
#include "mozilla/dom/BrowserParent.h"
|
||||||
#include "OuterDocAccessible.h"
|
#include "OuterDocAccessible.h"
|
||||||
|
|
||||||
#include "nsRect.h"
|
#include "nsRect.h"
|
||||||
|
@ -544,7 +545,18 @@ static inline NSMutableArray* ConvertToNSArray(nsTArray<ProxyAccessible*>& aArra
|
||||||
mozAccessible* focusedChild = nil;
|
mozAccessible* focusedChild = nil;
|
||||||
if (accWrap) {
|
if (accWrap) {
|
||||||
Accessible* focusedGeckoChild = accWrap->FocusedChild();
|
Accessible* focusedGeckoChild = accWrap->FocusedChild();
|
||||||
if (focusedGeckoChild) focusedChild = GetNativeFromGeckoAccessible(focusedGeckoChild);
|
if (focusedGeckoChild) {
|
||||||
|
focusedChild = GetNativeFromGeckoAccessible(focusedGeckoChild);
|
||||||
|
} else {
|
||||||
|
dom::BrowserParent* browser = dom::BrowserParent::GetFocused();
|
||||||
|
if (browser) {
|
||||||
|
a11y::DocAccessibleParent* proxyDoc = browser->GetTopLevelDocAccessible();
|
||||||
|
if (proxyDoc) {
|
||||||
|
mozAccessible* nativeRemoteChild = GetNativeFromProxy(proxyDoc);
|
||||||
|
return [nativeRemoteChild accessibilityFocusedUIElement];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (proxy) {
|
} else if (proxy) {
|
||||||
ProxyAccessible* focusedGeckoChild = proxy->FocusedChild();
|
ProxyAccessible* focusedGeckoChild = proxy->FocusedChild();
|
||||||
if (focusedGeckoChild) focusedChild = GetNativeFromProxy(focusedGeckoChild);
|
if (focusedGeckoChild) focusedChild = GetNativeFromProxy(focusedGeckoChild);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче