<textarea> unnecessarily saves the value in some cases
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 12:08:52 +0000 (12:08 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 12:08:52 +0000 (12:08 +0000)
commit170f0089620ea0e381d1d08afe5683029179b1e7
treeaa3216b0067129e749070de54d88392128c2c8df
parent30a3bd2b70c70b1100a1f3c8e2c74d456fc91bb1
<textarea> unnecessarily saves the value in some cases
https://bugs.webkit.org/show_bug.cgi?id=90259

Reviewed by Hajime Morita.

Source/WebCore:

Test: fast/forms/textarea/textarea-state-restore.html

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::saveFormControlState):
We apply EOL normalization to value(), but don't apply it to
defaultValue(). Also value() can return a null string, which never
equals to any strings. To check m_isDirty is what we need..

LayoutTests:

* fast/forms/textarea/textarea-state-restore-expected.txt: Added.
* fast/forms/textarea/textarea-state-restore.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/textarea/textarea-state-restore-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/textarea/textarea-state-restore.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLTextAreaElement.cpp