зеркало из https://github.com/mozilla/pjs.git
Don't construct cell reflow states with a row group reflow state as their parent; instead, always link in a table row reflow state as appropriate. (Bug 627842, patch 3.875) r=roc
Fixes assertion on layout/reftests/bugs/409084-1a.html once the rest of the inflation patches land.
This commit is contained in:
Родитель
0771ac796f
Коммит
7a61a331c0
|
@ -951,6 +951,8 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
|||
aFirstTruncatedRow = nsnull;
|
||||
aDesiredHeight = 0;
|
||||
|
||||
bool borderCollapse =
|
||||
static_cast<nsTableFrame*>(aTable.GetFirstInFlow())->IsBorderCollapse();
|
||||
PRInt32 lastRowIndex = aLastRow.GetRowIndex();
|
||||
bool wasLast = false;
|
||||
// Iterate the rows between aFirstRow and aLastRow
|
||||
|
@ -970,7 +972,21 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
|||
nscoord cellAvailHeight = aSpanningRowBottom - rowPos.y;
|
||||
NS_ASSERTION(cellAvailHeight >= 0, "No space for cell?");
|
||||
bool isTopOfPage = (row == &aFirstRow) && aFirstRowIsTopOfPage;
|
||||
nscoord cellHeight = row->ReflowCellFrame(&aPresContext, aReflowState,
|
||||
|
||||
nsRect rowRect = row->GetRect();
|
||||
nsSize rowAvailSize(aReflowState.availableWidth,
|
||||
NS_MAX(aReflowState.availableHeight - rowRect.y,
|
||||
0));
|
||||
// don't let the available height exceed what
|
||||
// CalculateRowHeights set for it
|
||||
rowAvailSize.height = NS_MIN(rowAvailSize.height, rowRect.height);
|
||||
nsHTMLReflowState rowReflowState(&aPresContext, aReflowState,
|
||||
row, rowAvailSize,
|
||||
-1, -1, false);
|
||||
InitChildReflowState(aPresContext, borderCollapse, rowReflowState);
|
||||
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
|
||||
|
||||
nscoord cellHeight = row->ReflowCellFrame(&aPresContext, rowReflowState,
|
||||
isTopOfPage, cell,
|
||||
cellAvailHeight, status);
|
||||
aDesiredHeight = NS_MAX(aDesiredHeight, rowPos.y + cellHeight);
|
||||
|
|
Загрузка…
Ссылка в новой задаче