Bug 174448 crash in [@ nsMenuPopupFrame::GetRootViewForPopup] on msnbc page

r=bzbarsky sr=hyatt sr=roc+moz a=roc+moz
This commit is contained in:
timeless%mac.com 2002-10-22 00:23:35 +00:00
parent c1caff3309
commit 79370a7e5a

View File

@ -625,8 +625,10 @@ nsMenuPopupFrame::AdjustClientXYForNestedDocuments ( nsIDOMXULDocument* inPopupD
nsIFrame* targetFrame;
shell->GetPrimaryFrameFor(targetAsContent, &targetFrame);
nsIView* parentView = nsnull;
GetRootViewForPopup(mPresContext, targetFrame, &parentView);
GetWidgetForView(parentView, *getter_AddRefs(targetDocumentWidget));
if (targetFrame) {
GetRootViewForPopup(mPresContext, targetFrame, &parentView);
GetWidgetForView(parentView, *getter_AddRefs(targetDocumentWidget));
}
if (!targetDocumentWidget) {
// We aren't inside a popup. This means we should use the root view's
// widget.