Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Issue 263193002: HTMLTableSectionElement.insertRow()'s argument default value should be -1 (Closed)

Created:
6 years, 7 months ago by Inactive
Modified:
6 years, 7 months ago
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, arv+blink, watchdog-blink-watchlist_google.com
Visibility:
Public.

Description

HTMLTableSectionElement.insertRow()'s argument default value should be -1 HTMLTableSectionElement.insertRow()'s argument default value should be -1, not 0, as per the specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-tbody-element The new behavior matches the one of Firefox 29 and IE11. This CL also cleans up the implementation of HTMLTableSectionElement::insertRow() a bit. R=arv@chromium.org, tkent@chromium.org BUG=369803 TEST=fast/dom/HTMLTableSectionElement/insertRow-default-argument.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173339

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -14 lines) Patch
A LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-default-argument.html View 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-default-argument-expected.txt View 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTableSectionElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLTableSectionElement.cpp View 1 chunk +15 lines, -13 lines 4 comments Download
M Source/core/html/HTMLTableSectionElement.idl View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 12 (0 generated)
Inactive
6 years, 7 months ago (2014-05-05 14:04:08 UTC) #1
eseidel
I hope we're convincing Safari to change too. :)
6 years, 7 months ago (2014-05-05 15:30:51 UTC) #2
Inactive
On 2014/05/05 15:30:51, eseidel wrote: > I hope we're convincing Safari to change too. :) ...
6 years, 7 months ago (2014-05-05 15:32:56 UTC) #3
eseidel
lgtm https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp File Source/core/html/HTMLTableSectionElement.cpp (left): https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp#oldcode65 Source/core/html/HTMLTableSectionElement.cpp:65: if (index < -1 || index > numRows) ...
6 years, 7 months ago (2014-05-05 15:33:42 UTC) #4
Inactive
https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.idl File Source/core/html/HTMLTableSectionElement.idl (right): https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.idl#newcode27 Source/core/html/HTMLTableSectionElement.idl:27: [RaisesException] HTMLElement insertRow(optional long index); On 2014/05/05 15:33:42, eseidel ...
6 years, 7 months ago (2014-05-05 15:35:48 UTC) #5
Inactive
On 2014/05/05 15:32:56, Chris Dumez wrote: > On 2014/05/05 15:30:51, eseidel wrote: > > I ...
6 years, 7 months ago (2014-05-05 18:16:56 UTC) #6
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 7 months ago (2014-05-05 21:31:56 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/263193002/1
6 years, 7 months ago (2014-05-05 21:32:14 UTC) #8
commit-bot: I haz the power
Change committed as 173339
6 years, 7 months ago (2014-05-05 21:45:26 UTC) #9
arv (Not doing code reviews)
https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp File Source/core/html/HTMLTableSectionElement.cpp (right): https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp#newcode79 Source/core/html/HTMLTableSectionElement.cpp:79: Node* n = index ? children->item(index) : firstChild(); fistChild ...
6 years, 7 months ago (2014-05-06 17:53:41 UTC) #10
Inactive
https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp File Source/core/html/HTMLTableSectionElement.cpp (right): https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSectionElement.cpp#newcode79 Source/core/html/HTMLTableSectionElement.cpp:79: Node* n = index ? children->item(index) : firstChild(); On ...
6 years, 7 months ago (2014-05-06 17:57:54 UTC) #11
Inactive
6 years, 7 months ago (2014-05-06 18:55:45 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSe...
File Source/core/html/HTMLTableSectionElement.cpp (right):

https://codereview.chromium.org/263193002/diff/1/Source/core/html/HTMLTableSe...
Source/core/html/HTMLTableSectionElement.cpp:79: Node* n = index ?
children->item(index) : firstChild();
On 2014/05/06 17:57:54, Chris Dumez wrote:
> On 2014/05/06 17:53:42, arv wrote:
> > fistChild does not seem right here. It should be firstElementChild. You
should
> > be able to test this with a whitespace text node as the firstChild.
> > 
> > "Otherwise, the method must create a tr element, insert it as a child of the
> > table section element, immediately before the indexth tr element in the rows
> > collection, and finally must return the newly created tr element."
> 
> Oh, I thought this looked weird as well when I refactored this part of the
code.
> I will take investigate and fix if needed in a follow-up patch. Thanks for
> noticing this.

Yes, I confirmed we behave differently thatn Firefox and the spec here:
http://jsfiddle.net/JS4VU/1/

Powered by Google App Engine
This is Rietveld 408576698