Bug 1406822 - Implement a11y::HandlerProvider::GetEffectiveOutParamIid. r=Jamie, a=ritu
☠☠ backed out by cae5754b8af5 ☠ ☠
authorAaron Klotz <aklotz@mozilla.com>
Tue, 17 Oct 2017 15:01:27 -0600
changeset 435099 2683f54b6e5101964f23b973b03eaf7487f259e2
parent 435098 88ea5a2c3e65399f1fec58244fd44d6303712a13
child 435100 349332cc8d8507f2ab1e7a5bea9672d47d4ebdde
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie, ritu
bugs1406822
milestone57.0
Bug 1406822 - Implement a11y::HandlerProvider::GetEffectiveOutParamIid. r=Jamie, a=ritu MozReview-Commit-ID: BKH3ooMQvN1
accessible/ipc/win/HandlerProvider.cpp
accessible/ipc/win/HandlerProvider.h
--- a/accessible/ipc/win/HandlerProvider.cpp
+++ b/accessible/ipc/win/HandlerProvider.cpp
@@ -4,16 +4,18 @@
  * 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 "AccessibleTable.h"
+#include "AccessibleTable2.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"
@@ -209,16 +211,28 @@ HandlerProvider::MarshalAs(REFIID aIid)
       aIid == IID_IAccessible2_3) {
     // This should always be the newest IA2 interface ID
     return NEWEST_IA2_IID;
   }
   // 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;
+  }
+
+  MOZ_ASSERT(false);
+  return IID_IUnknown;
+}
+
 HRESULT
 HandlerProvider::NewInstance(REFIID aIid,
                              mscom::InterceptorTargetPtr<IUnknown> aTarget,
                              NotNull<mscom::IHandlerProvider**> aOutNewPayload)
 {
   RefPtr<IHandlerProvider> newPayload(new HandlerProvider(aIid, Move(aTarget)));
   newPayload.forget(aOutNewPayload.get());
   return S_OK;
--- a/accessible/ipc/win/HandlerProvider.h
+++ b/accessible/ipc/win/HandlerProvider.h
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 #ifndef mozilla_a11y_HandlerProvider_h
 #define mozilla_a11y_HandlerProvider_h
 
-#include "handler/AccessibleHandler.h"
+#include "mozilla/a11y/AccessibleHandler.h"
 #include "mozilla/AlreadyAddRefed.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/mscom/IHandlerProvider.h"
 #include "mozilla/mscom/Ptr.h"
 #include "mozilla/mscom/StructStream.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/UniquePtr.h"
 
@@ -39,16 +39,18 @@ public:
   STDMETHODIMP_(ULONG) AddRef() override;
   STDMETHODIMP_(ULONG) Release() override;
 
   // IHandlerProvider
   STDMETHODIMP GetHandler(NotNull<CLSID*> aHandlerClsid) override;
   STDMETHODIMP GetHandlerPayloadSize(NotNull<DWORD*> aOutPayloadSize) override;
   STDMETHODIMP WriteHandlerPayload(NotNull<IStream*> aStream) override;
   STDMETHODIMP_(REFIID) MarshalAs(REFIID aIid) override;
+  STDMETHODIMP_(REFIID) GetEffectiveOutParamIid(REFIID aCallIid,
+                                                ULONG aCallMethod) override;
   STDMETHODIMP NewInstance(REFIID aIid,
                            mscom::InterceptorTargetPtr<IUnknown> aTarget,
                            NotNull<mscom::IHandlerProvider**> aOutNewPayload) override;
 
   // IGeckoBackChannel
   STDMETHODIMP put_HandlerControl(long aPid, IHandlerControl* aCtrl) override;
   STDMETHODIMP Refresh(IA2Data* aOutData) override;