Fix for bug 188872 (Switching between type of HTMLInputElement incorrectly reset size from Int to pixel). Fix by Ruslan Ismailov <croo@nm.ru>, r=sicking, sr=peterv.

This commit is contained in:
peterv%netscape.com 2003-01-14 09:53:57 +00:00
Родитель 850a7a8524
Коммит 0f3016339b
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -534,7 +534,9 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsHTMLValue newValue(value.GetPixelValue(), eHTMLUnit_Integer);
SetHTMLAttribute(nsHTMLAtoms::size, newValue, PR_FALSE);
}
else if (value.GetUnit() == eHTMLUnit_Integer) {
else if (value.GetUnit() == eHTMLUnit_Integer &&
mType != NS_FORM_INPUT_TEXT &&
mType != NS_FORM_INPUT_PASSWORD) {
nsHTMLValue newValue(value.GetIntValue(), eHTMLUnit_Pixel);
SetHTMLAttribute(nsHTMLAtoms::size, newValue, PR_FALSE);
}