Closed Bug 746570 Opened 12 years ago Closed 12 years ago

Codegen.py has lots of cases of using rstrip() where it means stripTrailingWhitespace()

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Because otherwise blank lines in the middle of the text getting processed will get whitespace on them.

Alternately, more use of CGIndenter?  ;)
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Comment on attachment 632908 [details] [diff] [review]
Get rid of bogus uses of rstrip() that are leaving random trailing spaces in the middle of our string.

Review of attachment 632908 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/Codegen.py
@@ +3212,5 @@
>              (memberString, lastVisibility, itemCount) = \
>                  declareMembers(self, memberList, lastVisibility, itemCount,
>                                 separator)
>              if self.indent:
> +                memberString = CGIndenter(CGGeneric(memberString)).define()

Shouldn't this use len(self.indent)?
Attachment #632908 - Flags: review?(peterv) → review+
> Shouldn't this use len(self.indent)?

Yes, indeed.  Will fix.
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f7ab21fde07
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/3f7ab21fde07
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: