Bug 160477

Summary: Drop custom bindings code for HTMLSelectElement.remove()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, dbates, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=160475
Bug Depends on: 160394    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2016-08-02 16:30:16 PDT
Drop custom bindings code for HTMLSelectElement.remove() and use overloading instead.
Comment 1 Chris Dumez 2016-08-02 16:45:00 PDT
Bindings look like:
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionRemove(ExecState* state)
{
    size_t argsCount = std::min<size_t>(1, state->argumentCount());
    if (argsCount == 0) {
        return jsHTMLSelectElementPrototypeFunctionRemove1(state);
    }
    if (argsCount == 1) {
        JSValue distinguishingArg = state->uncheckedArgument(0);
        if (distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(JSHTMLOptionElement::info()))
            return jsHTMLSelectElementPrototypeFunctionRemove3(state);
        if (distinguishingArg.isNumber())
            return jsHTMLSelectElementPrototypeFunctionRemove2(state);
        return jsHTMLSelectElementPrototypeFunctionRemove2(state);
    }
    return throwVMTypeError(state);
}
Comment 2 Chris Dumez 2016-08-02 16:51:21 PDT
Created attachment 285162 [details]
Patch
Comment 3 Chris Dumez 2016-08-02 16:57:53 PDT
Created attachment 285164 [details]
Patch
Comment 4 WebKit Commit Bot 2016-08-02 19:57:41 PDT
Comment on attachment 285164 [details]
Patch

Clearing flags on attachment: 285164

Committed r204064: <http://trac.webkit.org/changeset/204064>
Comment 5 WebKit Commit Bot 2016-08-02 19:57:46 PDT
All reviewed patches have been landed.  Closing bug.