Revert changeset d856b4067e80 (bug 1421144) to work around the crashes in bug 1424505. r=Jamie, a=RyanVM
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 21 Mar 2018 17:24:29 -0400
changeset 463167 7d6400c2038cf35259e42d30541654a94e7a7b9a
parent 463166 8e7c044b2e71af8b7dba06ced0298fe50446c575
child 463168 def0f8799e4f663e3062beef4d877000bfdd0f34
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie, RyanVM
bugs1421144, 1424505
milestone60.0
Revert changeset d856b4067e80 (bug 1421144) to work around the crashes in bug 1424505. r=Jamie, a=RyanVM
accessible/windows/msaa/RootAccessibleWrap.cpp
accessible/windows/msaa/RootAccessibleWrap.h
--- a/accessible/windows/msaa/RootAccessibleWrap.cpp
+++ b/accessible/windows/msaa/RootAccessibleWrap.cpp
@@ -144,57 +144,8 @@ RootAccessibleWrap::accNavigate(
     return E_FAIL;
   }
 
   VariantInit(pvarEndUpAt);
   pvarEndUpAt->pdispVal = NativeAccessible(target);
   pvarEndUpAt->vt = VT_DISPATCH;
   return S_OK;
 }
-
-STDMETHODIMP
-RootAccessibleWrap::get_accFocus(
-      /* [retval][out] */ VARIANT __RPC_FAR *pvarChild)
-{
-  HRESULT hr = DocAccessibleWrap::get_accFocus(pvarChild);
-  if (FAILED(hr) || pvarChild->vt != VT_EMPTY) {
-    // We got a definite result (either failure or an accessible).
-    return hr;
-  }
-
-  // The base implementation reported no focus.
-  // Focus might be in a remote document.
-  // (The base implementation can't handle this.)
-  // Get the document in the active tab.
-  ProxyAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
-  if (!docProxy) {
-    return hr;
-  }
-  Accessible* docAcc = WrapperFor(docProxy);
-  if (!docAcc) {
-    return E_FAIL;
-  }
-  RefPtr<IDispatch> docDisp = NativeAccessible(docAcc);
-  if (!docDisp) {
-    return E_FAIL;
-  }
-  RefPtr<IAccessible> docIa;
-  hr = docDisp->QueryInterface(IID_IAccessible, (void**)getter_AddRefs(docIa));
-  MOZ_ASSERT(SUCCEEDED(hr));
-  MOZ_ASSERT(docIa);
-
-  // Ask this document for its focused descendant.
-  // We return this as is to the client except for CHILDID_SELF (see below).
-  hr = docIa->get_accFocus(pvarChild);
-  if (FAILED(hr)) {
-    return hr;
-  }
-
-  if (pvarChild->vt == VT_I4 && pvarChild->lVal == CHILDID_SELF) {
-    // The document itself has focus.
-    // We're handling a call to accFocus on the root accessible,
-    // so replace CHILDID_SELF with the document accessible.
-    pvarChild->vt = VT_DISPATCH;
-    docDisp.forget(&pvarChild->pdispVal);
-  }
-
-  return S_OK;
-}
--- a/accessible/windows/msaa/RootAccessibleWrap.h
+++ b/accessible/windows/msaa/RootAccessibleWrap.h
@@ -38,19 +38,16 @@ public:
    */
   already_AddRefed<IUnknown> GetInternalUnknown();
 
   virtual /* [id] */ HRESULT STDMETHODCALLTYPE accNavigate(
     /* [in] */ long navDir,
     /* [optional][in] */ VARIANT varStart,
     /* [retval][out] */ VARIANT __RPC_FAR *pvarEndUpAt) override;
 
-  virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_accFocus(
-    /* [retval][out] */ VARIANT __RPC_FAR *pvarChild) override;
-
 private:
   // DECLARE_AGGREGATABLE declares the internal IUnknown methods as well as
   // mInternalUnknown.
   DECLARE_AGGREGATABLE(RootAccessibleWrap);
   IUnknown* mOuter;
 };
 
 } // namespace a11y