mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1297549: Part 3 - Modify Windows AccessibleWrap to get hwnd from TabChild under e10s; r=tbsaunde
MozReview-Commit-ID: DjnzVn0K5n1
This commit is contained in:
parent
6775220daf
commit
e9a3ff5953
@ -9,6 +9,7 @@
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "DocAccessible-inl.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/a11y/DocAccessibleChild.h"
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "EnumVariant.h"
|
||||
@ -1303,6 +1304,22 @@ AccessibleWrap::GetHWNDFor(Accessible* aAccessible)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
DocAccessible* doc = aAccessible->Document();
|
||||
if (!doc) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DocAccessibleChild* ipcDoc = doc->IPCDoc();
|
||||
if (!ipcDoc) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto tab = static_cast<dom::TabChild*>(ipcDoc->Manager());
|
||||
MOZ_ASSERT(tab);
|
||||
return reinterpret_cast<HWND>(tab->GetNativeWindowHandle());
|
||||
}
|
||||
|
||||
// Accessibles in child processes are said to have the HWND of the window
|
||||
// their tab is within. Popups are always in the parent process, and so
|
||||
// never proxied, which means this is basically correct.
|
||||
|
Loading…
Reference in New Issue
Block a user