Bug 1564299: Fire a reorder event on the outer doc accessible when an OOP document gets added. r=yzen
authorJames Teh <jteh@mozilla.com>
Wed, 10 Jul 2019 12:59:21 +0000
changeset 482284 bf25c3b58362c73e91a1587c1caaeb33f70de53b
parent 482283 4db5a1d1f69af424f3f25b2cd05ac095ce82670f
child 482285 d5c70273b5afc0bdb870f70310663991c6c76e77
push id89676
push userjteh@mozilla.com
push dateWed, 10 Jul 2019 21:47:38 +0000
treeherderautoland@bf25c3b58362 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1564299
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1564299: Fire a reorder event on the outer doc accessible when an OOP document gets added. r=yzen For same-process iframe documents, this reorder event is fired by the content process. This isn't possible when the document is in a different process to its embedder. In this case, we need to fire it from the parent process when the embedded document accessible is added. Differential Revision: https://phabricator.services.mozilla.com/D37352
accessible/ipc/DocAccessibleParent.cpp
--- a/accessible/ipc/DocAccessibleParent.cpp
+++ b/accessible/ipc/DocAccessibleParent.cpp
@@ -566,16 +566,22 @@ ipc::IPCResult DocAccessibleParent::AddC
         // The embedded document should use the same emulated window handle as
         // its embedder. It will return the embedder document (not a window
         // accessible) as the parent accessible, so we pass a null accessible
         // when sending the window to the embedded document.
         aChildDoc->SetEmulatedWindowHandle(mEmulatedWindowHandle);
         Unused << aChildDoc->SendEmulatedWindow(
             reinterpret_cast<uintptr_t>(mEmulatedWindowHandle), nullptr);
       }
+      // We need to fire a reorder event on the outer doc accessible.
+      // For same-process documents, this is fired by the content process, but
+      // this isn't possible when the document is in a different process to its
+      // embedder.
+      // RecvEvent fires both OS and XPCOM events.
+      Unused << RecvEvent(aParentID, nsIAccessibleEvent::EVENT_REORDER);
     }
   }
 #endif  // defined(XP_WIN)
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult DocAccessibleParent::RecvShutdown() {