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

RESOLVED FIXED in mozilla16

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

(Blocks: 1 bug)

Trunk
mozilla16
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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

Alternately, more use of CGIndenter?  ;)
Created attachment 632908 [details] [diff] [review]
Get rid of bogus uses of rstrip() that are leaving random trailing spaces in the middle of our string.
Attachment #632908 - Flags: review?(peterv)
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.