зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1594300: Implement xpcAccessible::TakeFocus for ProxyAccessibles on Windows. r=yzen
1. Implement ProxyAccessible::TakeFocus on Windows. 2. Use this implementation in xpcAccessible::TakeFocus like we do on other platforms. 3. Enable accessible/tests/browser/fission/browser_take_focus.js on Windows, since it now works. Differential Revision: https://phabricator.services.mozilla.com/D59977 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
47152527c5
Коммит
b2a45adc2b
|
@ -724,5 +724,13 @@ void ProxyAccessible::DOMNodeID(nsString& aID) {
|
|||
aID = (wchar_t*)resultWrap;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TakeFocus() {
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
return;
|
||||
}
|
||||
acc->accSelect(SELFLAG_TAKEFOCUS, kChildIdSelf);
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -12,4 +12,4 @@ support-files =
|
|||
[browser_reframe_visibility.js]
|
||||
[browser_src_change.js]
|
||||
[browser_take_focus.js]
|
||||
skip-if = fission || (os == 'win') # Bug 1556627 and 1594300 xpcAccessible::TakeFocus() is not implemented on Windows with e10s.
|
||||
skip-if = fission # Bug 1556627
|
||||
|
|
|
@ -636,11 +636,7 @@ xpcAccessible::TakeFocus() {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
proxy->TakeFocus();
|
||||
#endif
|
||||
} else {
|
||||
Intl()->TakeFocus();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче