WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159527
tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells
https://bugs.webkit.org/show_bug.cgi?id=159527
Summary
tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no ...
Chris Dumez
Reported
2016-07-07 15:30:20 PDT
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
Attachments
Patch
(5.15 KB, patch)
2016-07-07 15:48 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(5.45 KB, patch)
2016-07-07 18:01 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-07-07 15:31:14 PDT
<
rdar://problem/27232261
>
Chris Dumez
Comment 2
2016-07-07 15:48:34 PDT
Created
attachment 283071
[details]
Patch
Ryosuke Niwa
Comment 3
2016-07-07 17:18:57 PDT
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.
Chris Dumez
Comment 4
2016-07-07 18:01:23 PDT
Created
attachment 283096
[details]
Patch
WebKit Commit Bot
Comment 5
2016-07-07 18:56:56 PDT
Comment on
attachment 283096
[details]
Patch Clearing flags on attachment: 283096 Committed
r202952
: <
http://trac.webkit.org/changeset/202952
>
WebKit Commit Bot
Comment 6
2016-07-07 18:57:01 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug