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
Родитель c3733371ee
Коммит 7ca3efff70
2 изменённых файлов: 26 добавлений и 26 удалений

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

@ -1330,20 +1330,20 @@ 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 += kidSize.height + cellSpacingY;
// Update the running y-offset
nsSize kidSize;
frame->GetSize(kidSize);
aReflowState.y += cellSpacingY + kidSize.height;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
}
}
}

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

@ -1330,20 +1330,20 @@ 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 += kidSize.height + cellSpacingY;
// Update the running y-offset
nsSize kidSize;
frame->GetSize(kidSize);
aReflowState.y += cellSpacingY + kidSize.height;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
// If our height is constrained then update the available height
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
aReflowState.availSize.height -= kidSize.height;
}
}
}