Bug 92054 - inline-table wrapper should be generated for display: inline element only
Summary: inline-table wrapper should be generated for display: inline element only
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-23 18:41 PDT by Julien Chaffraix
Modified: 2012-07-24 10:44 PDT (History)
3 users (show)

See Also:


Attachments
Trivial patch. (4.86 KB, patch)
2012-07-24 09:01 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Patch for landing (4.83 KB, patch)
2012-07-24 10:03 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-23 18:41:02 PDT
This is a follow-up of bug 15365. I misread the specification and allowed any inline formatting context to generate an inline-table wrapper.

CSS 2.1 just takes the display into account: "If C's parent is an 'inline' box, then T must be an 'inline-table' box; otherwise it must be a 'table' box." (C is a proper table child)

Patch forthcoming.
Comment 1 Julien Chaffraix 2012-07-24 09:01:44 PDT
Created attachment 154079 [details]
Trivial patch.
Comment 2 Abhishek Arya 2012-07-24 09:09:59 PDT
Comment on attachment 154079 [details]
Trivial patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=154079&action=review

> Source/WebCore/ChangeLog:3
> +        inline-table wrapper should be generated for display: inline element only

Please add Regression(rXYZ):

> LayoutTests/fast/table/inline-block-generates-table-wrapper-expected.html:9
> +    display: table-cell;

Is this display table ? in this expected testcase, we can even directly use the table and td tags.
Comment 3 Julien Chaffraix 2012-07-24 09:21:11 PDT
Comment on attachment 154079 [details]
Trivial patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=154079&action=review

>> Source/WebCore/ChangeLog:3
>> +        inline-table wrapper should be generated for display: inline element only
> 
> Please add Regression(rXYZ):

It's not really a regression. The code was actually working due to another bug: we didn't check for table parts in RenderBlock::addChildIgnoringContinuation and thus would wrap table parts in an anonymous block, leading to the right behavior. This was confusing which is why I sided with fixing our check to match what the spec said.

>> LayoutTests/fast/table/inline-block-generates-table-wrapper-expected.html:9
>> +    display: table-cell;
> 
> Is this display table ? in this expected testcase, we can even directly use the table and td tags.

Good catch, it should be display: table or the test case is void.

Using <td> or <table> is a not-so-great-an-idea due to the UA style sheet and the different behaviors between CSS and HTML tables. It's better to stick with CSS tables for consistency.
Comment 4 Julien Chaffraix 2012-07-24 10:03:31 PDT
Created attachment 154091 [details]
Patch for landing
Comment 5 WebKit Review Bot 2012-07-24 10:44:49 PDT
Comment on attachment 154091 [details]
Patch for landing

Clearing flags on attachment: 154091

Committed r123492: <http://trac.webkit.org/changeset/123492>
Comment 6 WebKit Review Bot 2012-07-24 10:44:52 PDT
All reviewed patches have been landed.  Closing bug.