This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
End tag of </td> or </th> in "in cell" mode wrongly asserts current node will be "tr" http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#parsing-main-intd The passage: Switch the insertion mode to "in row". (The current node will be a tr element at this point.) The current node will not necessarily be a tr in the fragment case. WebKit had this as an ASSERT in our TreeBuilder: http://trac.webkit.org/browser/trunk/WebCore/html/HTMLTreeBuilder.cpp?rev=65006#L2000 But that ASSERT is false in the case of: <table><tr></tr></table> <script> rows = document.getElementsByTagName("tr"); for (i = 0; i < rows.length; ++i) rows[i].innerHTML += "<td>foo</td>"; </script> Assuming I"m understanding the fragment case and how innerHTML is supposed to work correctly. I recommend changing "(The current node will be a tr element at this point.)" to "(The current node will be a tr element at this point, except in the fragment case.)" In the fragment case the "context element" must be a tr for this to be allowed (I think).
The example HTML came from: http://trac.webkit.org/browser/trunk/LayoutTests/fast/table/rowindex.html
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Partially Accepted Change Description: see diff given below Rationale: I just removed the note altogether, since it isn't so helpful when it's a complicated condition, and the spec doesn't usually have asserts like this.
Checked in as WHATWG revision r5296. Check-in comment: remove incorrect comment http://html5.org/tools/web-apps-tracker?from=5295&to=5296