From 082dac3d45dff06e857e901ff75129980ad2f71f Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Wed, 14 Jul 1999 19:21:27 +0000 Subject: [PATCH] Fix for bugs 9601 and 9698. git-svn-id: svn://10.0.0.236/trunk@39339 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 25 ++++++++++--------- .../html/style/src/nsCSSFrameConstructor.cpp | 25 ++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 71a63d55a65..34d8bc46839 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4605,18 +4605,19 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, if (childFrame) { #ifdef INCLUDE_XUL - nsCOMPtr tag; - if (!aContainer) return NS_ERROR_NULL_POINTER; - aContainer->GetTag(*getter_AddRefs(tag)); - if (tag.get() == nsXULAtoms::treechildren || - tag.get() == nsXULAtoms::treeitem) { - // Convert to a tree row group frame. - nsIFrame* parentFrame; - childFrame->GetParent(&parentFrame); - nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame; - if (treeRowGroup && treeRowGroup->IsLazy()) { - treeRowGroup->OnContentRemoved(*aPresContext, childFrame); - return NS_OK; + if (aContainer) { + nsCOMPtr tag; + aContainer->GetTag(*getter_AddRefs(tag)); + if (tag.get() == nsXULAtoms::treechildren || + tag.get() == nsXULAtoms::treeitem) { + // Convert to a tree row group frame. + nsIFrame* parentFrame; + childFrame->GetParent(&parentFrame); + nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame; + if (treeRowGroup && treeRowGroup->IsLazy()) { + treeRowGroup->OnContentRemoved(*aPresContext, childFrame); + return NS_OK; + } } } #endif // INCLUDE_XUL diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 71a63d55a65..34d8bc46839 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -4605,18 +4605,19 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, if (childFrame) { #ifdef INCLUDE_XUL - nsCOMPtr tag; - if (!aContainer) return NS_ERROR_NULL_POINTER; - aContainer->GetTag(*getter_AddRefs(tag)); - if (tag.get() == nsXULAtoms::treechildren || - tag.get() == nsXULAtoms::treeitem) { - // Convert to a tree row group frame. - nsIFrame* parentFrame; - childFrame->GetParent(&parentFrame); - nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame; - if (treeRowGroup && treeRowGroup->IsLazy()) { - treeRowGroup->OnContentRemoved(*aPresContext, childFrame); - return NS_OK; + if (aContainer) { + nsCOMPtr tag; + aContainer->GetTag(*getter_AddRefs(tag)); + if (tag.get() == nsXULAtoms::treechildren || + tag.get() == nsXULAtoms::treeitem) { + // Convert to a tree row group frame. + nsIFrame* parentFrame; + childFrame->GetParent(&parentFrame); + nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame; + if (treeRowGroup && treeRowGroup->IsLazy()) { + treeRowGroup->OnContentRemoved(*aPresContext, childFrame); + return NS_OK; + } } } #endif // INCLUDE_XUL