Bug 1430938 part 2: AccessibleHandler: When QueryService is called for IAccessibleAction or IAccessibleText, just use QI. r?MarcoZ
JAWS uses QueryService for these.
Using QI avoids a cross-process call, since we have these interfaces cached.
More importantly, if QS is used, the handler won't get used for that object, so our caching won't be used.
MozReview-Commit-ID: Ejc2Bjp7NSv
--- a/accessible/ipc/win/handler/AccessibleHandler.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandler.cpp
@@ -1241,16 +1241,23 @@ AccessibleHandler::QueryService(REFGUID
of our own object to implement this just like a QI. */
if (aIid == IID_IAccessible2_3 || aIid == IID_IAccessible2_2 ||
aIid == IID_IAccessible2) {
RefPtr<NEWEST_IA2_INTERFACE> ia2(this);
ia2.forget(aOutInterface);
return S_OK;
}
+ // JAWS uses QueryService for these, but QI will work just fine and we can
+ // thus avoid a cross-process call. More importantly, if QS is used, the
+ // handler won't get used for that object, so our caching won't be used.
+ if (aIid == IID_IAccessibleAction || aIid == IID_IAccessibleText) {
+ return InternalQueryInterface(aIid, aOutInterface);
+ }
+
for (uint32_t i = 0; i < ArrayLength(kUnsupportedServices); ++i) {
if (aServiceId == kUnsupportedServices[i]) {
return E_NOINTERFACE;
}
}
if (!mServProvPassThru) {
RefPtr<IUnknown> proxy(GetProxy());