зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8db2450c5f
Коммит
655ebc2dca
|
@ -867,6 +867,7 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
|
||||||
// if the canvas is scrolled so that part is off screen.
|
// if the canvas is scrolled so that part is off screen.
|
||||||
nsIView* containingView = nsnull;
|
nsIView* containingView = nsnull;
|
||||||
nsPoint offset;
|
nsPoint offset;
|
||||||
|
nsMargin margin;
|
||||||
aFrame->GetOffsetFromView(aPresContext, offset, &containingView);
|
aFrame->GetOffsetFromView(aPresContext, offset, &containingView);
|
||||||
if (!containingView)
|
if (!containingView)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -982,7 +983,6 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
|
||||||
// Add in the top and left margins
|
// Add in the top and left margins
|
||||||
const nsStyleMargin* smargin =
|
const nsStyleMargin* smargin =
|
||||||
(const nsStyleMargin*)mStyleContext->GetStyleData(eStyleStruct_Margin);
|
(const nsStyleMargin*)mStyleContext->GetStyleData(eStyleStruct_Margin);
|
||||||
nsMargin margin;
|
|
||||||
smargin->GetMargin(margin);
|
smargin->GetMargin(margin);
|
||||||
|
|
||||||
xpos += margin.left;
|
xpos += margin.left;
|
||||||
|
@ -1234,7 +1234,7 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
|
||||||
xpos -= mRect.width;
|
xpos -= mRect.width;
|
||||||
}
|
}
|
||||||
if ( (screenViewLocY + mRect.height) > screenBottomTwips )
|
if ( (screenViewLocY + mRect.height) > screenBottomTwips )
|
||||||
ypos -= (screenViewLocY + mRect.height) - screenBottomTwips;
|
ypos -= (mRect.height + margin.top + margin.bottom);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче