diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 42d470671af9..0f05eb3e9d22 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -1325,67 +1325,6 @@ NS_METHOD nsTableOuterFrame::VerifyTree() const } #endif -/** - * Remove and delete aChild's next-in-flow(s). Updates the sibling and flow - * pointers. - * - * Updates the child count and content offsets of all containers that are - * affected - * - * Overloaded here because nsContainerFrame makes assumptions about pseudo-frames - * that are not true for tables. - * - * @param aChild child this child's next-in-flow - * @return PR_TRUE if successful and PR_FALSE otherwise - */ -void nsTableOuterFrame::DeleteChildsNextInFlow(nsPresContext* aPresContext, - nsIFrame* aChild) -{ - if (!aChild) return; - NS_PRECONDITION(mFrames.ContainsFrame(aChild), "bad geometric parent"); - - nsIFrame* nextInFlow = aChild->GetNextInFlow(); - if (!nextInFlow) { - NS_ASSERTION(PR_FALSE, "null next-in-flow"); - return; - } - - nsTableOuterFrame* parent = static_cast - (nextInFlow->GetParent()); - if (!parent) { - NS_ASSERTION(PR_FALSE, "null parent"); - return; - } - // If the next-in-flow has a next-in-flow then delete it too (and - // delete it first). - nsIFrame* nextNextInFlow = nextInFlow->GetNextInFlow(); - if (nextNextInFlow) { - parent->DeleteChildsNextInFlow(aPresContext, nextInFlow); - } - - // Disconnect the next-in-flow from the flow list - nsSplittableFrame::BreakFromPrevFlow(nextInFlow); - - // Take the next-in-flow out of the parent's child list - if (parent->mFrames.FirstChild() == nextInFlow) { - parent->mFrames.SetFrames(nextInFlow->GetNextSibling()); - } else { - // Because the next-in-flow is not the first child of the parent - // we know that it shares a parent with aChild. Therefore, we need - // to capture the next-in-flow's next sibling (in case the - // next-in-flow is the last next-in-flow for aChild AND the - // next-in-flow is not the last child in parent) - NS_ASSERTION(aChild->GetNextSibling() == nextInFlow, "unexpected sibling"); - - aChild->SetNextSibling(nextInFlow->GetNextSibling()); - } - - // Delete the next-in-flow frame and adjust its parent's child count - nextInFlow->Destroy(); - - NS_POSTCONDITION(!aChild->GetNextInFlow(), "non null next-in-flow"); -} - nsIAtom* nsTableOuterFrame::GetType() const { diff --git a/layout/tables/nsTableOuterFrame.h b/layout/tables/nsTableOuterFrame.h index 153cc55cbede..a4781a100f53 100644 --- a/layout/tables/nsTableOuterFrame.h +++ b/layout/tables/nsTableOuterFrame.h @@ -215,21 +215,6 @@ protected: NS_IMETHOD VerifyTree() const; #endif - /** - * Remove and delete aChild's next-in-flow(s). Updates the sibling and flow - * pointers. - * - * Updates the child count and content offsets of all containers that are - * affected - * - * Overloaded here because nsContainerFrame makes assumptions about pseudo-frames - * that are not true for tables. - * - * @param aChild child this child's next-in-flow - * @return PR_TRUE if successful and PR_FALSE otherwise - */ - virtual void DeleteChildsNextInFlow(nsPresContext* aPresContext, nsIFrame* aChild); - PRUint8 GetCaptionSide(); PRUint8 GetCaptionVerticalAlign();