From c2be473e90c8535b1efc5f1b82a76ba9ef87a977 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Fri, 9 Oct 2015 14:19:38 -0400 Subject: [PATCH] bug 1215657 - make AccessibleWrap::get_accFocus work with proxied accessibles r=davidb --- accessible/windows/msaa/AccessibleWrap.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp index 2c4de0f9548f..eb5447ebd0f4 100644 --- a/accessible/windows/msaa/AccessibleWrap.cpp +++ b/accessible/windows/msaa/AccessibleWrap.cpp @@ -658,12 +658,15 @@ AccessibleWrap::get_accFocus( if (IsDefunct()) return CO_E_OBJNOTCONNECTED; - // TODO make this work with proxies. - if (IsProxy()) - return E_NOTIMPL; - // Return the current IAccessible child that has focus - Accessible* focusedAccessible = FocusedChild(); + Accessible* focusedAccessible; + if (IsProxy()) { + ProxyAccessible* proxy = Proxy()->FocusedChild(); + focusedAccessible = proxy ? WrapperFor(proxy) : nullptr; + } else { + focusedAccessible = FocusedChild(); + } + if (focusedAccessible == this) { pvarChild->vt = VT_I4; pvarChild->lVal = CHILDID_SELF;