зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322532: Move a11y retrieval of native window handle to DocAccessibleChild; r=yzen
MozReview-Commit-ID: DwLBfAQJkRJ --HG-- extra : rebase_source : b206229f4167979d79c71e7cad11d01d7d60f9ed
This commit is contained in:
Родитель
c9721c0a3b
Коммит
68616ae61e
|
@ -77,6 +77,18 @@ DocAccessibleChild::RecvEmulatedWindow(const WindowsHandle& aEmulatedWindowHandl
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
HWND
|
||||
DocAccessibleChild::GetNativeWindowHandle() const
|
||||
{
|
||||
if (mEmulatedWindowHandle) {
|
||||
return mEmulatedWindowHandle;
|
||||
}
|
||||
|
||||
auto tab = static_cast<dom::TabChild*>(Manager());
|
||||
MOZ_ASSERT(tab);
|
||||
return reinterpret_cast<HWND>(tab->GetNativeWindowHandle());
|
||||
}
|
||||
|
||||
void
|
||||
DocAccessibleChild::PushDeferredEvent(UniquePtr<DeferredEvent> aEvent)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
RecvEmulatedWindow(const WindowsHandle& aEmulatedWindowHandle,
|
||||
const IAccessibleHolder& aEmulatedWindowCOMProxy) override;
|
||||
|
||||
HWND GetEmulatedWindowHandle() const { return mEmulatedWindowHandle; }
|
||||
HWND GetNativeWindowHandle() const;
|
||||
IAccessible* GetEmulatedWindowIAccessible() const { return mEmulatedWindowProxy.get(); }
|
||||
|
||||
IAccessible* GetParentIAccessible() const { return mParentProxy.get(); }
|
||||
|
|
|
@ -131,18 +131,7 @@ DocAccessibleWrap::GetNativeWindow() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
HWND hWnd = ipcDoc->GetEmulatedWindowHandle();
|
||||
if (hWnd) {
|
||||
return hWnd;
|
||||
}
|
||||
|
||||
auto tab = static_cast<dom::TabChild*>(ipcDoc->Manager());
|
||||
MOZ_ASSERT(tab);
|
||||
if (!tab) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return reinterpret_cast<HWND>(tab->GetNativeWindowHandle());
|
||||
return ipcDoc->GetNativeWindowHandle();
|
||||
} else if (mHWND) {
|
||||
return mHWND;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче