Closed
Bug 14920
Opened 26 years ago
Closed 26 years ago
[4x.P] GFX textfield size="N,M" is treated as size="M"
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: MatsPalmgren_bugz, Assigned: rickg)
References
()
Details
(Whiteboard: [TESTCASE])
Attachments
(1 file)
|
425 bytes,
text/html
|
Details |
GFX textfield size="N,M" is treated as size="M" by apprunner.
Both Navigator 4.08 and IE5 on Windows 98 treats this as size="N".
At the given URL above, it's the textfield in the "Sign up for free newsletter"
form. I'm using apprunner 1999-09-24-09-M11 on Windows 98.
Will attach a testcase to illustrate in a moment.
| Reporter | ||
Comment 1•26 years ago
|
||
| Reporter | ||
Updated•26 years ago
|
Whiteboard: [TESTCASE]
Updated•26 years ago
|
Assignee: karnaze → kmcclusk
Comment 2•26 years ago
|
||
Reassigning to Kevin.
Updated•26 years ago
|
Assignee: kmcclusk → buster
Comment 3•26 years ago
|
||
I'm not sure this is valid. Do we have to replicate old parsing behavior when
looking at an invalid size specification. I don't think N,M is valid looking at
the HTML4.0 spec.
size = cdata [CN]
This attribute tells the user agent the initial width of the control. The
width is given in pixels except when type
attribute has the value "text" or "password". In that case, its value
refers to the (integer) number of characters.
Updated•26 years ago
|
Assignee: buster → kmcclusk
Updated•26 years ago
|
Assignee: kmcclusk → rickg
Comment 4•26 years ago
|
||
The problem is the call to nsString::ToInteger returns the second value after
the comma instead of the value before the comma
in nsGenericHTMLElement::ParseValue.
PRBool
nsGenericHTMLElement::ParseValue(const nsString& aString, PRInt32 aMin,
nsHTMLValue& aResult, nsHTMLUnit aValueUnit)
{
PRInt32 ec, val = aString.ToInteger(&ec);
if (NS_OK == ec) {
if (val < aMin) val = aMin;
if (eHTMLUnit_Pixel == aValueUnit) {
aResult.SetPixelValue(val);
}
else {
aResult.SetIntValue(val, aValueUnit);
}
return PR_TRUE;
}
return PR_FALSE;
}
Rick, should nsString::ToString be modified to return the first value instead of
the second in this case of aString.ToInteger("10,40"); ?
| Reporter | ||
Comment 5•26 years ago
|
||
Additional info:
Navigator 3.04, 4.6, 4.61 and IE4 also treats it as size="N"
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Using the 1999111016 M11 build on NT, this looks the same as in Nav 4.7. Marking
verified.
Status: RESOLVED → VERIFIED
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•