[Webkit-unassigned] [Bug 38468] REGRESSION: Text clipped in absolutely positioned search inputs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 3 19:11:42 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38468





--- Comment #10 from Joseph Pecoraro <joepeck at webkit.org>  2010-05-03 19:11:42 PST ---
> It alters the appearance of this example

I see what you mean. However still, none of my patches handle this correctly.

> <input type="search" style="height: 25px; padding: 4px; -webkit-appearance: textfield; font-size: 20px;" value="Clipped">

Just using the centered innerBlock ends up with just the top half of the text.
In this case the height of the innerBlock is 23px, while the height of the
entire textfield is set at 25px. That means, to center the innerBlock it moves
the clipRect just 1 pixel down.

In Safari 4.0.5 the clipRect was always offset by the borderTop()+paddingTop()
ending up moving down 6px.

In both cases the clipRect's contentHeight is 13px (25 - 8 padding - 4 border)
but you still see different portions.

I can make a patch with the best of both worlds, and end up with something
like:

    RenderBox* renderBox = m_innerBlock->renderBox();
    IntRect clipRect = IntRect(renderBox->x(),
        max(borderTop() + paddingTop(), renderBox->y()),
        contentWidth(), contentHeight());

This way it looks like Safari 4.0.5 for cases where centering the clipRect
would actually show less then it used to. This would still work for uneven
padding cases.

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



More information about the webkit-unassigned mailing list