From fdc2c57a4a77ec26ca0b665935ca70ae251c5a12 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 1534aefbdaee..844ae6dcfc8a 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;