mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 302656. Not exposing language type from HTTP or meta content-language. r=timeless, sr=neil, a=bsmedberg
This commit is contained in:
parent
ef9ceda68e
commit
ef7c4bc7a0
@ -55,6 +55,9 @@
|
||||
******/
|
||||
|
||||
|
||||
// Header info
|
||||
ACCESSIBILITY_ATOM(headerContentLanguage, "content-language")
|
||||
|
||||
// Alphabetical list of frame types
|
||||
ACCESSIBILITY_ATOM(blockFrame, "BlockFrame")
|
||||
ACCESSIBILITY_ATOM(inlineFrame, "InlineFrame")
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user