Removed code where standard mode was incorrectly subtracting border size

r=kmcclusk
This commit is contained in:
rods%netscape.com 1999-10-07 21:37:02 +00:00
Родитель 4c78ed1e7f
Коммит aad2ad4877
2 изменённых файлов: 4 добавлений и 28 удалений

Просмотреть файл

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

Просмотреть файл

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