Bug 559241. Reflow non-dirty overflow container children if we're supposed to reflow all kids. r=dbaron

This commit is contained in:
Robert O'Callahan 2010-05-19 15:04:33 +12:00
Родитель 87f96430ac
Коммит cf9a69d02b
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -1071,7 +1071,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus) ||
NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE,
"Column set should be complete if the available height is unconstrained");

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

@ -899,6 +899,8 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
return NS_OK; // nothing to reflow
nsOverflowContinuationTracker tracker(aPresContext, this, PR_FALSE, PR_FALSE);
PRBool shouldReflowAllKids = aReflowState.ShouldReflowAllKids();
for (nsIFrame* frame = overflowContainers->FirstChild(); frame;
frame = frame->GetNextSibling()) {
if (frame->GetPrevInFlow()->GetParent() != GetPrevInFlow()) {
@ -906,7 +908,9 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
// it will get reflowed once it's been placed
continue;
}
if (NS_SUBTREE_DIRTY(frame)) {
// If the available vertical height has changed, we need to reflow
// even if the frame isn't dirty.
if (shouldReflowAllKids || NS_SUBTREE_DIRTY(frame)) {
// Get prev-in-flow
nsIFrame* prevInFlow = frame->GetPrevInFlow();
NS_ASSERTION(prevInFlow,