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
--- 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;
}