Bug 1370802: There's actually no need for lang to be lowercased. r=heycam

MozReview-Commit-ID: KwtbLqR9Y81
This commit is contained in:
Emilio Cobos Álvarez
2017-06-17 02:27:59 +02:00
parent 8c054a331c
commit 79dc52d467
3 changed files with 3 additions and 26 deletions

View File

@@ -1224,19 +1224,8 @@ MapLangAttributeInto(const nsMappedAttributes* aAttributes, GenericSpecifiedValu
}
MOZ_ASSERT(langValue->Type() == nsAttrValue::eAtom);
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(Font))) {
nsIAtom* atom = langValue->GetAtomValue();
const nsDependentAtomString atomString(atom);
Maybe<nsCOMPtr<nsIAtom>> lowerAtom;
if (nsContentUtils::StringContainsASCIIUpper(atomString)) {
nsAutoString dest;
dest.SetCapacity(atomString.Length());
nsContentUtils::ASCIIToLower(atomString, dest);
lowerAtom.emplace(NS_AtomizeMainThread(dest));
}
aData->SetIdentAtomValueIfUnset(
eCSSProperty__x_lang, lowerAtom ? lowerAtom->get() : atom);
aData->SetIdentAtomValueIfUnset(eCSSProperty__x_lang,
langValue->GetAtomValue());
}
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(Text))) {
if (!aData->PropertyIsSet(eCSSProperty_text_emphasis_position)) {