зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543298 part 3: For out-of-process iframes, send the embedded document accessible's COM proxy to the embedder. r=eeejay
This will be later exposed as a child of the embedder OuterDocAccessible. Differential Revision: https://phabricator.services.mozilla.com/D32280 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4e9fb4dabe
Коммит
a23e2db32f
|
@ -536,6 +536,30 @@ ipc::IPCResult DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
|
|||
ProxyCreated(aChildDoc, Interfaces::DOCUMENT | Interfaces::HYPERTEXT);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
auto embeddedBrowser = static_cast<dom::BrowserParent*>(aChildDoc->Manager());
|
||||
dom::BrowserBridgeParent* bridge = embeddedBrowser->GetBrowserBridgeParent();
|
||||
if (bridge) {
|
||||
// aChildDoc is an embedded document in a different content process to
|
||||
// this document.
|
||||
// Send a COM proxy for the embedded document to the embedder process
|
||||
// hosting the iframe. This will be returned as the child of the
|
||||
// embedder OuterDocAccessible.
|
||||
RefPtr<IDispatch> docAcc;
|
||||
aChildDoc->GetCOMInterface((void**)getter_AddRefs(docAcc));
|
||||
RefPtr<IDispatch> docWrapped(
|
||||
mscom::PassthruProxy::Wrap<IDispatch>(WrapNotNull(docAcc)));
|
||||
IDispatchHolder::COMPtrType docPtr(
|
||||
mscom::ToProxyUniquePtr(std::move(docWrapped)));
|
||||
IDispatchHolder docHolder(std::move(docPtr));
|
||||
if (bridge->SendSetEmbeddedDocAccessibleCOMProxy(docHolder)) {
|
||||
# if defined(MOZ_SANDBOX)
|
||||
mDocProxyStream = docHolder.GetPreservedStream();
|
||||
# endif // defined(MOZ_SANDBOX)
|
||||
}
|
||||
}
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -268,6 +268,7 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
|
||||
# if defined(MOZ_SANDBOX)
|
||||
mscom::PreservedStreamPtr mParentProxyStream;
|
||||
mscom::PreservedStreamPtr mDocProxyStream;
|
||||
# endif // defined(MOZ_SANDBOX)
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
|
|
|
@ -1126,6 +1126,11 @@ mozilla::ipc::IPCResult BrowserParent::RecvPDocAccessibleConstructor(
|
|||
// In this case, we don't get aParentDoc and aParentID.
|
||||
MOZ_ASSERT(!aParentDoc && !aParentID);
|
||||
MOZ_ASSERT(embedderID);
|
||||
# ifdef XP_WIN
|
||||
MOZ_ASSERT(!aDocCOMProxy.IsNull());
|
||||
RefPtr<IAccessible> proxy(aDocCOMProxy.Get());
|
||||
doc->SetCOMInterface(proxy);
|
||||
# endif
|
||||
mozilla::ipc::IPCResult added = embedderDoc->AddChildDoc(doc, embedderID);
|
||||
if (!added) {
|
||||
# ifdef DEBUG
|
||||
|
|
Загрузка…
Ссылка в новой задаче