merge more changes from chimera branch, fixed printing crash and sets dpi to

96dpi instead of 84dpi (bug 208920)
This commit is contained in:
pinkerton%netscape.com 2003-11-05 21:37:58 +00:00
Родитель 121754a263
Коммит 6747b725be
2 изменённых файлов: 5 добавлений и 11 удалений

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

@ -1029,7 +1029,11 @@ PRUint32 nsDeviceContextMac::GetScreenResolution()
if (NS_SUCCEEDED(prefs->GetIntPref("browser.display.screen_resolution", &intVal)) && intVal > 0) {
mPixelsPerInch = intVal;
}
#ifdef XP_MACOSX
#if 0
// the code here will ignore the default setting of 96dpi and
// instead force approximately 84dpi. There's no real reason for this
// and we shipped Camino0.7 with 96dpi and got no complaints. As
// a result, I'm removing it, but leaving the code for posterity.
else {
short hppi, vppi;
::ScreenRes(&hppi, &vppi);

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

@ -155,19 +155,9 @@ public:
//------------------------------------------------------------------------
static void SetPortToKnownGoodPort()
{
#ifndef MOZ_WIDGET_COCOA
WindowPtr firstWindow = GetTheWindowList();
if (firstWindow)
::SetGWorld(::GetWindowPort(firstWindow), ::GetMainDevice());
#else
static GrafPtr gGoodPort = nsnull;
if (!gGoodPort) {
Rect macRect;
::SetRect(&macRect, 0, 0, 2, 2);
::NewGWorld(&gGoodPort, 16, &macRect, nsnull, nsnull, 0);
}
::SetGWorld(gGoodPort, nsnull);
#endif
}
};