tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells: - https://html.spec.whatwg.org/multipage/tables.html#dom-tbody-deleterow - https://html.spec.whatwg.org/multipage/tables.html#dom-tr-deletecell Firefox and Chrome do not throw but WebKit does. Covered by: http://w3c-test.org/html/semantics/tabular-data/the-tbody-element/deleteRow.html http://w3c-test.org/html/semantics/tabular-data/the-tr-element/deleteCell.html
<rdar://problem/27232261>
Created attachment 283071 [details] Patch
Comment on attachment 283071 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283071&action=review > Source/WebCore/html/HTMLTableRowElement.cpp:134 > index = numCells-1; Why don't we just return early here instead when numCells is 0? Also, can we add spaces around -? > Source/WebCore/html/HTMLTableSectionElement.cpp:92 > - else > + else if (index != -1) Ditto about returning early when index == -1.
Created attachment 283096 [details] Patch
Comment on attachment 283096 [details] Patch Clearing flags on attachment: 283096 Committed r202952: <http://trac.webkit.org/changeset/202952>
All reviewed patches have been landed. Closing bug.