From 24f50edca755e2a11bf8494201736dd8e3921dec Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 10 Feb 2016 18:04:15 -0500 Subject: [PATCH] bug 1250882 - implement xpcAccessible::GetLanguage() for proxied accessibles r=davidb --- accessible/xpcom/xpcAccessible.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/accessible/xpcom/xpcAccessible.cpp b/accessible/xpcom/xpcAccessible.cpp index 30ff6a45a31..95580eda611 100644 --- a/accessible/xpcom/xpcAccessible.cpp +++ b/accessible/xpcom/xpcAccessible.cpp @@ -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; }