зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2d1bf652ef
Коммит
4b92064d44
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче