Bug 90259

Summary: Textarea unnecessarily saves the value in some cases
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: mifenton, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 23346    
Attachments:
Description Flags
Patch
none
Patch for landing none

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]
Patch
Comment 3 Hajime Morrita 2012-06-29 02:18:08 PDT
Comment on attachment 150117 [details]
Patch

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.