Bug 3235

Summary: CSS2: Table cell coalescing in CSS broken
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: TablesAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, ian, zwarich
Priority: P2 Keywords: InRadar
Version: 412   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case as attachement
none
Patch to add test darin: review+

Description Dave Hyatt 2005-06-01 14:56:31 PDT
<html>
<head>
<style>
.entries { display: table-cell; }
.sidebar { display: table-cell; }
</style>
</head>
<body>
<div class="nav"></div>
<div class="entries">One</div>
<div class="sidebar">Two</div>
</body>
</html>

"One" and "Two" should be in the same table, so they should be in a row together.  Instead they end up 
in separate tables all because of the presence of the extra "nav" div.
Comment 1 Dave Hyatt 2005-06-01 14:57:37 PDT
Apple Bug: rdar://3299883/
Comment 2 Eric Seidel (no email) 2005-12-28 02:12:04 PST
Created attachment 5331 [details]
test case as attachement
Comment 3 Eric Seidel (no email) 2005-12-28 02:13:00 PST
CC'ing beth as this is in her area of expertise.
Comment 4 Bradley Meck 2008-05-31 01:06:42 PDT
After looking into the bug I cannot seem to locate the logic for testing adjacent cells. It does not occur in all the Rendering files and my next guess was the CSSParser, which also does not appear to have the logic. Also the use of setStyle only occurs once for TABLE_CELL, and that also does not appear to contain the logic. Any clues?
Comment 5 Rob Buis 2008-06-01 23:50:52 PDT
Hi Bradley,

(In reply to comment #4)
> After looking into the bug I cannot seem to locate the logic for testing
> adjacent cells. It does not occur in all the Rendering files and my next guess
> was the CSSParser, which also does not appear to have the logic. Also the use
> of setStyle only occurs once for TABLE_CELL, and that also does not appear to
> contain the logic. Any clues?

I noticed that the render tree dumps are different if you position the non table cell div first or last. In the last case two RenderTableCell's are created, the first case just one. It may be worth debugging on what basis
and where these RenderTableCell's are created, maybe by stepping through the code or adding printf statements.
Cheers,

Rob.
Comment 6 Cameron Zwarich (cpst) 2009-04-21 02:00:54 PDT
Created attachment 29644 [details]
Patch to add test

The bug is now fixed, but we should add this as a test.
Comment 7 Cameron Zwarich (cpst) 2009-04-21 08:49:21 PDT
Landed in r42711.