Closed
Bug 154345
Opened 23 years ago
Closed 22 years ago
ParseValueOrPercent compressing whitespace unnecessarily
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 obsolete file)
nsGenericElement::ParseValueOrPercent and
nsGenericElement::ParseValueOrPercentOrProportional are calling
CompressWhitespace(), which is not needed -- ToInteger() will properly handle
leading whitespace...
![]() |
Assignee | |
Comment 1•23 years ago
|
||
Fixing ParseValueOrPercentOrProportional is hard; this fixes
ParseValueOrPercent
Comment 2•23 years ago
|
||
Comment on attachment 89240 [details] [diff] [review]
Proposed patch
r=peterv
Attachment #89240 -
Flags: review+
Comment 3•23 years ago
|
||
Comment on attachment 89240 [details] [diff] [review]
Proposed patch
Split the line:
if (val < 0) val = 0;
into two separate lines, and add braces while you're at it...
sr=jst
Attachment #89240 -
Flags: superreview+
![]() |
Assignee | |
Comment 4•23 years ago
|
||
Fix checked in; I'll want to get rid of those nsAutoStrings in general at some
point, methinks....
Priority: -- → P5
Target Milestone: --- → Future
![]() |
Assignee | |
Updated•23 years ago
|
Attachment #89240 -
Attachment is obsolete: true
Updated•23 years ago
|
QA Contact: desale → stummala
Boris: please be very carefull what you are doing here, this code is heavily
used by tables and it covers some strange attribute cases. Please look at lxr
that you don't regress the bugs that have been fixed here already.
![]() |
Assignee | |
Comment 6•23 years ago
|
||
Yeah, I will.... that's why I did not touch ParseValueOrPercentOrProportional yet...
![]() |
Assignee | |
Comment 7•22 years ago
|
||
alright, marking this fixed. jkeiser moved all this code around and I think we
now only compress whitespace when it's actually needed (see
nsHTMLValue::ParseIntValue)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•