mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 233441. Make nsViewManager always have a root view, you can't change it. r+sr=dbaron
This commit is contained in:
parent
3c02d7de57
commit
3c25d2a2c8
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user