зеркало из https://github.com/mozilla/gecko-dev.git
reflow was using the wrong DC to rendering context for PP
BUg 117745 r=dcone sr=attinasi
This commit is contained in:
Родитель
978de2b139
Коммит
b304b3f01e
|
@ -113,10 +113,11 @@ typedef void * nsNativeDeviceContext;
|
||||||
* Conts need for Print Preview
|
* Conts need for Print Preview
|
||||||
*/
|
*/
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
const PRUint8 kUseAltDCFor_NONE = 0x00; // Do not use the AltDC for anything
|
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_FONTMETRICS = 0x01; // Use it for only getting the font metrics
|
||||||
const PRUint8 kUseAltDCFor_CREATE_RC = 0x02; // Use when creating RenderingContexts
|
const PRUint8 kUseAltDCFor_CREATERC_REFLOW = 0x02; // Use when creating RenderingContexts for Reflow
|
||||||
const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x04; // Use it for getting the Surface Dimensions
|
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
|
#endif
|
||||||
|
|
||||||
#define NS_IDEVICE_CONTEXT_IID \
|
#define NS_IDEVICE_CONTEXT_IID \
|
||||||
|
|
|
@ -253,7 +253,7 @@ NS_IMETHODIMP nsDeviceContextGTK::CreateRenderingContext(nsIRenderingContext *&a
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
// Defer to Alt when there is one
|
// 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);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -126,7 +126,7 @@ NS_IMETHODIMP nsDeviceContextMac :: CreateRenderingContext(nsIRenderingContext *
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
// Defer to Alt when there is one
|
// 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);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -178,7 +178,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIView *aView, nsIRen
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
// AltDC NEVER use widgets to create their DCs
|
// AltDC NEVER use widgets to create their DCs
|
||||||
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
|
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATERC_PAINT)) {
|
||||||
return mAltDC->CreateRenderingContext(aContext);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -212,7 +212,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIWidget *aWidget, ns
|
||||||
// AltDC NEVER use widgets to create their DCs
|
// AltDC NEVER use widgets to create their DCs
|
||||||
// NOTE: The mAltDC will call it;s own init
|
// NOTE: The mAltDC will call it;s own init
|
||||||
// so we can return here
|
// so we can return here
|
||||||
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
|
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW)) {
|
||||||
return mAltDC->CreateRenderingContext(aContext);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -234,7 +234,7 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIWidget *aWidget, ns
|
||||||
NS_IMETHODIMP DeviceContextImpl :: InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWin)
|
NS_IMETHODIMP DeviceContextImpl :: InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWin)
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#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
|
// but we still need to initialize with the Alt DC
|
||||||
if (mAltDC) {
|
if (mAltDC) {
|
||||||
return aContext->Init(mAltDC, aWin);
|
return aContext->Init(mAltDC, aWin);
|
||||||
|
|
|
@ -297,7 +297,7 @@ nsresult nsDeviceContextOS2::CreateRenderingContext( nsIRenderingContext *&aCont
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
// Defer to Alt when there is one
|
// 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);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ NS_IMETHODIMP nsDeviceContextWin :: CreateRenderingContext(nsIRenderingContext *
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
// Defer to Alt when there is one
|
// 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);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -192,7 +192,7 @@ NS_IMETHODIMP nsDeviceContextXlib::CreateRenderingContext(nsIRenderingContext *&
|
||||||
|
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
/* Defer to Alt when there is one */
|
/* 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);
|
return mAltDC->CreateRenderingContext(aContext);
|
||||||
}
|
}
|
||||||
#endif /* NS_PRINT_PREVIEW */
|
#endif /* NS_PRINT_PREVIEW */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче