Bug 302656. Not exposing language type from HTTP or meta content-language. r=timeless, sr=neil, a=bsmedberg

This commit is contained in:
aaronleventhal%moonset.net 2005-08-02 12:59:13 +00:00
parent ef9ceda68e
commit ef7c4bc7a0
3 changed files with 12 additions and 1 deletions

View File

@ -55,6 +55,9 @@
******/
// Header info
ACCESSIBILITY_ATOM(headerContentLanguage, "content-language")
// Alphabetical list of frame types
ACCESSIBILITY_ATOM(blockFrame, "BlockFrame")
ACCESSIBILITY_ATOM(inlineFrame, "InlineFrame")

View File

@ -112,7 +112,8 @@ NS_IMETHODIMP nsOuterDocAccessible::Init()
// We're in the accessibility cache now
// In these variable names, "outer" relates to the nsOuterDocAccessible
// as opposed to the nsDocAccessibleWrap which is "inner".
// The outer node is a <browser>, <iframe> or <editor> tag, whereas the inner node
// The outer node is a something like a <browser>, <frame>, <iframe>, <page> or
// <editor> tag, whereas the inner node
// corresponds to the inner document root.
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));

View File

@ -532,6 +532,13 @@ nsAccessNodeWrap::get_language(BSTR __RPC_FAR *aLanguage)
break;
}
}
if (language.IsEmpty()) { // Nothing found, so use document's language
nsIDocument *doc = content->GetOwnerDoc();
if (doc) {
doc->GetHeaderData(nsAccessibilityAtoms::headerContentLanguage, language);
}
}
*aLanguage = ::SysAllocString(language.get());
return S_OK;