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
This commit is contained in:
parent
d76d572b5a
commit
339afcce8a
@ -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;
|
||||
|
||||
@ -225,7 +225,7 @@ nsEventStateManager::UpdateCursor(nsIPresContext& aPresContext, nsPoint& aPoint,
|
||||
}
|
||||
|
||||
nsIWidget* window;
|
||||
aTargetFrame->GetWindow(window);
|
||||
aTargetFrame->GetWindow(&window);
|
||||
window->SetCursor(c);
|
||||
NS_RELEASE(window);
|
||||
}
|
||||
|
||||
@ -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 ");
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -225,7 +225,7 @@ nsEventStateManager::UpdateCursor(nsIPresContext& aPresContext, nsPoint& aPoint,
|
||||
}
|
||||
|
||||
nsIWidget* window;
|
||||
aTargetFrame->GetWindow(window);
|
||||
aTargetFrame->GetWindow(&window);
|
||||
window->SetCursor(c);
|
||||
NS_RELEASE(window);
|
||||
}
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 ");
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user