Removed code where standard mode was incorrectly subtracting border size

r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@50145 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
1999-10-07 21:37:02 +00:00
parent 1c08cd13d9
commit f291b097d5
2 changed files with 4 additions and 28 deletions

View File

@@ -176,9 +176,8 @@ nsTextControlFrame::GetHorizontalInsidePadding(nsIPresContext& aPresContext,
} else {
padding = (nscoord)(aCharWidth * padTextField);
}
#ifdef DEBUG_rods
printf("Padding - %d %5.2f %d\n", aCharWidth, padTextField, padding);
#endif
nscoord min = NSIntPixelsToTwips(padMinText, aPixToTwip);
if (padding > min && (1 == shouldUsePadMinText)) {
return padding;
@@ -291,17 +290,6 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
}
}
if (eCompatibility_Standard == mode) {
nsCOMPtr<nsILookAndFeel> lookAndFeel;
if (NS_SUCCEEDED(aPresContext->GetLookAndFeel(getter_AddRefs(lookAndFeel)))) {
PRInt32 borderSize;
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_TextFieldBorder, borderSize);
nscoord borderTwips = NSIntPixelsToTwips(borderSize, p2t);
desiredSize.width -= borderTwips*2;
desiredSize.height -= borderTwips*2;
}
}
aDesiredLayoutSize.width = desiredSize.width;
aDesiredLayoutSize.height = desiredSize.height;
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;