From 05b9f1f4ff6105b5fcfa5d7924fee8bf8ac18ef7 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Tue, 5 Oct 1999 02:41:36 +0000 Subject: [PATCH] Checked in workaround for tree-view/apprunner problem of assert in GetColumnWidth() --- layout/html/table/src/nsTableFrame.cpp | 8 ++++++++ layout/tables/nsTableFrame.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index 5b6234825155..7f47ed554b8a 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -278,8 +278,16 @@ nsTableFrame::nsTableFrame() mBits.mCellMapValid = PR_TRUE; mBits.mIsInvariantWidth = PR_FALSE; mBits.mHasScrollableRowGroup = PR_FALSE; + // XXX We really shouldn't do this, but if we don't then we'll have a + // problem with the tree control... +#if 0 mColumnWidthsLength = 0; mColumnWidths = nsnull; +#else + mColumnWidthsLength = 10; + mColumnWidths = new PRInt32[mColumnWidthsLength]; + nsCRT::memset (mColumnWidths, 0, mColumnWidthsLength*sizeof(PRInt32)); +#endif mCellMap = new nsCellMap(0, 0); } diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 5b6234825155..7f47ed554b8a 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -278,8 +278,16 @@ nsTableFrame::nsTableFrame() mBits.mCellMapValid = PR_TRUE; mBits.mIsInvariantWidth = PR_FALSE; mBits.mHasScrollableRowGroup = PR_FALSE; + // XXX We really shouldn't do this, but if we don't then we'll have a + // problem with the tree control... +#if 0 mColumnWidthsLength = 0; mColumnWidths = nsnull; +#else + mColumnWidthsLength = 10; + mColumnWidths = new PRInt32[mColumnWidthsLength]; + nsCRT::memset (mColumnWidths, 0, mColumnWidthsLength*sizeof(PRInt32)); +#endif mCellMap = new nsCellMap(0, 0); }