Bug 1405065: Implement accNavigate in Windows a11y LazyInstantiator. r?aklotz draft
authorJames Teh <jteh@mozilla.com>
Thu, 05 Oct 2017 13:54:07 +1000
changeset 675318 ffd7ad46f751c46aae7c698d0cf22fff2e09684c
parent 674516 c97190c389c4cfef20fe55b4bacade95a36ae6ef
child 734577 d08fe1f7d01c5b9a487fb7d20f0429ed061ab35c
push id83104
push userbmo:jteh@mozilla.com
push dateThu, 05 Oct 2017 05:32:11 +0000
reviewersaklotz
bugs1405065
milestone58.0a1
Bug 1405065: Implement accNavigate in Windows a11y LazyInstantiator. r?aklotz The first accessibility client to ask for the root accessible will get a surrogate LazyInstantiator object. That instantiates accessibility if appropriate and then passes calls through. However, it previously didn't implement accNavigate, which broke things for clients that used this on the root. In particular, this was bad for NAVRELATION_EMBEDS, which is used by some clients to retrieve the tab document. This patch simply passes accNavigate through to the real accessible, just as is already done for other methods. MozReview-Commit-ID: KIoA9BwMDhc
accessible/windows/msaa/LazyInstantiator.cpp
--- a/accessible/windows/msaa/LazyInstantiator.cpp
+++ b/accessible/windows/msaa/LazyInstantiator.cpp
@@ -807,17 +807,22 @@ LazyInstantiator::accLocation(long *pxLe
   RESOLVE_ROOT;
   return mWeakAccessible->accLocation(pxLeft, pyTop, pcxWidth, pcyHeight, varChild);
 }
 
 HRESULT
 LazyInstantiator::accNavigate(long navDir, VARIANT varStart,
                               VARIANT *pvarEndUpAt)
 {
-  return E_NOTIMPL;
+  if (!pvarEndUpAt) {
+    return E_INVALIDARG;
+  }
+
+  RESOLVE_ROOT;
+  return mWeakAccessible->accNavigate(navDir, varStart, pvarEndUpAt);
 }
 
 HRESULT
 LazyInstantiator::accHitTest(long xLeft, long yTop, VARIANT *pvarChild)
 {
   if (!pvarChild) {
     return E_INVALIDARG;
   }