Changeset 204064 in webkit
- Timestamp:
- Aug 2, 2016 7:56:22 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r204063 r204064 1 2016-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 1 15 2016-08-02 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp
r199334 r204064 33 33 using namespace HTMLNames; 34 34 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 else49 select.removeByIndex(state.argument(0).toInt32(&state));50 }51 52 return jsUndefined();53 }54 55 35 void selectIndexSetter(HTMLSelectElement* select, JSC::ExecState* exec, unsigned index, JSC::JSValue value) 56 36 { -
trunk/Source/WebCore/html/HTMLSelectElement.idl
r204028 r204064 61 61 [RaisesException] void add(HTMLElement element); 62 62 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 #e lse63 [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 67 67 [ImplementedAs=removeByIndex] void remove(long index); 68 #endif 68 69 69 70 70 readonly attribute HTMLCollection selectedOptions;
Note: See TracChangeset
for help on using the changeset viewer.