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

This commit is contained in:
Trevor Saunders 2016-02-10 18:04:15 -05:00
parent 24d25ea3d2
commit 24f50edca7

View File

@ -268,10 +268,17 @@ xpcAccessible::GetDescription(nsAString& aDescription)
NS_IMETHODIMP
xpcAccessible::GetLanguage(nsAString& aLanguage)
{
if (!Intl())
if (IntlGeneric().IsNull())
return NS_ERROR_FAILURE;
Intl()->Language(aLanguage);
nsAutoString lang;
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
proxy->Language(lang);
} else {
Intl()->Language(lang);
}
aLanguage.Assign(lang);
return NS_OK;
}