|
Last change
on this file since 82656 was
82656,
checked in by commit-queue@webkit.org, 10 years ago
|
|
2011-03-31 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
REGRESSION (r64712): Safari removes the first blank line in a textarea
https://bugs.webkit.org/show_bug.cgi?id=56434
- fast/forms/textarea-newline-expected.txt: Added.
- fast/forms/textarea-newline.html: Added to check the only first blank line in a textarea is correctly removed.
2011-03-31 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
REGRESSION (r64712): Safari removes the first blank line in a textarea
https://bugs.webkit.org/show_bug.cgi?id=56434
Test: fast/forms/textarea-newline.html
A linefeed removal after a textarea tag is originally processed in WebCore::HTMLTextAreaElement::defaultValue().
But HTML5 tree builder now removes the linefeed. It means linefeed removal happens twice.
And devalutValue() removal is not needed anymore.
- html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setDefaultValue): Remove an extra linefeed insertion at the beginning.
(WebCore::HTMLTextAreaElement::defaultValue): Remove linefeed removal check in default value creation function.
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <link rel="stylesheet" href="../../fast/js/resources/js-test-style.css"> |
|---|
| 5 | <script src="../../fast/js/resources/js-test-pre.js"></script> |
|---|
| 6 | </head> |
|---|
| 7 | <body> |
|---|
| 8 | These tests check if leading line feeds characters in textarea as default values are parsed correctly. |
|---|
| 9 | |
|---|
| 10 | <br> |
|---|
| 11 | <textarea id="no-line-feed">Madoka</textarea> |
|---|
| 12 | |
|---|
| 13 | <textarea id="one-line-feed"> |
|---|
| 14 | Sayaka</textarea> |
|---|
| 15 | |
|---|
| 16 | <textarea id="two-line-feeds"> |
|---|
| 17 | |
|---|
| 18 | Mami</textarea> |
|---|
| 19 | |
|---|
| 20 | <textarea id="one-line-feed-escaped-char-and-one-line-feed">
 |
|---|
| 21 | Kyoko</textarea> |
|---|
| 22 | |
|---|
| 23 | <textarea id="two-line-feed-escaped-chars">

Homura</textarea> |
|---|
| 24 | |
|---|
| 25 | <p id="description"></p> |
|---|
| 26 | <div id="console"></div> |
|---|
| 27 | |
|---|
| 28 | <script> |
|---|
| 29 | shouldBe('document.getElementById("no-line-feed").value', '"Madoka"'); |
|---|
| 30 | |
|---|
| 31 | shouldBe('document.getElementById("one-line-feed").value', '"Sayaka"'); |
|---|
| 32 | |
|---|
| 33 | shouldBe('document.getElementById("two-line-feeds").value', '"\\nMami"'); |
|---|
| 34 | |
|---|
| 35 | shouldBe('document.getElementById("one-line-feed-escaped-char-and-one-line-feed").value', '"\\n\\nKyoko"'); |
|---|
| 36 | |
|---|
| 37 | shouldBe('document.getElementById("two-line-feed-escaped-chars").value', '"\\n\\nHomura"'); |
|---|
| 38 | |
|---|
| 39 | var successfullyParsed = true; |
|---|
| 40 | </script> |
|---|
| 41 | |
|---|
| 42 | <script src="../../fast/js/resources/js-test-post.js"></script> |
|---|
| 43 | </body> |
|---|
| 44 | </html> |
|---|
Note: See
TracBrowser
for help on using the repository browser.