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 git-svn-id: svn://10.0.0.236/trunk@122594 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user