From f5ba346bdc848621c2589dbeba359d3f9c205b9a Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Fri, 22 Oct 1999 14:53:52 +0000 Subject: [PATCH] Removed 5 convenience functions from nsIFrame --- layout/base/public/nsIFrame.h | 6 -- layout/generic/nsBlockFrame.cpp | 2 +- layout/generic/nsBlockReflowState.cpp | 2 +- layout/generic/nsBlockReflowState.h | 2 +- layout/generic/nsContainerFrame.cpp | 2 +- layout/generic/nsFrame.cpp | 30 --------- layout/generic/nsFrame.h | 5 -- layout/generic/nsIFrame.h | 6 -- layout/generic/nsInlineFrame.cpp | 2 +- layout/generic/nsSplittableFrame.cpp | 73 +++++++-------------- layout/generic/nsSplittableFrame.h | 11 ++-- layout/html/base/src/nsBlockFrame.cpp | 2 +- layout/html/base/src/nsBlockReflowState.cpp | 2 +- layout/html/base/src/nsBlockReflowState.h | 2 +- layout/html/base/src/nsContainerFrame.cpp | 2 +- layout/html/base/src/nsFrame.cpp | 30 --------- layout/html/base/src/nsFrame.h | 5 -- layout/html/base/src/nsInlineFrame.cpp | 2 +- layout/html/base/src/nsSplittableFrame.cpp | 73 +++++++-------------- layout/html/base/src/nsSplittableFrame.h | 11 ++-- layout/html/table/src/nsTableOuterFrame.cpp | 2 +- layout/tables/nsTableOuterFrame.cpp | 2 +- 22 files changed, 70 insertions(+), 204 deletions(-) diff --git a/layout/base/public/nsIFrame.h b/layout/base/public/nsIFrame.h index a29d234ae763..9197fd64c90c 100644 --- a/layout/base/public/nsIFrame.h +++ b/layout/base/public/nsIFrame.h @@ -560,12 +560,6 @@ public: NS_IMETHOD GetNextInFlow(nsIFrame** aNextInFlow) const = 0; NS_IMETHOD SetNextInFlow(nsIFrame*) = 0; - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame) = 0; - NS_IMETHOD PrependToFlow(nsIFrame* aBeforeFrame) = 0; - NS_IMETHOD RemoveFromFlow() = 0; - NS_IMETHOD BreakFromPrevFlow() = 0; - NS_IMETHOD BreakFromNextFlow() = 0; - /** * Accessor functions to get/set the associated view object */ diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 5fbd69f7bcb5..9eb208190860 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -442,7 +442,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Disconnect the next-in-flow from the flow list - nextInFlow->BreakFromPrevFlow(); + nsSplittableFrame::BreakFromPrevFlow(nextInFlow); // Take the next-in-flow out of the parent's child list PRBool result = parent->mFrames.RemoveFrame(nextInFlow); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 23522dd3b1b0..347097626dbd 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1402,36 +1402,6 @@ NS_IMETHODIMP nsFrame::SetNextInFlow(nsIFrame*) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP nsFrame::AppendToFlow(nsIFrame* aAfterFrame) -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::PrependToFlow(nsIFrame* aBeforeFrame) -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::RemoveFromFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::BreakFromPrevFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::BreakFromNextFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - // Associated view object NS_IMETHODIMP nsFrame::GetView(nsIView** aView) const { diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index f3823ed51259..319b86cc2cf3 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -204,11 +204,6 @@ public: NS_IMETHOD SetPrevInFlow(nsIFrame*); NS_IMETHOD GetNextInFlow(nsIFrame** aNextInFlow) const; NS_IMETHOD SetNextInFlow(nsIFrame*); - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD PrependToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD RemoveFromFlow(); - NS_IMETHOD BreakFromPrevFlow(); - NS_IMETHOD BreakFromNextFlow(); NS_IMETHOD GetView(nsIView** aView) const; NS_IMETHOD SetView(nsIView* aView); NS_IMETHOD GetParentWithView(nsIFrame** aParent) const; diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index a29d234ae763..9197fd64c90c 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -560,12 +560,6 @@ public: NS_IMETHOD GetNextInFlow(nsIFrame** aNextInFlow) const = 0; NS_IMETHOD SetNextInFlow(nsIFrame*) = 0; - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame) = 0; - NS_IMETHOD PrependToFlow(nsIFrame* aBeforeFrame) = 0; - NS_IMETHOD RemoveFromFlow() = 0; - NS_IMETHOD BreakFromPrevFlow() = 0; - NS_IMETHOD BreakFromNextFlow() = 0; - /** * Accessor functions to get/set the associated view object */ diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index a22d279056d6..9fbe213d6f7e 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -996,7 +996,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, nsSplittableType st; aOldFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aOldFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aOldFrame); } parent->mFrames.DestroyFrame(aPresContext, aOldFrame); aOldFrame = oldFrameNextInFlow; diff --git a/layout/generic/nsSplittableFrame.cpp b/layout/generic/nsSplittableFrame.cpp index d5602ea74300..63a44600f534 100644 --- a/layout/generic/nsSplittableFrame.cpp +++ b/layout/generic/nsSplittableFrame.cpp @@ -34,7 +34,8 @@ nsSplittableFrame::Init(nsIPresContext& aPresContext, if (aPrevInFlow) { // Hook the frame into the flow - AppendToFlow(aPrevInFlow); + mPrevInFlow = aPrevInFlow; + aPrevInFlow->SetNextInFlow(this); // Make sure the general flags bits are the same nsFrameState state; @@ -108,67 +109,39 @@ nsIFrame* nsSplittableFrame::GetLastInFlow() const return lastInFlow; } -// Append this frame to flow after aAfterFrame -NS_METHOD nsSplittableFrame::AppendToFlow(nsIFrame* aAfterFrame) -{ - NS_PRECONDITION(aAfterFrame != nsnull, "null pointer"); - - mPrevInFlow = aAfterFrame; - aAfterFrame->GetNextInFlow(&mNextInFlow); - mPrevInFlow->SetNextInFlow(this); - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(this); - } - return NS_OK; -} - -// Prepend this frame to flow before aBeforeFrame -NS_METHOD nsSplittableFrame::PrependToFlow(nsIFrame* aBeforeFrame) -{ - NS_PRECONDITION(aBeforeFrame != nsnull, "null pointer"); - - aBeforeFrame->GetPrevInFlow(&mPrevInFlow); - mNextInFlow = aBeforeFrame; - mNextInFlow->SetPrevInFlow(this); - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(this); - } - return NS_OK; -} - // Remove this frame from the flow. Connects prev in flow and next in flow -NS_METHOD nsSplittableFrame::RemoveFromFlow() +void +nsSplittableFrame::RemoveFromFlow(nsIFrame* aFrame) { - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(mNextInFlow); + nsIFrame* prevInFlow; + nsIFrame* nextInFlow; + + aFrame->GetPrevInFlow(&prevInFlow); + aFrame->GetNextInFlow(&nextInFlow); + + if (prevInFlow) { + prevInFlow->SetNextInFlow(nextInFlow); } - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(mPrevInFlow); + if (nextInFlow) { + nextInFlow->SetPrevInFlow(prevInFlow); } - mPrevInFlow = mNextInFlow = nsnull; - return NS_OK; + aFrame->SetPrevInFlow(nsnull); + aFrame->SetNextInFlow(nsnull); } // Detach from previous frame in flow -NS_METHOD nsSplittableFrame::BreakFromPrevFlow() +void +nsSplittableFrame::BreakFromPrevFlow(nsIFrame* aFrame) { - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(nsnull); - mPrevInFlow = nsnull; - } - return NS_OK; -} + nsIFrame* prevInFlow; -// Detach from next frame in flow -NS_METHOD nsSplittableFrame::BreakFromNextFlow() -{ - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(nsnull); - mNextInFlow = nsnull; + aFrame->GetPrevInFlow(&prevInFlow); + if (prevInFlow) { + prevInFlow->SetNextInFlow(nsnull); + aFrame->SetPrevInFlow(nsnull); } - return NS_OK; } nsIFrame * nsSplittableFrame::GetPrevInFlow() diff --git a/layout/generic/nsSplittableFrame.h b/layout/generic/nsSplittableFrame.h index 16e4c78b704d..4e76734c9ec2 100644 --- a/layout/generic/nsSplittableFrame.h +++ b/layout/generic/nsSplittableFrame.h @@ -51,11 +51,12 @@ public: */ nsIFrame* GetLastInFlow() const; - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD PrependToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD RemoveFromFlow(); - NS_IMETHOD BreakFromPrevFlow(); - NS_IMETHOD BreakFromNextFlow(); + // Remove the frame from the flow. Connects the frame's prev-in-flow + // and its next-in-flow + static void RemoveFromFlow(nsIFrame* aFrame); + + // Detach from previous frame in flow + static void BreakFromPrevFlow(nsIFrame* aFrame); nsIFrame* GetPrevInFlow(); nsIFrame* GetNextInFlow(); diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 134da4543e34..9fd40ccd31c7 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -4879,7 +4879,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsSplittableType st; aDeletedFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aDeletedFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aDeletedFrame); } #ifdef NOISY_REMOVE_FRAME printf("DoRemoveFrame: prevLine=%p line=%p frame=", diff --git a/layout/html/base/src/nsContainerFrame.cpp b/layout/html/base/src/nsContainerFrame.cpp index 5fbd69f7bcb5..9eb208190860 100644 --- a/layout/html/base/src/nsContainerFrame.cpp +++ b/layout/html/base/src/nsContainerFrame.cpp @@ -442,7 +442,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Disconnect the next-in-flow from the flow list - nextInFlow->BreakFromPrevFlow(); + nsSplittableFrame::BreakFromPrevFlow(nextInFlow); // Take the next-in-flow out of the parent's child list PRBool result = parent->mFrames.RemoveFrame(nextInFlow); diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index 23522dd3b1b0..347097626dbd 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -1402,36 +1402,6 @@ NS_IMETHODIMP nsFrame::SetNextInFlow(nsIFrame*) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP nsFrame::AppendToFlow(nsIFrame* aAfterFrame) -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::PrependToFlow(nsIFrame* aBeforeFrame) -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::RemoveFromFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::BreakFromPrevFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP nsFrame::BreakFromNextFlow() -{ - NS_ERROR("not splittable"); - return NS_ERROR_NOT_IMPLEMENTED; -} - // Associated view object NS_IMETHODIMP nsFrame::GetView(nsIView** aView) const { diff --git a/layout/html/base/src/nsFrame.h b/layout/html/base/src/nsFrame.h index f3823ed51259..319b86cc2cf3 100644 --- a/layout/html/base/src/nsFrame.h +++ b/layout/html/base/src/nsFrame.h @@ -204,11 +204,6 @@ public: NS_IMETHOD SetPrevInFlow(nsIFrame*); NS_IMETHOD GetNextInFlow(nsIFrame** aNextInFlow) const; NS_IMETHOD SetNextInFlow(nsIFrame*); - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD PrependToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD RemoveFromFlow(); - NS_IMETHOD BreakFromPrevFlow(); - NS_IMETHOD BreakFromNextFlow(); NS_IMETHOD GetView(nsIView** aView) const; NS_IMETHOD SetView(nsIView* aView); NS_IMETHOD GetParentWithView(nsIFrame** aParent) const; diff --git a/layout/html/base/src/nsInlineFrame.cpp b/layout/html/base/src/nsInlineFrame.cpp index a22d279056d6..9fbe213d6f7e 100644 --- a/layout/html/base/src/nsInlineFrame.cpp +++ b/layout/html/base/src/nsInlineFrame.cpp @@ -996,7 +996,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, nsSplittableType st; aOldFrame->IsSplittable(st); if (NS_FRAME_NOT_SPLITTABLE != st) { - aOldFrame->RemoveFromFlow(); + nsSplittableFrame::RemoveFromFlow(aOldFrame); } parent->mFrames.DestroyFrame(aPresContext, aOldFrame); aOldFrame = oldFrameNextInFlow; diff --git a/layout/html/base/src/nsSplittableFrame.cpp b/layout/html/base/src/nsSplittableFrame.cpp index d5602ea74300..63a44600f534 100644 --- a/layout/html/base/src/nsSplittableFrame.cpp +++ b/layout/html/base/src/nsSplittableFrame.cpp @@ -34,7 +34,8 @@ nsSplittableFrame::Init(nsIPresContext& aPresContext, if (aPrevInFlow) { // Hook the frame into the flow - AppendToFlow(aPrevInFlow); + mPrevInFlow = aPrevInFlow; + aPrevInFlow->SetNextInFlow(this); // Make sure the general flags bits are the same nsFrameState state; @@ -108,67 +109,39 @@ nsIFrame* nsSplittableFrame::GetLastInFlow() const return lastInFlow; } -// Append this frame to flow after aAfterFrame -NS_METHOD nsSplittableFrame::AppendToFlow(nsIFrame* aAfterFrame) -{ - NS_PRECONDITION(aAfterFrame != nsnull, "null pointer"); - - mPrevInFlow = aAfterFrame; - aAfterFrame->GetNextInFlow(&mNextInFlow); - mPrevInFlow->SetNextInFlow(this); - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(this); - } - return NS_OK; -} - -// Prepend this frame to flow before aBeforeFrame -NS_METHOD nsSplittableFrame::PrependToFlow(nsIFrame* aBeforeFrame) -{ - NS_PRECONDITION(aBeforeFrame != nsnull, "null pointer"); - - aBeforeFrame->GetPrevInFlow(&mPrevInFlow); - mNextInFlow = aBeforeFrame; - mNextInFlow->SetPrevInFlow(this); - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(this); - } - return NS_OK; -} - // Remove this frame from the flow. Connects prev in flow and next in flow -NS_METHOD nsSplittableFrame::RemoveFromFlow() +void +nsSplittableFrame::RemoveFromFlow(nsIFrame* aFrame) { - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(mNextInFlow); + nsIFrame* prevInFlow; + nsIFrame* nextInFlow; + + aFrame->GetPrevInFlow(&prevInFlow); + aFrame->GetNextInFlow(&nextInFlow); + + if (prevInFlow) { + prevInFlow->SetNextInFlow(nextInFlow); } - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(mPrevInFlow); + if (nextInFlow) { + nextInFlow->SetPrevInFlow(prevInFlow); } - mPrevInFlow = mNextInFlow = nsnull; - return NS_OK; + aFrame->SetPrevInFlow(nsnull); + aFrame->SetNextInFlow(nsnull); } // Detach from previous frame in flow -NS_METHOD nsSplittableFrame::BreakFromPrevFlow() +void +nsSplittableFrame::BreakFromPrevFlow(nsIFrame* aFrame) { - if (mPrevInFlow) { - mPrevInFlow->SetNextInFlow(nsnull); - mPrevInFlow = nsnull; - } - return NS_OK; -} + nsIFrame* prevInFlow; -// Detach from next frame in flow -NS_METHOD nsSplittableFrame::BreakFromNextFlow() -{ - if (mNextInFlow) { - mNextInFlow->SetPrevInFlow(nsnull); - mNextInFlow = nsnull; + aFrame->GetPrevInFlow(&prevInFlow); + if (prevInFlow) { + prevInFlow->SetNextInFlow(nsnull); + aFrame->SetPrevInFlow(nsnull); } - return NS_OK; } nsIFrame * nsSplittableFrame::GetPrevInFlow() diff --git a/layout/html/base/src/nsSplittableFrame.h b/layout/html/base/src/nsSplittableFrame.h index 16e4c78b704d..4e76734c9ec2 100644 --- a/layout/html/base/src/nsSplittableFrame.h +++ b/layout/html/base/src/nsSplittableFrame.h @@ -51,11 +51,12 @@ public: */ nsIFrame* GetLastInFlow() const; - NS_IMETHOD AppendToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD PrependToFlow(nsIFrame* aAfterFrame); - NS_IMETHOD RemoveFromFlow(); - NS_IMETHOD BreakFromPrevFlow(); - NS_IMETHOD BreakFromNextFlow(); + // Remove the frame from the flow. Connects the frame's prev-in-flow + // and its next-in-flow + static void RemoveFromFlow(nsIFrame* aFrame); + + // Detach from previous frame in flow + static void BreakFromPrevFlow(nsIFrame* aFrame); nsIFrame* GetPrevInFlow(); nsIFrame* GetNextInFlow(); diff --git a/layout/html/table/src/nsTableOuterFrame.cpp b/layout/html/table/src/nsTableOuterFrame.cpp index 2b3a35c7d6e3..4e7668e086a4 100644 --- a/layout/html/table/src/nsTableOuterFrame.cpp +++ b/layout/html/table/src/nsTableOuterFrame.cpp @@ -1059,7 +1059,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Disconnect the next-in-flow from the flow list - nextInFlow->BreakFromPrevFlow(); + nsSplittableFrame::BreakFromPrevFlow(nextInFlow); // Take the next-in-flow out of the parent's child list if (parent->mFrames.FirstChild() == nextInFlow) { diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 2b3a35c7d6e3..4e7668e086a4 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -1059,7 +1059,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Disconnect the next-in-flow from the flow list - nextInFlow->BreakFromPrevFlow(); + nsSplittableFrame::BreakFromPrevFlow(nextInFlow); // Take the next-in-flow out of the parent's child list if (parent->mFrames.FirstChild() == nextInFlow) {