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:
rods%netscape.com 2000-03-18 14:20:03 +00:00
parent 425572a3d4
commit 1310a72d4b
4 changed files with 2 additions and 52 deletions

View File

@ -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);

View File

@ -200,7 +200,6 @@ protected:
nscoord aAvailableWidth,
nscoord aAvailableHeight);
nsresult GetScreenHeight(nsIPresContext* aPresContext, nscoord& aHeight);
public:
nsresult PositionDropdown(nsIPresContext* aPresContext,
nscoord aHeight,

View File

@ -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);

View File

@ -200,7 +200,6 @@ protected:
nscoord aAvailableWidth,
nscoord aAvailableHeight);
nsresult GetScreenHeight(nsIPresContext* aPresContext, nscoord& aHeight);
public:
nsresult PositionDropdown(nsIPresContext* aPresContext,
nscoord aHeight,