mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
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:
parent
2d1bf652ef
commit
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user