Small test case for bug in renderer floats
Vadim Plessky
lucy-ples at mtu-net.ru
Thu Aug 8 14:24:31 BST 2002
On Thursday 08 August 2002 12:24 am, Koos Vriezen wrote:
| Hi,
|
| Ok, what goes wrong at Google, after I applied the patch below (which is
| in CVS now) is this test case; a floating table and a div.
|
Hi Koos!
Thanks for interesting testcase, I enjoyed it! :-)
I slightly re-worked it (see attached files or ver.5 below; it has "more CSS,
less HTML"):
<html>
<head>
<style type="text/css">
body { border:1px solid lime; background: #ffffff }
.aa { color: navy }
table { border: 2px dashed orange; background: #ddffdd;
float: right; width: 20%;
margin: 0 }
div { border: 2px dashed green; margin: 0 }
p { border: 1px dotted gray; margin: 0 }
</style>
</head>
<body>
<p class="aa">first line of text</p>
<table cellpadding=0 cellspacing=4>
<tr>
<td>
<a href=""><b>Bold</b> anchor</a>
<br><br>Some text in floating table.
</td>
</tr>
</table>
<div>
Some text in div. Some text in div. Some text in div.
Some text in div. Some text in div.
<br>
Some text in div. Some text in div. Some text in div.
Some text in div. Some text in div.
<br>
Some text in div. Some text in div. Some text in div.
Some text in div. Some text in div.
</div>
</body>
</html>
Rendering in Konq/KDE 3.0.2 and Mozilla 1.0 is *different*.
Pls compare by yourself. (I don't run HEAD CVS and haven't tested your patch)
you can see with help of borders around <div> and <table> , that in Mozilla
both <div> and <table> start at the same horizontal line, while in Konqueror
<table> is placed *above* (starts before) <div>.
I also can't explain about one em in height (one line size) of *space* above
<div> and <table>, both in Mozilla and Konqueror.
First I thought that this is caused by default mnargins.
But applying margin: 0 for all elements doesn't help. Line still remains on
rendered page...
| <html><body style="border:1px solid gray" ;bgcolor=#ffffff>
| <p>
| <table border=0 cellpadding=0 cellspacing=4 align=right width=20%
| bgcolor=#d dffdd>
| <tr><td><a href=""><b>Bold</b>anchor</a>
| <br><br>Some text in floating table.
| </td></tr></table>
| <div>
| Some text in div. Some text in div. Some text in div.
| Some text in div. Some text in div.
| <br>
| Some text in div. Some text in div. Some text in div.
| Some text in div. Some text in div.
| <br>
| Some text in div. Some text in div. Some text in div.
| Some text in div. Some text in div.
| </div>
| </body>
| </html>
|
| The floating table can go over the text in the div. Also it behaves
| erratically, if the mouse hovers the link.
Do you have same behavior on modified testcase?
Can you add :hover class to anchor, and see wether this helps to identify
wrong piece of code?
| This seems to work correct without my patch, however if you resize khtml
| so that the table becomes overhanging, the original non-aligned-right-
| border bug shows it self.
| Damn, is this stuff touchy :(.
| Anyway, there is a third option :) Call RenderFlow::addOverHangingFloats
| not with '-child->xPos()' but with '-child->xPos() + child->marginLeft()'
| as xoffset param at line 455.
|
| Dirk, I also thought this second option make sense but it breaks google. I
| attached the diff for option number three.
|
| Vadim, as you may understand, I'm not going to backport it yet.
|
| Regards,
|
| Koos
|
| On Thu, 1 Aug 2002, Koos Vriezen wrote:
--
Vadim Plessky
http://kde2.newmail.ru (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020808/5143c5af/attachment.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020808/5143c5af/attachment-0001.html>
More information about the kfm-devel
mailing list