Removed GetScreenHeight and using the one in nsFormControlFrame
b=25774 r=kmcclusk git-svn-id: svn://10.0.0.236/trunk@63395 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
425572a3d4
commit
1310a72d4b
@ -624,30 +624,6 @@ nsComboboxControlFrame::GetDropdownFrame()
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsComboboxControlFrame::GetScreenHeight(nsIPresContext* aPresContext,
|
||||
nscoord& aHeight)
|
||||
{
|
||||
aHeight = 0;
|
||||
nsIDeviceContext* context;
|
||||
aPresContext->GetDeviceContext( &context );
|
||||
if ( nsnull != context )
|
||||
{
|
||||
PRInt32 height;
|
||||
PRInt32 width;
|
||||
context->GetDeviceSurfaceDimensions(width, height);
|
||||
float devUnits;
|
||||
context->GetDevUnitsToAppUnits(devUnits);
|
||||
aHeight = NSToIntRound(float( height) / devUnits );
|
||||
NS_RELEASE( context );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
|
||||
nsresult
|
||||
nsComboboxControlFrame::PositionDropdown(nsIPresContext* aPresContext,
|
||||
nscoord aHeight,
|
||||
@ -676,7 +652,7 @@ nsComboboxControlFrame::PositionDropdown(nsIPresContext* aPresContext,
|
||||
dropdownFrame->GetRect(dropdownRect);
|
||||
|
||||
nscoord screenHeightInPixels = 0;
|
||||
if (NS_SUCCEEDED(GetScreenHeight(aPresContext, screenHeightInPixels))) {
|
||||
if (NS_SUCCEEDED(nsFormControlFrame::GetScreenHeight(aPresContext, screenHeightInPixels))) {
|
||||
// Get the height of the dropdown list in pixels.
|
||||
float t2p;
|
||||
aPresContext->GetTwipsToPixels(&t2p);
|
||||
|
||||
@ -200,7 +200,6 @@ protected:
|
||||
nscoord aAvailableWidth,
|
||||
nscoord aAvailableHeight);
|
||||
|
||||
nsresult GetScreenHeight(nsIPresContext* aPresContext, nscoord& aHeight);
|
||||
public:
|
||||
nsresult PositionDropdown(nsIPresContext* aPresContext,
|
||||
nscoord aHeight,
|
||||
|
||||
@ -624,30 +624,6 @@ nsComboboxControlFrame::GetDropdownFrame()
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsComboboxControlFrame::GetScreenHeight(nsIPresContext* aPresContext,
|
||||
nscoord& aHeight)
|
||||
{
|
||||
aHeight = 0;
|
||||
nsIDeviceContext* context;
|
||||
aPresContext->GetDeviceContext( &context );
|
||||
if ( nsnull != context )
|
||||
{
|
||||
PRInt32 height;
|
||||
PRInt32 width;
|
||||
context->GetDeviceSurfaceDimensions(width, height);
|
||||
float devUnits;
|
||||
context->GetDevUnitsToAppUnits(devUnits);
|
||||
aHeight = NSToIntRound(float( height) / devUnits );
|
||||
NS_RELEASE( context );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
|
||||
nsresult
|
||||
nsComboboxControlFrame::PositionDropdown(nsIPresContext* aPresContext,
|
||||
nscoord aHeight,
|
||||
@ -676,7 +652,7 @@ nsComboboxControlFrame::PositionDropdown(nsIPresContext* aPresContext,
|
||||
dropdownFrame->GetRect(dropdownRect);
|
||||
|
||||
nscoord screenHeightInPixels = 0;
|
||||
if (NS_SUCCEEDED(GetScreenHeight(aPresContext, screenHeightInPixels))) {
|
||||
if (NS_SUCCEEDED(nsFormControlFrame::GetScreenHeight(aPresContext, screenHeightInPixels))) {
|
||||
// Get the height of the dropdown list in pixels.
|
||||
float t2p;
|
||||
aPresContext->GetTwipsToPixels(&t2p);
|
||||
|
||||
@ -200,7 +200,6 @@ protected:
|
||||
nscoord aAvailableWidth,
|
||||
nscoord aAvailableHeight);
|
||||
|
||||
nsresult GetScreenHeight(nsIPresContext* aPresContext, nscoord& aHeight);
|
||||
public:
|
||||
nsresult PositionDropdown(nsIPresContext* aPresContext,
|
||||
nscoord aHeight,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user