Commit f14a4a3d authored by hyatt's avatar hyatt

Fix mac.com regression (and weather.com regression).

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 009044ff
2002-11-21 David Hyatt <hyatt@apple.com>
Fix mac.com regression (and weather.com regression).
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-21 Richard Williamson <rjw@apple.com> 2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh. Fixed performance regression! Argh.
......
2002-11-21 David Hyatt <hyatt@apple.com>
Fix mac.com regression (and weather.com regression).
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-21 Richard Williamson <rjw@apple.com> 2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh. Fixed performance regression! Argh.
......
2002-11-21 David Hyatt <hyatt@apple.com>
Fix mac.com regression (and weather.com regression).
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-21 Richard Williamson <rjw@apple.com> 2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh. Fixed performance regression! Argh.
......
...@@ -1201,11 +1201,11 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte ...@@ -1201,11 +1201,11 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
static_cast<RenderFlow*>(o->containingBlock())->insertSpecialObject(o); static_cast<RenderFlow*>(o->containingBlock())->insertSpecialObject(o);
} }
} else if ( o->isReplaced() ) { } else if ( o->isReplaced() ) {
if (o->style()->whiteSpace() != NOWRAP || (!last || last->style()->whiteSpace() != NOWRAP)) { if (o->style()->whiteSpace() != NOWRAP || last->style()->whiteSpace() != NOWRAP) {
w += tmpW; w += tmpW;
tmpW = 0; tmpW = 0;
lBreak.obj = last; lBreak.obj = o;
lBreak.pos = last ? last->length() : 0; lBreak.pos = 0;
} }
tmpW += o->width()+o->marginLeft()+o->marginRight(); tmpW += o->width()+o->marginLeft()+o->marginRight();
...@@ -1367,6 +1367,7 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte ...@@ -1367,6 +1367,7 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
kdDebug() << "RenderFlow::findNextLineBreak new position at " << m_height << " newWidth " << width << endl; kdDebug() << "RenderFlow::findNextLineBreak new position at " << m_height << " newWidth " << width << endl;
#endif #endif
} }
if( !w && w + tmpW > width+1 && (o != start.obj || (unsigned) pos != start.pos) ) { if( !w && w + tmpW > width+1 && (o != start.obj || (unsigned) pos != start.pos) ) {
// getting below floats wasn't enough... // getting below floats wasn't enough...
//kdDebug() << "still too wide w=" << w << " tmpW = " << tmpW << " width = " << width << endl; //kdDebug() << "still too wide w=" << w << " tmpW = " << tmpW << " width = " << width << endl;
...@@ -1386,7 +1387,10 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte ...@@ -1386,7 +1387,10 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
goto end; goto end;
} }
if (o->isReplaced() && o->style()->whiteSpace() != NOWRAP) { last = o;
o = Bidinext( start.par, o );
if (last->isReplaced() && last->style()->whiteSpace() != NOWRAP) {
// Go ahead and add in tmpW. // Go ahead and add in tmpW.
w += tmpW; w += tmpW;
tmpW = 0; tmpW = 0;
...@@ -1394,8 +1398,6 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte ...@@ -1394,8 +1398,6 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
lBreak.pos = 0; lBreak.pos = 0;
} }
last = o;
o = Bidinext( start.par, o );
pos = 0; pos = 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment