Bug 929773 - ISimpleDOMNode language fails on text nodes, r=davidb

This commit is contained in:
Alexander Surkov 2013-10-23 12:40:57 -04:00
parent a4e08580e0
commit eceff25684

View File

@ -516,8 +516,8 @@ sdnAccessible::get_language(BSTR __RPC_FAR* aLanguage)
return CO_E_OBJNOTCONNECTED;
nsAutoString language;
if (mNode->IsElement())
nsCoreUtils::GetLanguageFor(mNode->AsElement(), nullptr, language);
if (mNode->IsContent())
nsCoreUtils::GetLanguageFor(mNode->AsContent(), nullptr, language);
if (language.IsEmpty()) { // Nothing found, so use document's language
mNode->OwnerDoc()->GetHeaderData(nsGkAtoms::headerContentLanguage,
language);