[patch] css parser, floats

Germain Garand germain at ebooksfrance.org
Sat Feb 28 16:54:41 GMT 2004


Le Samedi 28 Février 2004 14:44, Dirk Mueller a écrit :
> > 2) fix a problem with floating images: when they aren't loaded yet, the
> > page is first layouted with temporary 10x10 pixmaps, but once the final
> > image is loaded, blocks affected by the float aren't relayouted.
> > Results in ugly text overlaps on images on a lot of news sites
> > (see #71445)
>
> Do you have a testcase for this? I consider it dangerous to compare
> floatBottom() with m_height while we're trying hard to calculate m_height
> itself.

it's not easy to testcase because it happens when images aren't yet loaded, so
from a local file, it just works (as is stated in #71445).

However, attached is a testcase with one second delayed images from my server, 
so that it becomes obvious.

The test for floatBottom() > m_height was outside of the loop over 'child', so 
it checked the first and only the first child, apparently for no good reason.

That sounded strange to me, so I had a look at WC125, and saw that they moved 
the test inside the loop, just after some logic ensuring that m_height isn't 
< floatBottom() in a specific case, so it looked all fine...

Now, this "while" block is an <expletive deleted> monster, so its getting hard 
to be deterministic, but still, I think it boils down to m_height only 
growing by += child->height() at the end of the loop.
so indeed, if floatBottom() is > m_height, it means a fresh float has just 
been inserted from the previous child, hence that remaining childs need to 
relayout...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040228/00347787/attachment.html>


More information about the kfm-devel mailing list