Bug 233441. Make nsViewManager always have a root view, you can't change it. r+sr=dbaron

This commit is contained in:
roc+%cs.cmu.edu 2006-05-17 02:38:31 +00:00
parent 3c02d7de57
commit 3c25d2a2c8

View File

@ -139,15 +139,9 @@ inLayoutUtils::GetClientOrigin(nsIPresContext* aPresContext,
nsPoint result(0,0);
nsIView* view;
aFrame->GetOffsetFromView(aPresContext, result, &view);
nsIView* rootView = nsnull;
if (view) {
nsIViewManager* viewManager = view->GetViewManager();
NS_ASSERTION(viewManager, "View must have a viewmanager");
viewManager->GetRootView(rootView);
}
while (view) {
result += view->GetPosition();
if (view == rootView) {
if (view->ExternalIsRoot()) {
break;
}
view = view->GetParent();