зеркало из https://github.com/mozilla/pjs.git
bug 96343 - skip cellspacing logic when child is not a row. sr=attinasi, r=alexsavulov
This commit is contained in:
Родитель
55b39581f8
Коммит
4e2a495fca
|
@ -1330,20 +1330,20 @@ nsTableRowGroupFrame::RecoverState(nsRowGroupReflowState& aReflowState,
|
||||||
nsTableFrame::GetTableFrame(this, tableFrame);
|
nsTableFrame::GetTableFrame(this, tableFrame);
|
||||||
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
||||||
|
|
||||||
// Walk the list of children looking for aKidFrame
|
// Walk the list of children up to aKidFrame
|
||||||
for (nsIFrame* frame = mFrames.FirstChild(); frame; frame->GetNextSibling(&frame)) {
|
for (nsIFrame* frame = mFrames.FirstChild(); frame && (frame != aKidFrame); frame->GetNextSibling(&frame)) {
|
||||||
if (frame == aKidFrame) {
|
nsCOMPtr<nsIAtom> fType;
|
||||||
break;
|
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
|
// If our height is constrained then update the available height
|
||||||
nsSize kidSize;
|
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
|
||||||
frame->GetSize(kidSize);
|
aReflowState.availSize.height -= kidSize.height;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1330,20 +1330,20 @@ nsTableRowGroupFrame::RecoverState(nsRowGroupReflowState& aReflowState,
|
||||||
nsTableFrame::GetTableFrame(this, tableFrame);
|
nsTableFrame::GetTableFrame(this, tableFrame);
|
||||||
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
||||||
|
|
||||||
// Walk the list of children looking for aKidFrame
|
// Walk the list of children up to aKidFrame
|
||||||
for (nsIFrame* frame = mFrames.FirstChild(); frame; frame->GetNextSibling(&frame)) {
|
for (nsIFrame* frame = mFrames.FirstChild(); frame && (frame != aKidFrame); frame->GetNextSibling(&frame)) {
|
||||||
if (frame == aKidFrame) {
|
nsCOMPtr<nsIAtom> fType;
|
||||||
break;
|
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
|
// If our height is constrained then update the available height
|
||||||
nsSize kidSize;
|
if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
|
||||||
frame->GetSize(kidSize);
|
aReflowState.availSize.height -= kidSize.height;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче