Title: [204133] trunk/Source/WebCore
- Revision
- 204133
- Author
- cdu...@apple.com
- Date
- 2016-08-04 13:12:04 -0700 (Thu, 04 Aug 2016)
Log Message
Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add()
https://bugs.webkit.org/show_bug.cgi?id=160527
Reviewed by Ryosuke Niwa.
Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add().
We now have 2 overloads instead of 3 while achieving the same web-facing
behavior.
* html/HTMLOptionsCollection.h:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::add): Deleted.
* html/HTMLSelectElement.idl:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (204132 => 204133)
--- trunk/Source/WebCore/ChangeLog 2016-08-04 20:02:45 UTC (rev 204132)
+++ trunk/Source/WebCore/ChangeLog 2016-08-04 20:12:04 UTC (rev 204133)
@@ -1,3 +1,20 @@
+2016-08-04 Chris Dumez <cdu...@apple.com>
+
+ Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add()
+ https://bugs.webkit.org/show_bug.cgi?id=160527
+
+ Reviewed by Ryosuke Niwa.
+
+ Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add().
+ We now have 2 overloads instead of 3 while achieving the same web-facing
+ behavior.
+
+ * html/HTMLOptionsCollection.h:
+ * html/HTMLOptionsCollection.idl:
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::add): Deleted.
+ * html/HTMLSelectElement.idl:
+
2016-08-04 Anders Carlsson <ander...@apple.com>
Move Objective-C bindings specific code into the bindings
Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.h (204132 => 204133)
--- trunk/Source/WebCore/html/HTMLOptionsCollection.h 2016-08-04 20:02:45 UTC (rev 204132)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.h 2016-08-04 20:12:04 UTC (rev 204133)
@@ -44,7 +44,6 @@
void add(HTMLElement&, HTMLElement* beforeElement, ExceptionCode&);
void add(HTMLElement&, int beforeIndex, ExceptionCode&);
- void add(HTMLElement& element, ExceptionCode& ec) { add(element, nullptr, ec); }
void remove(int index);
void remove(HTMLOptionElement&);
Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.idl (204132 => 204133)
--- trunk/Source/WebCore/html/HTMLOptionsCollection.idl 2016-08-04 20:02:45 UTC (rev 204132)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.idl 2016-08-04 20:12:04 UTC (rev 204133)
@@ -36,8 +36,7 @@
#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
// FIXME: Should be:
// void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
- [RaisesException] void add(HTMLElement element);
- [RaisesException] void add(HTMLElement element, HTMLElement? before);
+ [RaisesException] void add(HTMLElement element, optional HTMLElement? before = null);
[RaisesException] void add(HTMLElement element, long index);
#else
[RaisesException] void add(HTMLOptionElement option, unsigned long index);
Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (204132 => 204133)
--- trunk/Source/WebCore/html/HTMLSelectElement.h 2016-08-04 20:02:45 UTC (rev 204132)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h 2016-08-04 20:12:04 UTC (rev 204133)
@@ -54,7 +54,6 @@
void add(HTMLElement&, HTMLElement* beforeElement, ExceptionCode&);
void add(HTMLElement&, int beforeIndex, ExceptionCode&);
- void add(HTMLElement& element, ExceptionCode& ec) { add(element, nullptr, ec); }
using Node::remove;
void remove(HTMLOptionElement&);
Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (204132 => 204133)
--- trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-08-04 20:02:45 UTC (rev 204132)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-08-04 20:12:04 UTC (rev 204133)
@@ -53,12 +53,11 @@
HTMLOptionElement? namedItem(DOMString name);
#endif
- [ObjCLegacyUnnamedParameters, RaisesException] void add(HTMLElement element, HTMLElement? before);
+ [ObjCLegacyUnnamedParameters, RaisesException] void add(HTMLElement element, optional HTMLElement? before = null);
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
// FIXME: Should be:
// void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
[RaisesException] void add(HTMLElement element, long index);
- [RaisesException] void add(HTMLElement element);
[RaisesException] void remove(); // ChildNode overload
// FIXME: This overload is not in the specification and was dropped in Blink.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes