diff --git a/layout/base/public/nsIFrame.h b/layout/base/public/nsIFrame.h index b5fc702c949e..9c60e385289e 100644 --- a/layout/base/public/nsIFrame.h +++ b/layout/base/public/nsIFrame.h @@ -537,7 +537,7 @@ public: * Flow member functions. CreateContinuingFrame() is responsible for * appending the continuing frame to the flow. */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) = 0; diff --git a/layout/base/src/nsContainerFrame.cpp b/layout/base/src/nsContainerFrame.cpp index 7bf5175d0b1f..0f7e40f72fcf 100644 --- a/layout/base/src/nsContainerFrame.cpp +++ b/layout/base/src/nsContainerFrame.cpp @@ -78,7 +78,7 @@ nsContainerFrame::SizeOfWithoutThis(nsISizeOfHandler* aHandler) const } void -nsContainerFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, +nsContainerFrame::PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsContainerFrame* aContFrame) @@ -94,17 +94,17 @@ nsContainerFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, aContFrame->mLastContentOffset = nextOffset; aContFrame->mLastContentIsComplete = PR_TRUE; - aContFrame->SetStyleContext(aPresContext, aStyleContext); + aContFrame->SetStyleContext(&aPresContext, aStyleContext); } NS_METHOD -nsContainerFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsContainerFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) { - nsIContentDelegate* contentDelegate = mContent->GetDelegate(aPresContext); - nsresult rv = contentDelegate->CreateFrame(aPresContext, mContent, aParent, + nsIContentDelegate* contentDelegate = mContent->GetDelegate(&aPresContext); + nsresult rv = contentDelegate->CreateFrame(&aPresContext, mContent, aParent, aStyleContext, aContinuingFrame); NS_RELEASE(contentDelegate); if (NS_OK == rv) { diff --git a/layout/base/src/nsContainerFrame.h b/layout/base/src/nsContainerFrame.h index c70fa2acbe0a..301a3fe0921c 100644 --- a/layout/base/src/nsContainerFrame.h +++ b/layout/base/src/nsContainerFrame.h @@ -113,7 +113,7 @@ public: * set the content offsets, mLastContentOffset, and append the continuing * frame to the flow. */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); @@ -205,7 +205,7 @@ protected: * and style context. Subclasses should invoke this method after * construction of a continuing frame. */ - void PrepareContinuingFrame(nsIPresContext* aPresContext, + void PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsContainerFrame* aContFrame); diff --git a/layout/base/src/nsFrame.cpp b/layout/base/src/nsFrame.cpp index 2a5a5ece3fdf..5cb33ce84cf9 100644 --- a/layout/base/src/nsFrame.cpp +++ b/layout/base/src/nsFrame.cpp @@ -1141,7 +1141,7 @@ NS_METHOD nsFrame::IsSplittable(nsSplittableType& aIsSplittable) const return NS_OK; } -NS_METHOD nsFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +NS_METHOD nsFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/base/src/nsFrame.h b/layout/base/src/nsFrame.h index 18b834038277..d4315d99a22d 100644 --- a/layout/base/src/nsFrame.h +++ b/layout/base/src/nsFrame.h @@ -177,7 +177,7 @@ public: NS_IMETHOD GetReflowMetrics(nsIPresContext& aPresContext, nsReflowMetrics& aMetrics); NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/base/src/nsSplittableFrame.cpp b/layout/base/src/nsSplittableFrame.cpp index 22e79414a06b..ba660023cb4f 100644 --- a/layout/base/src/nsSplittableFrame.cpp +++ b/layout/base/src/nsSplittableFrame.cpp @@ -70,14 +70,14 @@ nsSplittableFrame::IsSplittable(nsSplittableType& aIsSplittable) const * @return the continuing frame or null if unsuccessful */ NS_METHOD -nsSplittableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsSplittableFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) { - nsIContentDelegate* contentDelegate = mContent->GetDelegate(aPresContext); + nsIContentDelegate* contentDelegate = mContent->GetDelegate(&aPresContext); - nsresult rv = contentDelegate->CreateFrame(aPresContext, mContent, aParent, + nsresult rv = contentDelegate->CreateFrame(&aPresContext, mContent, aParent, aStyleContext, aContinuingFrame); NS_RELEASE(contentDelegate); if (NS_OK != rv) { @@ -91,8 +91,8 @@ nsSplittableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, // Resolve style for the continuing frame and set its style context. nsIStyleContext* styleContext = - aPresContext->ResolveStyleContextFor(mContent, aParent); - aContinuingFrame->SetStyleContext(aPresContext,styleContext); + aPresContext.ResolveStyleContextFor(mContent, aParent); + aContinuingFrame->SetStyleContext(&aPresContext,styleContext); NS_RELEASE(styleContext); return rv; diff --git a/layout/base/src/nsSplittableFrame.h b/layout/base/src/nsSplittableFrame.h index 2c26a6c2b9da..717a0055e228 100644 --- a/layout/base/src/nsSplittableFrame.h +++ b/layout/base/src/nsSplittableFrame.h @@ -28,7 +28,7 @@ public: // CreateContinuingFrame() does the default behavior of using the // content delegate to create a new frame NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/css/layout/src/nsCSSBlockFrame.cpp b/layout/css/layout/src/nsCSSBlockFrame.cpp index 7f21c43dcd65..e425fddf4fab 100644 --- a/layout/css/layout/src/nsCSSBlockFrame.cpp +++ b/layout/css/layout/src/nsCSSBlockFrame.cpp @@ -113,7 +113,7 @@ public: NS_IMETHOD PrevChild(const nsIFrame* aChild, nsIFrame*& aPrevChild) const; NS_IMETHOD LastChild(nsIFrame*& aLastChild) const; NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); @@ -938,7 +938,7 @@ nsCSSBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const } NS_IMETHODIMP -nsCSSBlockFrame::CreateContinuingFrame(nsIPresContext* aCX, +nsCSSBlockFrame::CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/css/layout/src/nsCSSInlineFrame.cpp b/layout/css/layout/src/nsCSSInlineFrame.cpp index 95180493ac84..520aa77d1df7 100644 --- a/layout/css/layout/src/nsCSSInlineFrame.cpp +++ b/layout/css/layout/src/nsCSSInlineFrame.cpp @@ -143,7 +143,7 @@ nsCSSInlineFrame::GetSkipSides() const } NS_IMETHODIMP -nsCSSInlineFrame::CreateContinuingFrame(nsIPresContext* aCX, +nsCSSInlineFrame::CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/css/layout/src/nsCSSInlineFrame.h b/layout/css/layout/src/nsCSSInlineFrame.h index 86a0bb6c0757..e95c0f2b0841 100644 --- a/layout/css/layout/src/nsCSSInlineFrame.h +++ b/layout/css/layout/src/nsCSSInlineFrame.h @@ -62,7 +62,7 @@ public: NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); // nsIFrame - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aCX, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/css/layout/src/nsCSSInlineLayout.cpp b/layout/css/layout/src/nsCSSInlineLayout.cpp index 26a3d6f2e604..59fe9ffd06f8 100644 --- a/layout/css/layout/src/nsCSSInlineLayout.cpp +++ b/layout/css/layout/src/nsCSSInlineLayout.cpp @@ -430,7 +430,7 @@ nsCSSInlineLayout::MaybeCreateNextInFlow(nsIFrame* aFrame, aFrame->GetNextSibling(nextFrame); nsIStyleContext* kidSC; aFrame->GetStyleContext(mLineLayout.mPresContext, kidSC); - aFrame->CreateContinuingFrame(mLineLayout.mPresContext, mContainerFrame, + aFrame->CreateContinuingFrame(*mLineLayout.mPresContext, mContainerFrame, kidSC, nextInFlow); NS_RELEASE(kidSC); if (nsnull == nextInFlow) { diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index b5fc702c949e..9c60e385289e 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -537,7 +537,7 @@ public: * Flow member functions. CreateContinuingFrame() is responsible for * appending the continuing frame to the flow. */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) = 0; diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 302aa07dea48..9f620e9c0c69 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -122,7 +122,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, // Create a continuing child of the previous page's last child nsIStyleContext* kidSC; prevLastChild->GetStyleContext(&aPresContext, kidSC); - nsresult rv = prevLastChild->CreateContinuingFrame(&aPresContext, this, + nsresult rv = prevLastChild->CreateContinuingFrame(aPresContext, this, kidSC, mFirstChild); NS_RELEASE(kidSC); @@ -178,7 +178,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsPageFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsPageFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/generic/nsPageFrame.h b/layout/generic/nsPageFrame.h index 283b9ca15117..4f40b3650886 100644 --- a/layout/generic/nsPageFrame.h +++ b/layout/generic/nsPageFrame.h @@ -30,7 +30,7 @@ public: const nsReflowState& aMaxSize, nsReflowStatus& aStatus); - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aCX, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/base/src/nsBodyFrame.cpp b/layout/html/base/src/nsBodyFrame.cpp index acd411aef06e..e774ea47b24c 100644 --- a/layout/html/base/src/nsBodyFrame.cpp +++ b/layout/html/base/src/nsBodyFrame.cpp @@ -266,7 +266,7 @@ NS_METHOD nsBodyFrame::ContentDeleted(nsIPresShell* aShell, } NS_METHOD -nsBodyFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsBodyFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) @@ -301,7 +301,7 @@ void nsBodyFrame::CreateColumnFrame(nsIPresContext* aPresContext) NS_ASSERTION(prevBody->ChildIsPseudoFrame(prevColumn), "bad previous column"); - prevColumn->CreateContinuingFrame(aPresContext, this, styleContext, + prevColumn->CreateContinuingFrame(*aPresContext, this, styleContext, mFirstChild); mChildCount = 1; } diff --git a/layout/html/base/src/nsBodyFrame.h b/layout/html/base/src/nsBodyFrame.h index b190ab86e77f..fbf5df90fa78 100644 --- a/layout/html/base/src/nsBodyFrame.h +++ b/layout/html/base/src/nsBodyFrame.h @@ -60,7 +60,7 @@ public: nsIContent* aChild, PRInt32 aIndexInParent); - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/base/src/nsHTMLBase.cpp b/layout/html/base/src/nsHTMLBase.cpp index 6eb014310803..496680287384 100644 --- a/layout/html/base/src/nsHTMLBase.cpp +++ b/layout/html/base/src/nsHTMLBase.cpp @@ -187,7 +187,7 @@ nsHTMLBase::CreateFrame(nsIPresContext* aPresContext, } else { // Since kid has a prev-in-flow, use that to create the next // frame. - rv = aKidPrevInFlow->CreateContinuingFrame(aPresContext, aParentFrame, + rv = aKidPrevInFlow->CreateContinuingFrame(*aPresContext, aParentFrame, kidSC, kidFrame); } diff --git a/layout/html/base/src/nsPageFrame.cpp b/layout/html/base/src/nsPageFrame.cpp index 302aa07dea48..9f620e9c0c69 100644 --- a/layout/html/base/src/nsPageFrame.cpp +++ b/layout/html/base/src/nsPageFrame.cpp @@ -122,7 +122,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, // Create a continuing child of the previous page's last child nsIStyleContext* kidSC; prevLastChild->GetStyleContext(&aPresContext, kidSC); - nsresult rv = prevLastChild->CreateContinuingFrame(&aPresContext, this, + nsresult rv = prevLastChild->CreateContinuingFrame(aPresContext, this, kidSC, mFirstChild); NS_RELEASE(kidSC); @@ -178,7 +178,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsPageFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsPageFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/html/base/src/nsPageFrame.h b/layout/html/base/src/nsPageFrame.h index 283b9ca15117..4f40b3650886 100644 --- a/layout/html/base/src/nsPageFrame.h +++ b/layout/html/base/src/nsPageFrame.h @@ -30,7 +30,7 @@ public: const nsReflowState& aMaxSize, nsReflowStatus& aStatus); - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aCX, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aCX, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/base/src/nsRootPart.cpp b/layout/html/base/src/nsRootPart.cpp index 340f225916bd..ca7658f2b8b6 100644 --- a/layout/html/base/src/nsRootPart.cpp +++ b/layout/html/base/src/nsRootPart.cpp @@ -399,7 +399,7 @@ NS_METHOD RootContentFrame::Reflow(nsIPresContext& aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(&aPresContext, kidSC); nsIFrame* continuingPage; - nsresult rv = kidFrame->CreateContinuingFrame(&aPresContext, this, + nsresult rv = kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingPage); NS_RELEASE(kidSC); reflowReason = eReflowReason_Initial; diff --git a/layout/html/base/src/nsScrollFrame.cpp b/layout/html/base/src/nsScrollFrame.cpp index 8fe45b5d48d8..5656e2388179 100644 --- a/layout/html/base/src/nsScrollFrame.cpp +++ b/layout/html/base/src/nsScrollFrame.cpp @@ -195,7 +195,7 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(&aPresContext, kidSC); nsIFrame* continuingPage; - nsresult rv = kidFrame->CreateContinuingFrame(&aPresContext, this, + nsresult rv = kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingPage); NS_RELEASE(kidSC); diff --git a/layout/html/table/src/nsTableCellFrame.cpp b/layout/html/table/src/nsTableCellFrame.cpp index 9f895006e69f..136c4588a388 100644 --- a/layout/html/table/src/nsTableCellFrame.cpp +++ b/layout/html/table/src/nsTableCellFrame.cpp @@ -181,7 +181,7 @@ void nsTableCellFrame::CreatePsuedoFrame(nsIPresContext* aPresContext) // Create a continuing column nsIStyleContext* kidSC; prevPseudoFrame->GetStyleContext(aPresContext, kidSC); - prevPseudoFrame->CreateContinuingFrame(aPresContext, this, kidSC, mFirstChild); + prevPseudoFrame->CreateContinuingFrame(*aPresContext, this, kidSC, mFirstChild); NS_RELEASE(kidSC); mChildCount = 1; } @@ -390,7 +390,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableCellFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableCellFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/html/table/src/nsTableCellFrame.h b/layout/html/table/src/nsTableCellFrame.h index 9011c0cd9104..9a5d1a959f26 100644 --- a/layout/html/table/src/nsTableCellFrame.h +++ b/layout/html/table/src/nsTableCellFrame.h @@ -62,7 +62,7 @@ public: /** * @see nsContainerFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index bebd75ee3d0b..926c0ed2edd8 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -1758,7 +1758,7 @@ PRBool nsTableFrame::ReflowMappedChildren( nsIPresContext* aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -2005,7 +2005,7 @@ PRBool nsTableFrame::PullUpChildren(nsIPresContext* aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -2138,7 +2138,7 @@ nsTableFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, kidStyleContext, kidFrame); NS_RELEASE(kidDel); } else { - kidPrevInFlow->CreateContinuingFrame(aPresContext, this, kidStyleContext, + kidPrevInFlow->CreateContinuingFrame(*aPresContext, this, kidStyleContext, kidFrame); } @@ -2570,7 +2570,7 @@ PRBool nsTableFrame::IsFirstPassValid() const } NS_METHOD -nsTableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) @@ -2606,11 +2606,11 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, printf("found a head or foot in continuing frame\n"); // Resolve style for the child nsIStyleContext* kidStyleContext = - aPresContext->ResolveStyleContextFor(content, cf); // kidStyleContext: REFCNT++ + aPresContext.ResolveStyleContextFor(content, cf); // kidStyleContext: REFCNT++ nsIContentDelegate* kidDel = nsnull; - kidDel = content->GetDelegate(aPresContext); // kidDel: REFCNT++ + kidDel = content->GetDelegate(&aPresContext); // kidDel: REFCNT++ nsIFrame* duplicateFrame; - nsresult rv = kidDel->CreateFrame(aPresContext, content, cf, + nsresult rv = kidDel->CreateFrame(&aPresContext, content, cf, kidStyleContext, duplicateFrame); NS_RELEASE(kidDel); // kidDel: REFCNT-- NS_RELEASE(kidStyleContext); // kidStyleContenxt: REFCNT-- diff --git a/layout/html/table/src/nsTableFrame.h b/layout/html/table/src/nsTableFrame.h index 3eff1efc8698..c59004e4dddc 100644 --- a/layout/html/table/src/nsTableFrame.h +++ b/layout/html/table/src/nsTableFrame.h @@ -110,7 +110,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/table/src/nsTableOuterFrame.cpp b/layout/html/table/src/nsTableOuterFrame.cpp index 1f3057358c7a..77ead9178b56 100644 --- a/layout/html/table/src/nsTableOuterFrame.cpp +++ b/layout/html/table/src/nsTableOuterFrame.cpp @@ -655,7 +655,7 @@ nsresult nsTableOuterFrame::CreateChildFrames(nsIPresContext* aPresContext) } NS_METHOD -nsTableOuterFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableOuterFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) @@ -672,7 +672,7 @@ nsTableOuterFrame::CreateContinuingFrame(nsIPresContext* aPresContext, } void -nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, +nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsTableOuterFrame* aContFrame) @@ -696,7 +696,7 @@ nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, aContFrame->SetFirstContentOffset(nextOffset); aContFrame->SetLastContentOffset(nextOffset); aContFrame->SetLastContentIsComplete(PR_TRUE); - aContFrame->SetStyleContext(aPresContext, aStyleContext); + aContFrame->SetStyleContext(&aPresContext, aStyleContext); } NS_METHOD nsTableOuterFrame::VerifyTree() const @@ -837,7 +837,7 @@ nsresult nsTableOuterFrame::CreateInnerTableFrame(nsIPresContext* aPresContext, nsIStyleContextPtr kidSC; prevInnerTable->GetStyleContext(aPresContext, kidSC.AssignRef()); - prevInnerTable->CreateContinuingFrame(aPresContext, this, kidSC, + prevInnerTable->CreateContinuingFrame(*aPresContext, this, kidSC, (nsIFrame*&)aTableFrame); if (nsnull == aTableFrame) { return NS_ERROR_OUT_OF_MEMORY; diff --git a/layout/html/table/src/nsTableOuterFrame.h b/layout/html/table/src/nsTableOuterFrame.h index d6c064c9eee7..8acdf8212705 100644 --- a/layout/html/table/src/nsTableOuterFrame.h +++ b/layout/html/table/src/nsTableOuterFrame.h @@ -60,7 +60,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); @@ -98,7 +98,7 @@ protected: /** overridden here to handle special caption-table relationship * @see nsContainerFrame::PrepareContinuingFrame */ - void PrepareContinuingFrame(nsIPresContext* aPresContext, + void PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsTableOuterFrame* aContFrame); diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index e5a9d376e237..66916ec8a088 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -864,7 +864,7 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableRowFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableRowFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/html/table/src/nsTableRowFrame.h b/layout/html/table/src/nsTableRowFrame.h index d932bd8e0f38..16c2d485e2b9 100644 --- a/layout/html/table/src/nsTableRowFrame.h +++ b/layout/html/table/src/nsTableRowFrame.h @@ -87,7 +87,7 @@ public: nsDidReflowStatus aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/html/table/src/nsTableRowGroupFrame.cpp b/layout/html/table/src/nsTableRowGroupFrame.cpp index 6b2fd6b1781a..715d2e264651 100644 --- a/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -367,7 +367,7 @@ if (gsDebug) printf("\n\nREFLOWMAPPED FOR ROW GROUP FRAME\n"); nsIFrame* continuingFrame; nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); @@ -607,7 +607,7 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -768,7 +768,7 @@ nsTableRowGroupFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, kidFrame); NS_RELEASE(kidDel); } else { - kidPrevInFlow->CreateContinuingFrame(aPresContext, this, kidSC, + kidPrevInFlow->CreateContinuingFrame(*aPresContext, this, kidSC, kidFrame); } @@ -1169,7 +1169,7 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableRowGroupFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableRowGroupFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/html/table/src/nsTableRowGroupFrame.h b/layout/html/table/src/nsTableRowGroupFrame.h index 888a1bce73b9..876765538a68 100644 --- a/layout/html/table/src/nsTableRowGroupFrame.h +++ b/layout/html/table/src/nsTableRowGroupFrame.h @@ -77,7 +77,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 9f895006e69f..136c4588a388 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -181,7 +181,7 @@ void nsTableCellFrame::CreatePsuedoFrame(nsIPresContext* aPresContext) // Create a continuing column nsIStyleContext* kidSC; prevPseudoFrame->GetStyleContext(aPresContext, kidSC); - prevPseudoFrame->CreateContinuingFrame(aPresContext, this, kidSC, mFirstChild); + prevPseudoFrame->CreateContinuingFrame(*aPresContext, this, kidSC, mFirstChild); NS_RELEASE(kidSC); mChildCount = 1; } @@ -390,7 +390,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableCellFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableCellFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 9011c0cd9104..9a5d1a959f26 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -62,7 +62,7 @@ public: /** * @see nsContainerFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index bebd75ee3d0b..926c0ed2edd8 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1758,7 +1758,7 @@ PRBool nsTableFrame::ReflowMappedChildren( nsIPresContext* aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -2005,7 +2005,7 @@ PRBool nsTableFrame::PullUpChildren(nsIPresContext* aPresContext, nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -2138,7 +2138,7 @@ nsTableFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, kidStyleContext, kidFrame); NS_RELEASE(kidDel); } else { - kidPrevInFlow->CreateContinuingFrame(aPresContext, this, kidStyleContext, + kidPrevInFlow->CreateContinuingFrame(*aPresContext, this, kidStyleContext, kidFrame); } @@ -2570,7 +2570,7 @@ PRBool nsTableFrame::IsFirstPassValid() const } NS_METHOD -nsTableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) @@ -2606,11 +2606,11 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext* aPresContext, printf("found a head or foot in continuing frame\n"); // Resolve style for the child nsIStyleContext* kidStyleContext = - aPresContext->ResolveStyleContextFor(content, cf); // kidStyleContext: REFCNT++ + aPresContext.ResolveStyleContextFor(content, cf); // kidStyleContext: REFCNT++ nsIContentDelegate* kidDel = nsnull; - kidDel = content->GetDelegate(aPresContext); // kidDel: REFCNT++ + kidDel = content->GetDelegate(&aPresContext); // kidDel: REFCNT++ nsIFrame* duplicateFrame; - nsresult rv = kidDel->CreateFrame(aPresContext, content, cf, + nsresult rv = kidDel->CreateFrame(&aPresContext, content, cf, kidStyleContext, duplicateFrame); NS_RELEASE(kidDel); // kidDel: REFCNT-- NS_RELEASE(kidStyleContext); // kidStyleContenxt: REFCNT-- diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 3eff1efc8698..c59004e4dddc 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -110,7 +110,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 1f3057358c7a..77ead9178b56 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -655,7 +655,7 @@ nsresult nsTableOuterFrame::CreateChildFrames(nsIPresContext* aPresContext) } NS_METHOD -nsTableOuterFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableOuterFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) @@ -672,7 +672,7 @@ nsTableOuterFrame::CreateContinuingFrame(nsIPresContext* aPresContext, } void -nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, +nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsTableOuterFrame* aContFrame) @@ -696,7 +696,7 @@ nsTableOuterFrame::PrepareContinuingFrame(nsIPresContext* aPresContext, aContFrame->SetFirstContentOffset(nextOffset); aContFrame->SetLastContentOffset(nextOffset); aContFrame->SetLastContentIsComplete(PR_TRUE); - aContFrame->SetStyleContext(aPresContext, aStyleContext); + aContFrame->SetStyleContext(&aPresContext, aStyleContext); } NS_METHOD nsTableOuterFrame::VerifyTree() const @@ -837,7 +837,7 @@ nsresult nsTableOuterFrame::CreateInnerTableFrame(nsIPresContext* aPresContext, nsIStyleContextPtr kidSC; prevInnerTable->GetStyleContext(aPresContext, kidSC.AssignRef()); - prevInnerTable->CreateContinuingFrame(aPresContext, this, kidSC, + prevInnerTable->CreateContinuingFrame(*aPresContext, this, kidSC, (nsIFrame*&)aTableFrame); if (nsnull == aTableFrame) { return NS_ERROR_OUT_OF_MEMORY; diff --git a/layout/tables/nsTableOuterFrame.h b/layout/tables/nsTableOuterFrame.h index d6c064c9eee7..8acdf8212705 100644 --- a/layout/tables/nsTableOuterFrame.h +++ b/layout/tables/nsTableOuterFrame.h @@ -60,7 +60,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); @@ -98,7 +98,7 @@ protected: /** overridden here to handle special caption-table relationship * @see nsContainerFrame::PrepareContinuingFrame */ - void PrepareContinuingFrame(nsIPresContext* aPresContext, + void PrepareContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsTableOuterFrame* aContFrame); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index e5a9d376e237..66916ec8a088 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -864,7 +864,7 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableRowFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableRowFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index d932bd8e0f38..16c2d485e2b9 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -87,7 +87,7 @@ public: nsDidReflowStatus aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame); diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 6b2fd6b1781a..715d2e264651 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -367,7 +367,7 @@ if (gsDebug) printf("\n\nREFLOWMAPPED FOR ROW GROUP FRAME\n"); nsIFrame* continuingFrame; nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); @@ -607,7 +607,7 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; kidFrame->GetStyleContext(aPresContext, kidSC); - kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, + kidFrame->CreateContinuingFrame(*aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -768,7 +768,7 @@ nsTableRowGroupFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, kidFrame); NS_RELEASE(kidDel); } else { - kidPrevInFlow->CreateContinuingFrame(aPresContext, this, kidSC, + kidPrevInFlow->CreateContinuingFrame(*aPresContext, this, kidSC, kidFrame); } @@ -1169,7 +1169,7 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, } NS_METHOD -nsTableRowGroupFrame::CreateContinuingFrame(nsIPresContext* aPresContext, +nsTableRowGroupFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame) diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h index 888a1bce73b9..876765538a68 100644 --- a/layout/tables/nsTableRowGroupFrame.h +++ b/layout/tables/nsTableRowGroupFrame.h @@ -77,7 +77,7 @@ public: nsReflowStatus& aStatus); /** @see nsContainerFrame::CreateContinuingFrame */ - NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, + NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, nsIFrame*& aContinuingFrame);