From cf85b4a81217097c6891c1798b9d0207680ac80e Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Fri, 2 Oct 2015 06:33:44 -0400 Subject: [PATCH] bug 1210741 - make AccessibleWrap::get_accLocation work with proxied accessibles r=davidb --- accessible/windows/msaa/AccessibleWrap.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp index 1534aefbdae..844ae6dcfc8 100644 --- a/accessible/windows/msaa/AccessibleWrap.cpp +++ b/accessible/windows/msaa/AccessibleWrap.cpp @@ -952,11 +952,13 @@ AccessibleWrap::accLocation( if (xpAccessible->IsDefunct()) return CO_E_OBJNOTCONNECTED; - // TODO make this work with proxies. - if (xpAccessible->IsProxy()) - return E_NOTIMPL; + nsIntRect rect; + if (xpAccessible->IsProxy()) { + rect = xpAccessible->Proxy()->Bounds(); + } else { + rect = xpAccessible->Bounds(); + } - nsIntRect rect = xpAccessible->Bounds(); *pxLeft = rect.x; *pyTop = rect.y; *pcxWidth = rect.width;