From 38f124cff8bfd04abfe0d0a6d6095c373b4cc896 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 26 Feb 2002 00:43:12 +0000 Subject: [PATCH] bug 126742 - correct typo, setting the correct offset. sr=attinasi, r=alexsavulov, a=shaver --- layout/html/table/src/nsTableFrame.cpp | 5 ++--- layout/tables/nsTableFrame.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index 6268fe7c0a6..38fdf5f7f9a 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -3531,8 +3531,7 @@ nsTableFrame::DistributeHeightToRows(nsIPresContext* aPresContext, nscoord cellSpacingY = GetCellSpacingY(); nscoord sumOfRowHeights = 0; - nsMargin borderPadding; - GetChildAreaOffset(*aPresContext, &aReflowState); + nsMargin borderPadding = GetChildAreaOffset(*aPresContext, &aReflowState); nscoord rowGroupYPos = borderPadding.top + cellSpacingY; nsVoidArray rowGroups; @@ -7519,7 +7518,7 @@ nsTableFrame::GetProperty(nsIPresContext* aPresContext, } else if (aCreateIfNecessary) { // The property isn't set yet, so allocate a new value, set the property, // and return the newly allocated value - void* value; + void* value = nsnull; NSFMPropertyDtorFunc dtorFunc; if (aPropertyName == nsLayoutAtoms::collapseOffsetProperty) { value = new nsPoint(0, 0); diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 6268fe7c0a6..38fdf5f7f9a 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -3531,8 +3531,7 @@ nsTableFrame::DistributeHeightToRows(nsIPresContext* aPresContext, nscoord cellSpacingY = GetCellSpacingY(); nscoord sumOfRowHeights = 0; - nsMargin borderPadding; - GetChildAreaOffset(*aPresContext, &aReflowState); + nsMargin borderPadding = GetChildAreaOffset(*aPresContext, &aReflowState); nscoord rowGroupYPos = borderPadding.top + cellSpacingY; nsVoidArray rowGroups; @@ -7519,7 +7518,7 @@ nsTableFrame::GetProperty(nsIPresContext* aPresContext, } else if (aCreateIfNecessary) { // The property isn't set yet, so allocate a new value, set the property, // and return the newly allocated value - void* value; + void* value = nsnull; NSFMPropertyDtorFunc dtorFunc; if (aPropertyName == nsLayoutAtoms::collapseOffsetProperty) { value = new nsPoint(0, 0);