Added code to invalidate the frame after a resize if there is border or

padding. Otherwise the border/padding area was left dirty
This commit is contained in:
troy%netscape.com 1998-10-31 04:40:01 +00:00
Родитель f7515907d7
Коммит 4303137409
2 изменённых файлов: 22 добавлений и 0 удалений

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

@ -190,6 +190,17 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// are sent...
htmlReflow->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED);
}
// If this is a resize reflow and we have non-zero border or padding
// then do a repaint to make sure we repaint correctly.
// XXX We could be smarter about only damaging the border/padding area
// that was affected by the resize...
if ((eReflowReason_Resize == aReflowState.reason) &&
((borderPadding.left != 0) || (borderPadding.top != 0) ||
(borderPadding.right != 0) || (borderPadding.bottom) != 0)) {
nsRect damageRect(0, 0, aReflowState.maxSize.width, aReflowState.maxSize.height);
Invalidate(damageRect, PR_FALSE);
}
}
// Return the max size as our desired size

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

@ -190,6 +190,17 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// are sent...
htmlReflow->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED);
}
// If this is a resize reflow and we have non-zero border or padding
// then do a repaint to make sure we repaint correctly.
// XXX We could be smarter about only damaging the border/padding area
// that was affected by the resize...
if ((eReflowReason_Resize == aReflowState.reason) &&
((borderPadding.left != 0) || (borderPadding.top != 0) ||
(borderPadding.right != 0) || (borderPadding.bottom) != 0)) {
nsRect damageRect(0, 0, aReflowState.maxSize.width, aReflowState.maxSize.height);
Invalidate(damageRect, PR_FALSE);
}
}
// Return the max size as our desired size