зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
3fc3201cc4
Коммит
5a180776de
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче