Fix for 21639 progress meter draws three times for each update, r=pinkerton, a=chofmann

This commit is contained in:
sfraser%netscape.com 1999-12-14 03:48:04 +00:00
Родитель c4b0c2741d
Коммит 6eb518978b
1 изменённых файлов: 113 добавлений и 113 удалений

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

@ -328,7 +328,7 @@ nsProgressMeterFrame::setSize(nsAutoString sizeString, int& size, PRBool& isPerc
v = 100;
}
printf("size=%d\n", v);
// printf("size=%d\n", v);
size = v;
}
@ -377,6 +377,8 @@ nsProgressMeterFrame :: Paint ( nsIPresContext* aPresContext,
nsLeafFrame::Paint(aPresContext, aRenderingContext, aDirtyRect,
aWhichLayer);
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND)
{
// get our border
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
@ -409,7 +411,7 @@ nsProgressMeterFrame :: Paint ( nsIPresContext* aPresContext,
// paint the current progress in blue
PaintBar(aPresContext, aRenderingContext, rect, mProgress, color);
}
return NS_OK;
} // Paint
@ -429,7 +431,7 @@ nsProgressMeterFrame :: PaintBar ( nsIPresContext* aPresContext,
if (!mUndetermined)
{
int p = (int)(bar.width*progress);
nscoord p = (nscoord)(bar.width*progress);
bar.width = p;
}
@ -449,7 +451,6 @@ nsProgressMeterFrame :: PaintBar ( nsIPresContext* aPresContext,
else
PaintBarSolid(aPresContext,aRenderingContext,bar, color, 0);
}
nsRect
@ -479,7 +480,6 @@ nsProgressMeterFrame::GetBrightness(nscolor c)
{
// get the biggest rgb component;
PRUint8 r = NS_GET_R(c);
PRUint8 g = NS_GET_G(c);
PRUint8 b = NS_GET_B(c);