Add patch to remove whitespace on empty lines in nsCharSeparatedTokenizer.h
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 03 May 2010 19:14:47 -0700
changeset 1556 07e0021effbc68a28557e1c1b65808bc5a3f5b4e
parent 1555 919d2f65c65b14eeb88b0d0de07840414c8da814
child 1557 a344046617ac232c66483e82cdaec75dc3d39ce7
push id1254
push userdholbert@mozilla.com
push dateTue, 04 May 2010 02:15:02 +0000
Add patch to remove whitespace on empty lines in nsCharSeparatedTokenizer.h
series
tokenizer_removeEmptylineWhitespace
--- a/series
+++ b/series
@@ -1,13 +1,14 @@
 smil_infallibleMisc #+WIP
 tokenizer_renameFile
 tokenizer_allowOtherChars
 tokenizer_allowSeparatorToBeOptional
 tokenizer_fixOldUses
 tokenizer_useInSVGAndSMIL
 tokenizer_extendCstringVersion
+tokenizer_removeEmptylineWhitespace
 smil_541297ChangeAbortToWarning
 smil_541297Fix
 smil_debuggingCode #+debug
 smil_misc #+nits
 smil_cacheTextZoom #+notsure
 smil_alwaysRecomposeDebugging #+debug
new file mode 100644
--- /dev/null
+++ b/tokenizer_removeEmptylineWhitespace
@@ -0,0 +1,55 @@
+From: Daniel Holbert <dholbert@cs.stanford.edu>
+Bug 562310 followup: remove whitespace on empty lines, in nsCharSeparatedTokenizer.h. (whitespace-only changes)
+
+diff --git a/xpcom/ds/nsCharSeparatedTokenizer.h b/xpcom/ds/nsCharSeparatedTokenizer.h
+--- a/xpcom/ds/nsCharSeparatedTokenizer.h
++++ b/xpcom/ds/nsCharSeparatedTokenizer.h
+@@ -139,17 +139,17 @@ public:
+         // Skip separator (and any whitespace after it), if we're at one.
+         if (mLastTokenEndedWithSeparator) {
+             ++mIter;
+ 
+             while (mIter != mEnd && isWhitespace(*mIter)) {
+                 ++mIter;
+             }
+         }
+-        
++
+         return Substring(begin, end);
+     }
+ 
+ private:
+     nsSubstring::const_char_iterator mIter, mEnd;
+     PRPackedBool mLastTokenEndedWithSeparator;
+     PRUnichar mSeparatorChar;
+     PRUint32  mFlags;
+@@ -199,27 +199,27 @@ public:
+               ++mIter;
+           }
+           end = mIter;
+ 
+           while (mIter != mEnd && isWhitespace(*mIter)) {
+               ++mIter;
+           }
+         }
+-        
++
+         // Skip separator (and any whitespace after it).
+         if (mIter != mEnd) {
+             NS_ASSERTION(*mIter == mSeparatorChar, "Ended loop too soon");
+             ++mIter;
+ 
+             while (mIter != mEnd && isWhitespace(*mIter)) {
+                 ++mIter;
+             }
+         }
+-        
++
+         return Substring(begin, end);
+     }
+ 
+ private:
+     nsCSubstring::const_char_iterator mIter, mEnd;
+     PRUnichar mSeparatorChar;
+ 
+     PRBool isWhitespace(unsigned char aChar)