bug 120226, can't show system hint when browser maximize

patch by jerry.tan@sun.com r=bryner, sr=hewitt
This commit is contained in:
jerry.tan%sun.com 2002-08-10 10:16:39 +00:00
Родитель 8db2450c5f
Коммит 655ebc2dca
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -867,6 +867,7 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
// if the canvas is scrolled so that part is off screen.
nsIView* containingView = nsnull;
nsPoint offset;
nsMargin margin;
aFrame->GetOffsetFromView(aPresContext, offset, &containingView);
if (!containingView)
return NS_OK;
@ -982,7 +983,6 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
// Add in the top and left margins
const nsStyleMargin* smargin =
(const nsStyleMargin*)mStyleContext->GetStyleData(eStyleStruct_Margin);
nsMargin margin;
smargin->GetMargin(margin);
xpos += margin.left;
@ -1234,7 +1234,7 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
xpos -= mRect.width;
}
if ( (screenViewLocY + mRect.height) > screenBottomTwips )
ypos -= (screenViewLocY + mRect.height) - screenBottomTwips;
ypos -= (mRect.height + margin.top + margin.bottom);
}