Bug 125640

Summary: WebKit generates a table (instead of inline-table) anonymous wrapper for element with "display:table-cell" and inline-level parent
Product: WebKit Reporter: Daniel Holbert <dholbert>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 21092    
Bug Blocks:    
Attachments:
Description Flags
testcase none

Description Daniel Holbert 2013-12-12 09:30:45 PST
Created attachment 219090 [details]
testcase

What steps will reproduce the problem?
1. Load attached testcase.

EXPECTED RESULTS:
Both "table-cell, ..." lines should have a black border and a lime background.

ACTUAL RESULTS:
The first "table-cell, ..." line has a solid black line above it, and no background.

As described at https://bugzilla.mozilla.org/show_bug.cgi?id=928074#c22, I think this indicates that WebKit is incorrectly generating an anonymous *block-level* table element to wrap the table-cell. This goes against the CSS 2.1 spec -- as described in step 3 substep 2 at http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes ,

"(If C's parent is an 'inline' box, then [the generated anonymous table] must be an 'inline-table' box; otherwise it must be a 'table' box.)"

And in the testcase, the parent is a <span>, which is an inline box. So, WebKit should generate an inline-table and match the rendering of the lower line that has an explicit inline-table.

I tested with two webkit-based browsers on Ubuntu 13.10:
 - Midori 0.4.3 (not sure what WebKit version)
 - epiphany-browser 3.6.1 (which says "Powered by WebKit 1.10.2")
Both show ACTUAL RESULTS.

Firefox 26 shows EXPECTED RESULTS

See also the related Blink bug, here: http://code.google.com/p/chromium/issues/detail?id=327832
Comment 1 Daniel Holbert 2014-01-06 09:19:20 PST
As I discovered (via a few hops) on the Blink version of this bug, this issue may be a variant of bug 21092. (Though I'm not sure, since there appear to be several related issues; bug 21092 seems to be primarily about a problem with <table style="display:inline">.)

Adding dependency to establish the connection, at least (though this may end up just being a duplicate).