Moved code that repaints after a resize or initial reflow to the viewport

This commit is contained in:
troy%netscape.com 1999-07-24 15:18:24 +00:00
Родитель cae606a8be
Коммит 7ffa0d8a63
4 изменённых файлов: 14 добавлений и 14 удалений

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

@ -299,13 +299,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
kidFrame->SetRect(rect);
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aReflowState.availableWidth, aReflowState.availableHeight);
Invalidate(damageRect, PR_FALSE);
}
// Return our desired size
aDesiredSize.width = kidDesiredSize.width + kidReflowState.mComputedMargin.left +
kidReflowState.mComputedMargin.right;

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

@ -524,6 +524,13 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.descent = 0;
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aDesiredSize.width, aDesiredSize.height);
Invalidate(damageRect, PR_FALSE);
}
NS_FRAME_TRACE_REFLOW_OUT("ViewportFrame::Reflow", aStatus);
return NS_OK;
}

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

@ -299,13 +299,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
kidFrame->SetRect(rect);
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aReflowState.availableWidth, aReflowState.availableHeight);
Invalidate(damageRect, PR_FALSE);
}
// Return our desired size
aDesiredSize.width = kidDesiredSize.width + kidReflowState.mComputedMargin.left +
kidReflowState.mComputedMargin.right;

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

@ -524,6 +524,13 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.descent = 0;
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aDesiredSize.width, aDesiredSize.height);
Invalidate(damageRect, PR_FALSE);
}
NS_FRAME_TRACE_REFLOW_OUT("ViewportFrame::Reflow", aStatus);
return NS_OK;
}