зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1396450 - Don't apply ToLowerCase to font feature identifiers used in @font-feature-values rules, as the spec says they're case sensitive. r=xidorn
This commit is contained in:
Родитель
f5fa8a68b9
Коммит
dba372ac43
|
@ -20,10 +20,9 @@ gfxFontFeatureValueSet::GetFontFeatureValuesFor(const nsAString& aFamily,
|
|||
const nsAString& aName,
|
||||
nsTArray<uint32_t>& aValues)
|
||||
{
|
||||
nsAutoString family(aFamily), name(aName);
|
||||
nsAutoString family(aFamily);
|
||||
ToLowerCase(family);
|
||||
ToLowerCase(name);
|
||||
FeatureValueHashKey key(family, aVariantProperty, name);
|
||||
FeatureValueHashKey key(family, aVariantProperty, aName);
|
||||
|
||||
aValues.Clear();
|
||||
FeatureValueHashEntry *entry = mFontFeatureValues.GetEntry(key);
|
||||
|
@ -64,9 +63,7 @@ gfxFontFeatureValueSet::AppendFeatureValueHashEntry(const nsAString& aFamily,
|
|||
const nsAString& aName,
|
||||
uint32_t aAlternate)
|
||||
{
|
||||
nsAutoString name(aName);
|
||||
ToLowerCase(name);
|
||||
FeatureValueHashKey key(aFamily, aAlternate, name);
|
||||
FeatureValueHashKey key(aFamily, aAlternate, aName);
|
||||
FeatureValueHashEntry *entry = mFontFeatureValues.PutEntry(key);
|
||||
entry->mKey = key;
|
||||
return &entry->mValues;
|
||||
|
|
|
@ -17,6 +17,9 @@ span {
|
|||
font-feature-settings: "ss05"; /* crossed W */
|
||||
}
|
||||
|
||||
/* tests that should NOT use the feature, due to case-sensitivity of font-feature-values names */
|
||||
#test2, #test3 { font-feature-settings: "ss05" off; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
|
|
|
@ -58,13 +58,13 @@ div { margin: 0 20px; }
|
|||
}
|
||||
|
||||
#test2 {
|
||||
/* testing case-insensitivity of styleset name */
|
||||
/* testing case-sensitivity of styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(altW);
|
||||
}
|
||||
|
||||
#test3 {
|
||||
/* testing case-insensitivity of styleset name */
|
||||
/* testing case-sensitivity of styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(ALTW);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ div { margin: 0 20px; }
|
|||
#test4 {
|
||||
/* testing escapes in styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(\41 ltW);
|
||||
font-variant-alternates: styleset(\41 lTw);
|
||||
}
|
||||
|
||||
#test5 {
|
||||
|
|
|
@ -19,6 +19,9 @@ span {
|
|||
font-feature-settings: "ss05"; /* crossed W */
|
||||
}
|
||||
|
||||
/* tests that should NOT use the feature, due to case-sensitivity of font-feature-values names */
|
||||
#test2, #test3 { font-feature-settings: "ss05" off; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
|
|
|
@ -65,13 +65,13 @@ div { margin: 0 20px; }
|
|||
}
|
||||
|
||||
#test2 {
|
||||
/* testing case-insensitivity of styleset name */
|
||||
/* testing case-sensitivity of styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(altW);
|
||||
}
|
||||
|
||||
#test3 {
|
||||
/* testing case-insensitivity of styleset name */
|
||||
/* testing case-sensitivity of styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(ALTW);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ div { margin: 0 20px; }
|
|||
#test4 {
|
||||
/* testing escapes in styleset name */
|
||||
font-family: fontB;
|
||||
font-variant-alternates: styleset(\41 ltW);
|
||||
font-variant-alternates: styleset(\41 lTw);
|
||||
}
|
||||
|
||||
#test5 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче