From 339afcce8a066ca7d7d2de4fd5aae2cebcbd55f9 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 10 Feb 1999 05:38:18 +0000 Subject: [PATCH] Changed a bunch more nsIFrame member functions to be pointer arguments instead of references git-svn-id: svn://10.0.0.236/trunk@20222 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsGenericElement.cpp | 2 +- .../events/src/nsEventStateManager.cpp | 2 +- .../html/document/src/nsHTMLContentSink.cpp | 2 +- mozilla/layout/base/nsCSSFrameConstructor.cpp | 4 +- mozilla/layout/base/nsPresShell.cpp | 8 +-- mozilla/layout/base/public/nsIFrame.h | 8 +-- .../layout/base/src/nsFrameImageLoader.cpp | 6 +-- mozilla/layout/base/src/nsGenericElement.cpp | 2 +- .../layout/events/src/nsEventStateManager.cpp | 2 +- mozilla/layout/forms/nsFieldSetFrame.cpp | 2 +- mozilla/layout/forms/nsFileControlFrame.cpp | 2 +- mozilla/layout/forms/nsFormControlFrame.cpp | 10 ++-- mozilla/layout/forms/nsFormControlHelper.cpp | 2 +- .../layout/forms/nsHTMLButtonControlFrame.cpp | 10 ++-- mozilla/layout/forms/nsImageControlFrame.cpp | 8 +-- mozilla/layout/generic/nsAreaFrame.cpp | 6 +-- mozilla/layout/generic/nsBlockFrame.cpp | 2 +- mozilla/layout/generic/nsBlockReflowState.cpp | 2 +- mozilla/layout/generic/nsBlockReflowState.h | 2 +- mozilla/layout/generic/nsBulletFrame.cpp | 2 +- mozilla/layout/generic/nsContainerFrame.cpp | 6 +-- mozilla/layout/generic/nsFrame.cpp | 52 ++++++++++--------- mozilla/layout/generic/nsFrame.h | 8 +-- mozilla/layout/generic/nsFrameFrame.cpp | 2 +- mozilla/layout/generic/nsFrameSetFrame.cpp | 10 ++-- .../layout/generic/nsHTMLContainerFrame.cpp | 6 +-- mozilla/layout/generic/nsIFrame.h | 8 +-- mozilla/layout/generic/nsImageFrame.cpp | 10 ++-- mozilla/layout/generic/nsObjectFrame.cpp | 20 +++---- .../layout/generic/nsSimplePageSequence.cpp | 2 +- mozilla/layout/generic/nsTextFrame.cpp | 8 +-- mozilla/layout/generic/nsViewportFrame.cpp | 4 +- mozilla/layout/html/base/src/nsAreaFrame.cpp | 6 +-- mozilla/layout/html/base/src/nsBlockFrame.cpp | 2 +- .../html/base/src/nsBlockReflowState.cpp | 2 +- .../layout/html/base/src/nsBlockReflowState.h | 2 +- .../layout/html/base/src/nsBulletFrame.cpp | 2 +- .../layout/html/base/src/nsContainerFrame.cpp | 6 +-- mozilla/layout/html/base/src/nsFrame.cpp | 52 ++++++++++--------- mozilla/layout/html/base/src/nsFrame.h | 8 +-- .../html/base/src/nsHTMLContainerFrame.cpp | 6 +-- mozilla/layout/html/base/src/nsImageFrame.cpp | 10 ++-- .../layout/html/base/src/nsObjectFrame.cpp | 20 +++---- mozilla/layout/html/base/src/nsPresShell.cpp | 8 +-- .../layout/html/base/src/nsScrollFrame.cpp | 12 ++--- .../html/base/src/nsSimplePageSequence.cpp | 2 +- mozilla/layout/html/base/src/nsTextFrame.cpp | 8 +-- .../layout/html/base/src/nsViewportFrame.cpp | 4 +- .../layout/html/document/src/nsFrameFrame.cpp | 2 +- .../html/document/src/nsFrameSetFrame.cpp | 10 ++-- .../html/document/src/nsHTMLContentSink.cpp | 2 +- .../layout/html/forms/src/nsFieldSetFrame.cpp | 2 +- .../html/forms/src/nsFileControlFrame.cpp | 2 +- .../html/forms/src/nsFormControlFrame.cpp | 10 ++-- .../html/forms/src/nsFormControlHelper.cpp | 2 +- .../forms/src/nsHTMLButtonControlFrame.cpp | 10 ++-- .../html/forms/src/nsImageControlFrame.cpp | 8 +-- .../layout/html/forms/src/nsLabelFrame.cpp | 8 +-- .../html/style/src/nsCSSFrameConstructor.cpp | 4 +- .../layout/html/table/src/nsTableRowFrame.cpp | 2 +- .../html/table/src/nsTableRowGroupFrame.cpp | 2 +- mozilla/layout/tables/nsTableRowFrame.cpp | 2 +- .../layout/tables/nsTableRowGroupFrame.cpp | 2 +- .../xul/base/src/nsProgressMeterFrame.cpp | 2 +- .../layout/xul/base/src/nsTreeCellFrame.cpp | 2 +- 65 files changed, 225 insertions(+), 217 deletions(-) diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index c3060e600c3..c0d8c7af321 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -854,7 +854,7 @@ nsGenericElement::RenderFrame() // XXX We should tell the frame the damage area and let it invalidate // itself. Add some API calls to nsIFrame to allow a caller to invalidate // parts of the frame... - frame->GetOffsetFromView(offset, view); + frame->GetOffsetFromView(offset, &view); view->GetViewManager(vm); bounds.x += offset.x; bounds.y += offset.y; diff --git a/mozilla/content/events/src/nsEventStateManager.cpp b/mozilla/content/events/src/nsEventStateManager.cpp index 69b76a80b0c..de4c8891cab 100644 --- a/mozilla/content/events/src/nsEventStateManager.cpp +++ b/mozilla/content/events/src/nsEventStateManager.cpp @@ -225,7 +225,7 @@ nsEventStateManager::UpdateCursor(nsIPresContext& aPresContext, nsPoint& aPoint, } nsIWidget* window; - aTargetFrame->GetWindow(window); + aTargetFrame->GetWindow(&window); window->SetCursor(c); NS_RELEASE(window); } diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 8eca6f63932..3a9dc631fe7 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -2078,7 +2078,7 @@ HTMLContentSink::ScrollToRef() // coordinates that are relative to that. nsPoint offset; nsIView* view; - frame->GetOffsetFromView(offset, view); + frame->GetOffsetFromView(offset, &view); if (view == rootView) { // XXX write me! // printf("view==rootView "); diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 0c46eb6c2a5..a2e3f2dcb0d 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -3113,11 +3113,11 @@ ApplyRenderingChangeToTree(nsIPresContext* aPresContext, // (adjusting r's coordinate system to reflect the nesting) and // update there. nsIView* view; - aFrame->GetView(view); + aFrame->GetView(&view); if (nsnull != view) { } else { nsPoint offset; - aFrame->GetOffsetFromView(offset, view); + aFrame->GetOffsetFromView(offset, &view); NS_ASSERTION(nsnull != view, "no view"); r += offset; } diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 3a9b7326150..90e08330551 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1056,10 +1056,10 @@ PresShell::CreateRenderingContext(nsIFrame *aFrame, nsIRenderingContext *&aConte nsPoint pt; nsresult rv; - aFrame->GetView(view); + aFrame->GetView(&view); if (nsnull == view) - aFrame->GetOffsetFromView(pt, view); + aFrame->GetOffsetFromView(pt, &view); while (nsnull != view) { @@ -1693,8 +1693,8 @@ CompareTrees(nsIFrame* aA, nsIFrame* aB) // do have views, make sure the views are the same size. If the // views have widgets, make sure they both do or neither does. If // they do, make sure the widgets are the same size. - k1->GetView(v1); - k2->GetView(v2); + k1->GetView(&v1); + k2->GetView(&v2); if (((nsnull == v1) && (nsnull != v2)) || ((nsnull != v1) && (nsnull == v2))) { LogVerifyMessage(k1, k2, "child views are not matched\n"); diff --git a/mozilla/layout/base/public/nsIFrame.h b/mozilla/layout/base/public/nsIFrame.h index e75256a6c93..40c5f38fb85 100644 --- a/mozilla/layout/base/public/nsIFrame.h +++ b/mozilla/layout/base/public/nsIFrame.h @@ -457,19 +457,19 @@ public: /** * Accessor functions to get/set the associated view object */ - NS_IMETHOD GetView(nsIView*& aView) const = 0; // may be null + NS_IMETHOD GetView(nsIView** aView) const = 0; // may be null NS_IMETHOD SetView(nsIView* aView) = 0; /** * Find the first geometric parent that has a view */ - NS_IMETHOD GetParentWithView(nsIFrame*& aParent) const = 0; + NS_IMETHOD GetParentWithView(nsIFrame** aParent) const = 0; /** * Returns the offset from this frame to the closest geometric parent that * has a view. Also returns the containing view or null in case of error */ - NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const = 0; + NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const = 0; /** * Returns the window that contains this frame. If this frame has a @@ -477,7 +477,7 @@ public: * returned, otherwise this frame's geometric parent is checked * recursively upwards. */ - NS_IMETHOD GetWindow(nsIWidget*&) const = 0; + NS_IMETHOD GetWindow(nsIWidget**) const = 0; /** * Get the "type" of the frame. May return a NULL atom pointer diff --git a/mozilla/layout/base/src/nsFrameImageLoader.cpp b/mozilla/layout/base/src/nsFrameImageLoader.cpp index 281f0f5b9fe..f53c05c8f4b 100644 --- a/mozilla/layout/base/src/nsFrameImageLoader.cpp +++ b/mozilla/layout/base/src/nsFrameImageLoader.cpp @@ -250,7 +250,7 @@ nsFrameImageLoader::Notify(nsIImageRequest *aImageRequest, case nsImageNotification_kIsTransparent: // Mark the frame's view as having transparent areas - mTargetFrame->GetView(view); + mTargetFrame->GetView(&view); if (nsnull != view) { view->SetContentTransparency(PR_TRUE); } @@ -339,9 +339,9 @@ nsFrameImageLoader::DamageRepairFrame(const nsRect* aDamageRect) // XXX We should tell the frame the damage area and let it invalidate // itself. Add some API calls to nsIFrame to allow a caller to invalidate // parts of the frame... - mTargetFrame->GetView(view); + mTargetFrame->GetView(&view); if (nsnull == view) { - mTargetFrame->GetOffsetFromView(offset, view); + mTargetFrame->GetOffsetFromView(offset, &view); bounds.x += offset.x; bounds.y += offset.y; } diff --git a/mozilla/layout/base/src/nsGenericElement.cpp b/mozilla/layout/base/src/nsGenericElement.cpp index c3060e600c3..c0d8c7af321 100644 --- a/mozilla/layout/base/src/nsGenericElement.cpp +++ b/mozilla/layout/base/src/nsGenericElement.cpp @@ -854,7 +854,7 @@ nsGenericElement::RenderFrame() // XXX We should tell the frame the damage area and let it invalidate // itself. Add some API calls to nsIFrame to allow a caller to invalidate // parts of the frame... - frame->GetOffsetFromView(offset, view); + frame->GetOffsetFromView(offset, &view); view->GetViewManager(vm); bounds.x += offset.x; bounds.y += offset.y; diff --git a/mozilla/layout/events/src/nsEventStateManager.cpp b/mozilla/layout/events/src/nsEventStateManager.cpp index 69b76a80b0c..de4c8891cab 100644 --- a/mozilla/layout/events/src/nsEventStateManager.cpp +++ b/mozilla/layout/events/src/nsEventStateManager.cpp @@ -225,7 +225,7 @@ nsEventStateManager::UpdateCursor(nsIPresContext& aPresContext, nsPoint& aPoint, } nsIWidget* window; - aTargetFrame->GetWindow(window); + aTargetFrame->GetWindow(&window); window->SetCursor(c); NS_RELEASE(window); } diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index aa091695994..f1b69f4a342 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -214,7 +214,7 @@ nsFieldSetFrame::Paint(nsIPresContext& aPresContext, if ((eFramePaintLayer_Overlay == aWhichLayer) && GetShowFrameBorders()) { nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { aRenderingContext.SetColor(NS_RGB(0,0,255)); } diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index dcd088a911c..e1a84dd2fd1 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -131,7 +131,7 @@ nsFileControlFrame::SetFocus(PRBool aOn, PRBool aRepaint) void nsFileControlFrame::MouseClicked(nsIPresContext* aPresContext) { nsIView* textView; - mTextFrame->GetView(textView); + mTextFrame->GetView(&textView); if (nsnull == textView) { return; } diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index b9c3eb78f32..97e32594fcd 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -195,7 +195,7 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, // positioned then we show it. if (NS_FRAME_REFLOW_FINISHED == aStatus) { nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetVisibility(nsViewVisibility_kShow); } @@ -249,7 +249,7 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, // absolutely positioned controls already have a view but not a widget nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull == view) { result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); if (!NS_SUCCEEDED(result)) { @@ -261,8 +261,8 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // initialize the view as hidden since we don't know the (x,y) until Paint result = view->Init(viewMan, boundBox, parView, nsnull, nsViewVisibility_kHide); @@ -556,7 +556,7 @@ NS_METHOD nsFormControlFrame::HandleEvent(nsIPresContext& aPresContext, // XXX if there is no view, it could be an image button. Unfortunately, // every image button will get every event. nsIView* view; - GetView(view); + GetView(&view); if (view) { if (mWidget != aEvent->widget) { aEventStatus = nsEventStatus_eIgnore; diff --git a/mozilla/layout/forms/nsFormControlHelper.cpp b/mozilla/layout/forms/nsFormControlHelper.cpp index 3fa29463bf9..866eae3e27f 100644 --- a/mozilla/layout/forms/nsFormControlHelper.cpp +++ b/mozilla/layout/forms/nsFormControlHelper.cpp @@ -78,7 +78,7 @@ void nsFormControlHelper::ForceDrawFrame(nsIFrame * aFrame) nsRect rect; nsIView * view; nsPoint pnt; - aFrame->GetOffsetFromView(pnt, view); + aFrame->GetOffsetFromView(pnt, &view); aFrame->GetRect(rect); rect.x = pnt.x; rect.y = pnt.y; diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index a2c6e1b893d..0f3c3c5d2df 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -452,7 +452,7 @@ nsHTMLButtonControlFrame::GetTranslatedRect(nsRect& aRect) { nsIView* view; nsPoint viewOffset(0,0); - GetOffsetFromView(viewOffset, view); + GetOffsetFromView(viewOffset, &view); while (nsnull != view) { nsPoint tempOffset; view->GetPosition(&tempOffset.x, &tempOffset.y); @@ -476,7 +476,7 @@ nsHTMLButtonControlFrame::HandleEvent(nsIPresContext& aPresContext, nsresult result = NS_OK; nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -612,7 +612,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, if (!mDidInit) { // create our view, we need a view to grab the mouse nsIView* view; - GetView(view); + GetView(&view); if (!view) { nsresult result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); nsIPresShell *presShell = aPresContext.GetShell(); @@ -621,8 +621,8 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // the view's size is not know yet, but its size will be kept in synch with our frame. nsRect boundBox(0, 0, 500, 500); result = view->Init(viewMan, boundBox, parView, nsnull); diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index 8c29d9d3f2d..eb477187048 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -181,7 +181,7 @@ nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, // create our view, we need a view to grab the mouse nsIView* view; - GetView(view); + GetView(&view); if (!view) { nsresult result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); nsIPresShell *presShell = aPresContext.GetShell(); @@ -190,8 +190,8 @@ nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // the view's size is not know yet, but its size will be kept in synch with our frame. nsRect boundBox(0, 0, 500, 500); result = view->Init(viewMan, boundBox, parView, nsnull); @@ -265,7 +265,7 @@ nsImageControlFrame::GetTranslatedRect(nsRect& aRect) { nsIView* view; nsPoint viewOffset(0,0); - GetOffsetFromView(viewOffset, view); + GetOffsetFromView(viewOffset, &view); while (nsnull != view) { nsPoint tempOffset; view->GetPosition(&tempOffset.x, &tempOffset.y); diff --git a/mozilla/layout/generic/nsAreaFrame.cpp b/mozilla/layout/generic/nsAreaFrame.cpp index b703744c50a..c88f1b60fdb 100644 --- a/mozilla/layout/generic/nsAreaFrame.cpp +++ b/mozilla/layout/generic/nsAreaFrame.cpp @@ -321,13 +321,13 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext, if (!isScrolled) { nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { // Position and size view relative to its parent, not relative to our // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; view->GetViewManager(vm); @@ -459,7 +459,7 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext, // XXX Make sure the frame is repainted. For the time being, since we // have no idea what actually changed repaint it all... nsIView* view; - nextFrame->GetView(view); + nextFrame->GetView(&view); if (nsnull != view) { nsIViewManager* viewMgr; view->GetViewManager(viewMgr); diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 7f584e7456b..9c56f2c8f1f 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -61,7 +61,7 @@ nsBulletFrame::List(FILE* out, PRInt32 aIndent) const for (i = aIndent; --i >= 0; ) fputs(" ", out); fprintf(out, "Bullet(%d)@%p ", ContentIndexInContainer(this), this); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index 6b0d2612fd5..121f88141a1 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -69,7 +69,7 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) { // Prevent event dispatch during destruction nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetClientData(nsnull); } @@ -231,7 +231,7 @@ nsContainerFrame::PaintChild(nsIPresContext& aPresContext, nsFramePaintLayer aWhichLayer) { nsIView *pView; - aFrame->GetView(pView); + aFrame->GetView(&pView); if (nsnull == pView) { nsRect kidRect; aFrame->GetRect(kidRect); @@ -581,7 +581,7 @@ nsContainerFrame::List(FILE* out, PRInt32 aIndent) const ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index c25cafbe7cb..3ce5555909b 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -527,7 +527,7 @@ NS_IMETHODIMP nsFrame::MoveTo(nscoord aX, nscoord aY) // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; mView->GetViewManager(vm); vm->MoveViewTo(mView, origin.x, origin.y); @@ -1263,7 +1263,7 @@ nsFrame::DidReflow(nsIPresContext& aPresContext, // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; mView->GetViewManager(vm); vm->ResizeView(mView, mRect.width, mRect.height); @@ -1425,9 +1425,10 @@ NS_IMETHODIMP nsFrame::BreakFromNextFlow() } // Associated view object -NS_IMETHODIMP nsFrame::GetView(nsIView*& aView) const +NS_IMETHODIMP nsFrame::GetView(nsIView** aView) const { - aView = mView; + NS_PRECONDITION(nsnull != aView, "null OUT parameter pointer"); + *aView = mView; return NS_OK; } @@ -1447,30 +1448,32 @@ NS_IMETHODIMP nsFrame::SetView(nsIView* aView) } // Find the first geometric parent that has a view -NS_IMETHODIMP nsFrame::GetParentWithView(nsIFrame*& aParent) const +NS_IMETHODIMP nsFrame::GetParentWithView(nsIFrame** aParent) const { - aParent = mParent; + NS_PRECONDITION(nsnull != aParent, "null OUT parameter pointer"); - while (nsnull != aParent) { + nsIFrame* parent; + for (parent = mParent; nsnull != parent; parent->GetParent(&parent)) { nsIView* parView; - aParent->GetView(parView); + parent->GetView(&parView); if (nsnull != parView) { break; } - aParent->GetParent(&aParent); } + *aParent = parent; return NS_OK; } // Returns the offset from this frame to the closest geometric parent that // has a view. Also returns the containing view or null in case of error -NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const +NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const { + NS_PRECONDITION(nsnull != aView, "null OUT parameter pointer"); nsIFrame* frame = (nsIFrame*)this; - aView = nsnull; + *aView = nsnull; aOffset.MoveTo(0, 0); do { nsPoint origin; @@ -1481,28 +1484,29 @@ NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) cons if (nsnull != frame) { frame->GetView(aView); } - } while ((nsnull != frame) && (nsnull == aView)); + } while ((nsnull != frame) && (nsnull == *aView)); return NS_OK; } -NS_IMETHODIMP nsFrame::GetWindow(nsIWidget*& aWindow) const +NS_IMETHODIMP nsFrame::GetWindow(nsIWidget** aWindow) const { - nsIFrame* frame = (nsIFrame*)this; - - aWindow = nsnull; - while (nsnull != frame) { + NS_PRECONDITION(nsnull != aWindow, "null OUT parameter pointer"); + + nsIFrame* frame; + nsIWidget* window = nsnull; + for (frame = (nsIFrame*)this; nsnull != frame; frame->GetParentWithView(&frame)) { nsIView* view; - frame->GetView(view); + frame->GetView(&view); if (nsnull != view) { - view->GetWidget(aWindow); - if (nsnull != aWindow) { + view->GetWidget(window); + if (nsnull != window) { break; } } - frame->GetParentWithView(frame); } - NS_POSTCONDITION(nsnull != aWindow, "no window in frame tree"); + NS_POSTCONDITION(nsnull != window, "no window in frame tree"); + *aWindow = window; return NS_OK; } @@ -1530,7 +1534,7 @@ nsFrame::Invalidate(const nsRect& aDamageRect, nsPoint offset; nsIView* view; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); NS_ASSERTION(nsnull != view, "no view"); rect += offset; view->GetViewManager(viewManager); @@ -2142,7 +2146,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool) nsRect rect; nsIView * view; nsPoint pnt; - aFrame->GetOffsetFromView(pnt, view); + aFrame->GetOffsetFromView(pnt, &view); aFrame->GetRect(rect); rect.x = pnt.x; rect.y = pnt.y; diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index 5f437b5f584..3ac91e4c654 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -186,11 +186,11 @@ public: NS_IMETHOD RemoveFromFlow(); NS_IMETHOD BreakFromPrevFlow(); NS_IMETHOD BreakFromNextFlow(); - NS_IMETHOD GetView(nsIView*& aView) const; + NS_IMETHOD GetView(nsIView** aView) const; NS_IMETHOD SetView(nsIView* aView); - NS_IMETHOD GetParentWithView(nsIFrame*& aParent) const; - NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const; - NS_IMETHOD GetWindow(nsIWidget*&) const; + NS_IMETHOD GetParentWithView(nsIFrame** aParent) const; + NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const; + NS_IMETHOD GetWindow(nsIWidget**) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const; NS_IMETHOD IsPercentageBase(PRBool& aBase) const; NS_IMETHOD GetAutoMarginSize(PRUint8 aSide, nscoord& aSize) const; diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 6e61e7c52c6..ed1182e4642 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -706,7 +706,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, nsIView* parView; nsPoint origin; - GetOffsetFromView(origin, parView); + GetOffsetFromView(origin, &parView); nsRect viewBounds(origin.x, origin.y, aSize.width, aSize.height); nsIViewManager* viewMan = presShell->GetViewManager(); diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index bcf65a013fe..1942d10a057 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -457,7 +457,7 @@ nsHTMLFramesetFrame::GetFrameForPoint(const nsPoint& aPoint, { //XXX Temporary to deal with event handling in both this and FramsetBorderFrame nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -843,8 +843,8 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); nsRect boundBox(0, 0, aDesiredSize.width, aDesiredSize.height); result = view->Init(viewMan, boundBox, parView, nsnull); viewMan->InsertChild(parView, view, 0); @@ -1316,7 +1316,7 @@ nsHTMLFramesetFrame::StartMouseDrag(nsIPresContext& aPresContext, nsHTMLFrameset NS_ASSERTION((nsnull != aBorder) && (index >= 0), "invalid dragger"); #endif nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -1417,7 +1417,7 @@ void nsHTMLFramesetFrame::EndMouseDrag() { nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 33cd4ee6601..93e6f02ff3f 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -185,7 +185,7 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, PRBool aForce) { nsIView* view; - aFrame->GetView(view); + aFrame->GetView(&view); // If we don't yet have a view, see if we need a view if (nsnull == view) { PRInt32 zIndex = 0; @@ -274,11 +274,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, nsIFrame* parent; nsIView* view; - aFrame->GetParentWithView(parent); + aFrame->GetParentWithView(&parent); NS_ASSERTION(parent, "GetParentWithView failed"); nsIView* parentView; - parent->GetView(parentView); + parent->GetView(&parentView); NS_ASSERTION(parentView, "no parent with view"); // Create a view diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index e75256a6c93..40c5f38fb85 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -457,19 +457,19 @@ public: /** * Accessor functions to get/set the associated view object */ - NS_IMETHOD GetView(nsIView*& aView) const = 0; // may be null + NS_IMETHOD GetView(nsIView** aView) const = 0; // may be null NS_IMETHOD SetView(nsIView* aView) = 0; /** * Find the first geometric parent that has a view */ - NS_IMETHOD GetParentWithView(nsIFrame*& aParent) const = 0; + NS_IMETHOD GetParentWithView(nsIFrame** aParent) const = 0; /** * Returns the offset from this frame to the closest geometric parent that * has a view. Also returns the containing view or null in case of error */ - NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const = 0; + NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const = 0; /** * Returns the window that contains this frame. If this frame has a @@ -477,7 +477,7 @@ public: * returned, otherwise this frame's geometric parent is checked * recursively upwards. */ - NS_IMETHOD GetWindow(nsIWidget*&) const = 0; + NS_IMETHOD GetWindow(nsIWidget**) const = 0; /** * Get the "type" of the frame. May return a NULL atom pointer diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index b4dca343d0c..814f45a6c12 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -820,10 +820,10 @@ nsImageFrame::HandleEvent(nsIPresContext& aPresContext, // XXX Event isn't in our local coordinate space like it should be... nsIView* view; - GetView(view); + GetView(&view); if (nsnull == view) { nsPoint offset; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); if (nsnull != view) { aEvent->point -= offset; } @@ -918,10 +918,10 @@ nsImageFrame::GetCursor(nsIPresContext& aPresContext, // XXX Event isn't in our local coordinate space like it should be... nsPoint pt = aPoint; nsIView* view; - GetView(view); + GetView(&view); if (nsnull == view) { nsPoint offset; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); if (nsnull != view) { pt -= offset; } @@ -994,7 +994,7 @@ nsImageFrame::AttributeChanged(nsIPresContext* aPresContext, nsRect bounds; nsPoint offset; nsIView* view; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 94ed7b6463f..1ad97350fb4 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -209,8 +209,8 @@ nsObjectFrame::CreateWidget(nscoord aWidth, nscoord aHeight, PRBool aViewOnly) nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); if (NS_OK == parView->GetViewManager(viewMan)) { @@ -258,7 +258,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth, nscoord aHeight, PRBool aViewOnly) nsIView* parentWithView; nsPoint origin; view->SetVisibility(nsViewVisibility_kShow); - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); viewMan->ResizeView(view, mRect.width, mRect.height); viewMan->MoveViewTo(view, origin.x, origin.y); } @@ -399,7 +399,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, GetDesiredSize(&aPresContext, aReflowState, aMetrics); nsIView *parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); // Just make the frigging widget. float t2p = aPresContext.GetTwipsToPixels(); @@ -553,7 +553,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, aMetrics.maxElementSize->height = aMetrics.height; } - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); window->x = NSTwipsToIntPixels(origin.x, t2p); window->y = NSTwipsToIntPixels(origin.y, t2p); @@ -600,7 +600,7 @@ nsObjectFrame::DidReflow(nsIPresContext& aPresContext, // positioned then we show it. if (NS_FRAME_REFLOW_FINISHED == aStatus) { nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetVisibility(nsViewVisibility_kShow); } @@ -615,7 +615,7 @@ nsObjectFrame::DidReflow(nsIPresContext& aPresContext, float t2p = aPresContext.GetTwipsToPixels(); nscoord offx, offy; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); #if 0 parentWithView->GetScrollOffset(&offx, &offy); @@ -1017,7 +1017,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetURL(const char *aURL, const char *aTar if ((nsnull != mOwner) && (nsnull != mContext)) { - rv = mOwner->GetOffsetFromView(origin, view); + rv = mOwner->GetOffsetFromView(origin, &view); if (NS_OK == rv) { @@ -1485,7 +1485,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: CreateWidget(void) { // Create view if necessary - mOwner->GetView(view); + mOwner->GetView(&view); if (nsnull == view) { @@ -1500,7 +1500,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: CreateWidget(void) { nsIView *view; - mOwner->GetView(view); + mOwner->GetView(&view); view->GetWidget(mWidget); if (PR_TRUE == windowless) diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index 24555be5a6e..523401acfe3 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -318,7 +318,7 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext, // Print the page nsIView* view; - page->GetView(view); + page->GetView(&view); NS_ASSERTION(nsnull != view, "no page view"); vm->Display(view); diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 2aefc494733..b792d07f51b 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -409,7 +409,7 @@ void BlinkTimer::Notify(nsITimer *timer) nsRect bounds; text->GetRect(bounds); nsIView* view; - text->GetOffsetFromView(offset, view); + text->GetOffsetFromView(offset, &view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; @@ -1480,8 +1480,8 @@ TextFrame::GetPosition(nsIPresContext& aCX, nsPoint origin; //GetOrigin(origin); nsIView * view; - GetView(view); - GetOffsetFromView(origin,view); + GetView(&view); + GetOffsetFromView(origin, &view); PRBool found = BinarySearchForPosition(aRendContext, text, origin.x, 0, 0, PRInt32(textLength), PRInt32(aEvent->point.x) , //go to local coordinates @@ -2371,7 +2371,7 @@ TextFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index fb555d38ec3..903e1cfacb0 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -163,7 +163,7 @@ ViewportFrame::CalculateFixedContainingBlockSize(nsIPresContext& aPresC nsIFrame* kidFrame = mFrames.FirstChild(); nsIView* kidView; - kidFrame->GetView(kidView); + kidFrame->GetView(&kidView); if (nsnull != kidView) { nsIScrollableView* scrollingView; @@ -398,7 +398,7 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext, // XXX Make sure the frame is repainted. For the time being, since we // have no idea what actually changed repaint it all... nsIView* view; - nextFrame->GetView(view); + nextFrame->GetView(&view); if (nsnull != view) { nsIViewManager* viewMgr; view->GetViewManager(viewMgr); diff --git a/mozilla/layout/html/base/src/nsAreaFrame.cpp b/mozilla/layout/html/base/src/nsAreaFrame.cpp index b703744c50a..c88f1b60fdb 100644 --- a/mozilla/layout/html/base/src/nsAreaFrame.cpp +++ b/mozilla/layout/html/base/src/nsAreaFrame.cpp @@ -321,13 +321,13 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext, if (!isScrolled) { nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { // Position and size view relative to its parent, not relative to our // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; view->GetViewManager(vm); @@ -459,7 +459,7 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext, // XXX Make sure the frame is repainted. For the time being, since we // have no idea what actually changed repaint it all... nsIView* view; - nextFrame->GetView(view); + nextFrame->GetView(&view); if (nsnull != view) { nsIViewManager* viewMgr; view->GetViewManager(viewMgr); diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 710b295a062..ab2e8df0cf9 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -582,7 +582,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 7f584e7456b..9c56f2c8f1f 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -61,7 +61,7 @@ nsBulletFrame::List(FILE* out, PRInt32 aIndent) const for (i = aIndent; --i >= 0; ) fputs(" ", out); fprintf(out, "Bullet(%d)@%p ", ContentIndexInContainer(this), this); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index 6b0d2612fd5..121f88141a1 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -69,7 +69,7 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) { // Prevent event dispatch during destruction nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetClientData(nsnull); } @@ -231,7 +231,7 @@ nsContainerFrame::PaintChild(nsIPresContext& aPresContext, nsFramePaintLayer aWhichLayer) { nsIView *pView; - aFrame->GetView(pView); + aFrame->GetView(&pView); if (nsnull == pView) { nsRect kidRect; aFrame->GetRect(kidRect); @@ -581,7 +581,7 @@ nsContainerFrame::List(FILE* out, PRInt32 aIndent) const ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index c25cafbe7cb..3ce5555909b 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -527,7 +527,7 @@ NS_IMETHODIMP nsFrame::MoveTo(nscoord aX, nscoord aY) // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; mView->GetViewManager(vm); vm->MoveViewTo(mView, origin.x, origin.y); @@ -1263,7 +1263,7 @@ nsFrame::DidReflow(nsIPresContext& aPresContext, // parent frame (our parent frame may not have a view). nsIView* parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); nsIViewManager *vm; mView->GetViewManager(vm); vm->ResizeView(mView, mRect.width, mRect.height); @@ -1425,9 +1425,10 @@ NS_IMETHODIMP nsFrame::BreakFromNextFlow() } // Associated view object -NS_IMETHODIMP nsFrame::GetView(nsIView*& aView) const +NS_IMETHODIMP nsFrame::GetView(nsIView** aView) const { - aView = mView; + NS_PRECONDITION(nsnull != aView, "null OUT parameter pointer"); + *aView = mView; return NS_OK; } @@ -1447,30 +1448,32 @@ NS_IMETHODIMP nsFrame::SetView(nsIView* aView) } // Find the first geometric parent that has a view -NS_IMETHODIMP nsFrame::GetParentWithView(nsIFrame*& aParent) const +NS_IMETHODIMP nsFrame::GetParentWithView(nsIFrame** aParent) const { - aParent = mParent; + NS_PRECONDITION(nsnull != aParent, "null OUT parameter pointer"); - while (nsnull != aParent) { + nsIFrame* parent; + for (parent = mParent; nsnull != parent; parent->GetParent(&parent)) { nsIView* parView; - aParent->GetView(parView); + parent->GetView(&parView); if (nsnull != parView) { break; } - aParent->GetParent(&aParent); } + *aParent = parent; return NS_OK; } // Returns the offset from this frame to the closest geometric parent that // has a view. Also returns the containing view or null in case of error -NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const +NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const { + NS_PRECONDITION(nsnull != aView, "null OUT parameter pointer"); nsIFrame* frame = (nsIFrame*)this; - aView = nsnull; + *aView = nsnull; aOffset.MoveTo(0, 0); do { nsPoint origin; @@ -1481,28 +1484,29 @@ NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) cons if (nsnull != frame) { frame->GetView(aView); } - } while ((nsnull != frame) && (nsnull == aView)); + } while ((nsnull != frame) && (nsnull == *aView)); return NS_OK; } -NS_IMETHODIMP nsFrame::GetWindow(nsIWidget*& aWindow) const +NS_IMETHODIMP nsFrame::GetWindow(nsIWidget** aWindow) const { - nsIFrame* frame = (nsIFrame*)this; - - aWindow = nsnull; - while (nsnull != frame) { + NS_PRECONDITION(nsnull != aWindow, "null OUT parameter pointer"); + + nsIFrame* frame; + nsIWidget* window = nsnull; + for (frame = (nsIFrame*)this; nsnull != frame; frame->GetParentWithView(&frame)) { nsIView* view; - frame->GetView(view); + frame->GetView(&view); if (nsnull != view) { - view->GetWidget(aWindow); - if (nsnull != aWindow) { + view->GetWidget(window); + if (nsnull != window) { break; } } - frame->GetParentWithView(frame); } - NS_POSTCONDITION(nsnull != aWindow, "no window in frame tree"); + NS_POSTCONDITION(nsnull != window, "no window in frame tree"); + *aWindow = window; return NS_OK; } @@ -1530,7 +1534,7 @@ nsFrame::Invalidate(const nsRect& aDamageRect, nsPoint offset; nsIView* view; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); NS_ASSERTION(nsnull != view, "no view"); rect += offset; view->GetViewManager(viewManager); @@ -2142,7 +2146,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool) nsRect rect; nsIView * view; nsPoint pnt; - aFrame->GetOffsetFromView(pnt, view); + aFrame->GetOffsetFromView(pnt, &view); aFrame->GetRect(rect); rect.x = pnt.x; rect.y = pnt.y; diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h index 5f437b5f584..3ac91e4c654 100644 --- a/mozilla/layout/html/base/src/nsFrame.h +++ b/mozilla/layout/html/base/src/nsFrame.h @@ -186,11 +186,11 @@ public: NS_IMETHOD RemoveFromFlow(); NS_IMETHOD BreakFromPrevFlow(); NS_IMETHOD BreakFromNextFlow(); - NS_IMETHOD GetView(nsIView*& aView) const; + NS_IMETHOD GetView(nsIView** aView) const; NS_IMETHOD SetView(nsIView* aView); - NS_IMETHOD GetParentWithView(nsIFrame*& aParent) const; - NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView*& aView) const; - NS_IMETHOD GetWindow(nsIWidget*&) const; + NS_IMETHOD GetParentWithView(nsIFrame** aParent) const; + NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const; + NS_IMETHOD GetWindow(nsIWidget**) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const; NS_IMETHOD IsPercentageBase(PRBool& aBase) const; NS_IMETHOD GetAutoMarginSize(PRUint8 aSide, nscoord& aSize) const; diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 33cd4ee6601..93e6f02ff3f 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -185,7 +185,7 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, PRBool aForce) { nsIView* view; - aFrame->GetView(view); + aFrame->GetView(&view); // If we don't yet have a view, see if we need a view if (nsnull == view) { PRInt32 zIndex = 0; @@ -274,11 +274,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, nsIFrame* parent; nsIView* view; - aFrame->GetParentWithView(parent); + aFrame->GetParentWithView(&parent); NS_ASSERTION(parent, "GetParentWithView failed"); nsIView* parentView; - parent->GetView(parentView); + parent->GetView(&parentView); NS_ASSERTION(parentView, "no parent with view"); // Create a view diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index b4dca343d0c..814f45a6c12 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -820,10 +820,10 @@ nsImageFrame::HandleEvent(nsIPresContext& aPresContext, // XXX Event isn't in our local coordinate space like it should be... nsIView* view; - GetView(view); + GetView(&view); if (nsnull == view) { nsPoint offset; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); if (nsnull != view) { aEvent->point -= offset; } @@ -918,10 +918,10 @@ nsImageFrame::GetCursor(nsIPresContext& aPresContext, // XXX Event isn't in our local coordinate space like it should be... nsPoint pt = aPoint; nsIView* view; - GetView(view); + GetView(&view); if (nsnull == view) { nsPoint offset; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); if (nsnull != view) { pt -= offset; } @@ -994,7 +994,7 @@ nsImageFrame::AttributeChanged(nsIPresContext* aPresContext, nsRect bounds; nsPoint offset; nsIView* view; - GetOffsetFromView(offset, view); + GetOffsetFromView(offset, &view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 94ed7b6463f..1ad97350fb4 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -209,8 +209,8 @@ nsObjectFrame::CreateWidget(nscoord aWidth, nscoord aHeight, PRBool aViewOnly) nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); if (NS_OK == parView->GetViewManager(viewMan)) { @@ -258,7 +258,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth, nscoord aHeight, PRBool aViewOnly) nsIView* parentWithView; nsPoint origin; view->SetVisibility(nsViewVisibility_kShow); - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); viewMan->ResizeView(view, mRect.width, mRect.height); viewMan->MoveViewTo(view, origin.x, origin.y); } @@ -399,7 +399,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, GetDesiredSize(&aPresContext, aReflowState, aMetrics); nsIView *parentWithView; nsPoint origin; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); // Just make the frigging widget. float t2p = aPresContext.GetTwipsToPixels(); @@ -553,7 +553,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, aMetrics.maxElementSize->height = aMetrics.height; } - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); window->x = NSTwipsToIntPixels(origin.x, t2p); window->y = NSTwipsToIntPixels(origin.y, t2p); @@ -600,7 +600,7 @@ nsObjectFrame::DidReflow(nsIPresContext& aPresContext, // positioned then we show it. if (NS_FRAME_REFLOW_FINISHED == aStatus) { nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetVisibility(nsViewVisibility_kShow); } @@ -615,7 +615,7 @@ nsObjectFrame::DidReflow(nsIPresContext& aPresContext, float t2p = aPresContext.GetTwipsToPixels(); nscoord offx, offy; - GetOffsetFromView(origin, parentWithView); + GetOffsetFromView(origin, &parentWithView); #if 0 parentWithView->GetScrollOffset(&offx, &offy); @@ -1017,7 +1017,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetURL(const char *aURL, const char *aTar if ((nsnull != mOwner) && (nsnull != mContext)) { - rv = mOwner->GetOffsetFromView(origin, view); + rv = mOwner->GetOffsetFromView(origin, &view); if (NS_OK == rv) { @@ -1485,7 +1485,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: CreateWidget(void) { // Create view if necessary - mOwner->GetView(view); + mOwner->GetView(&view); if (nsnull == view) { @@ -1500,7 +1500,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: CreateWidget(void) { nsIView *view; - mOwner->GetView(view); + mOwner->GetView(&view); view->GetWidget(mWidget); if (PR_TRUE == windowless) diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 3a9b7326150..90e08330551 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -1056,10 +1056,10 @@ PresShell::CreateRenderingContext(nsIFrame *aFrame, nsIRenderingContext *&aConte nsPoint pt; nsresult rv; - aFrame->GetView(view); + aFrame->GetView(&view); if (nsnull == view) - aFrame->GetOffsetFromView(pt, view); + aFrame->GetOffsetFromView(pt, &view); while (nsnull != view) { @@ -1693,8 +1693,8 @@ CompareTrees(nsIFrame* aA, nsIFrame* aB) // do have views, make sure the views are the same size. If the // views have widgets, make sure they both do or neither does. If // they do, make sure the widgets are the same size. - k1->GetView(v1); - k2->GetView(v2); + k1->GetView(&v1); + k2->GetView(&v2); if (((nsnull == v1) && (nsnull != v2)) || ((nsnull != v1) && (nsnull == v2))) { LogVerifyMessage(k1, k2, "child views are not matched\n"); diff --git a/mozilla/layout/html/base/src/nsScrollFrame.cpp b/mozilla/layout/html/base/src/nsScrollFrame.cpp index 8ef0e89faba..b14f4152134 100644 --- a/mozilla/layout/html/base/src/nsScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsScrollFrame.cpp @@ -69,7 +69,7 @@ nsScrollFrame::SetInitialChildList(nsIPresContext& aPresContext, #ifdef NS_DEBUG // Verify that the scrolled frame has a view nsIView* scrolledView; - frame->GetView(scrolledView); + frame->GetView(&scrolledView); NS_ASSERTION(nsnull != scrolledView, "no view"); #endif @@ -107,7 +107,7 @@ nsScrollFrame::DidReflow(nsIPresContext& aPresContext, nsIView* scrolledView; frame->GetSize(size); - frame->GetView(scrolledView); + frame->GetView(&scrolledView); scrolledView->GetViewManager(vm); vm->ResizeView(scrolledView, size.width, size.height); NS_RELEASE(vm); @@ -123,10 +123,10 @@ nsScrollFrame::CreateScrollingView() // Get parent view nsIFrame* parent; - GetParentWithView(parent); + GetParentWithView(&parent); NS_ASSERTION(parent, "GetParentWithView failed"); nsIView* parentView; - parent->GetView(parentView); + parent->GetView(&parentView); NS_ASSERTION(parentView, "GetParentWithView failed"); // Get the view manager @@ -305,7 +305,7 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext, // width; otherwise, it's not only just an incremental reflow but also nsIScrollableView* scrollingView; nsIView* view; - GetView(view); + GetView(&view); if (NS_SUCCEEDED(view->QueryInterface(kScrollViewIID, (void**)&scrollingView))) { PRBool unused; scrollingView->GetScrollbarVisibility(&roomForVerticalScrollbar, &unused); @@ -541,7 +541,7 @@ nsScrollFrame::ReResolveStyleContext(nsIPresContext* aPresContext, const nsStyleDisplay* disp = (const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display); nsIView * view; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetVisibility((NS_STYLE_VISIBILITY_HIDDEN == disp->mVisible) ? nsViewVisibility_kHide : nsViewVisibility_kShow); diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 24555be5a6e..523401acfe3 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -318,7 +318,7 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext, // Print the page nsIView* view; - page->GetView(view); + page->GetView(&view); NS_ASSERTION(nsnull != view, "no page view"); vm->Display(view); diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 2aefc494733..b792d07f51b 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -409,7 +409,7 @@ void BlinkTimer::Notify(nsITimer *timer) nsRect bounds; text->GetRect(bounds); nsIView* view; - text->GetOffsetFromView(offset, view); + text->GetOffsetFromView(offset, &view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; @@ -1480,8 +1480,8 @@ TextFrame::GetPosition(nsIPresContext& aCX, nsPoint origin; //GetOrigin(origin); nsIView * view; - GetView(view); - GetOffsetFromView(origin,view); + GetView(&view); + GetOffsetFromView(origin, &view); PRBool found = BinarySearchForPosition(aRendContext, text, origin.x, 0, 0, PRInt32(textLength), PRInt32(aEvent->point.x) , //go to local coordinates @@ -2371,7 +2371,7 @@ TextFrame::List(FILE* out, PRInt32 aIndent) const // Output the tag ListTag(out); nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { fprintf(out, " [view=%p]", view); } diff --git a/mozilla/layout/html/base/src/nsViewportFrame.cpp b/mozilla/layout/html/base/src/nsViewportFrame.cpp index fb555d38ec3..903e1cfacb0 100644 --- a/mozilla/layout/html/base/src/nsViewportFrame.cpp +++ b/mozilla/layout/html/base/src/nsViewportFrame.cpp @@ -163,7 +163,7 @@ ViewportFrame::CalculateFixedContainingBlockSize(nsIPresContext& aPresC nsIFrame* kidFrame = mFrames.FirstChild(); nsIView* kidView; - kidFrame->GetView(kidView); + kidFrame->GetView(&kidView); if (nsnull != kidView) { nsIScrollableView* scrollingView; @@ -398,7 +398,7 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext, // XXX Make sure the frame is repainted. For the time being, since we // have no idea what actually changed repaint it all... nsIView* view; - nextFrame->GetView(view); + nextFrame->GetView(&view); if (nsnull != view) { nsIViewManager* viewMgr; view->GetViewManager(viewMgr); diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index 6e61e7c52c6..ed1182e4642 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -706,7 +706,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, nsIView* parView; nsPoint origin; - GetOffsetFromView(origin, parView); + GetOffsetFromView(origin, &parView); nsRect viewBounds(origin.x, origin.y, aSize.width, aSize.height); nsIViewManager* viewMan = presShell->GetViewManager(); diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index bcf65a013fe..1942d10a057 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -457,7 +457,7 @@ nsHTMLFramesetFrame::GetFrameForPoint(const nsPoint& aPoint, { //XXX Temporary to deal with event handling in both this and FramsetBorderFrame nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -843,8 +843,8 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); nsRect boundBox(0, 0, aDesiredSize.width, aDesiredSize.height); result = view->Init(viewMan, boundBox, parView, nsnull); viewMan->InsertChild(parView, view, 0); @@ -1316,7 +1316,7 @@ nsHTMLFramesetFrame::StartMouseDrag(nsIPresContext& aPresContext, nsHTMLFrameset NS_ASSERTION((nsnull != aBorder) && (index >= 0), "invalid dragger"); #endif nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -1417,7 +1417,7 @@ void nsHTMLFramesetFrame::EndMouseDrag() { nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 8eca6f63932..3a9dc631fe7 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -2078,7 +2078,7 @@ HTMLContentSink::ScrollToRef() // coordinates that are relative to that. nsPoint offset; nsIView* view; - frame->GetOffsetFromView(offset, view); + frame->GetOffsetFromView(offset, &view); if (view == rootView) { // XXX write me! // printf("view==rootView "); diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index aa091695994..f1b69f4a342 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -214,7 +214,7 @@ nsFieldSetFrame::Paint(nsIPresContext& aPresContext, if ((eFramePaintLayer_Overlay == aWhichLayer) && GetShowFrameBorders()) { nsIView* view; - GetView(view); + GetView(&view); if (nsnull != view) { aRenderingContext.SetColor(NS_RGB(0,0,255)); } diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index dcd088a911c..e1a84dd2fd1 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -131,7 +131,7 @@ nsFileControlFrame::SetFocus(PRBool aOn, PRBool aRepaint) void nsFileControlFrame::MouseClicked(nsIPresContext* aPresContext) { nsIView* textView; - mTextFrame->GetView(textView); + mTextFrame->GetView(&textView); if (nsnull == textView) { return; } diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index b9c3eb78f32..97e32594fcd 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -195,7 +195,7 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, // positioned then we show it. if (NS_FRAME_REFLOW_FINISHED == aStatus) { nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull != view) { view->SetVisibility(nsViewVisibility_kShow); } @@ -249,7 +249,7 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, // absolutely positioned controls already have a view but not a widget nsIView* view = nsnull; - GetView(view); + GetView(&view); if (nsnull == view) { result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); if (!NS_SUCCEEDED(result)) { @@ -261,8 +261,8 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // initialize the view as hidden since we don't know the (x,y) until Paint result = view->Init(viewMan, boundBox, parView, nsnull, nsViewVisibility_kHide); @@ -556,7 +556,7 @@ NS_METHOD nsFormControlFrame::HandleEvent(nsIPresContext& aPresContext, // XXX if there is no view, it could be an image button. Unfortunately, // every image button will get every event. nsIView* view; - GetView(view); + GetView(&view); if (view) { if (mWidget != aEvent->widget) { aEventStatus = nsEventStatus_eIgnore; diff --git a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp index 3fa29463bf9..866eae3e27f 100644 --- a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp @@ -78,7 +78,7 @@ void nsFormControlHelper::ForceDrawFrame(nsIFrame * aFrame) nsRect rect; nsIView * view; nsPoint pnt; - aFrame->GetOffsetFromView(pnt, view); + aFrame->GetOffsetFromView(pnt, &view); aFrame->GetRect(rect); rect.x = pnt.x; rect.y = pnt.y; diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index a2c6e1b893d..0f3c3c5d2df 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -452,7 +452,7 @@ nsHTMLButtonControlFrame::GetTranslatedRect(nsRect& aRect) { nsIView* view; nsPoint viewOffset(0,0); - GetOffsetFromView(viewOffset, view); + GetOffsetFromView(viewOffset, &view); while (nsnull != view) { nsPoint tempOffset; view->GetPosition(&tempOffset.x, &tempOffset.y); @@ -476,7 +476,7 @@ nsHTMLButtonControlFrame::HandleEvent(nsIPresContext& aPresContext, nsresult result = NS_OK; nsIView* view; - GetView(view); + GetView(&view); if (view) { nsIViewManager* viewMan; view->GetViewManager(viewMan); @@ -612,7 +612,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, if (!mDidInit) { // create our view, we need a view to grab the mouse nsIView* view; - GetView(view); + GetView(&view); if (!view) { nsresult result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); nsIPresShell *presShell = aPresContext.GetShell(); @@ -621,8 +621,8 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // the view's size is not know yet, but its size will be kept in synch with our frame. nsRect boundBox(0, 0, 500, 500); result = view->Init(viewMan, boundBox, parView, nsnull); diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index 8c29d9d3f2d..eb477187048 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -181,7 +181,7 @@ nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, // create our view, we need a view to grab the mouse nsIView* view; - GetView(view); + GetView(&view); if (!view) { nsresult result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); nsIPresShell *presShell = aPresContext.GetShell(); @@ -190,8 +190,8 @@ nsImageControlFrame::SetInitialChildList(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // the view's size is not know yet, but its size will be kept in synch with our frame. nsRect boundBox(0, 0, 500, 500); result = view->Init(viewMan, boundBox, parView, nsnull); @@ -265,7 +265,7 @@ nsImageControlFrame::GetTranslatedRect(nsRect& aRect) { nsIView* view; nsPoint viewOffset(0,0); - GetOffsetFromView(viewOffset, view); + GetOffsetFromView(viewOffset, &view); while (nsnull != view) { nsPoint tempOffset; view->GetPosition(&tempOffset.x, &tempOffset.y); diff --git a/mozilla/layout/html/forms/src/nsLabelFrame.cpp b/mozilla/layout/html/forms/src/nsLabelFrame.cpp index 8b180e2248f..29c7a8dfbbf 100644 --- a/mozilla/layout/html/forms/src/nsLabelFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLabelFrame.cpp @@ -138,7 +138,7 @@ nsLabelFrame::GetTranslatedRect(nsRect& aRect) { nsIView* view; nsPoint viewOffset(0,0); - GetOffsetFromView(viewOffset, view); + GetOffsetFromView(viewOffset, &view); while (nsnull != view) { nsPoint tempOffset; view->GetPosition(&tempOffset.x, &tempOffset.y); @@ -393,7 +393,7 @@ nsLabelFrame::Reflow(nsIPresContext& aPresContext, if (!mDidInit) { // create our view, we need a view to grab the mouse nsIView* view; - GetView(view); + GetView(&view); if (!view) { nsresult result = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID, (void **)&view); @@ -403,8 +403,8 @@ nsLabelFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* parWithView; nsIView *parView; - GetParentWithView(parWithView); - parWithView->GetView(parView); + GetParentWithView(&parWithView); + parWithView->GetView(&parView); // the view's size is not know yet, but its size will be kept in synch with our frame. nsRect boundBox(0, 0, 500, 500); result = view->Init(viewMan, boundBox, parView, nsnull); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 0c46eb6c2a5..a2e3f2dcb0d 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3113,11 +3113,11 @@ ApplyRenderingChangeToTree(nsIPresContext* aPresContext, // (adjusting r's coordinate system to reflect the nesting) and // update there. nsIView* view; - aFrame->GetView(view); + aFrame->GetView(&view); if (nsnull != view) { } else { nsPoint offset; - aFrame->GetOffsetFromView(offset, view); + aFrame->GetOffsetFromView(offset, &view); NS_ASSERTION(nsnull != view, "no view"); r += offset; } diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 86deec49711..2d8668918a3 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -305,7 +305,7 @@ void nsTableRowFrame::PaintChildren(nsIPresContext& aPresContext, while (nsnull != kid) { nsIView *pView; - kid->GetView(pView); + kid->GetView(&pView); if (nsnull == pView) { nsRect kidRect; kid->GetRect(kidRect); diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 397df92b5cc..376ef4dc4eb 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -221,7 +221,7 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext& aPresContext, while (nsnull != kid) { nsIView *pView; - kid->GetView(pView); + kid->GetView(&pView); if (nsnull == pView) { PRBool clipState; nsRect kidRect; diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 86deec49711..2d8668918a3 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -305,7 +305,7 @@ void nsTableRowFrame::PaintChildren(nsIPresContext& aPresContext, while (nsnull != kid) { nsIView *pView; - kid->GetView(pView); + kid->GetView(&pView); if (nsnull == pView) { nsRect kidRect; kid->GetRect(kidRect); diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 397df92b5cc..376ef4dc4eb 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -221,7 +221,7 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext& aPresContext, while (nsnull != kid) { nsIView *pView; - kid->GetView(pView); + kid->GetView(&pView); if (nsnull == pView) { PRBool clipState; nsRect kidRect; diff --git a/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp b/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp index 31355d8e972..332c628d65b 100644 --- a/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp @@ -138,7 +138,7 @@ void StripeTimer::Notify(nsITimer *timer) nsRect bounds; frame->GetRect(bounds); nsIView* view; - frame->GetOffsetFromView(offset, view); + frame->GetOffsetFromView(offset, &view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; diff --git a/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp b/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp index 8502b15947c..23c280962d0 100644 --- a/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp @@ -40,7 +40,7 @@ static void ForceDrawFrame(nsIFrame * aFrame) nsRect rect; nsIView * view; nsPoint pnt; - aFrame->GetOffsetFromView(pnt, view); + aFrame->GetOffsetFromView(pnt, &view); aFrame->GetRect(rect); rect.x = pnt.x; rect.y = pnt.y;