reflow was using the wrong DC to rendering context for PP

BUg 117745 r=dcone sr=attinasi
This commit is contained in:
rods%netscape.com 2002-01-11 11:56:10 +00:00
Родитель 978de2b139
Коммит b304b3f01e
7 изменённых файлов: 13 добавлений и 12 удалений

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

@ -115,8 +115,9 @@ typedef void * nsNativeDeviceContext;
#ifdef NS_PRINT_PREVIEW
const PRUint8 kUseAltDCFor_NONE = 0x00; // Do not use the AltDC for anything
const PRUint8 kUseAltDCFor_FONTMETRICS = 0x01; // Use it for only getting the font metrics
const PRUint8 kUseAltDCFor_CREATE_RC = 0x02; // Use when creating RenderingContexts
const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x04; // Use it for getting the Surface Dimensions
const PRUint8 kUseAltDCFor_CREATERC_REFLOW = 0x02; // Use when creating RenderingContexts for Reflow
const PRUint8 kUseAltDCFor_CREATERC_PAINT = 0x04; // Use when creating RenderingContexts for Painting
const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x08; // Use it for getting the Surface Dimensions
#endif
#define NS_IDEVICE_CONTEXT_IID \

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

@ -253,7 +253,7 @@ NS_IMETHODIMP nsDeviceContextGTK::CreateRenderingContext(nsIRenderingContext *&a
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif

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

@ -126,7 +126,7 @@ NS_IMETHODIMP nsDeviceContextMac :: CreateRenderingContext(nsIRenderingContext *
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif

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

@ -178,7 +178,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIView *aView, nsIRen
{
#ifdef NS_PRINT_PREVIEW
// AltDC NEVER use widgets to create their DCs
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATERC_PAINT)) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif
@ -212,7 +212,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIWidget *aWidget, ns
// AltDC NEVER use widgets to create their DCs
// NOTE: The mAltDC will call it;s own init
// so we can return here
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW)) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif
@ -234,7 +234,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIWidget *aWidget, ns
NS_IMETHODIMP DeviceContextImpl :: InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWin)
{
#ifdef NS_PRINT_PREVIEW
// there are a couple of cases where the kUseAltDCFor_CREATE_RC flag has been turned off
// there are a couple of cases where the kUseAltDCFor_CREATERC_xxx flag has been turned off
// but we still need to initialize with the Alt DC
if (mAltDC) {
return aContext->Init(mAltDC, aWin);

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

@ -297,7 +297,7 @@ nsresult nsDeviceContextOS2::CreateRenderingContext( nsIRenderingContext *&aCont
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC))
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
#endif

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

@ -287,7 +287,7 @@ NS_IMETHODIMP nsDeviceContextWin :: CreateRenderingContext(nsIRenderingContext *
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif

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

@ -192,7 +192,7 @@ NS_IMETHODIMP nsDeviceContextXlib::CreateRenderingContext(nsIRenderingContext *&
#ifdef NS_PRINT_PREVIEW
/* Defer to Alt when there is one */
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif /* NS_PRINT_PREVIEW */