From 1495d665e7c51938ba0846bcaebfb0993ee1b5c2 Mon Sep 17 00:00:00 2001 From: "neil@parkwaycc.co.uk" Date: Mon, 27 Aug 2007 02:51:23 -0700 Subject: [PATCH] Bug 393665 Fix crash regression from bug 306990 r=Enn sr+a=roc --- layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 1e702f8a0092..0036cc7941a4 100644 --- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -2443,16 +2443,16 @@ nsTreeBodyFrame::CalcHorzWidth(const ScrollParts& aParts) width = 0; } - // If no horz scrolling periphery is present, then just - // return the width of the columns + // If no horz scrolling periphery is present, then just return our width if (width == 0) { - width = aParts.mColumnsFrame->GetRect().width; + mAdjustWidth = 0; + width = mRect.width; + } else { + // Compute the adjustment to the last column. This varies depending on the + // visibility of the columnpicker and the scrollbar. + mAdjustWidth = mRect.width - aParts.mColumnsFrame->GetRect().width; } - // Compute the adjustment to the last column. This varies depending on the - // visibility of the columnpicker and the scrollbar. - mAdjustWidth = mRect.width - aParts.mColumnsFrame->GetRect().width; - return width; }