Changeset 202952 in webkit
- Timestamp:
- Jul 7, 2016, 6:56:18 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLTableRowElement.cpp (modified) (1 diff)
-
Source/WebCore/html/HTMLTableSectionElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r202951 r202952 1 2016-07-07 Chris Dumez <cdumez@apple.com> 2 3 tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells 4 https://bugs.webkit.org/show_bug.cgi?id=159527 5 <rdar://problem/27232261> 6 7 Reviewed by Alex Christensen. 8 9 Rebaseline now that more checks are passing. 10 11 * web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt: 12 * web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt: 13 1 14 2016-07-07 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt
r194580 r202952 4 4 PASS HTMLTableSectionElement deleteRow(rows.length) 5 5 PASS HTMLTableSectionElement deleteRow(-2) 6 FAIL HTMLTableSectionElement deleteRow(-1) with no rows IndexSizeError: DOM Exception 1 6 PASS HTMLTableSectionElement deleteRow(-1) with no rows 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt
r194580 r202952 4 4 PASS HTMLTableRowElement deleteCell(-2) 5 5 PASS HTMLTableRowElement deleteCell(cells.length) 6 FAIL HTMLTableRowElement deleteCell(-1) with no cells IndexSizeError: DOM Exception 1 6 PASS HTMLTableRowElement deleteCell(-1) with no cells 7 7 -
trunk/Source/WebCore/ChangeLog
r202951 r202952 1 2016-07-07 Chris Dumez <cdumez@apple.com> 2 3 tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells 4 https://bugs.webkit.org/show_bug.cgi?id=159527 5 <rdar://problem/27232261> 6 7 Reviewed by Alex Christensen. 8 9 tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there 10 are no rows / cells: 11 - https://html.spec.whatwg.org/multipage/tables.html#dom-tbody-deleterow 12 - https://html.spec.whatwg.org/multipage/tables.html#dom-tr-deletecell 13 14 Firefox and Chrome do not throw but WebKit was throwing. 15 16 No new tests, rebaselined existing tests. 17 18 * html/HTMLTableRowElement.cpp: 19 (WebCore::HTMLTableRowElement::deleteCell): 20 * html/HTMLTableSectionElement.cpp: 21 (WebCore::HTMLTableSectionElement::deleteRow): 22 1 23 2016-07-07 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/html/HTMLTableRowElement.cpp
r202937 r202952 131 131 Ref<HTMLCollection> children = cells(); 132 132 int numCells = children->length(); 133 if (index == -1) 134 index = numCells-1; 133 if (index == -1) { 134 if (!numCells) 135 return; 136 137 index = numCells - 1; 138 } 135 139 if (index >= 0 && index < numCells) 136 140 HTMLElement::removeChild(*children->item(index), ec); -
trunk/Source/WebCore/html/HTMLTableSectionElement.cpp
r197779 r202952 86 86 Ref<HTMLCollection> children = rows(); 87 87 int numRows = children->length(); 88 if (index == -1) 88 if (index == -1) { 89 if (!numRows) 90 return; 91 89 92 index = numRows - 1; 93 } 90 94 if (index >= 0 && index < numRows) 91 95 HTMLElement::removeChild(*children->item(index), ec);
Note:
See TracChangeset
for help on using the changeset viewer.