Bug 90259 - Textarea unnecessarily saves the value in some cases
: Textarea unnecessarily saves the value in some cases
Status: RESOLVED FIXED
: WebKit
Forms
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
: 23346
  Show dependency treegraph
 
Reported: 2012-06-29 01:45 PST by
Modified: 2012-06-29 05:09 PST (History)


Attachments
Patch (4.68 KB, patch)
2012-06-29 02:10 PST, Kent Tamura
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (4.70 KB, patch)
2012-06-29 02:22 PST, Kent Tamura
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-06-29 01:45:46 PST
HTMLTextAreaElement::saveFormControlState() has a code like:

    if (currentValue == defaultValue())
        return FormControlState();

It's wrong because
 - We don't apply EOL normalization to defaultValue(), though does it to currentValue.
 - currentValue can be a null string.
------- Comment #1 From 2012-06-29 02:09:14 PST -------
Rename the title because webkit-patch can't handle <textarea> in the title.
------- Comment #2 From 2012-06-29 02:10:06 PST -------
Created an attachment (id=150117) [details]
Patch
------- Comment #3 From 2012-06-29 02:18:08 PST -------
(From update of attachment 150117 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=150117&action=review

Code is OK. added some nits.

> LayoutTests/fast/forms/textarea/textarea-state-restore.html:16
> +    document.write('<div id=parent><form id=form1 action="data:text/html,&lt;script>history.back()&lt;/script>">');

Could the test data more readable?
It's hard to see compare HTML between two stages.
I think it's better to have small duplication to improve readability.
------- Comment #4 From 2012-06-29 02:22:37 PST -------
Created an attachment (id=150119) [details]
Patch for landing

Improve readability of the test code
------- Comment #5 From 2012-06-29 05:09:08 PST -------
(From update of attachment 150119 [details])
Clearing flags on attachment: 150119

Committed r121552: <http://trac.webkit.org/changeset/121552>
------- Comment #6 From 2012-06-29 05:09:12 PST -------
All reviewed patches have been landed.  Closing bug.