20747 "[PP] The Font FACE attribute is case-sensitive". FontNameKey now computes the hash-value on lower-case strings. Also added a few out-commented lines in GetScreenResolution that may be useful later for #18136 "Fixing the font size mess".

This commit is contained in:
pierre%netscape.com 1999-12-04 13:52:15 +00:00
Родитель 190ba77382
Коммит 2e91e607c0
2 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -470,7 +470,9 @@ FontNameKey::FontNameKey(const nsString& aString)
PRUint32 FontNameKey::HashValue(void) const
{
return nsCRT::HashValue(mString.GetUnicode());
nsString str;
mString.ToLowerCase(str);
return nsCRT::HashValue(str.GetUnicode());
}
PRBool FontNameKey::Equals(const nsHashKey *aKey) const
@ -643,6 +645,13 @@ PRUint32 nsDeviceContextMac::GetScreenResolution()
if (NS_SUCCEEDED(prefs->GetIntPref("browser.screen_resolution", &intVal))) {
mPixelsPerInch = intVal;
}
#if 0
else {
short hppi, vppi;
::ScreenRes(&hppi, &vppi);
mPixelsPerInch = hppi * 1.17f;
}
#endif
nsServiceManager::ReleaseService(kPrefCID, prefs);
}

Просмотреть файл

@ -470,7 +470,9 @@ FontNameKey::FontNameKey(const nsString& aString)
PRUint32 FontNameKey::HashValue(void) const
{
return nsCRT::HashValue(mString.GetUnicode());
nsString str;
mString.ToLowerCase(str);
return nsCRT::HashValue(str.GetUnicode());
}
PRBool FontNameKey::Equals(const nsHashKey *aKey) const
@ -643,6 +645,13 @@ PRUint32 nsDeviceContextMac::GetScreenResolution()
if (NS_SUCCEEDED(prefs->GetIntPref("browser.screen_resolution", &intVal))) {
mPixelsPerInch = intVal;
}
#if 0
else {
short hppi, vppi;
::ScreenRes(&hppi, &vppi);
mPixelsPerInch = hppi * 1.17f;
}
#endif
nsServiceManager::ReleaseService(kPrefCID, prefs);
}