Title: [204064] trunk/Source/WebCore
- Revision
- 204064
- Author
- cdu...@apple.com
- Date
- 2016-08-02 19:56:22 -0700 (Tue, 02 Aug 2016)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (204063 => 204064)
--- trunk/Source/WebCore/ChangeLog 2016-08-03 02:56:05 UTC (rev 204063)
+++ trunk/Source/WebCore/ChangeLog 2016-08-03 02:56:22 UTC (rev 204064)
@@ -1,5 +1,19 @@
2016-08-02 Chris Dumez <cdu...@apple.com>
+ 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:
+
+2016-08-02 Chris Dumez <cdu...@apple.com>
+
Drop custom bindings code for HTMLOptionsCollection.remove()
https://bugs.webkit.org/show_bug.cgi?id=160475
Modified: trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp (204063 => 204064)
--- trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp 2016-08-03 02:56:05 UTC (rev 204063)
+++ trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp 2016-08-03 02:56:22 UTC (rev 204064)
@@ -32,26 +32,6 @@
using namespace JSC;
using namespace HTMLNames;
-JSValue JSHTMLSelectElement::remove(ExecState& state)
-{
- HTMLSelectElement& select = wrapped();
-
- if (!state.argumentCount()) {
- // When called with no argument, we should call Element::remove() to detach.
- ExceptionCode ec = 0;
- select.remove(ec);
- setDOMException(&state, ec);
- } else {
- // The HTMLSelectElement::remove() function can take either an option object or the index of an option.
- if (HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(state.argument(0)))
- select.remove(*option);
- else
- select.removeByIndex(state.argument(0).toInt32(&state));
- }
-
- return jsUndefined();
-}
-
void selectIndexSetter(HTMLSelectElement* select, JSC::ExecState* exec, unsigned index, JSC::JSValue value)
{
if (value.isUndefinedOrNull())
Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (204063 => 204064)
--- trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-08-03 02:56:05 UTC (rev 204063)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-08-03 02:56:22 UTC (rev 204064)
@@ -60,13 +60,13 @@
[RaisesException] void add(HTMLElement element, long index);
[RaisesException] void add(HTMLElement element);
- // In _javascript_, we support both option index and option object parameters.
- // As of this writing this cannot be auto-generated.
- [Custom] void remove(/* indexOrOption */);
-#else
+ [RaisesException] void remove(); // ChildNode overload
+ // FIXME: This overload is not in the specification and was dropped in Blink.
+ void remove(HTMLOptionElement option);
+#endif
[ImplementedAs=removeByIndex] void remove(long index);
-#endif
+
readonly attribute HTMLCollection selectedOptions;
attribute long selectedIndex;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes