From fe66af4a1c06748aad850c0f1c61d8a5c7c1aebc Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Thu, 6 Sep 2007 04:35:42 +0000 Subject: [PATCH] Bug 393970 - "Grid columns don't line up if one block is scrollable" (patch #1) [p=trev.moz@adblockplus.org (Wladimir Palant) r+sr+a1.9=roc] --- layout/xul/base/src/grid/nsGridRowLeafLayout.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp b/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp index 6dd73058579..d4b54badf3d 100644 --- a/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp +++ b/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp @@ -258,6 +258,7 @@ nsGridRowLeafLayout::ComputeChildSizes(nsIBox* aBox, // see if we are in a scrollable frame. If we are then there could be scrollbars present // if so we need to subtract them out to make sure our columns line up. if (aBox) { + PRBool isHorizontal = aBox->IsHorizontal(); // go up the parent chain looking for scrollframes aBox = aBox->GetParentBox(); @@ -273,7 +274,7 @@ nsGridRowLeafLayout::ComputeChildSizes(nsIBox* aBox, ourRect.Deflate(padding); nscoord diff; - if (aBox->IsHorizontal()) { + if (isHorizontal) { diff = scrollbarSizes.left + scrollbarSizes.right; } else { diff = scrollbarSizes.top + scrollbarSizes.bottom;