Bug 1756728 part 1: Make it possible to retrieve a BrowsingContext from a DocAccessibleParent. r=morgan

Previously, even for remote in-process iframes, it was only possible to retrieve the top level BrowsingContext for the remote process by getting the managing BrowserParent.
This makes it possible to get the correct BrowsingContext even for in-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D147716
This commit is contained in:
James Teh
2022-06-01 00:34:17 +00:00
parent 1765a9fe46
commit ecd3ad9bab
11 changed files with 90 additions and 45 deletions

View File

@@ -965,7 +965,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
do_GetInterface(mDocument->DocumentNode()->GetDocShell());
if (browserChild) {
static_cast<BrowserChild*>(browserChild.get())
->SendPDocAccessibleConstructor(ipcDoc, parentIPCDoc, id, 0, 0);
->SendPDocAccessibleConstructor(
ipcDoc, parentIPCDoc, id,
childDoc->DocumentNode()->GetBrowsingContext(), 0, 0);
ipcDoc->SendPDocAccessiblePlatformExtConstructor();
}
#endif