Closed
Bug 13526
Opened 26 years ago
Closed 26 years ago
unable to set or read percent through DOM
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jcarpenter0524, Assigned: karnaze)
Details
Attachments
(1 file)
348 bytes,
text/html
|
Details |
Overview Description:
In tables, for example, I can't read or set cellPadding to a percentage value
through DOM. The value I receive when I try to read a percentage value is the
same as if I were reading a pixel value.
Steps to Reproduce:
- Will attach example code
Actual Results:
(from the example code) 10
Expected Results:
(from the example code) 10%
Build Date & Platform Bug Found:
Win98 1999090311
Additional Builds and Platforms Tested On:
WinNT, MacPPC, Linux
Additional Information:
Reporter | ||
Comment 1•26 years ago
|
||
Reporter | ||
Updated•26 years ago
|
QA Contact: gerardok → janc
Reporter | ||
Comment 2•26 years ago
|
||
previous email concerning this bug:
vidur:
Seems like a bug in nsHTMLTableElement's StringToAttribute method. The current
implementation has:
if ((aAttribute == nsHTMLAtoms::cellspacing) ||
(aAttribute == nsHTMLAtoms::cellpadding)) {
if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
Seems like we should be calling ParseValueOrPerecent() of ParseValue(). Cc:ing
Peter to make sure I'm right - I've been wrong about
this stuff before.
--V
peterl:
Yes, that should be ParseValueOrPercent. Chris, you also need to ensure that you
handle percent values in AttributeToString and
MapAttributesInto (as well as in the actual cell padding/spacing code).
P
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•26 years ago
|
||
The attachment now works. Percentage values actually rendering properly is
another bug and applies to cellpadding, cellspacing, etc.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 4•26 years ago
|
||
verified
Reporter | ||
Comment 5•26 years ago
|
||
verified
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•