Use a prescontext from the same document as the frame when trying to get

views.  Bug 180329, r=peterv, sr=roc+moz, a=brendan.
This commit is contained in:
bzbarsky%mit.edu 2002-12-09 15:02:18 +00:00
Родитель 2d1bf652ef
Коммит 4b92064d44
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

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