remove dead code, bug 282009 r/sr=roc a=mtschrep
authorbmlk@gmx.de
Sat, 19 Jan 2008 22:34:03 -0800
changeset 10462 c5a6603a7c695f85187538c1dff3b5ea4265da82
parent 10461 f6d48859ddfd0ee48da1b39be9481c40c6f1cd76
child 10463 b0a5062215d8eac292f767cd475d17dad3068783
push idunknown
push userunknown
push dateunknown
reviewersmtschrep
bugs282009
milestone1.9b3pre
remove dead code, bug 282009 r/sr=roc a=mtschrep
layout/tables/nsTableOuterFrame.cpp
layout/tables/nsTableOuterFrame.h
--- a/layout/tables/nsTableOuterFrame.cpp
+++ b/layout/tables/nsTableOuterFrame.cpp
@@ -1320,77 +1320,16 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPr
 
 #ifdef NS_DEBUG
 NS_METHOD nsTableOuterFrame::VerifyTree() const
 {
   return NS_OK;
 }
 #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<nsTableOuterFrame*>
-                                         (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
 {
   return nsGkAtoms::tableOuterFrame;
 }
 
 /* ----- global methods ----- */
 
--- a/layout/tables/nsTableOuterFrame.h
+++ b/layout/tables/nsTableOuterFrame.h
@@ -210,31 +210,16 @@ protected:
 
 #ifdef NS_DEBUG
   /** overridden here to handle special caption-table relationship
     * @see nsContainerFrame::VerifyTree
     */
   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();
 
   void SetDesiredSize(PRUint8         aCaptionSide,
                       const nsMargin& aInnerMargin,
                       const nsMargin& aCaptionMargin,
                       nscoord&        aWidth,