gecko-dev/accessible/ipc
James Teh e7f4ed385b Bug 1570848: When an OuterDocAccessible is constructed, send it as the parent COM proxy for its remote document (if any). r=MarcoZ
Normally, the OuterDocAccessible is created first and the DocAccessibleParent for a remote document is created after that.
So, we get the OuterDocAccessible and call DocAccessibleParent::SendParentCOMProxy when the DocAccessibleParent is constructed (BrowserParent::RecvPDocAccessibleConstructor).
However, sometimes, the OuterDocAccessible is created *after* the DocAccessibleParent.
This sometimes happens for extension popups, for example.
In that case, we previously never sent the parent COM proxy.
Aside from leaving the remote document with a null parent, this also meant we never sent any events for the document, since events are buffered for remote documents until the parent COM proxy is received.
This effectively left the remote document (e.g. extension popup) inaccessible.

Now, we also call SendParentCOMProxy in the OuterDocAccessible constructor.
Note that this doesn't result in duplicates because if the OuterDocAccessible was created first, there won't be a DocAccessibleParent for the remote document yet, so this code won't run.

That said, if the OuterDocAccessible is recreated (e.g. due to frame reconstruction), we may call SendParentCOMProxy again.
This should be okay, but it required an assertion in DocAccessibleChild::RecvParentCOMProxy to be tweaked.

Differential Revision: https://phabricator.services.mozilla.com/D40358

--HG--
extra : moz-landing-system : lando
2019-08-02 04:24:54 +00:00
..
other Bug 1499041 - Remove libFuzzer flags from ipc/chromium/. r=froydnj 2019-07-24 14:13:30 +00:00
win Bug 1570848: When an OuterDocAccessible is constructed, send it as the parent COM proxy for its remote document (if any). r=MarcoZ 2019-08-02 04:24:54 +00:00
DocAccessibleChildBase.cpp
DocAccessibleChildBase.h
DocAccessibleParent.cpp Bug 1570038: When sending the parent COM proxy for a remote document, return early if the parent COM proxy can't be retrieved. r=yzen 2019-08-02 03:40:14 +00:00
DocAccessibleParent.h Bug 1570848: When an OuterDocAccessible is constructed, send it as the parent COM proxy for its remote document (if any). r=MarcoZ 2019-08-02 04:24:54 +00:00
IPCTypes.h
moz.build
ProxyAccessibleBase.cpp
ProxyAccessibleBase.h
ProxyAccessibleShared.h