Bug 3235 - CSS2: Table cell coalescing in CSS broken
Summary: CSS2: Table cell coalescing in CSS broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 412
Hardware: All All
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2005-06-01 14:56 PDT by Dave Hyatt
Modified: 2009-04-21 08:49 PDT (History)
3 users (show)

See Also:


Attachments
test case as attachement (216 bytes, text/html)
2005-12-28 02:12 PST, Eric Seidel (no email)
no flags Details
Patch to add test (2.15 KB, text/plain)
2009-04-21 02:00 PDT, Cameron Zwarich (cpst)
darin: review+
Details

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