2010-11-25 Kenichi Ishibashi <bashi@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Nov 2010 04:54:55 +0000 (04:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Nov 2010 04:54:55 +0000 (04:54 +0000)
commit175996653866d7950099ede159be459bbce97645
tree55007c16f3501689a86690efec9af14d3bbf8709
parenta2e11da486a393eb0858c81f1248c24ef8e4a7d9
2010-11-25  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        Assertion failure by resetting <output> twice
        https://bugs.webkit.org/show_bug.cgi?id=50095

        Adds a test that ensures assertion failures don't occur when
        updating the value of an output element.

        * fast/forms/output-reset-assertion-failed-expected.txt: Added.
        * fast/forms/output-reset-assertion-failed.html: Added.
        * fast/forms/script-tests/output-reset-assertion-failed.js: Added.
2010-11-25  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        Assertion failure by resetting <output> twice
        https://bugs.webkit.org/show_bug.cgi?id=50095

        Don't call setTextContentInternal() when the value wouldn't
        be changed.

        Test: fast/forms/output-reset-assertion-failed.html

        * html/HTMLOutputElement.cpp:
        (WebCore::HTMLOutputElement::HTMLOutputElement): Calls
        setTextContentInternal() if and only if needed.
        (WebCore::HTMLOutputElement::reset): Ditto.
        (WebCore::HTMLOutputElement::setValue): Ditto.
        (WebCore::HTMLOutputElement::setDefaultValue): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/output-reset-assertion-failed-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/output-reset-assertion-failed.html [new file with mode: 0644]
LayoutTests/fast/forms/script-tests/output-reset-assertion-failed.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLOutputElement.cpp