Bug 9683: Implement select.options.remove() method
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2007 17:51:02 +0000 (17:51 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2007 17:51:02 +0000 (17:51 +0000)
commit1cc7faf1c476c5894be10169846e5f9650abfabc
treee936bdbfc61ca54b819a5465b9bd5291a1bb0f23
parenta9c89892b3b9b7959f9192c6ced234c863fec45b
Bug 9683: Implement select.options.remove() method

WebCore:

        Bug 9683: Implement select.options.remove() method
        <http://bugs.webkit.org/show_bug.cgi?id=9683>

        Reviewed by Maciej.

        Implement select.options.remove() by calling select.remove()
        with the same arguments.  This is what MSIE 7 does, although its
        select.remove() method differs from WebKit's by throwing an
        exception when called with no arguments or with a negative
        integer argument.  Note that the DOM Level 1 documentation
        specifies that select.remove() does not throw an exception.

        Tests: fast/js/select-options-remove-gc.html
               fast/js/select-options-remove.html

        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
        (WebCore::JSHTMLOptionsCollection::remove): Added.
        * html/HTMLOptionsCollection.cpp:
        (WebCore::HTMLOptionsCollection::remove): Added.
        * html/HTMLOptionsCollection.h:
        * html/HTMLOptionsCollection.idl:

LayoutTests:

        Bug 9683: Implement select.options.remove() method
        <http://bugs.webkit.org/show_bug.cgi?id=9683>

        Reviewed by Maciej.

        * fast/js/resources/select-options-remove.js: Added.
        * fast/js/select-options-remove-expected.txt: Added.
        * fast/js/select-options-remove-gc-expected.txt: Added.
        * fast/js/select-options-remove-gc.html: Added.
        * fast/js/select-options-remove.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/resources/select-options-remove.js [new file with mode: 0644]
LayoutTests/fast/js/select-options-remove-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/select-options-remove-gc-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/select-options-remove-gc.html [new file with mode: 0644]
LayoutTests/fast/js/select-options-remove.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
WebCore/html/HTMLOptionsCollection.cpp
WebCore/html/HTMLOptionsCollection.h
WebCore/html/HTMLOptionsCollection.idl