now calls viewmanager to effect view changes.

This commit is contained in:
michaelp 1998-06-02 22:04:54 +00:00
parent 22bc23f28a
commit d4e9eac3bb

View File

@ -387,7 +387,9 @@ NS_METHOD nsFrame::MoveTo(nscoord aX, nscoord aY)
nsIView* parentWithView;
nsPoint origin;
GetOffsetFromView(origin, parentWithView);
mView->SetPosition(origin.x, origin.y);
nsIViewManager *vm = mView->GetViewManager();
vm->MoveViewTo(mView, origin.x, origin.y);
NS_RELEASE(vm);
NS_IF_RELEASE(parentWithView);
}
@ -401,7 +403,9 @@ NS_METHOD nsFrame::SizeTo(nscoord aWidth, nscoord aHeight)
// Let the view know
if ((nsnull != mView) && (0 == (mState & NS_FRAME_IN_REFLOW))) {
mView->SetDimensions(aWidth, aHeight);
nsIViewManager *vm = mView->GetViewManager();
vm->ResizeView(mView, aWidth, aHeight);
NS_RELEASE(vm);
}
return NS_OK;
}
@ -1012,8 +1016,10 @@ nsFrame::DidReflow(nsIPresContext& aPresContext,
nsIView* parentWithView;
nsPoint origin;
GetOffsetFromView(origin, parentWithView);
nsRect bounds(origin.x, origin.y, mRect.width, mRect.height);
mView->SetBounds(bounds);
nsIViewManager *vm = mView->GetViewManager();
vm->ResizeView(mView, mRect.width, mRect.height);
vm->MoveViewTo(mView, origin.x, origin.y);
NS_RELEASE(vm);
NS_IF_RELEASE(parentWithView);
}
}