Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203796 => 203797)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-27 21:51:49 UTC (rev 203797)
@@ -1,5 +1,16 @@
2016-07-27 Chris Dumez <[email protected]>
+ Parameter to named property getter should be mandatory
+ https://bugs.webkit.org/show_bug.cgi?id=160269
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline W3C test now that more checks are passing.
+
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-07-27 Chris Dumez <[email protected]>
+
First parameter to Range.createContextualFragment() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160266
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (203796 => 203797)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-07-27 21:51:49 UTC (rev 203797)
@@ -4394,7 +4394,7 @@
PASS HTMLSelectElement interface: attribute options
PASS HTMLSelectElement interface: attribute length
PASS HTMLSelectElement interface: operation item(unsigned long)
-FAIL HTMLSelectElement interface: operation namedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
+PASS HTMLSelectElement interface: operation namedItem(DOMString)
PASS HTMLSelectElement interface: operation add([object Object],[object Object],[object Object],[object Object])
PASS HTMLSelectElement interface: operation remove()
PASS HTMLSelectElement interface: operation remove(long)
@@ -4424,9 +4424,7 @@
PASS HTMLSelectElement interface: document.createElement("select") must inherit property "item" with the proper type (11)
PASS HTMLSelectElement interface: calling item(unsigned long) on document.createElement("select") with too few arguments must throw TypeError
PASS HTMLSelectElement interface: document.createElement("select") must inherit property "namedItem" with the proper type (12)
-FAIL HTMLSelectElement interface: calling namedItem(DOMString) on document.createElement("select") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS HTMLSelectElement interface: calling namedItem(DOMString) on document.createElement("select") with too few arguments must throw TypeError
PASS HTMLSelectElement interface: document.createElement("select") must inherit property "add" with the proper type (13)
PASS HTMLSelectElement interface: calling add([object Object],[object Object],[object Object],[object Object]) on document.createElement("select") with too few arguments must throw TypeError
PASS HTMLSelectElement interface: document.createElement("select") must inherit property "remove" with the proper type (14)
@@ -5717,7 +5715,7 @@
PASS PluginArray interface: operation refresh(boolean)
PASS PluginArray interface: attribute length
PASS PluginArray interface: operation item(unsigned long)
-FAIL PluginArray interface: operation namedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
+PASS PluginArray interface: operation namedItem(DOMString)
PASS MimeTypeArray interface: existence and properties of interface object
PASS MimeTypeArray interface object length
PASS MimeTypeArray interface object name
@@ -5725,7 +5723,7 @@
PASS MimeTypeArray interface: existence and properties of interface prototype object's "constructor" property
PASS MimeTypeArray interface: attribute length
PASS MimeTypeArray interface: operation item(unsigned long)
-FAIL MimeTypeArray interface: operation namedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
+PASS MimeTypeArray interface: operation namedItem(DOMString)
PASS Plugin interface: existence and properties of interface object
PASS Plugin interface object length
PASS Plugin interface object name
@@ -5736,7 +5734,7 @@
PASS Plugin interface: attribute filename
PASS Plugin interface: attribute length
PASS Plugin interface: operation item(unsigned long)
-FAIL Plugin interface: operation namedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
+PASS Plugin interface: operation namedItem(DOMString)
PASS MimeType interface: existence and properties of interface object
PASS MimeType interface object length
PASS MimeType interface object name
Modified: trunk/Source/WebCore/ChangeLog (203796 => 203797)
--- trunk/Source/WebCore/ChangeLog 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/ChangeLog 2016-07-27 21:51:49 UTC (rev 203797)
@@ -1,5 +1,25 @@
2016-07-27 Chris Dumez <[email protected]>
+ Parameter to named property getter should be mandatory
+ https://bugs.webkit.org/show_bug.cgi?id=160269
+
+ Reviewed by Ryosuke Niwa.
+
+ Parameter to named property getter should be mandatory:
+ - https://heycam.github.io/webidl/#idl-named-properties
+
+ No new tests, rebaselined existing test.
+
+ * Modules/mediastream/RTCStatsResponse.idl:
+ * bindings/scripts/test/TestOverrideBuiltins.idl:
+ * html/HTMLOptionsCollection.idl:
+ * html/HTMLSelectElement.idl:
+ * plugins/DOMMimeTypeArray.idl:
+ * plugins/DOMPlugin.idl:
+ * plugins/DOMPluginArray.idl:
+
+2016-07-27 Chris Dumez <[email protected]>
+
First parameter to Range.createContextualFragment() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160266
Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl (203796 => 203797)
--- trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -27,6 +27,5 @@
Conditional=WEB_RTC,
] interface RTCStatsResponse {
sequence<RTCStatsReport> result();
- // FIXME: The default parameter value is wrong.
- getter RTCStatsReport namedItem(optional DOMString name = "undefined");
+ getter RTCStatsReport namedItem(DOMString name);
};
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (203796 => 203797)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2016-07-27 21:51:49 UTC (rev 203797)
@@ -91,7 +91,7 @@
static const HashTableValue JSTestOverrideBuiltinsPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOverrideBuiltinsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestOverrideBuiltinsConstructor) } },
- { "namedItem", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestOverrideBuiltinsPrototypeFunctionNamedItem), (intptr_t) (0) } },
+ { "namedItem", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestOverrideBuiltinsPrototypeFunctionNamedItem), (intptr_t) (1) } },
};
const ClassInfo JSTestOverrideBuiltinsPrototype::s_info = { "TestOverrideBuiltinsPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestOverrideBuiltinsPrototype) };
@@ -200,7 +200,9 @@
return throwThisTypeError(*state, "TestOverrideBuiltins", "namedItem");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestOverrideBuiltins::info());
auto& impl = castedThis->wrapped();
- auto name = state->argument(0).isUndefined() ? ASCIILiteral("test") : state->uncheckedArgument(0).toWTFString(state);
+ if (UNLIKELY(state->argumentCount() < 1))
+ return throwVMError(state, createNotEnoughArgumentsError(state));
+ auto name = state->argument(0).toWTFString(state);
if (UNLIKELY(state->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(state, castedThis->globalObject(), impl.namedItem(WTFMove(name)));
Modified: trunk/Source/WebCore/bindings/scripts/test/TestOverrideBuiltins.idl (203796 => 203797)
--- trunk/Source/WebCore/bindings/scripts/test/TestOverrideBuiltins.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/bindings/scripts/test/TestOverrideBuiltins.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -2,5 +2,5 @@
OverrideBuiltins
] interface TestOverrideBuiltins
{
- getter Node namedItem(optional DOMString name = "test");
+ getter Node namedItem(DOMString name);
};
Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.idl (203796 => 203797)
--- trunk/Source/WebCore/html/HTMLOptionsCollection.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -27,7 +27,7 @@
[CustomSetter, SetterRaisesException] attribute unsigned long length;
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
- getter Node namedItem(optional DOMString name);
+ getter Node namedItem(DOMString name);
#else
getter HTMLOptionElement? item(unsigned long index);
getter HTMLOptionElement? namedItem(DOMString name);
Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (203796 => 203797)
--- trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -47,12 +47,10 @@
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
getter Node item(unsigned long index);
- Node namedItem(optional DOMString name);
+ Node namedItem(DOMString name);
#else
getter HTMLOptionElement? item(unsigned long index);
-
- // FIXME: Using "undefined" as default parameter value is wrong.
- HTMLOptionElement? namedItem(optional DOMString name = "undefined");
+ HTMLOptionElement? namedItem(DOMString name);
#endif
[ObjCLegacyUnnamedParameters, RaisesException] void add(HTMLElement element, optional HTMLElement? before = null);
Modified: trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl (203796 => 203797)
--- trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -24,8 +24,6 @@
] interface DOMMimeTypeArray {
readonly attribute unsigned long length;
getter DOMMimeType item(unsigned long index);
-
- // FIXME: Using "undefined" as default parameter value is wrong.
- getter DOMMimeType namedItem(optional DOMString name = "undefined");
+ getter DOMMimeType namedItem(DOMString name);
};
Modified: trunk/Source/WebCore/plugins/DOMPlugin.idl (203796 => 203797)
--- trunk/Source/WebCore/plugins/DOMPlugin.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/plugins/DOMPlugin.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -26,8 +26,6 @@
readonly attribute DOMString description;
readonly attribute unsigned long length;
getter DOMMimeType item(unsigned long index);
-
- // FIXME: Using "undefined" as default parameter value is wrong.
- getter DOMMimeType namedItem(optional DOMString name = "undefined");
+ getter DOMMimeType namedItem(DOMString name);
};
Modified: trunk/Source/WebCore/plugins/DOMPluginArray.idl (203796 => 203797)
--- trunk/Source/WebCore/plugins/DOMPluginArray.idl 2016-07-27 21:36:11 UTC (rev 203796)
+++ trunk/Source/WebCore/plugins/DOMPluginArray.idl 2016-07-27 21:51:49 UTC (rev 203797)
@@ -24,10 +24,8 @@
] interface DOMPluginArray {
readonly attribute unsigned long length;
getter DOMPlugin item(unsigned long index);
+ getter DOMPlugin namedItem(DOMString name);
- // FIXME: Using "undefined" as default parameter value is wrong.
- getter DOMPlugin namedItem(optional DOMString name = "undefined");
-
void refresh(optional boolean reload = false);
};