From 1c0da71da36103bd11a3b2faec870823d16588e7 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Tue, 10 Nov 1998 06:05:32 +0000 Subject: [PATCH] Renamed Init() to SetInitialChildList() and added an additional parameter for the name of the child list git-svn-id: svn://10.0.0.236/trunk@14333 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/style/src/nsHTMLStyleSheet.cpp | 39 ++++++++++--------- mozilla/layout/base/public/nsIFrame.h | 24 +++++++----- mozilla/layout/forms/nsFieldSetFrame.cpp | 10 +++-- mozilla/layout/forms/nsFormControlFrame.cpp | 4 +- mozilla/layout/forms/nsFormControlFrame.h | 4 +- .../layout/forms/nsHTMLButtonControlFrame.cpp | 10 +++-- mozilla/layout/forms/nsImageControlFrame.cpp | 8 +++- mozilla/layout/forms/nsLegendFrame.cpp | 6 ++- mozilla/layout/forms/nsLegendFrame.h | 4 +- mozilla/layout/generic/nsBlockFrame.cpp | 8 +++- mozilla/layout/generic/nsBlockReflowState.cpp | 8 +++- mozilla/layout/generic/nsBlockReflowState.h | 8 +++- mozilla/layout/generic/nsContainerFrame.cpp | 17 ++++++-- mozilla/layout/generic/nsContainerFrame.h | 6 ++- mozilla/layout/generic/nsFrame.cpp | 17 +++++--- mozilla/layout/generic/nsFrame.h | 4 +- .../layout/generic/nsHTMLContainerFrame.cpp | 2 +- mozilla/layout/generic/nsHTMLFrame.cpp | 28 +++---------- mozilla/layout/generic/nsIFrame.h | 24 +++++++----- mozilla/layout/generic/nsInlineFrame.cpp | 8 +++- .../layout/generic/nsSimplePageSequence.cpp | 6 ++- mozilla/layout/generic/nsSimplePageSequence.h | 4 +- mozilla/layout/html/base/src/nsBlockFrame.cpp | 8 +++- .../html/base/src/nsBlockReflowState.cpp | 8 +++- .../layout/html/base/src/nsBlockReflowState.h | 8 +++- mozilla/layout/html/base/src/nsBodyFrame.cpp | 10 +++-- mozilla/layout/html/base/src/nsBodyFrame.h | 4 +- .../layout/html/base/src/nsContainerFrame.cpp | 17 ++++++-- .../layout/html/base/src/nsContainerFrame.h | 6 ++- mozilla/layout/html/base/src/nsFrame.cpp | 17 +++++--- mozilla/layout/html/base/src/nsFrame.h | 4 +- .../html/base/src/nsHTMLContainerFrame.cpp | 2 +- mozilla/layout/html/base/src/nsHTMLFrame.cpp | 28 +++---------- .../layout/html/base/src/nsInlineFrame.cpp | 8 +++- .../layout/html/base/src/nsScrollFrame.cpp | 8 +++- .../html/base/src/nsSimplePageSequence.cpp | 6 ++- .../html/base/src/nsSimplePageSequence.h | 4 +- .../layout/html/forms/src/nsFieldSetFrame.cpp | 10 +++-- .../html/forms/src/nsFormControlFrame.cpp | 4 +- .../html/forms/src/nsFormControlFrame.h | 4 +- mozilla/layout/html/forms/src/nsFormFrame.cpp | 4 +- mozilla/layout/html/forms/src/nsFormFrame.h | 4 +- .../forms/src/nsHTMLButtonControlFrame.cpp | 10 +++-- .../html/forms/src/nsImageControlFrame.cpp | 8 +++- .../layout/html/forms/src/nsLabelFrame.cpp | 10 +++-- .../layout/html/forms/src/nsLegendFrame.cpp | 6 ++- mozilla/layout/html/forms/src/nsLegendFrame.h | 4 +- .../html/style/src/nsHTMLStyleSheet.cpp | 39 ++++++++++--------- .../html/table/src/nsTableCellFrame.cpp | 6 ++- .../layout/html/table/src/nsTableCellFrame.h | 4 +- .../html/table/src/nsTableColGroupFrame.cpp | 6 ++- .../html/table/src/nsTableColGroupFrame.h | 4 +- .../layout/html/table/src/nsTableFrame.cpp | 8 ++-- mozilla/layout/html/table/src/nsTableFrame.h | 4 +- .../html/table/src/nsTableOuterFrame.cpp | 4 +- .../layout/html/table/src/nsTableOuterFrame.h | 4 +- .../layout/html/table/src/nsTableRowFrame.cpp | 4 +- .../layout/html/table/src/nsTableRowFrame.h | 4 +- .../html/table/src/nsTableRowGroupFrame.cpp | 4 +- .../html/table/src/nsTableRowGroupFrame.h | 4 +- mozilla/layout/style/nsHTMLStyleSheet.cpp | 39 ++++++++++--------- mozilla/layout/tables/nsTableCellFrame.cpp | 6 ++- mozilla/layout/tables/nsTableCellFrame.h | 4 +- .../layout/tables/nsTableColGroupFrame.cpp | 6 ++- mozilla/layout/tables/nsTableColGroupFrame.h | 4 +- mozilla/layout/tables/nsTableFrame.cpp | 8 ++-- mozilla/layout/tables/nsTableFrame.h | 4 +- mozilla/layout/tables/nsTableOuterFrame.cpp | 4 +- mozilla/layout/tables/nsTableOuterFrame.h | 4 +- mozilla/layout/tables/nsTableRowFrame.cpp | 4 +- mozilla/layout/tables/nsTableRowFrame.h | 4 +- .../layout/tables/nsTableRowGroupFrame.cpp | 4 +- mozilla/layout/tables/nsTableRowGroupFrame.h | 4 +- 73 files changed, 404 insertions(+), 237 deletions(-) diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index 41158c8deeb..ffa5697b695 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp @@ -976,10 +976,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, NS_NewBodyFrame(childContent, aNewFrame, captionFrame, NS_BODY_NO_AUTO_MARGINS); captionFrame->SetStyleContext(aPresContext, childStyleContext); - // Process the caption's child content and initialize it + // Process the caption's child content and set the initial child list nsIFrame* captionChildList; ProcessChildren(aPresContext, captionFrame, childContent, captionChildList); - captionFrame->Init(*aPresContext, captionChildList); + captionFrame->SetInitialChildList(*aPresContext, nsnull, captionChildList); // Prepend the caption frame to the outer frame's child list innerFrame->SetNextSibling(captionFrame); @@ -1011,10 +1011,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, if (nsnull != frame) { frame->SetStyleContext(aPresContext, childStyleContext); - // Process the children, and initialize the frame + // Process the children, and set the frame's initial child list nsIFrame* childChildList; ProcessChildren(aPresContext, frame, childContent, childChildList); - frame->Init(*aPresContext, childChildList); + frame->SetInitialChildList(*aPresContext, nsnull, childChildList); // Link the frame into the child list if (nsnull == lastChildFrame) { @@ -1030,11 +1030,11 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, } } - // Initialize the inner table with its child list - innerFrame->Init(*aPresContext, innerChildList); + // Set the inner table frame's list of initial child frames + innerFrame->SetInitialChildList(*aPresContext, nsnull, innerChildList); - // Initialize the anonymous table outer frame - aNewFrame->Init(*aPresContext, childList); + // Set the anonymous table outer frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); return NS_OK; } @@ -1098,22 +1098,23 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext, pageSequenceFrame->SetStyleContext(aPresContext, pseudoStyle); NS_RELEASE(pseudoStyle); - // Process the child content, and initialize the page sequence frame + // Process the child content, and set the page sequence frame's initial + // child list rv = ProcessChildren(aPresContext, pageSequenceFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - pageSequenceFrame->Init(*aPresContext, childList); + pageSequenceFrame->SetInitialChildList(*aPresContext, nsnull, childList); // Set the root frame's initial child list - aNewFrame->Init(*aPresContext, pageSequenceFrame); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, pageSequenceFrame); } } } else { nsIFrame* childList; - // Process the child content, and initialize the frame + // Process the child content, and set the frame's initial child list rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - aNewFrame->Init(*aPresContext, childList); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } } } @@ -1214,8 +1215,8 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1253,7 +1254,7 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ConstructTableFrame(aPresContext, aContent, aParentFrame, aStyleContext, aNewFrame); // Note: table construction function takes care of setting the style context, - // processing children, and calling Init() + // processing children, and setting the initial child list return rv; case NS_STYLE_DISPLAY_TABLE_ROW_GROUP: @@ -1325,8 +1326,8 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1513,7 +1514,7 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext, // Set the scroll frame's initial child list and return the scroll frame // as the frame sub-tree if (nsnull != scrollFrame) { - scrollFrame->Init(*aPresContext, aFrameSubTree); + scrollFrame->SetInitialChildList(*aPresContext, nsnull, aFrameSubTree); aFrameSubTree = scrollFrame; } } diff --git a/mozilla/layout/base/public/nsIFrame.h b/mozilla/layout/base/public/nsIFrame.h index ec230adacd6..a260b158064 100644 --- a/mozilla/layout/base/public/nsIFrame.h +++ b/mozilla/layout/base/public/nsIFrame.h @@ -125,18 +125,24 @@ class nsIFrame : public nsISupports { public: /** - * Initialize the frame passing it its child frame list. + * Called to set the initial list of frames. This happens after the frame + * has been initialized and had its style context set. * - * This member function is called for all frames just after the frame is - * constructed. + * This is only called once for a given child list, and won't be called + * at all for child lists with no initial list of frames. * - * You should reflow the frames when you get your 'initial' reflow - * notification. - * - * @param aChildList list of child frames. May be NULL - * @see #Reflow() + * @param aListName the name of the child list. A NULL pointer for the atom + * name means the unnamed principal child list + * @param aChildList list of child frames + * @return NS_ERROR_INVALID_ARG if there is no child list with the specified + * name, + * NS_ERROR_UNEXPECTED if the frame is an atomic frame or if the + * initial list of frames has already been set for that child list, + * NS_OK otherwise */ - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList) = 0; + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) = 0; /** * Add this object's size information to the sizeof handler. Note that diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index da1ddcdc79e..355398f3695 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -59,7 +59,9 @@ public: nsFieldSetFrame(nsIContent* aContent, nsIFrame* aParentFrame); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, @@ -115,7 +117,9 @@ nsFieldSetFrame::~nsFieldSetFrame() } NS_IMETHODIMP -nsFieldSetFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // cache our display type const nsStyleDisplay* styleDisplay; @@ -163,7 +167,7 @@ nsFieldSetFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the content frame - return mFirstChild->Init(aPresContext, newChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, newChildList); } // this is identical to nsHTMLContainerFrame::Paint except for the background and border. diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 1ac02a57fc3..3f4ca951cc2 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -207,7 +207,9 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsFormControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsFormControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // add ourself as an nsIFormControlFrame nsFormFrame::AddFormControlFrame(aPresContext, *this); diff --git a/mozilla/layout/forms/nsFormControlFrame.h b/mozilla/layout/forms/nsFormControlFrame.h index 49084ffcd13..d984409fb30 100644 --- a/mozilla/layout/forms/nsFormControlFrame.h +++ b/mozilla/layout/forms/nsFormControlFrame.h @@ -111,7 +111,9 @@ public: nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus); diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 84a1056ef24..1b392b1fe6a 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -79,7 +79,9 @@ public: nsGUIEvent* aEvent, nsEventStatus& aEventStatus); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); virtual PRBool IsSuccessful(nsIFormControlFrame* aSubmitter); NS_IMETHOD GetType(PRInt32* aType) const; @@ -525,7 +527,9 @@ nsHTMLButtonControlFrame::HandleEvent(nsIPresContext& aPresContext, NS_IMETHODIMP -nsHTMLButtonControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsHTMLButtonControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // add ourself as an nsIFormControlFrame nsFormFrame::AddFormControlFrame(aPresContext, *this); @@ -577,7 +581,7 @@ nsHTMLButtonControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildLis } // Queue up the frames for the inline frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_IMETHODIMP diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index 5f6905d2011..bb3d6b3ddcd 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -62,7 +62,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, @@ -155,7 +157,9 @@ nsrefcnt nsImageControlFrame::Release(void) } NS_IMETHODIMP -nsImageControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsFormFrame::AddFormControlFrame(aPresContext, *this); if (nsnull == mFormFrame) { diff --git a/mozilla/layout/forms/nsLegendFrame.cpp b/mozilla/layout/forms/nsLegendFrame.cpp index af375929443..40d778e7530 100644 --- a/mozilla/layout/forms/nsLegendFrame.cpp +++ b/mozilla/layout/forms/nsLegendFrame.cpp @@ -87,7 +87,9 @@ nsLegendFrame::QueryInterface(REFNSIID aIID, void** aInstancePtrResult) } NS_IMETHODIMP -nsLegendFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsLegendFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // cache our display type const nsStyleDisplay* styleDisplay; @@ -110,7 +112,7 @@ nsLegendFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the inline frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_IMETHODIMP diff --git a/mozilla/layout/forms/nsLegendFrame.h b/mozilla/layout/forms/nsLegendFrame.h index cc78ffe4546..9f7d5d797e0 100644 --- a/mozilla/layout/forms/nsLegendFrame.h +++ b/mozilla/layout/forms/nsLegendFrame.h @@ -37,7 +37,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index 63fc2148da7..ab2c737ac07 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -54,12 +54,23 @@ nsContainerFrame::SizeOf(nsISizeOfHandler* aHandler) const } NS_IMETHODIMP -nsContainerFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { NS_PRECONDITION(nsnull == mFirstChild, "already initialized"); + nsresult result; - mFirstChild = aChildList; - return NS_OK; + if (nsnull != mFirstChild) { + result = NS_ERROR_UNEXPECTED; + } else if (nsnull != aListName) { + result = NS_ERROR_INVALID_ARG; + } else { + mFirstChild = aChildList; + result = NS_OK; + } + + return result; } NS_IMETHODIMP diff --git a/mozilla/layout/generic/nsContainerFrame.h b/mozilla/layout/generic/nsContainerFrame.h index 1f1392ac57f..079277daee0 100644 --- a/mozilla/layout/generic/nsContainerFrame.h +++ b/mozilla/layout/generic/nsContainerFrame.h @@ -28,9 +28,11 @@ class nsContainerFrame : public nsSplittableFrame public: NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus); diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 919609da5fb..09042022cad 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -294,14 +294,19 @@ nsrefcnt nsFrame::Release(void) ///////////////////////////////////////////////////////////////////////////// // nsIFrame -NS_IMETHODIMP nsFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +NS_IMETHODIMP nsFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { - if (nsnull != aChildList) { - NS_ERROR("not a container"); - return NS_ERROR_UNEXPECTED; - } - + // XXX This shouldn't be getting called at all, but currently is for backwards + // compatility reasons... +#if 0 + NS_ERROR("not a container"); + return NS_ERROR_UNEXPECTED; +#else + NS_ASSERTION(nsnull == aChildList, "not a container"); return NS_OK; +#endif } NS_IMETHODIMP nsFrame::DeleteFrame(nsIPresContext& aPresContext) diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index 8dca9ba7db4..08ac9527aed 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -112,7 +112,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; NS_IMETHOD GetContent(nsIContent*& aContent) const; diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 7ea7ba2ed3f..264e372c7d1 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -231,7 +231,7 @@ nsHTMLContainerFrame::CreateWrapperFrame(nsIPresContext& aPresContext, NS_RELEASE(pseudoStyle); // Init the body frame - aWrapperFrame->Init(aPresContext, aFrame); + aWrapperFrame->SetInitialChildList(aPresContext, nsnull, aFrame); } NS_RELEASE(content); diff --git a/mozilla/layout/generic/nsHTMLFrame.cpp b/mozilla/layout/generic/nsHTMLFrame.cpp index acb7d9fcf3b..813e816c603 100644 --- a/mozilla/layout/generic/nsHTMLFrame.cpp +++ b/mozilla/layout/generic/nsHTMLFrame.cpp @@ -45,7 +45,9 @@ class RootFrame : public nsHTMLContainerFrame { public: RootFrame(nsIContent* aContent); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -82,30 +84,12 @@ RootFrame::RootFrame(nsIContent* aContent) } NS_IMETHODIMP -RootFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +RootFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { -#if 0 - // Construct the root content frame and set its style context - mFirstChild = new RootContentFrame(mContent, this); - nsIStyleContext* pseudoStyleContext = - aPresContext.ResolvePseudoStyleContextFor(mContent, - nsHTMLAtoms::rootContentPseudo, - mStyleContext); - mFirstChild->SetStyleContext(&aPresContext, pseudoStyleContext); - NS_RELEASE(pseudoStyleContext); - - // Set the geometric and content parent for each of the child frames - for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) { - frame->SetGeometricParent(mFirstChild); - frame->SetContentParent(mFirstChild); - } - - // Queue up the frames for the root content frame - return mFirstChild->Init(aPresContext, aChildList); -#else mFirstChild = aChildList; return NS_OK; -#endif } NS_IMETHODIMP diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index ec230adacd6..a260b158064 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -125,18 +125,24 @@ class nsIFrame : public nsISupports { public: /** - * Initialize the frame passing it its child frame list. + * Called to set the initial list of frames. This happens after the frame + * has been initialized and had its style context set. * - * This member function is called for all frames just after the frame is - * constructed. + * This is only called once for a given child list, and won't be called + * at all for child lists with no initial list of frames. * - * You should reflow the frames when you get your 'initial' reflow - * notification. - * - * @param aChildList list of child frames. May be NULL - * @see #Reflow() + * @param aListName the name of the child list. A NULL pointer for the atom + * name means the unnamed principal child list + * @param aChildList list of child frames + * @return NS_ERROR_INVALID_ARG if there is no child list with the specified + * name, + * NS_ERROR_UNEXPECTED if the frame is an atomic frame or if the + * initial list of frames has already been set for that child list, + * NS_OK otherwise */ - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList) = 0; + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) = 0; /** * Add this object's size information to the sizeof handler. Note that diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index f37dc740c93..40533d8e564 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -60,7 +60,9 @@ public: virtual ~nsInlineFrame(); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, @@ -237,7 +239,9 @@ nsInlineFrame::AppendNewFrames(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsInlineFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsInlineFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { NS_PRECONDITION(nsnull == mFirstChild, "already initialized"); nsresult rv = AppendNewFrames(aPresContext, aChildList); diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index 1bd561eab28..6b339f87f31 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -30,7 +30,9 @@ nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsIContent* aContent, nsIFr } NS_IMETHODIMP -nsSimplePageSequenceFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsSimplePageSequenceFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // Create a page frame and set its style context mFirstChild = new nsPageFrame(mContent, this); @@ -49,7 +51,7 @@ nsSimplePageSequenceFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildLi } // Queue up the frames for the page frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } // XXX Hack diff --git a/mozilla/layout/generic/nsSimplePageSequence.h b/mozilla/layout/generic/nsSimplePageSequence.h index 1a75d8efe2f..3b25340734f 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.h +++ b/mozilla/layout/generic/nsSimplePageSequence.h @@ -25,7 +25,9 @@ class nsSimplePageSequenceFrame : public nsContainerFrame { public: nsSimplePageSequenceFrame(nsIContent* aContent, nsIFrame* aParent); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 7e4b158e2bf..7e32317569b 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -259,7 +259,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const; @@ -1618,7 +1620,9 @@ nsBlockFrame::ReResolveStyleContext(nsIPresContext* aPresContext, } NS_IMETHODIMP -nsBlockFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBlockFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv = AppendNewFrames(aPresContext, aChildList); if (NS_OK != rv) { diff --git a/mozilla/layout/html/base/src/nsBodyFrame.cpp b/mozilla/layout/html/base/src/nsBodyFrame.cpp index 3fefb18b7a4..1013343c04d 100644 --- a/mozilla/layout/html/base/src/nsBodyFrame.cpp +++ b/mozilla/layout/html/base/src/nsBodyFrame.cpp @@ -88,7 +88,9 @@ nsBodyFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) // nsIFrame NS_IMETHODIMP -nsBodyFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsBodyFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { if (nsnull == mPrevInFlow) { // Create a block frame and set its style context @@ -109,7 +111,7 @@ nsBodyFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the block frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } else { // We have a prev-in-flow, so create a continuing block frame @@ -120,7 +122,7 @@ nsBodyFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) prevBodyFrame->mFirstChild->CreateContinuingFrame(aPresContext, this, blockStyleContext, mFirstChild); NS_RELEASE(blockStyleContext); - return mFirstChild->Init(aPresContext, nsnull); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, nsnull); } } @@ -491,7 +493,7 @@ nsBodyFrame::CreateContinuingFrame(nsIPresContext& aPresContext, return NS_ERROR_OUT_OF_MEMORY; } PrepareContinuingFrame(aPresContext, aParent, aStyleContext, cf); - cf->Init(aPresContext, nsnull); + cf->SetInitialChildList(aPresContext, nsnull, nsnull); aContinuingFrame = cf; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsBodyFrame.h b/mozilla/layout/html/base/src/nsBodyFrame.h index 0c8867c97e9..9ed732139a8 100644 --- a/mozilla/layout/html/base/src/nsBodyFrame.h +++ b/mozilla/layout/html/base/src/nsBodyFrame.h @@ -37,7 +37,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index 63fc2148da7..ab2c737ac07 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -54,12 +54,23 @@ nsContainerFrame::SizeOf(nsISizeOfHandler* aHandler) const } NS_IMETHODIMP -nsContainerFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { NS_PRECONDITION(nsnull == mFirstChild, "already initialized"); + nsresult result; - mFirstChild = aChildList; - return NS_OK; + if (nsnull != mFirstChild) { + result = NS_ERROR_UNEXPECTED; + } else if (nsnull != aListName) { + result = NS_ERROR_INVALID_ARG; + } else { + mFirstChild = aChildList; + result = NS_OK; + } + + return result; } NS_IMETHODIMP diff --git a/mozilla/layout/html/base/src/nsContainerFrame.h b/mozilla/layout/html/base/src/nsContainerFrame.h index 1f1392ac57f..079277daee0 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.h +++ b/mozilla/layout/html/base/src/nsContainerFrame.h @@ -28,9 +28,11 @@ class nsContainerFrame : public nsSplittableFrame public: NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus); diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index 919609da5fb..09042022cad 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -294,14 +294,19 @@ nsrefcnt nsFrame::Release(void) ///////////////////////////////////////////////////////////////////////////// // nsIFrame -NS_IMETHODIMP nsFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +NS_IMETHODIMP nsFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { - if (nsnull != aChildList) { - NS_ERROR("not a container"); - return NS_ERROR_UNEXPECTED; - } - + // XXX This shouldn't be getting called at all, but currently is for backwards + // compatility reasons... +#if 0 + NS_ERROR("not a container"); + return NS_ERROR_UNEXPECTED; +#else + NS_ASSERTION(nsnull == aChildList, "not a container"); return NS_OK; +#endif } NS_IMETHODIMP nsFrame::DeleteFrame(nsIPresContext& aPresContext) diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h index 8dca9ba7db4..08ac9527aed 100644 --- a/mozilla/layout/html/base/src/nsFrame.h +++ b/mozilla/layout/html/base/src/nsFrame.h @@ -112,7 +112,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; NS_IMETHOD GetContent(nsIContent*& aContent) const; diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 7ea7ba2ed3f..264e372c7d1 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -231,7 +231,7 @@ nsHTMLContainerFrame::CreateWrapperFrame(nsIPresContext& aPresContext, NS_RELEASE(pseudoStyle); // Init the body frame - aWrapperFrame->Init(aPresContext, aFrame); + aWrapperFrame->SetInitialChildList(aPresContext, nsnull, aFrame); } NS_RELEASE(content); diff --git a/mozilla/layout/html/base/src/nsHTMLFrame.cpp b/mozilla/layout/html/base/src/nsHTMLFrame.cpp index acb7d9fcf3b..813e816c603 100644 --- a/mozilla/layout/html/base/src/nsHTMLFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLFrame.cpp @@ -45,7 +45,9 @@ class RootFrame : public nsHTMLContainerFrame { public: RootFrame(nsIContent* aContent); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -82,30 +84,12 @@ RootFrame::RootFrame(nsIContent* aContent) } NS_IMETHODIMP -RootFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +RootFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { -#if 0 - // Construct the root content frame and set its style context - mFirstChild = new RootContentFrame(mContent, this); - nsIStyleContext* pseudoStyleContext = - aPresContext.ResolvePseudoStyleContextFor(mContent, - nsHTMLAtoms::rootContentPseudo, - mStyleContext); - mFirstChild->SetStyleContext(&aPresContext, pseudoStyleContext); - NS_RELEASE(pseudoStyleContext); - - // Set the geometric and content parent for each of the child frames - for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) { - frame->SetGeometricParent(mFirstChild); - frame->SetContentParent(mFirstChild); - } - - // Queue up the frames for the root content frame - return mFirstChild->Init(aPresContext, aChildList); -#else mFirstChild = aChildList; return NS_OK; -#endif } NS_IMETHODIMP diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index f37dc740c93..40533d8e564 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -60,7 +60,9 @@ public: virtual ~nsInlineFrame(); // nsIFrame - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, @@ -237,7 +239,9 @@ nsInlineFrame::AppendNewFrames(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsInlineFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsInlineFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { NS_PRECONDITION(nsnull == mFirstChild, "already initialized"); nsresult rv = AppendNewFrames(aPresContext, aChildList); diff --git a/mozilla/layout/html/base/src/nsScrollFrame.cpp b/mozilla/layout/html/base/src/nsScrollFrame.cpp index 90713f5467d..80ca4e408e1 100644 --- a/mozilla/layout/html/base/src/nsScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsScrollFrame.cpp @@ -48,7 +48,9 @@ class nsScrollFrame : public nsHTMLContainerFrame { public: nsScrollFrame(nsIContent* aContent, nsIFrame* aParent); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus); @@ -77,7 +79,9 @@ nsScrollFrame::nsScrollFrame(nsIContent* aContent, nsIFrame* aParent) } NS_IMETHODIMP -nsScrollFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsScrollFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { NS_PRECONDITION(nsnull != aChildList, "no child frame"); NS_PRECONDITION(LengthOf(aChildList) == 1, "wrong number child frames"); diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 1bd561eab28..6b339f87f31 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -30,7 +30,9 @@ nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsIContent* aContent, nsIFr } NS_IMETHODIMP -nsSimplePageSequenceFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsSimplePageSequenceFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // Create a page frame and set its style context mFirstChild = new nsPageFrame(mContent, this); @@ -49,7 +51,7 @@ nsSimplePageSequenceFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildLi } // Queue up the frames for the page frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } // XXX Hack diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.h b/mozilla/layout/html/base/src/nsSimplePageSequence.h index 1a75d8efe2f..3b25340734f 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.h +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.h @@ -25,7 +25,9 @@ class nsSimplePageSequenceFrame : public nsContainerFrame { public: nsSimplePageSequenceFrame(nsIContent* aContent, nsIFrame* aParent); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index da1ddcdc79e..355398f3695 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -59,7 +59,9 @@ public: nsFieldSetFrame(nsIContent* aContent, nsIFrame* aParentFrame); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, @@ -115,7 +117,9 @@ nsFieldSetFrame::~nsFieldSetFrame() } NS_IMETHODIMP -nsFieldSetFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // cache our display type const nsStyleDisplay* styleDisplay; @@ -163,7 +167,7 @@ nsFieldSetFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the content frame - return mFirstChild->Init(aPresContext, newChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, newChildList); } // this is identical to nsHTMLContainerFrame::Paint except for the background and border. diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 1ac02a57fc3..3f4ca951cc2 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -207,7 +207,9 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsFormControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsFormControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // add ourself as an nsIFormControlFrame nsFormFrame::AddFormControlFrame(aPresContext, *this); diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.h b/mozilla/layout/html/forms/src/nsFormControlFrame.h index 49084ffcd13..d984409fb30 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.h +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.h @@ -111,7 +111,9 @@ public: nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus); diff --git a/mozilla/layout/html/forms/src/nsFormFrame.cpp b/mozilla/layout/html/forms/src/nsFormFrame.cpp index 3f733c7a636..0c72eeaf9c3 100644 --- a/mozilla/layout/html/forms/src/nsFormFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormFrame.cpp @@ -207,7 +207,9 @@ nsFormFrame::GetEnctype(PRInt32* aEnctype) } NS_IMETHODIMP -nsFormFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsFormFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult result = NS_OK; nsIDOMHTMLFormElement* content = nsnull; diff --git a/mozilla/layout/html/forms/src/nsFormFrame.h b/mozilla/layout/html/forms/src/nsFormFrame.h index ef1c792d413..58f2e3babfc 100644 --- a/mozilla/layout/html/forms/src/nsFormFrame.h +++ b/mozilla/layout/html/forms/src/nsFormFrame.h @@ -79,7 +79,9 @@ class nsFormFrame : public nsLeafFrame, public: nsFormFrame(nsIContent* aContent, nsIFrame* aParentFrame); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 84a1056ef24..1b392b1fe6a 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -79,7 +79,9 @@ public: nsGUIEvent* aEvent, nsEventStatus& aEventStatus); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); virtual PRBool IsSuccessful(nsIFormControlFrame* aSubmitter); NS_IMETHOD GetType(PRInt32* aType) const; @@ -525,7 +527,9 @@ nsHTMLButtonControlFrame::HandleEvent(nsIPresContext& aPresContext, NS_IMETHODIMP -nsHTMLButtonControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsHTMLButtonControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // add ourself as an nsIFormControlFrame nsFormFrame::AddFormControlFrame(aPresContext, *this); @@ -577,7 +581,7 @@ nsHTMLButtonControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildLis } // Queue up the frames for the inline frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_IMETHODIMP diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index 5f6905d2011..bb3d6b3ddcd 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -62,7 +62,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, @@ -155,7 +157,9 @@ nsrefcnt nsImageControlFrame::Release(void) } NS_IMETHODIMP -nsImageControlFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsFormFrame::AddFormControlFrame(aPresContext, *this); if (nsnull == mFormFrame) { diff --git a/mozilla/layout/html/forms/src/nsLabelFrame.cpp b/mozilla/layout/html/forms/src/nsLabelFrame.cpp index 329feaec7f5..5e5a3c87711 100644 --- a/mozilla/layout/html/forms/src/nsLabelFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLabelFrame.cpp @@ -73,7 +73,9 @@ public: nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, @@ -394,7 +396,9 @@ nsLabelFrame::FindFirstControl(nsIFrame* aParentFrame, nsIFormControlFrame*& aRe NS_IMETHODIMP -nsLabelFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsLabelFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // create our view, we need a view to grab the mouse nsIView* view; @@ -439,7 +443,7 @@ nsLabelFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the body frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_IMETHODIMP diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.cpp b/mozilla/layout/html/forms/src/nsLegendFrame.cpp index af375929443..40d778e7530 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLegendFrame.cpp @@ -87,7 +87,9 @@ nsLegendFrame::QueryInterface(REFNSIID aIID, void** aInstancePtrResult) } NS_IMETHODIMP -nsLegendFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsLegendFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // cache our display type const nsStyleDisplay* styleDisplay; @@ -110,7 +112,7 @@ nsLegendFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the inline frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_IMETHODIMP diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.h b/mozilla/layout/html/forms/src/nsLegendFrame.h index cc78ffe4546..9f7d5d797e0 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.h +++ b/mozilla/layout/html/forms/src/nsLegendFrame.h @@ -37,7 +37,9 @@ public: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Reflow(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp index 41158c8deeb..ffa5697b695 100644 --- a/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp @@ -976,10 +976,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, NS_NewBodyFrame(childContent, aNewFrame, captionFrame, NS_BODY_NO_AUTO_MARGINS); captionFrame->SetStyleContext(aPresContext, childStyleContext); - // Process the caption's child content and initialize it + // Process the caption's child content and set the initial child list nsIFrame* captionChildList; ProcessChildren(aPresContext, captionFrame, childContent, captionChildList); - captionFrame->Init(*aPresContext, captionChildList); + captionFrame->SetInitialChildList(*aPresContext, nsnull, captionChildList); // Prepend the caption frame to the outer frame's child list innerFrame->SetNextSibling(captionFrame); @@ -1011,10 +1011,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, if (nsnull != frame) { frame->SetStyleContext(aPresContext, childStyleContext); - // Process the children, and initialize the frame + // Process the children, and set the frame's initial child list nsIFrame* childChildList; ProcessChildren(aPresContext, frame, childContent, childChildList); - frame->Init(*aPresContext, childChildList); + frame->SetInitialChildList(*aPresContext, nsnull, childChildList); // Link the frame into the child list if (nsnull == lastChildFrame) { @@ -1030,11 +1030,11 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, } } - // Initialize the inner table with its child list - innerFrame->Init(*aPresContext, innerChildList); + // Set the inner table frame's list of initial child frames + innerFrame->SetInitialChildList(*aPresContext, nsnull, innerChildList); - // Initialize the anonymous table outer frame - aNewFrame->Init(*aPresContext, childList); + // Set the anonymous table outer frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); return NS_OK; } @@ -1098,22 +1098,23 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext, pageSequenceFrame->SetStyleContext(aPresContext, pseudoStyle); NS_RELEASE(pseudoStyle); - // Process the child content, and initialize the page sequence frame + // Process the child content, and set the page sequence frame's initial + // child list rv = ProcessChildren(aPresContext, pageSequenceFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - pageSequenceFrame->Init(*aPresContext, childList); + pageSequenceFrame->SetInitialChildList(*aPresContext, nsnull, childList); // Set the root frame's initial child list - aNewFrame->Init(*aPresContext, pageSequenceFrame); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, pageSequenceFrame); } } } else { nsIFrame* childList; - // Process the child content, and initialize the frame + // Process the child content, and set the frame's initial child list rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - aNewFrame->Init(*aPresContext, childList); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } } } @@ -1214,8 +1215,8 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1253,7 +1254,7 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ConstructTableFrame(aPresContext, aContent, aParentFrame, aStyleContext, aNewFrame); // Note: table construction function takes care of setting the style context, - // processing children, and calling Init() + // processing children, and setting the initial child list return rv; case NS_STYLE_DISPLAY_TABLE_ROW_GROUP: @@ -1325,8 +1326,8 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1513,7 +1514,7 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext, // Set the scroll frame's initial child list and return the scroll frame // as the frame sub-tree if (nsnull != scrollFrame) { - scrollFrame->Init(*aPresContext, aFrameSubTree); + scrollFrame->SetInitialChildList(*aPresContext, nsnull, aFrameSubTree); aFrameSubTree = scrollFrame; } } diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 67cff23ba7d..d81bbb49e1b 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -70,7 +70,9 @@ nsTableCellFrame::~nsTableCellFrame() } NS_IMETHODIMP -nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableCellFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // Create body pseudo frame NS_NewBodyFrame(mContent, this, mFirstChild, NS_BODY_NO_AUTO_MARGINS); @@ -88,7 +90,7 @@ nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the block frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.h b/mozilla/layout/html/table/src/nsTableCellFrame.h index f95afa9ec96..d5165901e6b 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.h +++ b/mozilla/layout/html/table/src/nsTableCellFrame.h @@ -53,7 +53,9 @@ public: // nsISupports NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp index 3afd1e782cd..232324fcded 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp @@ -108,7 +108,7 @@ nsTableColGroupFrame::InitNewFrames(nsIPresContext& aPresContext, nsIFrame* aChi nsIStyleContextPtr colStyleContext = aPresContext.ResolveStyleContextFor(col, mStyleContext, PR_TRUE); colFrame->SetStyleContext(&aPresContext, colStyleContext); - colFrame->Init(aPresContext, nsnull); + colFrame->SetInitialChildList(aPresContext, nsnull, nsnull); // Set nsColFrame-specific information PRInt32 absColIndex = mStartColIndex + colIndex; @@ -159,7 +159,9 @@ nsTableColGroupFrame::AppendNewFrames(nsIPresContext& aPresContext, nsIFrame* aC } NS_IMETHODIMP -nsTableColGroupFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableColGroupFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult result = AppendNewFrames(aPresContext, aChildList); if (NS_OK==result) diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.h b/mozilla/layout/html/table/src/nsTableColGroupFrame.h index 8142dd81d51..3a999187ec0 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.h +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.h @@ -45,7 +45,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index fa0001a9da4..ad343f0daf5 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -300,7 +300,9 @@ nsTableFrame::~nsTableFrame() } NS_IMETHODIMP -nsTableFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv=NS_OK; mFirstChild = aChildList; @@ -740,7 +742,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) nsIStyleContextPtr colStyleContext = aPresContext.ResolveStyleContextFor(col, lastColGroupStyle, PR_TRUE); colFrame->SetStyleContext(&aPresContext, colStyleContext); - colFrame->Init(aPresContext, nsnull); + colFrame->SetInitialChildList(aPresContext, nsnull, nsnull); // XXX Don't release this style context (or we'll end up with a double-free).\ // This code is doing what nsTableColGroupFrame::Reflow() does... @@ -755,7 +757,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) lastNewColFrame = colFrame; NS_RELEASE(col); // ADDREF: col-- } - lastColGroupFrame->Init(aPresContext, firstNewColFrame); + lastColGroupFrame->SetInitialChildList(aPresContext, nsnull, firstNewColFrame); NS_RELEASE(lastColGroup); // ADDREF: lastColGroup-- } } diff --git a/mozilla/layout/html/table/src/nsTableFrame.h b/mozilla/layout/html/table/src/nsTableFrame.h index c72cfe96e53..c2cc7233f0a 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.h +++ b/mozilla/layout/html/table/src/nsTableFrame.h @@ -92,7 +92,9 @@ public: */ PRBool IsRowGroup(PRInt32 aDisplayType); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** complete the append of aRowGroupFrame to the table * this builds the cell map diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index 39a0236c45c..c0316715c83 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -105,7 +105,9 @@ nsTableOuterFrame::nsTableOuterFrame(nsIContent* aContent, nsIFrame* aParentFram { } -NS_IMETHODIMP nsTableOuterFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +NS_IMETHODIMP nsTableOuterFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.h b/mozilla/layout/html/table/src/nsTableOuterFrame.h index b49e7285ddb..94fbbe1c75d 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.h +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.h @@ -50,7 +50,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 34f5080d11e..59d28573d6c 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -98,7 +98,9 @@ nsTableRowFrame::~nsTableRowFrame() } NS_IMETHODIMP -nsTableRowFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableRowFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; return NS_OK; diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.h b/mozilla/layout/html/table/src/nsTableRowFrame.h index 707a21c9bff..3d50a3d4838 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.h +++ b/mozilla/layout/html/table/src/nsTableRowFrame.h @@ -58,7 +58,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 22c06a2bdd0..470ab0bcb09 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -155,7 +155,9 @@ NS_METHOD nsTableRowGroupFrame::GetMaxColumns(PRInt32 &aMaxColumns) const NS_IMETHODIMP -nsTableRowGroupFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableRowGroupFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; return NS_OK; diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.h b/mozilla/layout/html/table/src/nsTableRowGroupFrame.h index ced1854afc7..2456c8afc1c 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.h +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.h @@ -52,7 +52,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index 41158c8deeb..ffa5697b695 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp @@ -976,10 +976,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, NS_NewBodyFrame(childContent, aNewFrame, captionFrame, NS_BODY_NO_AUTO_MARGINS); captionFrame->SetStyleContext(aPresContext, childStyleContext); - // Process the caption's child content and initialize it + // Process the caption's child content and set the initial child list nsIFrame* captionChildList; ProcessChildren(aPresContext, captionFrame, childContent, captionChildList); - captionFrame->Init(*aPresContext, captionChildList); + captionFrame->SetInitialChildList(*aPresContext, nsnull, captionChildList); // Prepend the caption frame to the outer frame's child list innerFrame->SetNextSibling(captionFrame); @@ -1011,10 +1011,10 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, if (nsnull != frame) { frame->SetStyleContext(aPresContext, childStyleContext); - // Process the children, and initialize the frame + // Process the children, and set the frame's initial child list nsIFrame* childChildList; ProcessChildren(aPresContext, frame, childContent, childChildList); - frame->Init(*aPresContext, childChildList); + frame->SetInitialChildList(*aPresContext, nsnull, childChildList); // Link the frame into the child list if (nsnull == lastChildFrame) { @@ -1030,11 +1030,11 @@ HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext* aPresContext, } } - // Initialize the inner table with its child list - innerFrame->Init(*aPresContext, innerChildList); + // Set the inner table frame's list of initial child frames + innerFrame->SetInitialChildList(*aPresContext, nsnull, innerChildList); - // Initialize the anonymous table outer frame - aNewFrame->Init(*aPresContext, childList); + // Set the anonymous table outer frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); return NS_OK; } @@ -1098,22 +1098,23 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext, pageSequenceFrame->SetStyleContext(aPresContext, pseudoStyle); NS_RELEASE(pseudoStyle); - // Process the child content, and initialize the page sequence frame + // Process the child content, and set the page sequence frame's initial + // child list rv = ProcessChildren(aPresContext, pageSequenceFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - pageSequenceFrame->Init(*aPresContext, childList); + pageSequenceFrame->SetInitialChildList(*aPresContext, nsnull, childList); // Set the root frame's initial child list - aNewFrame->Init(*aPresContext, pageSequenceFrame); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, pageSequenceFrame); } } } else { nsIFrame* childList; - // Process the child content, and initialize the frame + // Process the child content, and set the frame's initial child list rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); if (NS_SUCCEEDED(rv)) { - aNewFrame->Init(*aPresContext, childList); + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } } } @@ -1214,8 +1215,8 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1253,7 +1254,7 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ConstructTableFrame(aPresContext, aContent, aParentFrame, aStyleContext, aNewFrame); // Note: table construction function takes care of setting the style context, - // processing children, and calling Init() + // processing children, and setting the initial child list return rv; case NS_STYLE_DISPLAY_TABLE_ROW_GROUP: @@ -1325,8 +1326,8 @@ HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext* aPresContext, rv = ProcessChildren(aPresContext, aNewFrame, aContent, childList); } - // Initialize the frame - aNewFrame->Init(*aPresContext, childList); + // Set the frame's initial child list + aNewFrame->SetInitialChildList(*aPresContext, nsnull, childList); } return rv; @@ -1513,7 +1514,7 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext, // Set the scroll frame's initial child list and return the scroll frame // as the frame sub-tree if (nsnull != scrollFrame) { - scrollFrame->Init(*aPresContext, aFrameSubTree); + scrollFrame->SetInitialChildList(*aPresContext, nsnull, aFrameSubTree); aFrameSubTree = scrollFrame; } } diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 67cff23ba7d..d81bbb49e1b 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -70,7 +70,9 @@ nsTableCellFrame::~nsTableCellFrame() } NS_IMETHODIMP -nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableCellFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { // Create body pseudo frame NS_NewBodyFrame(mContent, this, mFirstChild, NS_BODY_NO_AUTO_MARGINS); @@ -88,7 +90,7 @@ nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) } // Queue up the frames for the block frame - return mFirstChild->Init(aPresContext, aChildList); + return mFirstChild->SetInitialChildList(aPresContext, nsnull, aChildList); } NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/tables/nsTableCellFrame.h b/mozilla/layout/tables/nsTableCellFrame.h index f95afa9ec96..d5165901e6b 100644 --- a/mozilla/layout/tables/nsTableCellFrame.h +++ b/mozilla/layout/tables/nsTableCellFrame.h @@ -53,7 +53,9 @@ public: // nsISupports NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/tables/nsTableColGroupFrame.cpp b/mozilla/layout/tables/nsTableColGroupFrame.cpp index 3afd1e782cd..232324fcded 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableColGroupFrame.cpp @@ -108,7 +108,7 @@ nsTableColGroupFrame::InitNewFrames(nsIPresContext& aPresContext, nsIFrame* aChi nsIStyleContextPtr colStyleContext = aPresContext.ResolveStyleContextFor(col, mStyleContext, PR_TRUE); colFrame->SetStyleContext(&aPresContext, colStyleContext); - colFrame->Init(aPresContext, nsnull); + colFrame->SetInitialChildList(aPresContext, nsnull, nsnull); // Set nsColFrame-specific information PRInt32 absColIndex = mStartColIndex + colIndex; @@ -159,7 +159,9 @@ nsTableColGroupFrame::AppendNewFrames(nsIPresContext& aPresContext, nsIFrame* aC } NS_IMETHODIMP -nsTableColGroupFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableColGroupFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult result = AppendNewFrames(aPresContext, aChildList); if (NS_OK==result) diff --git a/mozilla/layout/tables/nsTableColGroupFrame.h b/mozilla/layout/tables/nsTableColGroupFrame.h index 8142dd81d51..3a999187ec0 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.h +++ b/mozilla/layout/tables/nsTableColGroupFrame.h @@ -45,7 +45,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index fa0001a9da4..ad343f0daf5 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -300,7 +300,9 @@ nsTableFrame::~nsTableFrame() } NS_IMETHODIMP -nsTableFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { nsresult rv=NS_OK; mFirstChild = aChildList; @@ -740,7 +742,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) nsIStyleContextPtr colStyleContext = aPresContext.ResolveStyleContextFor(col, lastColGroupStyle, PR_TRUE); colFrame->SetStyleContext(&aPresContext, colStyleContext); - colFrame->Init(aPresContext, nsnull); + colFrame->SetInitialChildList(aPresContext, nsnull, nsnull); // XXX Don't release this style context (or we'll end up with a double-free).\ // This code is doing what nsTableColGroupFrame::Reflow() does... @@ -755,7 +757,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) lastNewColFrame = colFrame; NS_RELEASE(col); // ADDREF: col-- } - lastColGroupFrame->Init(aPresContext, firstNewColFrame); + lastColGroupFrame->SetInitialChildList(aPresContext, nsnull, firstNewColFrame); NS_RELEASE(lastColGroup); // ADDREF: lastColGroup-- } } diff --git a/mozilla/layout/tables/nsTableFrame.h b/mozilla/layout/tables/nsTableFrame.h index c72cfe96e53..c2cc7233f0a 100644 --- a/mozilla/layout/tables/nsTableFrame.h +++ b/mozilla/layout/tables/nsTableFrame.h @@ -92,7 +92,9 @@ public: */ PRBool IsRowGroup(PRInt32 aDisplayType); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** complete the append of aRowGroupFrame to the table * this builds the cell map diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 39a0236c45c..c0316715c83 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -105,7 +105,9 @@ nsTableOuterFrame::nsTableOuterFrame(nsIContent* aContent, nsIFrame* aParentFram { } -NS_IMETHODIMP nsTableOuterFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +NS_IMETHODIMP nsTableOuterFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; diff --git a/mozilla/layout/tables/nsTableOuterFrame.h b/mozilla/layout/tables/nsTableOuterFrame.h index b49e7285ddb..94fbbe1c75d 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.h +++ b/mozilla/layout/tables/nsTableOuterFrame.h @@ -50,7 +50,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 34f5080d11e..59d28573d6c 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -98,7 +98,9 @@ nsTableRowFrame::~nsTableRowFrame() } NS_IMETHODIMP -nsTableRowFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableRowFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; return NS_OK; diff --git a/mozilla/layout/tables/nsTableRowFrame.h b/mozilla/layout/tables/nsTableRowFrame.h index 707a21c9bff..3d50a3d4838 100644 --- a/mozilla/layout/tables/nsTableRowFrame.h +++ b/mozilla/layout/tables/nsTableRowFrame.h @@ -58,7 +58,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext, diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 22c06a2bdd0..470ab0bcb09 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -155,7 +155,9 @@ NS_METHOD nsTableRowGroupFrame::GetMaxColumns(PRInt32 &aMaxColumns) const NS_IMETHODIMP -nsTableRowGroupFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList) +nsTableRowGroupFrame::SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList) { mFirstChild = aChildList; return NS_OK; diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.h b/mozilla/layout/tables/nsTableRowGroupFrame.h index ced1854afc7..2456c8afc1c 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.h +++ b/mozilla/layout/tables/nsTableRowGroupFrame.h @@ -52,7 +52,9 @@ public: nsIFrame* aParentFrame, nsIFrame*& aResult); - NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList); + NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, + nsIAtom* aListName, + nsIFrame* aChildList); /** @see nsIFrame::Paint */ NS_IMETHOD Paint(nsIPresContext& aPresContext,