bug 1250882 - implement xpcAccessible::GetBounds() for proxied accessibles r=davidb

This commit is contained in:
Trevor Saunders 2016-02-11 16:23:17 -05:00
parent 21162b4de3
commit b04ac26aa2

View File

@ -382,10 +382,16 @@ xpcAccessible::GetBounds(int32_t* aX, int32_t* aY,
NS_ENSURE_ARG_POINTER(aHeight);
*aHeight = 0;
if (!Intl())
if (IntlGeneric().IsNull())
return NS_ERROR_FAILURE;
nsIntRect rect = Intl()->Bounds();
nsIntRect rect;
if (Accessible* acc = IntlGeneric().AsAccessible()) {
rect = acc->Bounds();
} else {
rect = IntlGeneric().AsProxy()->Bounds();
}
*aX = rect.x;
*aY = rect.y;
*aWidth = rect.width;