From 39cdc612bba35e65211632da5b9912095574308d Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Mon, 2 Jun 2003 04:38:53 +0000 Subject: [PATCH] Bug 193686. nsContainerFrame needs to report the overflowList as one of its child frame lists. Also, overflow frames should be destroyed when their parent is destroyed. r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@143164 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsContainerFrame.cpp | 4 +--- mozilla/layout/html/base/src/nsContainerFrame.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index 6d9ca5e76f0..3ed724fde69 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -175,9 +175,7 @@ nsContainerFrame::GetAdditionalChildListName(PRInt32 aIndex, nsIAtom** aListName) const { NS_PRECONDITION(nsnull != aListName, "null OUT parameter pointer"); - if (aIndex < 0) { - return NS_ERROR_INVALID_ARG; - } + NS_ENSURE_TRUE(aIndex >= 0, NS_ERROR_INVALID_ARG); if (aIndex == 0) { *aListName = nsLayoutAtoms::overflowList; NS_ADDREF(*aListName); diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index 6d9ca5e76f0..3ed724fde69 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -175,9 +175,7 @@ nsContainerFrame::GetAdditionalChildListName(PRInt32 aIndex, nsIAtom** aListName) const { NS_PRECONDITION(nsnull != aListName, "null OUT parameter pointer"); - if (aIndex < 0) { - return NS_ERROR_INVALID_ARG; - } + NS_ENSURE_TRUE(aIndex >= 0, NS_ERROR_INVALID_ARG); if (aIndex == 0) { *aListName = nsLayoutAtoms::overflowList; NS_ADDREF(*aListName);