bugs 642, 643; also removed unused files.

This commit is contained in:
karnaze@netscape.com
1998-09-28 21:32:24 +00:00
parent 39aa20c7df
commit bcd6d1bb45
11 changed files with 155 additions and 1880 deletions
+4 -24
View File
@@ -351,31 +351,11 @@ nsSelectControlFrame::PostCreateWidget(nsIPresContext* aPresContext)
NS_ASSERTION(PR_FALSE, "invalid widget");
return;
}
mWidget->SetBackgroundColor(NS_RGB(0xFF, 0xFF, 0xFF));
const nsStyleFont* styleFont = (const nsStyleFont*)mStyleContext->GetStyleData(eStyleStruct_Font);
if ((styleFont->mFlags & NS_STYLE_FONT_FACE_EXPLICIT) ||
(styleFont->mFlags & NS_STYLE_FONT_SIZE_EXPLICIT)) {
nsFont widgetFont(styleFont->mFixedFont);
widgetFont.weight = NS_FONT_WEIGHT_NORMAL; // always normal weight
widgetFont.size = styleFont->mFont.size; // normal font size
if (0 == (styleFont->mFlags & NS_STYLE_FONT_FACE_EXPLICIT)) {
widgetFont.name = "Arial"; // XXX windows specific font
}
mWidget->SetFont(widgetFont);
} else {
// use arial, scaled down one HTML size
// italics, decoration & variant(?) get used
nsFont widgetFont(styleFont->mFont);
widgetFont.name = "Arial"; // XXX windows specific font
widgetFont.weight = NS_FONT_WEIGHT_NORMAL;
const nsFont& normal = aPresContext->GetDefaultFont();
PRInt32 scaler = aPresContext->GetFontScaler();
float scaleFactor = nsStyleUtil::GetScalingFactor(scaler);
PRInt32 fontIndex = nsStyleUtil::FindNextSmallerFontSize(widgetFont.size, (PRInt32)normal.size, scaleFactor);
widgetFont.size = nsStyleUtil::CalcFontPointSize(fontIndex, (PRInt32)normal.size, scaleFactor);
mWidget->SetFont(widgetFont);
}
nsFont font(aPresContext->GetDefaultFixedFont());
GetFont(aPresContext, font);
mWidget->SetFont(font);
SetColors();
// add the options
if (!mOptionsAdded) {