-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make table.deleteRow(-1) a no-op when there are no rows #1924
Conversation
Please do not merge before #1890 as the commit message claims to copy wording that that commit changes. |
This copies the wording of tbody.deleteRow, with "its parent" instead of "this element". The previous wording would throw for this case. Tests: web-platform-tests/wpt#4001
64964f7
to
9528880
Compare
@rwlbuis, care to review this and the test? |
lgtm. It is best to be consistent. |
Thanks all, now merging this and web-platform-tests/wpt#4001 |
Chromium change is https://codereview.chromium.org/2427963004/ (no bug, if one is created it'll be linked from there) @cdumez, can you link to WebKit change when it lands? Filed Edge issue at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9440419/ |
WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=163746 |
https://bugs.webkit.org/show_bug.cgi?id=163746 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Import test coverage from: - web-platform-tests/wpt#4001 * web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row.html: * web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html: * web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html: Source/WebCore: Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing: - whatwg/html#1924 This is more consistent with the behavior of tbody.deleteRow(-1) and tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the same change via: - https://codereview.chromium.org/2427963004/ No new tests, updated existing tests. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::deleteRow): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@207640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=163746 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Import test coverage from: - web-platform-tests/wpt#4001 * web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row.html: * web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html: * web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt: * web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html: Source/WebCore: Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing: - whatwg/html#1924 This is more consistent with the behavior of tbody.deleteRow(-1) and tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the same change via: - https://codereview.chromium.org/2427963004/ No new tests, updated existing tests. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::deleteRow): Canonical link: https://commits.webkit.org/181525@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This copies the wording of tbody.deleteRow, with "its parent" instead
of "this element". The previous wording would throw for this case.
Tests: web-platform-tests/wpt#4001