bug 1210741 - make AccessibleWrap::get_accLocation work with proxied accessibles r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Fri, 02 Oct 2015 06:33:44 -0400
changeset 266688 c45c9add2d8d081a158492936527aeabec7cddac
parent 266687 81ed1750e33aab9f2fcdc3834e79e7a3168daa60
child 266689 f48787d52534533e04b574a1734e33c4b6304143
push id66255
push usertsaunders@mozilla.com
push dateWed, 07 Oct 2015 22:27:42 +0000
treeherdermozilla-inbound@f48787d52534 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1210741
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1210741 - make AccessibleWrap::get_accLocation work with proxied accessibles r=davidb
accessible/windows/msaa/AccessibleWrap.cpp
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -947,21 +947,23 @@ AccessibleWrap::accLocation(
 
   Accessible* xpAccessible = GetXPAccessibleFor(varChild);
   if (!xpAccessible)
     return E_INVALIDARG;
 
   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;
   *pcyHeight = rect.height;
   return S_OK;
 
   A11Y_TRYBLOCK_END
 }