Bug 91286

Summary: Remove an always-failing table-wrapping check in RenderObject::addChild
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: TablesAssignee: Julien Chaffraix <jchaffraix>
Severity: Normal CC: darin, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Proposed removal 1. none

Description Julien Chaffraix 2012-07-13 14:46:30 PDT
The table wrapping checks in RenderObject::addChild ends with the following snippet:

else if (newChild->isTableCell()) {
    needsTable = !isTableRow();
    // I'm not 100% sure this is the best way to fix this, but without this
    // change we recurse infinitely when trying to render the CSS2 test page:
    // http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlbodyheadrendering2.html.
    // See Radar 2925291.
    if (needsTable && isTableCell() && !children->firstChild() && !newChild->isTableCell())
        needsTable = false;

As we only get into the branch if newChild->isTableCell() so the nested check is always false. The inner check was added in r1147 by Darin and was made obsolete by bug 12066 (circa 2005).
Comment 1 Julien Chaffraix 2012-07-13 14:55:55 PDT
Created attachment 152342 [details]
Proposed removal 1.
Comment 2 Eric Seidel (no email) 2012-07-13 14:58:46 PDT
Comment on attachment 152342 [details]
Proposed removal 1.

Comment 3 WebKit Review Bot 2012-07-13 16:34:12 PDT
Comment on attachment 152342 [details]
Proposed removal 1.

Clearing flags on attachment: 152342

Committed r122642: <http://trac.webkit.org/changeset/122642>
Comment 4 WebKit Review Bot 2012-07-13 16:34:17 PDT
All reviewed patches have been landed.  Closing bug.