Fix off by one pixel scrolling errors running under 96DPI by replacing the damageRect.ScaleRoundOut(p2t) call with explicit conversion to twips because ScaleRoundOut introduced errors in the pixel to twips conversion. bug 120918; sr=attinasi r=dcone a=asa adt_a=paw

git-svn-id: svn://10.0.0.236/trunk@118852 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kmcclusk%netscape.com
2002-04-12 13:43:32 +00:00
parent e6fea376e0
commit d5af536078

View File

@@ -689,12 +689,15 @@ void nsViewManager::Refresh(nsView *aView, nsIRenderingContext *aContext, nsIReg
nsRect viewRect;
aView->GetDimensions(viewRect);
nsRect damageRect = damageRectInPixels;
nsRect damageRect;
nsRect paintRect;
float p2t;
mContext->GetDevUnitsToAppUnits(p2t);
damageRect.ScaleRoundOut(p2t);
damageRect.x = NSToIntRound(damageRectInPixels.x * p2t);
damageRect.y = NSToIntRound(damageRectInPixels.y * p2t);
damageRect.width = NSToIntRound(damageRectInPixels.width * p2t);
damageRect.height = NSToIntRound(damageRectInPixels.height * p2t);
// move the view rect into widget coordinates
viewRect.x = 0;
viewRect.y = 0;