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

List:       kde-bugs-dist
Subject:    [Bug 76464] list rendering: lines don't break (3.2.1 regression?)
From:       Dirk Mueller <mueller () kde ! org>
Date:       2004-03-01 1:34:15
Message-ID: 20040301013415.26356.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
      
http://bugs.kde.org/show_bug.cgi?id=76464      
mueller kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From mueller kde org  2004-03-01 02:34 -------
CVS commit by mueller: 

grrrr... 
CCMAIL: 76464-done bugs kde org


  M +46 -37    bidi.cpp   1.186


--- kdelibs/khtml/rendering/bidi.cpp  #1.185:1.186
 @ -1347,6 +1347,7  @ BidiIterator RenderBlock::findNextLineBr
                 int lastSpace = pos;
                 bool isPre = style()->whiteSpace() == PRE;
-                currentCharacterIsSpace = str[pos] == ' ' || (!isPre && str[pos] == \
'\n'); +
                 while(len) {
+                    currentCharacterIsSpace = str[pos] == ' ' || (!isPre && str[pos] \
== '\n');  if( (isPre && str[pos] == '\n') ||
                         (!isPre && isBreakable( str, pos, strlen ) ) ) {
 @ -1360,6 +1363,13  @ BidiIterator RenderBlock::findNextLineBr
 #endif
                     if ( !isPre && w + tmpW > width && w == 0 ) {
-                        int fb = floatBottom();
+                            int fb = nearestFloatBottom(m_height);
                         int newLineWidth = lineWidth(fb);
+                            int lastFloatBottom = m_height;
+                            while ( lastFloatBottom < fb && tmpW > newLineWidth ) {
+                                lastFloatBottom = fb;
+                                fb = nearestFloatBottom( fb );
+                                newLineWidth = lineWidth( fb );
+                            }
+
                         if(!w && m_height < fb && width < newLineWidth) {
                             m_height = fb;
 @ -1370,18 +1380,21  @ BidiIterator RenderBlock::findNextLineBr
                         }
                     }
-                    if ( !isPre && w + tmpW > width )
+
+                        if ( w + tmpW > width && o->style()->whiteSpace() == NORMAL \
)  goto end;
 
+                        if ( isPre && str[pos] == '\n' ) {
                     lBreak.obj = o;
                     lBreak.pos = pos;
-
-                    if( str[pos] == '\n' ) {
-#ifdef DEBUG_LINEBREAKS
-                        kdDebug(6041) << "forced break sol: " << start.obj << " " << \
start.pos << "   end: " << lBreak.obj << " " << lBreak.pos << "   width=" << w << \
                endl;
-#endif
                         return lBreak;
                     }
+
+                        if ( o->style()->whiteSpace() == NORMAL ) {
                     w += tmpW;
                     tmpW = 0;
+                            lBreak.obj = o;
+                            lBreak.pos = pos;
+                        }
+
                     lastSpace = pos;
                 }
 @ -1528,8 +1541,4  @ BidiIterator RenderBlock::findNextLineBr
     // of the next object instead to avoid confusing the rest of the
     // code.
-    if (lBreak.pos > 0) {
-        lBreak.pos--;
-        ++lBreak;
-    }
 
 #ifdef DEBUG_LINEBREAKS


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

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