Small test case for bug in renderer floats
Koos Vriezen
koos.vriezen at xs4all.nl
Tue Jul 30 13:32:22 BST 2002
On Mon, 29 Jul 2002, Koos Vriezen wrote:
> > On Monday 29 July 2002 2:43 pm, Koos Vriezen wrote:
> > | > | This is rendered wrong
> > | > | <html><body>
> > | > | <div style="float:left;" border=1>div text<br>div text</div>
> > | > | some text
> > | > | </body></html>
> Not sure what goes wrong here, but this makes the float be indented by the
> body margin twice. First guess would be call
> RenderFlow::addOverHangingFloats with child, 0, -child->yPos() and true.
> Also helps for http://www.linuxplanet.com/linuxplanet/reviews/4315/1
> reported by Hetz Ben Hamo on 18 July to this list.
This is the patch I used.
diff -u -3 -p -r1.277 render_flow.cpp
--- rendering/render_flow.cpp 2002/07/16 19:50:14 1.277
+++ rendering/render_flow.cpp 2002/07/30 12:24:27
@@ -452,7 +452,7 @@ void RenderFlow::layoutBlockChildren( bo
if ( child->hasOverhangingFloats() ) {
// need to add the float to our special objects
- addOverHangingFloats( static_cast<RenderFlow *>(child), -child->xPos(), -child->yPos(), true );
+ addOverHangingFloats( static_cast<RenderFlow *>(child), 0, -child->yPos(), true );
}
child = child->nextSibling();
It also fixes Bug#41403, that is the alignment with the body right border.
But is it correct that a RenderHtml can have a special? Now you have a
float that has a height greater than that of the body.
Koos
More information about the kfm-devel
mailing list