[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2005-10-13 13:28:41
Message-ID: 1129210121.718606.2843.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 470260 by carewolf:

Fix layout of explicit embedding levels ( \
http://bugzilla.opendarwin.org/show_bug.cgi?id=3599 )


 M  +7 -8      bidi.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/bidi.cpp #470259:470260
@@ -604,10 +604,10 @@
 
 	    bidi.context = new BidiContext(level, runDir, bidi.context, override);
 	    bidi.context->ref();
-	    if ( override )
-		dir = runDir;
+	    dir = runDir;
 	    bidi.status.last = runDir;
 	    bidi.status.lastStrong = runDir;
+	    bidi.status.eor = runDir;
 	}
     }
     adjustEmbedding = b;
@@ -929,7 +929,6 @@
         case QChar::DirRLO:
         case QChar::DirLRO:
         case QChar::DirPDF:
-            bidi.eor = bidi.last;
             embed( dirCurrent, bidi );
             break;
 
@@ -1857,19 +1856,19 @@
                         // Ignore soft hyphens
                         BidiIterator endMid(0, o, pos-1);
                         addMidpoint(endMid);
-                        
+
                         // Add the width up to but not including the hyphen.
                         tmpW += t->width(lastSpace, pos - lastSpace, f);
-                        
+
                         // For whitespace normal only, include the hyphen.  We need \
to ensure it will fit  // on the line if it shows when we break.
                         if (o->style()->whiteSpace() == NORMAL)
                             tmpW += t->width(pos, 1, f);
-                        
+
                         BidiIterator startMid(0, o, pos+1);
                         addMidpoint(startMid);
                     }
-                    
+
                     pos++;
                     len--;
                     lastSpace = pos; // Cheesy hack to prevent adding in widths of \
the run twice. @@ -1934,7 +1933,7 @@
                             goto end;
                         else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) )
                             // Subtract the width of the soft hyphen out since we \
                fit on a line.
-                            tmpW -= t->width(pos-1, 1, f);                        
+                            tmpW -= t->width(pos-1, 1, f);
                     }
 
                     if( preserveLF && *(str+pos) == '\n' ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic