Last Comment Bug 746570 - Codegen.py has lots of cases of using rstrip() where it means stripTrailingWhitespace()
: Codegen.py has lots of cases of using rstrip() where it means stripTrailingWh...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla16
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on:
Blocks: ParisBindings
  Show dependency treegraph
 
Reported: 2012-04-18 07:44 PDT by Boris Zbarsky [:bz]
Modified: 2012-06-16 06:51 PDT (History)
1 user (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Get rid of bogus uses of rstrip() that are leaving random trailing spaces in the middle of our string. (4.07 KB, patch)
2012-06-13 15:14 PDT, Boris Zbarsky [:bz]
peterv: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] 2012-04-18 07:44:09 PDT
Because otherwise blank lines in the middle of the text getting processed will get whitespace on them.

Alternately, more use of CGIndenter?  ;)
Comment 1 Boris Zbarsky [:bz] 2012-06-13 15:14:30 PDT
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.
Comment 2 Peter Van der Beken [:peterv] 2012-06-15 03:08:38 PDT
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)?
Comment 3 Boris Zbarsky [:bz] 2012-06-15 08:08:44 PDT
> Shouldn't this use len(self.indent)?

Yes, indeed.  Will fix.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-06-16 06:51:12 PDT
https://hg.mozilla.org/mozilla-central/rev/3f7ab21fde07

Note You need to log in before you can comment on or make changes to this bug.