Title: [203840] trunk
Revision
203840
Author
[email protected]
Date
2016-07-28 14:07:22 -0700 (Thu, 28 Jul 2016)

Log Message

Parameter to table.deleteRow() / body.deleteRow() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160307

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Parameter to table.deleteRow() / body.deleteRow() should be mandatory:
- https://html.spec.whatwg.org/multipage/tables.html#the-table-element
- https://html.spec.whatwg.org/multipage/tables.html#htmltablesectionelement

Firefox and Chrome agree with the specification.

No new tests, rebaselined existing test.

* html/HTMLTableElement.idl:
* html/HTMLTableSectionElement.idl:

Source/WebInspectorUI:

Update WebInspector accordingly.

* UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

Update existing test to reflect behavior change.

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/script-tests/non-numeric-values-numeric-parameters.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203839 => 203840)


--- trunk/LayoutTests/ChangeLog	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/LayoutTests/ChangeLog	2016-07-28 21:07:22 UTC (rev 203840)
@@ -1,3 +1,15 @@
+2016-07-28  Chris Dumez  <[email protected]>
+
+        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160307
+
+        Reviewed by Ryosuke Niwa.
+
+        Update existing test to reflect behavior change.
+
+        * fast/dom/non-numeric-values-numeric-parameters-expected.txt:
+        * fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
+
 2016-07-28  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r203826.

Modified: trunk/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt (203839 => 203840)


--- trunk/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt	2016-07-28 21:07:22 UTC (rev 203840)
@@ -34,11 +34,11 @@
 PASS nonNumericPolicy('createHTMLSelectElement().remove(x)') is 'any type allowed'
 PASS nonNumericPolicy('createHTMLSelectElement().item(x)') is 'any type allowed (but not omitted)'
 PASS nonNumericPolicy('createHTMLTableElement().insertRow(x)') is 'any type allowed'
-PASS nonNumericPolicy('createHTMLTableElement().deleteRow(x)') is 'any type allowed'
+PASS nonNumericPolicy('createHTMLTableElement().deleteRow(x)') is 'any type allowed (but not omitted)'
 PASS nonNumericPolicy('createHTMLTableRowElement().insertCell(x)') is 'any type allowed'
 PASS nonNumericPolicy('createHTMLTableRowElement().deleteCell(x)') is 'any type allowed (but not omitted)'
 PASS nonNumericPolicy('createHTMLTableSectionElement().insertRow(x)') is 'any type allowed'
-PASS nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)') is 'any type allowed'
+PASS nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)') is 'any type allowed (but not omitted)'
 PASS nonNumericPolicy('document.createElement("textarea").setSelectionRange(x, 0)') is 'any type allowed'
 PASS nonNumericPolicy('document.createElement("textarea").setSelectionRange(0, x)') is 'any type allowed'
 PASS nonNumericPolicy('document.createEvent("KeyboardEvent").initKeyboardEvent("a", false, false, null, "b", x, false, false, false, false, false)') is 'any type allowed'

Modified: trunk/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js (203839 => 203840)


--- trunk/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js	2016-07-28 21:07:22 UTC (rev 203840)
@@ -255,7 +255,7 @@
 // HTMLTableElement
 
 shouldBe("nonNumericPolicy('createHTMLTableElement().insertRow(x)')", "'any type allowed'");
-shouldBe("nonNumericPolicy('createHTMLTableElement().deleteRow(x)')", "'any type allowed'");
+shouldBe("nonNumericPolicy('createHTMLTableElement().deleteRow(x)')", "'any type allowed (but not omitted)'");
 
 // HTMLTableRowElement
 
@@ -265,7 +265,7 @@
 // HTMLTableSectionElement
 
 shouldBe("nonNumericPolicy('createHTMLTableSectionElement().insertRow(x)')", "'any type allowed'");
-shouldBe("nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)')", "'any type allowed'");
+shouldBe("nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)')", "'any type allowed (but not omitted)'");
 
 // HTMLInputElement
 

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203839 => 203840)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-28 21:07:22 UTC (rev 203840)
@@ -1,5 +1,16 @@
 2016-07-28  Chris Dumez  <[email protected]>
 
+        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160307
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline W3C test now that more checks are passing.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-07-28  Chris Dumez  <[email protected]>
+
         2 first parameters to input.setSelectionRange() should be mandatory
         https://bugs.webkit.org/show_bug.cgi?id=160310
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (203839 => 203840)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-28 21:07:22 UTC (rev 203840)
@@ -2449,7 +2449,7 @@
 PASS HTMLTableElement interface: operation createTBody() 
 PASS HTMLTableElement interface: attribute rows 
 PASS HTMLTableElement interface: operation insertRow(long) 
-FAIL HTMLTableElement interface: operation deleteRow(long) assert_equals: property has wrong .length expected 1 but got 0
+PASS HTMLTableElement interface: operation deleteRow(long) 
 FAIL HTMLTableElement interface: attribute sortable assert_true: The prototype object must have a property "sortable" expected true got false
 FAIL HTMLTableElement interface: operation stopSorting() assert_own_property: interface prototype object missing non-static operation expected property "stopSorting" missing
 PASS HTMLTableElement interface: attribute align 
@@ -2478,9 +2478,7 @@
 PASS HTMLTableElement interface: document.createElement("table") must inherit property "insertRow" with the proper type (12) 
 PASS HTMLTableElement interface: calling insertRow(long) on document.createElement("table") with too few arguments must throw TypeError 
 PASS HTMLTableElement interface: document.createElement("table") must inherit property "deleteRow" with the proper type (13) 
-FAIL HTMLTableElement interface: calling deleteRow(long) on document.createElement("table") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
+PASS HTMLTableElement interface: calling deleteRow(long) on document.createElement("table") with too few arguments must throw TypeError 
 FAIL HTMLTableElement interface: document.createElement("table") must inherit property "sortable" with the proper type (14) assert_inherits: property "sortable" not found in prototype chain
 FAIL HTMLTableElement interface: document.createElement("table") must inherit property "stopSorting" with the proper type (15) assert_inherits: property "stopSorting" not found in prototype chain
 PASS HTMLTableElement interface: document.createElement("table") must inherit property "align" with the proper type (16) 
@@ -2535,7 +2533,7 @@
 PASS HTMLTableSectionElement interface: existence and properties of interface prototype object's "constructor" property 
 PASS HTMLTableSectionElement interface: attribute rows 
 PASS HTMLTableSectionElement interface: operation insertRow(long) 
-FAIL HTMLTableSectionElement interface: operation deleteRow(long) assert_equals: property has wrong .length expected 1 but got 0
+PASS HTMLTableSectionElement interface: operation deleteRow(long) 
 PASS HTMLTableSectionElement interface: attribute align 
 PASS HTMLTableSectionElement interface: attribute ch 
 PASS HTMLTableSectionElement interface: attribute chOff 
@@ -2546,9 +2544,7 @@
 PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "insertRow" with the proper type (1) 
 PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tbody") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "deleteRow" with the proper type (2) 
-FAIL HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tbody") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
+PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tbody") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "align" with the proper type (3) 
 PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "ch" with the proper type (4) 
 PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "chOff" with the proper type (5) 
@@ -2559,9 +2555,7 @@
 PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "insertRow" with the proper type (1) 
 PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("thead") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "deleteRow" with the proper type (2) 
-FAIL HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("thead") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
+PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("thead") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "align" with the proper type (3) 
 PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "ch" with the proper type (4) 
 PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "chOff" with the proper type (5) 
@@ -2572,9 +2566,7 @@
 PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "insertRow" with the proper type (1) 
 PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "deleteRow" with the proper type (2) 
-FAIL HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
+PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError 
 PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type (3) 
 PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "ch" with the proper type (4) 
 PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "chOff" with the proper type (5) 

Modified: trunk/Source/WebCore/ChangeLog (203839 => 203840)


--- trunk/Source/WebCore/ChangeLog	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/Source/WebCore/ChangeLog	2016-07-28 21:07:22 UTC (rev 203840)
@@ -1,3 +1,21 @@
+2016-07-28  Chris Dumez  <[email protected]>
+
+        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160307
+
+        Reviewed by Ryosuke Niwa.
+
+        Parameter to table.deleteRow() / body.deleteRow() should be mandatory:
+        - https://html.spec.whatwg.org/multipage/tables.html#the-table-element
+        - https://html.spec.whatwg.org/multipage/tables.html#htmltablesectionelement
+
+        Firefox and Chrome agree with the specification.
+
+        No new tests, rebaselined existing test.
+
+        * html/HTMLTableElement.idl:
+        * html/HTMLTableSectionElement.idl:
+
 2016-07-28  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r203826.

Modified: trunk/Source/WebCore/html/HTMLTableElement.idl (203839 => 203840)


--- trunk/Source/WebCore/html/HTMLTableElement.idl	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/Source/WebCore/html/HTMLTableElement.idl	2016-07-28 21:07:22 UTC (rev 203840)
@@ -46,6 +46,6 @@
     void deleteCaption();
 
     [RaisesException] HTMLElement insertRow(optional long index = -1);
-    [RaisesException] void deleteRow(optional long index = 0);
+    [RaisesException] void deleteRow(long index);
 };
 

Modified: trunk/Source/WebCore/html/HTMLTableSectionElement.idl (203839 => 203840)


--- trunk/Source/WebCore/html/HTMLTableSectionElement.idl	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/Source/WebCore/html/HTMLTableSectionElement.idl	2016-07-28 21:07:22 UTC (rev 203840)
@@ -27,6 +27,6 @@
     [Reflect] attribute DOMString vAlign;
     readonly attribute HTMLCollection rows;
     [RaisesException] HTMLElement insertRow(optional long index = -1);
-    [RaisesException] void deleteRow(optional long index = 0);
+    [RaisesException] void deleteRow(long index);
 };
 

Modified: trunk/Source/WebInspectorUI/ChangeLog (203839 => 203840)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-07-28 21:07:22 UTC (rev 203840)
@@ -1,5 +1,16 @@
 2016-07-28  Chris Dumez  <[email protected]>
 
+        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160307
+
+        Reviewed by Ryosuke Niwa.
+
+        Update WebInspector accordingly.
+
+        * UserInterface/Models/NativeFunctionParameters.js:
+
+2016-07-28  Chris Dumez  <[email protected]>
+
         2 first parameters to input.setSelectionRange() should be mandatory
         https://bugs.webkit.org/show_bug.cgi?id=160310
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (203839 => 203840)


--- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js	2016-07-28 21:02:30 UTC (rev 203839)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js	2016-07-28 21:07:22 UTC (rev 203840)
@@ -962,7 +962,7 @@
     },
 
     HTMLTableElement: {
-        deleteRow: "[index]",
+        deleteRow: "index",
         insertRow: "[index]",
         __proto__: null,
     },
@@ -974,7 +974,7 @@
     },
 
     HTMLTableSectionElement: {
-        deleteRow: "[index]",
+        deleteRow: "index",
         insertRow: "[index]",
         __proto__: null,
     },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to