On Sat, Sep 06, 2008 at 03:53:34AM +0000, corvid wrote:
The genode one didn't want to break for me either anymore, so I went looking for an example from wikipedia. If I go to http://en.wikipedia.org/wiki/Cysteine#Sheep with images off, and click on the image of Cystine, the text directly below the image jumps down.
The source for that bit goes:
<div class="thumb tright"> <div class="thumbinner" style="width:152px;"><a href="/wiki/Image:Cystine-skeletal.png" class="image" title="Cystine, showing disulfide bond"><img alt="Cystine, showing disulfide bond" src="file:///tmp/150px-Cystine-skeletal.png" width="150" height="191" border="0" class="thumbimage" /></a> <div class="thumbcaption"> <div class="magnify"><a href="/wiki/Image:Cystine-skeletal.png" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div> <a href="/wiki/Cystine" title="Cystine">Cystine</a>, showing <a href="/wiki/Disulfide_bond" title="Disulfide bond">disulfide bond</a></div> </div> </div> <p>Cysteine is required...
It was like dillo had treated the </div></div><p> as a <br> until that click. I see that Textblock::addParbreak() has:
/* Another break before? */ if ((word = words->getRef(words->size () - 1)) && word->content.type == core::Content::BREAK) { word->content.breakSpace = misc::max (word->content.breakSpace, space); return; }
word = addWord (0, 0, 0, style); word->content.type = core::Content::BREAK; word->content.breakSpace = space; wordWrap (words->size () - 1);
For the sake of experiment, I stuck a wordWrap (words->size () - 1); before the return, and now it seems to work. I imagine it must have to do with lastLine->breakSpace getting updated...
Yes, it seems so. Can you please test attached patch? It just updates lastLine->breakSpace instead of calling Textblock::wordWrap, because of the comment above Textblock::wordWrap... It also fixes some bugs in the redraw optimization. At least the <ol> issue (google.com) no longer happens here. Cheers, Johannes