Bug 90259 - Textarea unnecessarily saves the value in some cases
: Textarea unnecessarily saves the value in some cases
Product: WebKit
Classification: Unclassified
Component: Forms
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Kent Tamura
Depends on:
Blocks: 23346
  Show dependency treegraph
Reported: 2012-06-29 01:45 PDT by Kent Tamura
Modified: 2012-06-29 05:09 PDT (History)
3 users (show)

See Also:

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

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-06-29 01:45:46 PDT
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 Kent Tamura 2012-06-29 02:09:14 PDT
Rename the title because webkit-patch can't handle <textarea> in the title.
Comment 2 Kent Tamura 2012-06-29 02:10:06 PDT
Created attachment 150117 [details]
Comment 3 Hajime Morrita 2012-06-29 02:18:08 PDT
Comment on 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 Kent Tamura 2012-06-29 02:22:37 PDT
Created attachment 150119 [details]
Patch for landing

Improve readability of the test code
Comment 5 WebKit Review Bot 2012-06-29 05:09:08 PDT
Comment on attachment 150119 [details]
Patch for landing

Clearing flags on attachment: 150119

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