-
tkent@chromium.org authored
Reviewed by Darin Adler. Form control state shouldn't be restored for hidden inputs. https://bugs.webkit.org/show_bug.cgi?id=26241 * fast/forms/button-state-restore.html: Updated for the behavior change. * fast/forms/state-restore-to-non-edited-controls-expected.txt: Added. * fast/forms/state-restore-to-non-edited-controls.html: Added. 2010-04-02 Kent Tamura <tkent@chromium.org> Reviewed by Darin Adler. Form control state shouldn't be restored for hidden inputs. https://bugs.webkit.org/show_bug.cgi?id=26241 To fix this issue, we don't save values if it is not changed from the default value. Updating the value IDL attribute of some controls such as type=hidden also updates the value content attribute, and it's impossible to distinguish the initial value and the current value. The values of such controls are not saved. It won't be a problem because we want to save and restore user-edited values. Test: fast/forms/state-restore-to-non-edited-controls.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::saveFormControlState): Do not save the value if it is same as the default value. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::saveFormControlState): ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e98f3226