Bug 91286 - Remove an always-failing table-wrapping check in RenderObject::addChild
Summary: Remove an always-failing table-wrapping check in RenderObject::addChild
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 14:46 PDT by Julien Chaffraix
Modified: 2012-07-13 16:34 PDT (History)
3 users (show)

See Also:


Attachments
Proposed removal 1. (2.71 KB, patch)
2012-07-13 14:55 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.

LGTM.
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.