Bug 1416986 part 4: AccessibleHandler: Don't fall through to the proxy for IAccessibleHyperlink. r=aklotz a=gchang
authorJames Teh <jteh@mozilla.com>
Wed, 15 Nov 2017 12:32:52 +1000
changeset 444959 7ebf334c8ed4fd51c3dc738a2274ed7485f7e5fc
parent 444958 30014722ca5303b725978d66fb651273a0cbc85c
child 444960 403ec09d449e557972cf017f4f094e76e7009c95
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz, gchang
bugs1416986
milestone58.0
Bug 1416986 part 4: AccessibleHandler: Don't fall through to the proxy for IAccessibleHyperlink. r=aklotz a=gchang The handler's implementation of IAHyperlink just forwards calls through to the proxy. However, it exists because we want the cache to be used when a hyperlink is retrieved. When querying from the handler to IAHyperlink, we should use the same implementation. This is mostly about consistency/correctness, especially as we're increasing complexity. MozReview-Commit-ID: AwYibrFzUyf
accessible/ipc/win/handler/AccessibleHandler.cpp
--- a/accessible/ipc/win/handler/AccessibleHandler.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandler.cpp
@@ -235,16 +235,23 @@ AccessibleHandler::QueryHandlerInterface
       // We already know this interface is not available, so don't query
       // the proxy, thus avoiding a pointless cross-process call.
       // If we return E_NOINTERFACE here, mscom::Handler will try the COM
       // proxy. S_FALSE signals that the proxy should not be tried.
       return S_FALSE;
     }
   }
 
+  if (aIid == IID_IAccessibleAction || aIid == IID_IAccessibleHyperlink) {
+    RefPtr<IAccessibleHyperlink> iaLink(
+      static_cast<IAccessibleHyperlink*>(this));
+    iaLink.forget(aOutInterface);
+    return S_OK;
+  }
+
   if (aIid == IID_IAccessibleText || aIid == IID_IAccessibleHypertext ||
       aIid == IID_IAccessibleHypertext2) {
     RefPtr<IAccessibleHypertext2> textTearoff(new AccessibleTextTearoff(this));
     textTearoff.forget(aOutInterface);
     return S_OK;
   }
 
   if (aIid == IID_IProvideClassInfo) {