зеркало из https://github.com/mozilla/gecko-dev.git
Fix for dogfood bug #43474
This commit is contained in:
Родитель
331b3696f8
Коммит
675ae572ce
|
@ -657,16 +657,17 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag)
|
|||
}
|
||||
|
||||
nsRect curRect;
|
||||
menuPopup->GetRect(curRect);
|
||||
menuPopup->GetBounds(curRect);
|
||||
|
||||
menuPopup->SetRect(mPresContext, nsRect(0,0,mLastPref.width, mLastPref.height));
|
||||
nsBoxLayoutState state(mPresContext);
|
||||
menuPopup->SetBounds(state, nsRect(0,0,mLastPref.width, mLastPref.height));
|
||||
|
||||
nsIView* view = nsnull;
|
||||
menuPopup->GetView(mPresContext, &view);
|
||||
view->SetVisibility(nsViewVisibility_kHide);
|
||||
menuPopup->SyncViewWithFrame(mPresContext, popupAnchor, popupAlign, this, -1, -1);
|
||||
nsRect rect;
|
||||
menuPopup->GetRect(rect);
|
||||
menuPopup->GetBounds(rect);
|
||||
|
||||
// if the height is different then reflow. It might need scrollbars force a reflow
|
||||
if (curRect.height != rect.height || mLastPref.height != rect.height)
|
||||
|
|
|
@ -140,7 +140,7 @@ nsMenuPopupFrame::Init(nsIPresContext* aPresContext,
|
|||
GetView(aPresContext, &ourView);
|
||||
|
||||
nsIFrame* parent;
|
||||
aParent->GetParentWithView(aPresContext, &parent);
|
||||
GetParentWithView(aPresContext, &parent);
|
||||
nsIView* parentView;
|
||||
parent->GetView(aPresContext, &parentView);
|
||||
|
||||
|
@ -490,7 +490,9 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
|
|||
//
|
||||
|
||||
nsIView* parentView = nsnull;
|
||||
GetNearestEnclosingView(aPresContext, aFrame, &parentView);
|
||||
nsIFrame* parentFrame = nsnull;
|
||||
aFrame->GetParent(&parentFrame);
|
||||
GetNearestEnclosingView(aPresContext, parentFrame, &parentView);
|
||||
if (!parentView)
|
||||
return NS_OK;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче