Bug 503791. ComboboxControlFrame should not assume that the origin of the screen is (0,0) because that is not true with more than one display. r=dbaron

This commit is contained in:
Timothy Nikkel
2009-08-17 20:21:07 -07:00
parent 1a3f3569e9
commit 097ae34ad2
4 changed files with 29 additions and 37 deletions

View File

@@ -177,9 +177,9 @@ nsFormControlFrame::GetFormProperty(nsIAtom* aName, nsAString& aValue) const
return NS_OK;
}
nsresult
nsFormControlFrame::GetScreenHeight(nsPresContext* aPresContext,
nscoord& aHeight)
// static
nsRect
nsFormControlFrame::GetUsableScreenRect(nsPresContext* aPresContext)
{
nsRect screen;
@@ -189,10 +189,9 @@ nsFormControlFrame::GetScreenHeight(nsPresContext* aPresContext,
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_MenusCanOverlapOSBar,
dropdownCanOverlapOSBar);
if ( dropdownCanOverlapOSBar )
context->GetRect ( screen );
context->GetRect(screen);
else
context->GetClientRect(screen);
aHeight = aPresContext->AppUnitsToDevPixels(screen.height);
return NS_OK;
return screen;
}