diff --git a/mozilla/layout/base/src/nsContainerFrame.cpp b/mozilla/layout/base/src/nsContainerFrame.cpp index ac245ff8c6e..5a6c8abc379 100644 --- a/mozilla/layout/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/base/src/nsContainerFrame.cpp @@ -400,14 +400,6 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, nsIFrame* if (parent->mFirstChild == nextInFlow) { nextInFlow->GetNextSibling(parent->mFirstChild); - // When a parent loses it's last child and that last child is a - // pseudo-frame then the parent's content offsets are now wrong. - // However, we know that the parent will eventually be reflowed - // in one of two ways: it will either get a chance to pullup - // children or it will be deleted because it's prev-in-flow - // (e.g. this) is complete. In either case, the content offsets - // will be repaired. - } else { nsIFrame* nextSibling; @@ -770,25 +762,6 @@ PRBool nsContainerFrame::IsChild(const nsIFrame* aChild) const return PR_TRUE; } -PRBool nsContainerFrame::IsLastChild(const nsIFrame* aChild) const -{ - // Check the geometric parent - nsIFrame* parent; - - aChild->GetGeometricParent(parent); - if (parent != (nsIFrame*)this) { - return PR_FALSE; - } - - // Check that aChild is in our sibling list - nsIFrame* lastChild = LastFrame(mFirstChild); - if (lastChild != aChild) { - return PR_FALSE; - } - - return PR_TRUE; -} - void nsContainerFrame::DumpTree() const { nsIFrame* root = (nsIFrame*)this; diff --git a/mozilla/layout/base/src/nsContainerFrame.h b/mozilla/layout/base/src/nsContainerFrame.h index ed0bde78835..190c5f8b1b7 100644 --- a/mozilla/layout/base/src/nsContainerFrame.h +++ b/mozilla/layout/base/src/nsContainerFrame.h @@ -253,11 +253,6 @@ protected: */ PRBool IsChild(const nsIFrame* aChild) const; - /** - * Returns PR_TRUE if aChild is the last child of this frame. - */ - PRBool IsLastChild(const nsIFrame* aChild) const; - void DumpTree() const; #endif diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 4d7110525b7..3eb0403836f 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -672,7 +672,7 @@ nsInlineFrame::ReflowFrame(nsInlineReflowState& aState, nsIFrame* nsInlineFrame::PullOneChild(nsInlineFrame* aNextInFlow, - nsIFrame* aLastChild) + nsIFrame* aLastChild) { NS_PRECONDITION(nsnull != aNextInFlow, "null ptr"); @@ -711,7 +711,6 @@ nsInlineFrame::PullOneChild(nsInlineFrame* aNextInFlow, if (nsnull == aLastChild) { mFirstChild = kidFrame; } else { - NS_ASSERTION(IsLastChild(aLastChild), "bad last child"); aLastChild->SetNextSibling(kidFrame); } kidFrame->SetNextSibling(nsnull); diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index 4d7110525b7..3eb0403836f 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -672,7 +672,7 @@ nsInlineFrame::ReflowFrame(nsInlineReflowState& aState, nsIFrame* nsInlineFrame::PullOneChild(nsInlineFrame* aNextInFlow, - nsIFrame* aLastChild) + nsIFrame* aLastChild) { NS_PRECONDITION(nsnull != aNextInFlow, "null ptr"); @@ -711,7 +711,6 @@ nsInlineFrame::PullOneChild(nsInlineFrame* aNextInFlow, if (nsnull == aLastChild) { mFirstChild = kidFrame; } else { - NS_ASSERTION(IsLastChild(aLastChild), "bad last child"); aLastChild->SetNextSibling(kidFrame); } kidFrame->SetNextSibling(nsnull); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 70d8a30f3ca..c02d593dae5 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1702,10 +1702,6 @@ nsReflowStatus nsTableFrame::ResizeReflowPass1(nsIPresContext* aPresContext, // Recalculate Layout Dependencies RecalcLayoutData(); - if (nsnull != prevKidFrame) { - NS_ASSERTION(IsLastChild(prevKidFrame), "unexpected last child"); - } - aDesiredSize.width = kidSize.width; mFirstPassValid = PR_TRUE; diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 88c9ac15a90..bab80f1637e 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -523,11 +523,6 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, } } - // Update our last content offset - if (nsnull != prevKidFrame) { - NS_ASSERTION(IsLastChild(prevKidFrame), "bad last child"); - } - return result; } diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 70d8a30f3ca..c02d593dae5 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1702,10 +1702,6 @@ nsReflowStatus nsTableFrame::ResizeReflowPass1(nsIPresContext* aPresContext, // Recalculate Layout Dependencies RecalcLayoutData(); - if (nsnull != prevKidFrame) { - NS_ASSERTION(IsLastChild(prevKidFrame), "unexpected last child"); - } - aDesiredSize.width = kidSize.width; mFirstPassValid = PR_TRUE; diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 88c9ac15a90..bab80f1637e 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -523,11 +523,6 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, } } - // Update our last content offset - if (nsnull != prevKidFrame) { - NS_ASSERTION(IsLastChild(prevKidFrame), "bad last child"); - } - return result; }