зеркало из https://github.com/mozilla/pjs.git
Part of fix for bug 359341 that somehow didn't make it in the first time. r+sr=roc
This commit is contained in:
Родитель
ff117d53fc
Коммит
4fb4f1ee16
|
@ -366,9 +366,9 @@ nsImageOS2 :: Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
|
|||
{ aSX + aSWidth, mInfo->cy - aSY } }; // SUR
|
||||
|
||||
PRBool fPrinting = PR_FALSE;
|
||||
nsIDeviceContext* context;
|
||||
aContext.GetDeviceContext(context);
|
||||
if (((nsDeviceContextOS2 *)context)->mPrintDC) {
|
||||
nsCOMPtr<nsIDeviceContext> context;
|
||||
aContext.GetDeviceContext(*getter_AddRefs(context));
|
||||
if (((nsDeviceContextOS2 *)context.get())->mPrintDC) {
|
||||
fPrinting = PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -738,9 +738,9 @@ NS_IMETHODIMP nsImageOS2::DrawTile(nsIRenderingContext &aContext,
|
|||
PRBool padded = (aPadX || aPadY);
|
||||
|
||||
// Get the scale - if greater than 1 then do slow tile which
|
||||
nsIDeviceContext *theDeviceContext;
|
||||
nsCOMPtr<nsIDeviceContext> theDeviceContext;
|
||||
float scale;
|
||||
aContext.GetDeviceContext(theDeviceContext);
|
||||
aContext.GetDeviceContext(*getter_AddRefs(theDeviceContext));
|
||||
theDeviceContext->GetCanonicalPixelScale(scale);
|
||||
|
||||
nsRect ValidRect (0, 0, ImageWidth, ImageHeight);
|
||||
|
|
|
@ -94,11 +94,10 @@ nsFont *font;
|
|||
nsPoint *pointlist;
|
||||
|
||||
// Get the size of a pixel.
|
||||
nsIDeviceContext* deviceContext;
|
||||
aSurface->GetDeviceContext(deviceContext);
|
||||
nsCOMPtr<nsIDeviceContext> deviceContext;
|
||||
aSurface->GetDeviceContext(*getter_AddRefs(deviceContext));
|
||||
float p2t; // pixel to twips conversion
|
||||
p2t = deviceContext->DevUnitsToAppUnits();
|
||||
NS_RELEASE(deviceContext);
|
||||
|
||||
font = new nsFont("Times", NS_FONT_STYLE_NORMAL,NS_FONT_VARIANT_NORMAL,NS_FONT_WEIGHT_BOLD,0,12);
|
||||
aSurface->SetFont(*font);
|
||||
|
|
|
@ -653,7 +653,6 @@ nsIToolkit* nsBaseWidget::GetToolkit()
|
|||
//-------------------------------------------------------------------------
|
||||
nsIDeviceContext* nsBaseWidget::GetDeviceContext()
|
||||
{
|
||||
NS_IF_ADDREF(mContext);
|
||||
return mContext;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче