Bug 385058 - "Grey marks (turds, remnants, ghosts) appear on scrollbars" (Redraw whole scrollbar when position changes) [p=mstange@themasta.com (Markus Stange) r+sr=roc a1.9=schrep]

This commit is contained in:
reed@reedloden.com 2008-02-07 00:56:38 -08:00
parent eadd3f29f3
commit d773919d98

View File

@ -658,15 +658,9 @@ nsSliderFrame::CurrentPositionChanged(nsPresContext* aPresContext,
// set the rect
thumbFrame->SetRect(newThumbRect);
// Figure out the union of the rect so we know what to redraw.
// Combine the old and new thumb overflow areas.
nsRect changeRect;
changeRect.UnionRect(thumbFrame->GetOverflowRect() + thumbRect.TopLeft(),
thumbFrame->GetOverflowRect() + newThumbRect.TopLeft());
// Redraw the scrollbar
Invalidate(clientRect, aImmediateRedraw);
// redraw just the change
Invalidate(changeRect, aImmediateRedraw);
if (mScrollbarListener)
mScrollbarListener->PositionChanged(aPresContext, mCurPos, curpospx);