зеркало из https://github.com/mozilla/pjs.git
Bug 302656. Not exposing language type from HTTP or meta content-language. r=timeless, sr=neil, a=bsmedberg
This commit is contained in:
Родитель
755e071063
Коммит
60accc195b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче