Bug 104141 - context menu doesn't appear on the first attempt. r=evaughan, sr=hyatt.

This commit is contained in:
bryner%netscape.com 2001-10-19 06:27:07 +00:00
Родитель 63f302f01a
Коммит 3be4e76341
1 изменённых файлов: 12 добавлений и 3 удалений

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

@ -253,7 +253,10 @@ nsMenuPopupFrame::MarkStyleChange(nsBoxLayoutState& aState)
nsIBox* parent = nsnull; nsIBox* parent = nsnull;
GetParentBox(&parent); GetParentBox(&parent);
if (parent) nsIMenuFrame* menuFrame = nsnull;
CallQueryInterface(parent, &menuFrame);
if (menuFrame)
return parent->RelayoutDirtyChild(aState, this); return parent->RelayoutDirtyChild(aState, this);
else { else {
nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext); nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext);
@ -310,7 +313,10 @@ nsMenuPopupFrame::MarkDirty(nsBoxLayoutState& aState)
nsIBox* parent = nsnull; nsIBox* parent = nsnull;
GetParentBox(&parent); GetParentBox(&parent);
if (parent) nsIMenuFrame* menuFrame = nsnull;
CallQueryInterface(parent, &menuFrame);
if (menuFrame)
return parent->RelayoutDirtyChild(aState, this); return parent->RelayoutDirtyChild(aState, this);
else { else {
nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext); nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext);
@ -355,7 +361,10 @@ nsMenuPopupFrame::RelayoutDirtyChild(nsBoxLayoutState& aState, nsIBox* aChild)
nsIBox* parentBox = nsnull; nsIBox* parentBox = nsnull;
GetParentBox(&parentBox); GetParentBox(&parentBox);
if (parentBox) nsIMenuFrame* menuFrame = nsnull;
CallQueryInterface(parentBox, &menuFrame);
if (menuFrame)
return parentBox->RelayoutDirtyChild(aState, this); return parentBox->RelayoutDirtyChild(aState, this);
else { else {
nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext); nsIPopupSetFrame* popupSet = GetPopupSetFrame(mPresContext);