Changeset 204064 in webkit


Ignore:
Timestamp:
Aug 2, 2016 7:56:22 PM (8 years ago)
Author:
Chris Dumez
Message:

Drop custom bindings code for HTMLSelectElement.remove()
https://bugs.webkit.org/show_bug.cgi?id=160477

Reviewed by Darin Adler.

Drop custom bindings code for HTMLSelectElement.remove() and use
overloading instead.

  • bindings/js/JSHTMLSelectElementCustom.cpp:

(WebCore::JSHTMLSelectElement::remove): Deleted.

  • html/HTMLSelectElement.idl:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r204063 r204064  
     12016-08-02  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop custom bindings code for HTMLSelectElement.remove()
     4        https://bugs.webkit.org/show_bug.cgi?id=160477
     5
     6        Reviewed by Darin Adler.
     7
     8        Drop custom bindings code for HTMLSelectElement.remove() and use
     9        overloading instead.
     10
     11        * bindings/js/JSHTMLSelectElementCustom.cpp:
     12        (WebCore::JSHTMLSelectElement::remove): Deleted.
     13        * html/HTMLSelectElement.idl:
     14
    1152016-08-02  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp

    r199334 r204064  
    3333using namespace HTMLNames;
    3434
    35 JSValue JSHTMLSelectElement::remove(ExecState& state)
    36 {
    37     HTMLSelectElement& select = wrapped();
    38 
    39     if (!state.argumentCount()) {
    40         // When called with no argument, we should call Element::remove() to detach.
    41         ExceptionCode ec = 0;
    42         select.remove(ec);
    43         setDOMException(&state, ec);
    44     } else {
    45         // The HTMLSelectElement::remove() function can take either an option object or the index of an option.
    46         if (HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(state.argument(0)))
    47             select.remove(*option);
    48         else
    49             select.removeByIndex(state.argument(0).toInt32(&state));
    50     }
    51 
    52     return jsUndefined();
    53 }
    54 
    5535void selectIndexSetter(HTMLSelectElement* select, JSC::ExecState* exec, unsigned index, JSC::JSValue value)
    5636{
  • trunk/Source/WebCore/html/HTMLSelectElement.idl

    r204028 r204064  
    6161    [RaisesException] void add(HTMLElement element);
    6262
    63     // In JavaScript, we support both option index and option object parameters.
    64     // As of this writing this cannot be auto-generated.
    65     [Custom] void remove(/* indexOrOption */);
    66 #else
     63    [RaisesException] void remove(); // ChildNode overload
     64    // FIXME: This overload is not in the specification and was dropped in Blink.
     65    void remove(HTMLOptionElement option);
     66#endif
    6767    [ImplementedAs=removeByIndex] void remove(long index);
    68 #endif
     68
    6969
    7070    readonly attribute HTMLCollection selectedOptions;
Note: See TracChangeset for help on using the changeset viewer.