[Webkit-unassigned] [Bug 18250] overlapping of text and image due to float:right

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 5 01:11:43 PDT 2008


------- Comment #7 from hyatt at apple.com  2008-09-05 01:11 PDT -------
What I said is still basically true.  For objects that shrink to avoid floats
(like tables or overflow sections), we only sample the top of the line.

int RenderBox::containingBlockWidth() const
    RenderBlock* cb = containingBlock();
    if (!cb)
        return 0;
    if (shrinkToAvoidFloats())
        return cb->lineWidth(m_y);
    return cb->availableWidth();

A fix would involve special casing fixed height objects.  Basically because you
know the height can't change if you vary the width, you can safely test for
floats that intersect from your y-position to your y-position + height.

However for auto height objects you can't do that and can really only sample at
your y-position.

The question is whether it would be worth making fixed height objects
inconsistent with auto height objects.

CSS2.1 says:


"The border box of a table, a block-level replaced element, or an element in
the normal flow that establishes a new block formatting context (such as an
element with 'overflow' other than 'visible') must not overlap any floats in
the same block formatting context as the element itself. If necessary,
implementations should clear the said element by placing it below any preceding
floats, but may place it adjacent to such floats if there is sufficient space.
They may even make the border box of said element narrower than defined by
section 10.3.3. CSS2 does not define when a UA may put said element next to the
float or by how much said element may become narrower."

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list