2010-04-28 Joseph Pecoraro <joepeck@webkit.org>
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 May 2010 02:54:08 +0000 (02:54 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 May 2010 02:54:08 +0000 (02:54 +0000)
commit0bd84fe73d714e5ecf47db291cea1e1b6427ad0d
treeaea411d8b5776be3116d4bf1db940de8d4b03cb2
parentea2a59db43dcf07c9d136783d80982d86e16899c
2010-04-28  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Oliver Hunt.

        <input type="search"> with uneven padding causes text clipping
        https://bugs.webkit.org/show_bug.cgi?id=38160

        * fast/css/input-search-padding.html: Added.
        * platform/mac/fast/css/input-search-padding-expected.checksum: Added.
        * platform/mac/fast/css/input-search-padding-expected.png: Added.
        * platform/mac/fast/css/input-search-padding-expected.txt: Added.

2010-04-28  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Oliver Hunt.

        <input type="search"> with uneven padding causes text clipping
        https://bugs.webkit.org/show_bug.cgi?id=38160

        Test: fast/css/input-search-padding.html

        An <input type="search"> contains an inner block, which is explicitly
        centered in RenderTextControlSingleLine based on the height of the element.
        However, the clipping rect was not using the set location, and instead
        calculated off of the top border and padding alone. This also vertically
        centers the Caps Lock indicator.

        * rendering/RenderTextControl.cpp: moved controlClipRect implementation to RenderTextControlSingleLine
        * rendering/RenderTextControl.h: allow a subclass implementation of controlClipRect, removed redundant hasControlClip implementation, and moved controlClipRect
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::paint): vertically center the Caps Lock indicator
        (WebCore::RenderTextControlSingleLine::controlClipRect): use the set location of the anonymous inner block instead
        * rendering/RenderTextControlSingleLine.h: allow for an implementation of controlClipRect for <input type="search">

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/input-search-padding.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/input-search-padding-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/input-search-padding-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/input-search-padding-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/forms/search-zoomed-expected.checksum
LayoutTests/platform/mac/fast/forms/search-zoomed-expected.png
WebCore/ChangeLog
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderTextControl.h
WebCore/rendering/RenderTextControlSingleLine.cpp
WebCore/rendering/RenderTextControlSingleLine.h