bug 96343 - skip cellspacing logic when child is not a row. sr=attinasi, r=alexsavulov

This commit is contained in:
karnaze%netscape.com 2001-10-22 14:37:03 +00:00
Родитель 55b39581f8
Коммит 4e2a495fca
2 изменённых файлов: 26 добавлений и 26 удалений

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

@ -1330,22 +1330,22 @@ nsTableRowGroupFrame::RecoverState(nsRowGroupReflowState& aReflowState,
nsTableFrame::GetTableFrame(this, tableFrame);
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
// Walk the list of children looking for aKidFrame
for (nsIFrame* frame = mFrames.FirstChild(); frame; frame->GetNextSibling(&frame)) {
if (frame == aKidFrame) {
break;
}
// Walk the list of children up to aKidFrame
for (nsIFrame* frame = mFrames.FirstChild(); frame && (frame != aKidFrame); frame->GetNextSibling(&frame)) {
nsCOMPtr<nsIAtom> fType;
frame->GetFrameType(getter_AddRefs(fType));
if (fType.get() == nsLayoutAtoms::tableRowFrame) {
// Update the running y-offset
nsSize kidSize;
frame->GetSize(kidSize);
aReflowState.y += cellSpacingY + kidSize.height;
aReflowState.y += kidSize.height + cellSpacingY;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
}
}
}
return NS_OK;
}

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

@ -1330,22 +1330,22 @@ nsTableRowGroupFrame::RecoverState(nsRowGroupReflowState& aReflowState,
nsTableFrame::GetTableFrame(this, tableFrame);
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
// Walk the list of children looking for aKidFrame
for (nsIFrame* frame = mFrames.FirstChild(); frame; frame->GetNextSibling(&frame)) {
if (frame == aKidFrame) {
break;
}
// Walk the list of children up to aKidFrame
for (nsIFrame* frame = mFrames.FirstChild(); frame && (frame != aKidFrame); frame->GetNextSibling(&frame)) {
nsCOMPtr<nsIAtom> fType;
frame->GetFrameType(getter_AddRefs(fType));
if (fType.get() == nsLayoutAtoms::tableRowFrame) {
// Update the running y-offset
nsSize kidSize;
frame->GetSize(kidSize);
aReflowState.y += cellSpacingY + kidSize.height;
aReflowState.y += kidSize.height + cellSpacingY;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
}
}
}
return NS_OK;
}