JavaScriptCore:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 03:16:41 +0000 (03:16 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 03:16:41 +0000 (03:16 +0000)
commit62a1f7d22f1c605345adf106b9e51b32c0ec5b87
tree2743bacd4826ea97731f7f283907756969132a3b
parentd71a5c9146d31f0b4604c7f282dd272209cb56a0
JavaScriptCore:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
          Implement select.options.add() method

        * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
        * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
        kjs/value.h to make it available as a forwarded header.
        * kjs/lookup.h:
        (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
        The new method returns a boolean value if no entry is found in the lookup table.
        * kjs/value.cpp:
        (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
        * kjs/value.h: Ditto.

LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
          Implement select.options.add() method

        * fast/dom/select-selectedIndex-multiple-expected.txt: Updated test results.
        * fast/dom/select-selectedIndex-multiple.html: Updated to print comments between
        tests to make failures easier to track down.
        * fast/dom/select-selectedIndex-expected.txt: Mirrored updates from select-selectedIndex-multiple.html
        * fast/dom/select-selectedIndex.html: Ditto.
        * fast/js/resources/select-options-add.js: Added.
        * fast/js/select-options-add-expected.txt: Added.
        * fast/js/select-options-add.html: Added.

WebCore:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
          Implement select.options.add() method

        Tests:
        - fast/dom/select-selectedIndex-multiple.html
        - fast/dom/select-selectedIndex.html
        - fast/js/select-options-add.html

        * DerivedSources.make: Added JSHTMLOptionsCollection.h.
        * ForwardingHeaders/kjs/operations.h: Added.
        * WebCore.xcodeproj/project.pbxproj: Added new source files.
        * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
        (WebCore::JSHTMLOptionsCollection::length):
        (WebCore::JSHTMLOptionsCollection::setLength):
        (WebCore::JSHTMLOptionsCollection::indexSetter):
        * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
        Renamed classes and methods for consistency.
        (KJS::JSHTMLElement::selectGetter):
        (KJS::JSHTMLElement::put):
        (KJS::JSHTMLElement::selectSetter):
        (KJS::JSHTMLCollection::JSHTMLCollection):
        (KJS::JSHTMLCollectionProtoFunc::callAsFunction):
        (KJS::getHTMLOptionsCollection):
        * bindings/js/kjs_html.h: Ditto.
        * bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
        Added support for Optional parameter attribute, which makes generated code assume overloaded
        implementation methods are available for a JavaScript function with optional arguments.  Changed
        local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
        * html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
        * html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
        (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
        (WebCore::HTMLOptionsCollection::add):
        (WebCore::HTMLOptionsCollection::selectedIndex):
        (WebCore::HTMLOptionsCollection::setSelectedIndex):
        (WebCore::HTMLOptionsCollection::setLength):
        * html/HTMLOptionsCollection.h: Ditto.
        * html/HTMLOptionsCollection.idl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/lookup.h
JavaScriptCore/kjs/value.cpp
JavaScriptCore/kjs/value.h
LayoutTests/ChangeLog
LayoutTests/fast/dom/select-selectedIndex-expected.txt
LayoutTests/fast/dom/select-selectedIndex-multiple-expected.txt
LayoutTests/fast/dom/select-selectedIndex-multiple.html
LayoutTests/fast/dom/select-selectedIndex.html
LayoutTests/fast/js/resources/select-options-add.js [new file with mode: 0644]
LayoutTests/fast/js/select-options-add-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/select-options-add.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/ForwardingHeaders/kjs/operations.h [new file with mode: 0644]
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp [new file with mode: 0644]
WebCore/bindings/js/kjs_html.cpp
WebCore/bindings/js/kjs_html.h
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/html/HTMLOptionElement.idl
WebCore/html/HTMLOptionsCollection.cpp
WebCore/html/HTMLOptionsCollection.h
WebCore/html/HTMLOptionsCollection.idl [new file with mode: 0644]