Add text-overflow support that allows placeholder and value text to show an ellipsis when not focused
https://bugs.webkit.org/show_bug.cgi?id=76118
<rdar://problem/9271742>
Reviewed by Dan Bernstein.
Source/WebCore:
Tests: fast/css/text-overflow-input-focus-placeholder-expected.html
fast/css/text-overflow-input-focus-placeholder.html
fast/css/text-overflow-input-focus-value-expected.html
fast/css/text-overflow-input-focus-value.html
fast/css/text-overflow-input.html
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange): When the style of the text control
changes, we update the text overflow property of the placeholder.
(WebCore::RenderTextControlSingleLine::createInnerTextStyle): When the style of the text control
changes, we update the text overflow property of the inner text block.
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated): The text of the value and placeholder should
only contain the ellipsis if the input's text-overflow property is set to ellipsis, and the input is not focused.
* rendering/RenderTextControlSingleLine.h:
LayoutTests:
* fast/css/text-overflow-input-focus-placeholder-expected.html: Added.
* fast/css/text-overflow-input-focus-placeholder.html: Added.
* fast/css/text-overflow-input-focus-value-expected.html: Added.
* fast/css/text-overflow-input-focus-value.html: Added.
* fast/css/text-overflow-input.html: Added.
New baselines:
* platform/mac/fast/css/text-overflow-input-expected.png: Added.
* platform/mac/fast/css/text-overflow-input-expected.txt: Added.
Needs baselines:
* platform/chromium/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/qt/test_expectations.txt:
* platform/win/test_expectations.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105451
268f45cc-cd09-0410-ab3c-
d52691b4dbfc