зеркало из https://github.com/mozilla/gecko-dev.git
bug 20943, r=rods, sr=ben, need to use alternate dc for print preview
This commit is contained in:
Родитель
2f2def6297
Коммит
0136bcc918
|
@ -123,6 +123,13 @@ NS_IMETHODIMP nsDeviceContextMac :: Init(nsNativeWidget aNativeWidget)
|
|||
*/
|
||||
NS_IMETHODIMP nsDeviceContextMac :: CreateRenderingContext(nsIRenderingContext *&aContext)
|
||||
{
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
// Defer to Alt when there is one
|
||||
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) {
|
||||
return mAltDC->CreateRenderingContext(aContext);
|
||||
}
|
||||
#endif
|
||||
|
||||
nsRenderingContextMac *pContext;
|
||||
nsresult rv;
|
||||
GrafPtr thePort;
|
||||
|
@ -476,6 +483,13 @@ nsDeviceContextMac :: FindScreenForSurface ( nsIScreen** outScreen )
|
|||
*/
|
||||
NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 & outWidth, PRInt32 & outHeight)
|
||||
{
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
// Defer to Alt when there is one
|
||||
if (mAltDC && (mUseAltDC & kUseAltDCFor_SURFACE_DIM)) {
|
||||
return mAltDC->GetDeviceSurfaceDimensions(outWidth, outHeight);
|
||||
}
|
||||
#endif
|
||||
|
||||
if( mSpec ) {
|
||||
// we have a printer device
|
||||
outWidth = (mPageRect.right-mPageRect.left)*mDevUnitsToAppUnits;
|
||||
|
|
Загрузка…
Ссылка в новой задаче