Source/WebCore: Fix for for https://bugs.webkit.org/show_bug.cgi?id=54402
authoradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Feb 2011 04:56:14 +0000 (04:56 +0000)
committeradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Feb 2011 04:56:14 +0000 (04:56 +0000)
commit84f76eee89f84862c56c2c84ce5a131daff54eeb
tree5a95fa548aef4cc12f58782e0da2b6e3f1cc1de3
parent0604899c8e3eddf18fd3d21d79598877e8922736
Source/WebCore: Fix for for https://bugs.webkit.org/show_bug.cgi?id=54402
REGRESSION (r72052): Placeholder text doesn't have the right padding for search fields on Windows

Reviewed by Dan Bernstein.

Test: updated fast/forms/placeholder-position.html and tested manually

Consider padding and margin for the results and cancel buttons.  This is important for the Windows
theme which uses padding to correctly position those buttons.  This change fixes the placeholder
position, and also better aligns the results popup list with the actual text you type.

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::clientPaddingLeft):
(WebCore::RenderTextControlSingleLine::clientPaddingRight):

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=54402
REGRESSION (r72052): Placeholder text doesn't have the right padding for search fields on Windows

Reviewed by Dan Bernstein.

Unfortunately, this doesn't test the Windows theme, since DRT uses the Safari theme, but I also tested this change manually on Windows and Mac.

* fast/forms/placeholder-position.html: Added a case for a search field with the results button.
* platform/mac/fast/forms/placeholder-position-expected.checksum:
* platform/mac/fast/forms/placeholder-position-expected.png:
* platform/mac/fast/forms/placeholder-position-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/placeholder-position.html
LayoutTests/platform/mac/fast/forms/placeholder-position-expected.checksum
LayoutTests/platform/mac/fast/forms/placeholder-position-expected.png
LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTextControlSingleLine.cpp