Not (Really) Part Of The Build. Fix embarrassing error in nsLineBreaker...
authorroc+@cs.cmu.edu
Wed, 30 May 2007 17:06:31 -0700
changeset 2021 bae62e14b092fc0ff9bd2fe3f2fc9bf961131ed4
parent 2020 96fd446b9dcf28d83af21ef7f38a5889c1a0f2c5
child 2022 73fe4d3308db4ff019921e6b973a7e76ecaf92f4
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9a5pre
Not (Really) Part Of The Build. Fix embarrassing error in nsLineBreaker...
content/base/src/nsLineBreaker.cpp
--- a/content/base/src/nsLineBreaker.cpp
+++ b/content/base/src/nsLineBreaker.cpp
@@ -159,17 +159,17 @@ nsLineBreaker::AppendText(nsIAtom* aLang
   PRUint32 wordStart = offset;
   PRBool wordHasCJK = PR_FALSE;
 
   for (;;) {
     PRUnichar ch = aText[offset];
     PRBool isSpace = IS_SPACE(ch);
 
     breakState[offset] = mAfterSpace && !isSpace &&
-      (aFlags & (start == 0 ? BREAK_ALLOW_INITIAL : BREAK_ALLOW_INSIDE));
+      (aFlags & (offset == 0 ? BREAK_ALLOW_INITIAL : BREAK_ALLOW_INSIDE));
     mAfterSpace = isSpace;
 
     if (isSpace) {
       if (offset > wordStart && wordHasCJK) {
         if (aFlags & BREAK_ALLOW_INSIDE) {
           // Save current start-of-word state because GetJISx4051Breaks will
           // set it to false
           PRPackedBool currentStart = breakState[wordStart];
@@ -249,17 +249,17 @@ nsLineBreaker::AppendText(nsIAtom* aLang
   PRUint32 start = offset;
   PRUint32 wordStart = offset;
 
   for (;;) {
     PRUint8 ch = aText[offset];
     PRBool isSpace = IS_SPACE(ch);
 
     breakState[offset] = mAfterSpace && !isSpace &&
-      (aFlags & (start == 0 ? BREAK_ALLOW_INITIAL : BREAK_ALLOW_INSIDE));
+      (aFlags & (offset == 0 ? BREAK_ALLOW_INITIAL : BREAK_ALLOW_INSIDE));
     mAfterSpace = isSpace;
 
     if (isSpace) {
       // The current word can't have any special (CJK/Thai) characters inside it
       // because this is 8-bit text, so just ignore it
       ++offset;
       if (offset >= aLength)
         break;