Changeset 203840 in webkit


Ignore:
Timestamp:
Jul 28, 2016 2:07:22 PM (8 years ago)
Author:
Chris Dumez
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:

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:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203839 r203840  
     12016-07-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=160307
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Update existing test to reflect behavior change.
     9
     10        * fast/dom/non-numeric-values-numeric-parameters-expected.txt:
     11        * fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
     12
    1132016-07-28  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt

    r203836 r203840  
    3535PASS nonNumericPolicy('createHTMLSelectElement().item(x)') is 'any type allowed (but not omitted)'
    3636PASS nonNumericPolicy('createHTMLTableElement().insertRow(x)') is 'any type allowed'
    37 PASS nonNumericPolicy('createHTMLTableElement().deleteRow(x)') is 'any type allowed'
     37PASS nonNumericPolicy('createHTMLTableElement().deleteRow(x)') is 'any type allowed (but not omitted)'
    3838PASS nonNumericPolicy('createHTMLTableRowElement().insertCell(x)') is 'any type allowed'
    3939PASS nonNumericPolicy('createHTMLTableRowElement().deleteCell(x)') is 'any type allowed (but not omitted)'
    4040PASS nonNumericPolicy('createHTMLTableSectionElement().insertRow(x)') is 'any type allowed'
    41 PASS nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)') is 'any type allowed'
     41PASS nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)') is 'any type allowed (but not omitted)'
    4242PASS nonNumericPolicy('document.createElement("textarea").setSelectionRange(x, 0)') is 'any type allowed'
    4343PASS nonNumericPolicy('document.createElement("textarea").setSelectionRange(0, x)') is 'any type allowed'
  • trunk/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js

    r203836 r203840  
    256256
    257257shouldBe("nonNumericPolicy('createHTMLTableElement().insertRow(x)')", "'any type allowed'");
    258 shouldBe("nonNumericPolicy('createHTMLTableElement().deleteRow(x)')", "'any type allowed'");
     258shouldBe("nonNumericPolicy('createHTMLTableElement().deleteRow(x)')", "'any type allowed (but not omitted)'");
    259259
    260260// HTMLTableRowElement
     
    266266
    267267shouldBe("nonNumericPolicy('createHTMLTableSectionElement().insertRow(x)')", "'any type allowed'");
    268 shouldBe("nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)')", "'any type allowed'");
     268shouldBe("nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)')", "'any type allowed (but not omitted)'");
    269269
    270270// HTMLInputElement
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r203836 r203840  
     12016-07-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=160307
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Rebaseline W3C test now that more checks are passing.
     9
     10        * web-platform-tests/html/dom/interfaces-expected.txt:
     11
    1122016-07-28  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r203836 r203840  
    24502450PASS HTMLTableElement interface: attribute rows
    24512451PASS HTMLTableElement interface: operation insertRow(long)
    2452 FAIL HTMLTableElement interface: operation deleteRow(long) assert_equals: property has wrong .length expected 1 but got 0
     2452PASS HTMLTableElement interface: operation deleteRow(long)
    24532453FAIL HTMLTableElement interface: attribute sortable assert_true: The prototype object must have a property "sortable" expected true got false
    24542454FAIL HTMLTableElement interface: operation stopSorting() assert_own_property: interface prototype object missing non-static operation expected property "stopSorting" missing
     
    24792479PASS HTMLTableElement interface: calling insertRow(long) on document.createElement("table") with too few arguments must throw TypeError
    24802480PASS HTMLTableElement interface: document.createElement("table") must inherit property "deleteRow" with the proper type (13)
    2481 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 () {
    2482             fn.apply(obj, args);
    2483         }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
     2481PASS HTMLTableElement interface: calling deleteRow(long) on document.createElement("table") with too few arguments must throw TypeError
    24842482FAIL HTMLTableElement interface: document.createElement("table") must inherit property "sortable" with the proper type (14) assert_inherits: property "sortable" not found in prototype chain
    24852483FAIL HTMLTableElement interface: document.createElement("table") must inherit property "stopSorting" with the proper type (15) assert_inherits: property "stopSorting" not found in prototype chain
     
    25362534PASS HTMLTableSectionElement interface: attribute rows
    25372535PASS HTMLTableSectionElement interface: operation insertRow(long)
    2538 FAIL HTMLTableSectionElement interface: operation deleteRow(long) assert_equals: property has wrong .length expected 1 but got 0
     2536PASS HTMLTableSectionElement interface: operation deleteRow(long)
    25392537PASS HTMLTableSectionElement interface: attribute align
    25402538PASS HTMLTableSectionElement interface: attribute ch
     
    25472545PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tbody") with too few arguments must throw TypeError
    25482546PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "deleteRow" with the proper type (2)
    2549 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 () {
    2550             fn.apply(obj, args);
    2551         }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
     2547PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tbody") with too few arguments must throw TypeError
    25522548PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "align" with the proper type (3)
    25532549PASS HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "ch" with the proper type (4)
     
    25602556PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("thead") with too few arguments must throw TypeError
    25612557PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "deleteRow" with the proper type (2)
    2562 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 () {
    2563             fn.apply(obj, args);
    2564         }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
     2558PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("thead") with too few arguments must throw TypeError
    25652559PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "align" with the proper type (3)
    25662560PASS HTMLTableSectionElement interface: document.createElement("thead") must inherit property "ch" with the proper type (4)
     
    25732567PASS HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError
    25742568PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "deleteRow" with the proper type (2)
    2575 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 () {
    2576             fn.apply(obj, args);
    2577         }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
     2569PASS HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError
    25782570PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type (3)
    25792571PASS HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "ch" with the proper type (4)
  • trunk/Source/WebCore/ChangeLog

    r203839 r203840  
     12016-07-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=160307
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Parameter to table.deleteRow() / body.deleteRow() should be mandatory:
     9        - https://html.spec.whatwg.org/multipage/tables.html#the-table-element
     10        - https://html.spec.whatwg.org/multipage/tables.html#htmltablesectionelement
     11
     12        Firefox and Chrome agree with the specification.
     13
     14        No new tests, rebaselined existing test.
     15
     16        * html/HTMLTableElement.idl:
     17        * html/HTMLTableSectionElement.idl:
     18
    1192016-07-28  Commit Queue  <commit-queue@webkit.org>
    220
  • trunk/Source/WebCore/html/HTMLTableElement.idl

    r203529 r203840  
    4747
    4848    [RaisesException] HTMLElement insertRow(optional long index = -1);
    49     [RaisesException] void deleteRow(optional long index = 0);
     49    [RaisesException] void deleteRow(long index);
    5050};
    5151
  • trunk/Source/WebCore/html/HTMLTableSectionElement.idl

    r199969 r203840  
    2828    readonly attribute HTMLCollection rows;
    2929    [RaisesException] HTMLElement insertRow(optional long index = -1);
    30     [RaisesException] void deleteRow(optional long index = 0);
     30    [RaisesException] void deleteRow(long index);
    3131};
    3232
  • trunk/Source/WebInspectorUI/ChangeLog

    r203836 r203840  
     12016-07-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to table.deleteRow() / body.deleteRow() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=160307
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Update WebInspector accordingly.
     9
     10        * UserInterface/Models/NativeFunctionParameters.js:
     11
    1122016-07-28  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js

    r203836 r203840  
    963963
    964964    HTMLTableElement: {
    965         deleteRow: "[index]",
     965        deleteRow: "index",
    966966        insertRow: "[index]",
    967967        __proto__: null,
     
    975975
    976976    HTMLTableSectionElement: {
    977         deleteRow: "[index]",
     977        deleteRow: "index",
    978978        insertRow: "[index]",
    979979        __proto__: null,
Note: See TracChangeset for help on using the changeset viewer.