mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1631276 part 2: On non-Windows, have the parent process notify the content process when the DocAccessibleParent is constructed. r=eeejay
This is already handled in a different way on Windows. For documents at the top level of their process (including OOP iframes), we can just set the flag rather than waiting for a message, since we can never get queries for such documents or descendants before parent process construction is complete. Differential Revision: https://phabricator.services.mozilla.com/D81009
This commit is contained in:
parent
feb712c112
commit
06946181ec
@ -1641,6 +1641,13 @@ void DocAccessible::DoInitialUpdate() {
|
||||
ipcDoc->SendPDocAccessiblePlatformExtConstructor();
|
||||
#endif
|
||||
}
|
||||
#if !defined(XP_WIN)
|
||||
// It's safe for us to mark top level documents as constructed in the
|
||||
// parent process without receiving an explicit message, since we can
|
||||
// never get queries for this document or descendants before parent
|
||||
// process construction is complete.
|
||||
ipcDoc->SetConstructedInParentProcess();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ class DocAccessibleChildBase : public PDocAccessibleChild {
|
||||
|
||||
DocAccessible* mDoc;
|
||||
bool mIsRemoteConstructed;
|
||||
|
||||
friend void DocAccessible::DoInitialUpdate();
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
|
@ -1694,6 +1694,11 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvDOMNodeID(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvConstructedInParentProcess() {
|
||||
SetConstructedInParentProcess();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvRestoreFocus() {
|
||||
FocusMgr()->ForceFocusEvent();
|
||||
return IPC_OK();
|
||||
|
@ -38,6 +38,7 @@ class DocAccessibleChild : public DocAccessibleChildBase {
|
||||
MOZ_COUNT_DTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
|
||||
}
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvConstructedInParentProcess() override;
|
||||
virtual mozilla::ipc::IPCResult RecvRestoreFocus() override;
|
||||
|
||||
/*
|
||||
|
@ -124,6 +124,12 @@ parent:
|
||||
async Batch(uint64_t aBatchType, BatchData[] aData);
|
||||
|
||||
child:
|
||||
/*
|
||||
* Notify the content process that the PDocAccessible has finished being
|
||||
* constructed in the parent process.
|
||||
*/
|
||||
async ConstructedInParentProcess();
|
||||
|
||||
async __delete__();
|
||||
|
||||
/*
|
||||
|
@ -1209,6 +1209,8 @@ mozilla::ipc::IPCResult BrowserParent::RecvPDocAccessibleConstructor(
|
||||
if (a11y::nsWinUtils::IsWindowEmulationStarted()) {
|
||||
doc->SetEmulatedWindowHandle(parentDoc->GetEmulatedWindowHandle());
|
||||
}
|
||||
# else
|
||||
Unused << aDoc->SendConstructedInParentProcess();
|
||||
# endif
|
||||
|
||||
return IPC_OK();
|
||||
|
Loading…
Reference in New Issue
Block a user