Make DPI preference behave the same on OS/2 as on Unixes. r=mkaply sr=roc b=323964

This commit is contained in:
dbaron%dbaron.org 2006-01-20 20:08:02 +00:00
Родитель e8c42514b1
Коммит b38434e360
2 изменённых файлов: 9 добавлений и 7 удалений

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

@ -573,16 +573,18 @@ nsDeviceContextOS2::SetDPI(PRInt32 aPrefDPI)
GFX (::DevQueryCaps(hdc, CAPS_HORIZONTAL_FONT_RES, 1, &OSVal), FALSE);
::WinReleasePS(ps);
if (aPrefDPI == 0) {
// If the pref is 0 use of OS value
mDpi = OSVal;
} else if (aPrefDPI > 0) {
if (aPrefDPI > 0) {
// If there's a valid pref value for the logical resolution,
// use it.
mDpi = aPrefDPI;
} else if ((aPrefDPI == 0) || (OSVal > 96)) {
// Either if the pref is 0 (force use of OS value) or the OS
// value is bigger than 96, use the OS value.
mDpi = OSVal;
} else {
// if we couldn't get the pref or it's negative then use 120
mDpi = 120;
// if we couldn't get the pref or it's negative, and the OS
// value is under 96ppi, then use 96.
mDpi = 96;
}
int pt2t = 72;

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

@ -1518,7 +1518,7 @@ pref("network.dns.disableIPv6", true);
#if XP_OS2
pref("ui.key.menuAccessKeyFocuses", true);
pref("browser.display.screen_resolution", 0); // System setting
pref("browser.display.screen_resolution", -1); // max(96dpi, System setting)
/* Fonts only needs lists if we have a default that might not be available. */
/* Tms Rmn, Helv and Courier are ALWAYS available on OS/2 */