Backing out 233441.

git-svn-id: svn://10.0.0.236/trunk@197726 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu 2006-05-17 02:38:28 +00:00
parent aa37223e7a
commit cb0706fbe3

View File

@ -139,9 +139,15 @@ 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->ExternalIsRoot()) {
if (view == rootView) {
break;
}
view = view->GetParent();