2010-04-02 Kent Tamura <tkent@chromium.org>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Apr 2010 19:09:46 +0000 (19:09 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Apr 2010 19:09:46 +0000 (19:09 +0000)
commitb47ddab8e353e1245e1ac4b18eabea9f4c2d171b
treed72f02aa2cb8a4eef8096b2603dcba0829b28427
parent34f1a97f2c8a3c4a7808049ac85cfdb6a34a47f2
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

        * 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: https://svn.webkit.org/repository/webkit/trunk@57013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/button-state-restore.html
LayoutTests/fast/forms/state-restore-to-non-edited-controls-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/state-restore-to-non-edited-controls.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLTextAreaElement.cpp