diff options
author | jonlee@apple.com <jonlee@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-01-19 22:56:14 +0000 |
---|---|---|
committer | jonlee@apple.com <jonlee@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-01-19 22:56:14 +0000 |
commit | 7b6fc20598bc1ccc6c07f09876c537418353f254 (patch) | |
tree | ece7d76e139a95f32ab639a7397bc6f3f7db8ba2 /third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html | |
parent | f36b805fc34526b1b62b16ad4d4abff93bc1c514 (diff) | |
download | chromium_src-7b6fc20598bc1ccc6c07f09876c537418353f254.zip chromium_src-7b6fc20598bc1ccc6c07f09876c537418353f254.tar.gz chromium_src-7b6fc20598bc1ccc6c07f09876c537418353f254.tar.bz2 |
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: svn://svn.chromium.org/blink/trunk@105451 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html b/third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html new file mode 100644 index 0000000..a0dd4fa --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/text-overflow-input-focus-placeholder.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> +<title>text-overflow</title> +<style> +input { + text-overflow: ellipsis; +} +</style> +</head> +<body> + <p>This test makes sure that the ellipsis disappears on the placeholder when a text input is focused.</p> + <input type="text" placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit" autofocus /> +</body> +</html>
\ No newline at end of file |