Bug 468771. Make sure to reflow the last column of a column-set if we're changing its height to be unbounded; it needs to pull all the content from the extra column, if there is one. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@258960 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4ef6a799bc
commit
1b1e85dcaa
@ -491,10 +491,17 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||||||
// Try to skip reflowing the child. We can't skip if the child is dirty. We also can't
|
// Try to skip reflowing the child. We can't skip if the child is dirty. We also can't
|
||||||
// skip if the next column is dirty, because the next column's first line(s)
|
// skip if the next column is dirty, because the next column's first line(s)
|
||||||
// might be pullable back to this column. We can't skip if it's the last child
|
// might be pullable back to this column. We can't skip if it's the last child
|
||||||
// because we need to obtain the bottom margin.
|
// because we need to obtain the bottom margin. We can't skip
|
||||||
|
// if this is the last column and we're supposed to assign unbounded
|
||||||
|
// height to it, because that could change the available height from
|
||||||
|
// the last time we reflowed it and we should try to pull all the
|
||||||
|
// content from its next sibling. (Note that it might be the last
|
||||||
|
// column, but not be the last child because the desired number of columns
|
||||||
|
// has changed.)
|
||||||
PRBool skipIncremental = !(GetStateBits() & NS_FRAME_IS_DIRTY)
|
PRBool skipIncremental = !(GetStateBits() & NS_FRAME_IS_DIRTY)
|
||||||
&& !NS_SUBTREE_DIRTY(child)
|
&& !NS_SUBTREE_DIRTY(child)
|
||||||
&& child->GetNextSibling()
|
&& child->GetNextSibling()
|
||||||
|
&& !(aUnboundedLastColumn && columnCount == aConfig.mBalanceColCount - 1)
|
||||||
&& !NS_SUBTREE_DIRTY(child->GetNextSibling());
|
&& !NS_SUBTREE_DIRTY(child->GetNextSibling());
|
||||||
// If we need to pull up content from the prev-in-flow then this is not just
|
// If we need to pull up content from the prev-in-flow then this is not just
|
||||||
// a height shrink. The prev in flow will have set the dirty bit.
|
// a height shrink. The prev in flow will have set the dirty bit.
|
||||||
@ -925,6 +932,10 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||||
|
|
||||||
|
NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus) ||
|
||||||
|
aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE,
|
||||||
|
"Column set should be complete if the available height is unconstrained");
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user