Bug 1410159: Add additional IUnknown resolution to a11y::HandlerProvider; r=Jamie
authorAaron Klotz <aklotz@mozilla.com>
Thu, 02 Nov 2017 15:37:57 -0600
changeset 440765 e255f93c08085eb8a4034d320c6af48827619908
parent 440764 962343e8bdf0f90916487fcf81908589d70ff51f
child 440766 14a5ae97c682ed92861492a1e51f041b6d6cef40
push id8120
push userryanvm@gmail.com
push dateSat, 04 Nov 2017 17:45:29 +0000
treeherdermozilla-beta@78568f0b1068 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie
bugs1410159
milestone58.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 1410159: Add additional IUnknown resolution to a11y::HandlerProvider; r=Jamie MozReview-Commit-ID: 4duTGCN9xJ6
accessible/ipc/win/HandlerProvider.cpp
accessible/ipc/win/PlatformChild.cpp
--- a/accessible/ipc/win/HandlerProvider.cpp
+++ b/accessible/ipc/win/HandlerProvider.cpp
@@ -4,18 +4,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #define INITGUID
 
 #include "mozilla/a11y/HandlerProvider.h"
 
 #include "Accessible2_3.h"
+#include "AccessibleDocument.h"
 #include "AccessibleTable.h"
 #include "AccessibleTable2.h"
+#include "AccessibleTableCell.h"
 #include "HandlerData.h"
 #include "HandlerData_i.c"
 #include "mozilla/Assertions.h"
 #include "mozilla/a11y/AccessibleWrap.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/Move.h"
 #include "mozilla/mscom/AgileReference.h"
 #include "mozilla/mscom/FastMarshaler.h"
@@ -335,18 +337,30 @@ HandlerProvider::MarshalAs(REFIID aIid)
   // Otherwise we juse return the identity.
   return aIid;
 }
 
 REFIID
 HandlerProvider::GetEffectiveOutParamIid(REFIID aCallIid,
                                          ULONG aCallMethod)
 {
-  if (aCallIid == IID_IAccessibleTable || aCallIid == IID_IAccessibleTable2) {
-    return IID_IAccessible2_3;
+  if (aCallIid == IID_IAccessibleTable ||
+      aCallIid == IID_IAccessibleTable2 ||
+      aCallIid == IID_IAccessibleDocument ||
+      aCallIid == IID_IAccessibleTableCell ||
+      aCallIid == IID_IAccessibleRelation) {
+    return NEWEST_IA2_IID;
+  }
+
+  // IAccessible2_2::accessibleWithCaret
+  static_assert(&NEWEST_IA2_IID == &IID_IAccessible2_3,
+                "You have modified NEWEST_IA2_IID. This code needs updating.");
+  if ((aCallIid == IID_IAccessible2_2 || aCallIid == IID_IAccessible2_3) &&
+      aCallMethod == 47) {
+    return NEWEST_IA2_IID;
   }
 
   MOZ_ASSERT(false);
   return IID_IUnknown;
 }
 
 HRESULT
 HandlerProvider::NewInstance(REFIID aIid,
--- a/accessible/ipc/win/PlatformChild.cpp
+++ b/accessible/ipc/win/PlatformChild.cpp
@@ -11,16 +11,17 @@
 #include "mozilla/mscom/InterceptorLog.h"
 
 #include "Accessible2.h"
 #include "Accessible2_2.h"
 #include "AccessibleHypertext2.h"
 #include "AccessibleTable2.h"
 #include "AccessibleTableCell.h"
 
+#include "AccessibleDocument_i.c"
 #include "AccessibleHypertext2_i.c"
 
 namespace mozilla {
 namespace a11y {
 
 /**
  * Unfortunately the COM interceptor does not intrinsically handle array
  * outparams. Instead we manually define the relevant metadata here, and