A placeholder renderer should not be taken to imply the existence of a text renderer in single line text controls
https://bugs.webkit.org/show_bug.cgi?id=112410

Reviewed by Tony Chang.

Source/WebCore:

The assumption that if a text control had a placeholder renderer
then it also had a text renderer is not valid. If
::-webkit-textfield-decoration-controller is set to display: none;
a single line text control's decoration container renderer and
hence text renderer are not created. This change handles this
corner case where a text control has a placeholder renderer but
not a text renderer.

Tests: fast/forms/search/search-hide-decoration-container-crash.html (Updated)

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):

LayoutTests:

Update search-hide-decoration-container-crash.html to exercise
non-null placeholder renderers and null text renderers.

Cases where neither are rendered already get coverage in
search-scroll-hidden-decoration-container-crash.html and
search-autoscroll-hidden-decoration-container-crash.html.

* fast/forms/search/search-hide-decoration-container-crash.html:
* fast/forms/search/search-hide-decoration-container-crash-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146038 268f45cc-cd09-0410-ab3c-d52691b4dbfc