Fix for bug 138573 (hitting return in list item causes list problems; workaround is to refresh)

Modified SlideLine() to use the combined area instead of the linebox
  bounds when invalidating. This makes sure that we invalidate the
  area occupied by the list bullets/ordinals.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com
This commit is contained in:
kin%netscape.com 2002-06-03 21:35:54 +00:00
Родитель 3fc3201cc4
Коммит 5a180776de
2 изменённых файлов: 18 добавлений и 8 удалений

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

@ -2780,13 +2780,18 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
{
NS_PRECONDITION(aDY != 0, "why slide a line nowhere?");
PRBool doInvalidate = !aLine->mBounds.IsEmpty();
nsRect lineCombinedArea;
aLine->GetCombinedArea(&lineCombinedArea);
PRBool doInvalidate = !lineCombinedArea.IsEmpty();
if (doInvalidate)
Invalidate(aState.mPresContext, aLine->mBounds);
Invalidate(aState.mPresContext, lineCombinedArea);
// Adjust line state
aLine->SlideBy(aDY);
if (doInvalidate)
Invalidate(aState.mPresContext, aLine->mBounds);
if (doInvalidate) {
aLine->GetCombinedArea(&lineCombinedArea);
Invalidate(aState.mPresContext, lineCombinedArea);
}
// Adjust the frames in the line
nsIFrame* kid = aLine->mFirstChild;

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

@ -2780,13 +2780,18 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
{
NS_PRECONDITION(aDY != 0, "why slide a line nowhere?");
PRBool doInvalidate = !aLine->mBounds.IsEmpty();
nsRect lineCombinedArea;
aLine->GetCombinedArea(&lineCombinedArea);
PRBool doInvalidate = !lineCombinedArea.IsEmpty();
if (doInvalidate)
Invalidate(aState.mPresContext, aLine->mBounds);
Invalidate(aState.mPresContext, lineCombinedArea);
// Adjust line state
aLine->SlideBy(aDY);
if (doInvalidate)
Invalidate(aState.mPresContext, aLine->mBounds);
if (doInvalidate) {
aLine->GetCombinedArea(&lineCombinedArea);
Invalidate(aState.mPresContext, lineCombinedArea);
}
// Adjust the frames in the line
nsIFrame* kid = aLine->mFirstChild;