From da3c8521afff7ba27677ecc3c51ac23bd80363bc Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Wed, 6 Aug 2008 16:53:36 -0400 Subject: [PATCH] Bug 416845. Use the right x position when distributing height to rows. r=bernd, sr=bzbarsky --- layout/tables/nsTableFrame.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 8d965db7993e..2d78deb41846 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -3336,10 +3336,9 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState, PR_FALSE); } } - else if (amountUsed > 0 && yOriginRG != rgFrame->GetPosition().y) { - NS_ASSERTION(rgFrame->GetPosition().x == 0, "Unexpected position"); + else if (amountUsed > 0 && yOriginRG != rgRect.y) { rgFrame->InvalidateOverflowRect(); - rgFrame->SetPosition(nsPoint(0, yOriginRG)); + rgFrame->SetPosition(nsPoint(rgRect.x, yOriginRG)); // Make sure child views are properly positioned nsTableFrame::RePositionViews(rgFrame); rgFrame->InvalidateOverflowRect(); @@ -3497,10 +3496,9 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState, // Make sure child views are properly positioned // XXX what happens if childFrame is a scroll frame and this gets skipped? see also below } - else if (amountUsed > 0 && yOriginRG != rgFrame->GetPosition().y) { - NS_ASSERTION(rgFrame->GetPosition().x == 0, "Unexpected position"); + else if (amountUsed > 0 && yOriginRG != rgRect.y) { rgFrame->InvalidateOverflowRect(); - rgFrame->SetPosition(nsPoint(0, yOriginRG)); + rgFrame->SetPosition(nsPoint(rgRect.x, yOriginRG)); // Make sure child views are properly positioned nsTableFrame::RePositionViews(rgFrame); rgFrame->InvalidateOverflowRect();