Bug 159527 - tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells
Summary: tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-07 15:30 PDT by Chris Dumez
Modified: 2016-07-07 18:57 PDT (History)
6 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Radar WebKit Bug Importer 2016-07-07 15:31:14 PDT
<rdar://problem/27232261>
Comment 2 Chris Dumez 2016-07-07 15:48:34 PDT
Created attachment 283071 [details]
Patch
Comment 3 Ryosuke Niwa 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.
Comment 4 Chris Dumez 2016-07-07 18:01:23 PDT
Created attachment 283096 [details]
Patch
Comment 5 WebKit Commit Bot 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>
Comment 6 WebKit Commit Bot 2016-07-07 18:57:01 PDT
All reviewed patches have been landed.  Closing bug.