Version: (using KDE Devel) Installed from: Compiled sources Lines in <ul><li>...</li></ul> don't break anymore, e.g. in this example: <HTML> <HEAD> <TITLE>test</TITLE> </HEAD> <BODY> <ul> <li>You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.</li> </ul> </BODY> </HTML>
Confirm broken in HEAD, too.
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