Closed Bug 18217 Opened 25 years ago Closed 18 years ago

display: inline-table not implemented

Categories

(Core :: Layout: Tables, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: ian, Assigned: dbaron)

References

(Blocks 1 open bug, )

Details

(Keywords: css2, dev-doc-complete, testcase, Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor][patch])

Attachments

(3 files)

Currently, inline-table causes the text to dissappear altogether. See: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/inlinetable.html The test contains a paragraph like this: <p>This is a quite short paragraph. There follows a table... Right here: <span class="table"> <span class="row"> <span class="cell"> There is an inline table here.</span></span></span> This is after the table. The table should have appeared inline.</p> It uses the following styles: span.table { display: inline-table; width: 5em; border: solid; } span.row { display: table-row; } span.cell { display: table-cell; } The page renders as follows: This is a quite short paragraph. There follows a table... Right here: This is after the table. The table should have appeared inline. i.e., the table does not render. Making the span.table element "display:table" makes it all render ok.
Blocks: 18218
Assignee: troy → karnaze
Component: Layout → HTMLTables
I would think an 'inline-table' would act like an inline replaced element, but this isn't completely clear from the spec. Should it instead have a baseline? If so, where?
I think the closest the spec gets to helping us is: # inline-table (In HTML: TABLE) # Specifies that an element defines an inline-level table: it is a # rectangular block that participates in an inline formatting context). Personally, I would say render it like an inline-block -- unfortunately, the CSS3 UI spec is just as vague as CSS2's inline-table definition on this issue! David, I suggest one of us posts about this to www-style. In the meantime, however, I think we should assume that inline-table is just a replaced element as far as the line formatting model rules are concerned.
QA Contact: petersen → chrisd
Status: NEW → ASSIGNED
Target Milestone: M14
Keywords: css2
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz} radars should now be considered deprecated in favour of keywords. I am *really* sorry about the spam...
Target Milestone: M14 → M16
Summary: {css2} display: inline-table makes contents dissappear → display: inline-table makes contents dissappear
IMPORTANT: Like 'compact', 'run-in' and 'marker', a declaration containing 'display:inline-table' is now entirely ignored by the CSS parser. See bug 18218 and bug 15432 for more info. If you are planning to implement 'inline-table', you will have to re-enable the declaration in nsCSSParser.cpp. If you have no plans to implement it for this release, you may want to mark the bug "Later" like the other ones.
I'm chaning the summary from "display: inline-table makes contents dissappear" to "display: inline-table not implemented and marking "remind". The contents are not disappearing for the reasons Pierre mentions.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → REMIND
Summary: display: inline-table makes contents dissappear → display: inline-table not implemented
Reopening and moving to Future to keep this bug on our "potential dups" radar.
Status: RESOLVED → REOPENED
OS: Windows 98 → All
Hardware: PC → All
Resolution: REMIND → ---
Target Milestone: M16 → Future
Taking QA per managerial policy.
QA Contact: chrisd → py8ieh=bugzilla
Taking QA per managerial policy.
*** Bug 58175 has been marked as a duplicate of this bug. ***
Status: REOPENED → ASSIGNED
Ian, your testcase gives a 404. Could you attach the testcase to the bug.
It's temporary, the university is upgrading their UPS or something... If you need the testcase Right Now give me a yell and I'll throw it up on damowmow.com or hixie.ch somewhere.
As far as I can tell, there is no way of imitating <table align="center"> in CSS2/HTML 4 strict, without using display: inline-table on the table element, as table is treated as a block element and there appears no way to centre block elements other than by setting percentage widths and margins. See: <http://lists.w3.org/Archives/Public/www-style/2001Feb/0082.html>
margin-left: auto; margin-right: auto;
*** Bug 68293 has been marked as a duplicate of this bug. ***
*** Bug 68293 has been marked as a duplicate of this bug. ***
QA Contact: ian → amar
*** Bug 48589 has been marked as a duplicate of this bug. ***
Whiteboard: [Hixie-PF]
*** Bug 82741 has been marked as a duplicate of this bug. ***
May be I am bugblind, but the table in Hixies testcase appears for me inline, the same is true for bug 48589. Hixie, could you reevaluate the status of the bug, please !!
That's weird. It appears we do something with 'inline-table' now, but LXR shows that the CSS parser drops 'display: inline-table' on the floor. Very strange. Amar: Could you investigate?
Whiteboard: [Hixie-PF] → [awd:tbl] [Hixie-PF]
Attached file Testcase
The old testcase had a problem IMO, you can't see if there's a rable there because the border will be aplied to the inline box. I've turned it into a 2x2 table. And.. it seems it works, but it does a strange thing with the border. It only shows a border around the lower row.
*** Bug 135994 has been marked as a duplicate of this bug. ***
I didn't notice, but the bug I filed, Bug 135994, was marked as a duplicate of this one. Whether or not they are duplicates is debatable; however they are related. I think that the problem is with the way Mozilla "sees" the table element. When it is declared to be {display: inline-table} or {display: inline;}, the table element becomes just another inline element like [span]. However, since the affected table tag is no longer considered to be a "table element" according to Mozilla, then there is a HTML bug. That bug is the fact that the [tr] and [td] (and other) elements must be inside a [table] element (according to the HTML4 specs). Since Mozilla no longer considers the ***affected table element*** to technically be an ***actual table element*** (due to the CSS display property change from table to inline), then the rendering engine thinks that this is a bug in the code and tries to guess the intent of the author. This theory is supported by my testcase from Bug 135994. I made the table have a border, and it was displayed as if affected table element was a regular inline element. The table's contents were rendered, but they are not related to the affected table element, except for a few bugs: For instance, if the table is positioned relative to it's inline-position, then strange things happen to the table elements. (see the testcase) I don't know if this is a bug or a feature, though. According to the markup (and HTML4 specs), any table element, even with {display: inline;}, is still a valid table, no matter what Mozilla may think. The CSS1 specs (which I was coding to) don't mention if changing the display property of tables changes what they can hold. The CSS2 specs utilize the {display: inline-table;} property and don't explain what {display: inline;} does to a table element and its contents (I think). I will attach a file with my test case (using {display: inline;} instead of {display: inline-table;}, thought I think they should both show the same results..)
here's the attachment I promised. ;)
I forgot something (sorry): >>It only shows a border around the lower row.<< I think that Mozilla is showing the border around the table element as if it was an inline element. I don't think that the border is around the bottom row of the table (see the intersection of the border and the text in the bottom row).
Those aren't bugs in 'inline-table', since 'display: inline' and 'display: inline-table' are two very different things. I'm going to reopen bug 135994, since it is NOT related at all to this bug.
I think the appearance of support for 'inline-table' comes from the failure to do {ib} construction when we construct the anonymous table frame. I don't think there's anything deeper than that. 'inline-table' has since been renamed to '-moz-inline-table'. However, I think there's something else stopping it from getting through, since I don't see how the logic in ConstructFrameByDisplayType would have allowed any frames at all to be constructed.
CSS 2.1 has been released. This is the revised edition of CSS2. It adds a few small things from CSS3. One of these is display: inline-block. http://www.w3.org/TR/2002/WD-CSS21-20020802/ The details for inline-block: http://www.w3.org/TR/2002/WD-CSS21-20020802/visuren.html#display-prop According to Bert Bos from w3.org, 'All in all, this should be the version of CSS that is "safe" for users of desktop browsers.'
MathML note: <mtable> is an inline-table. I believe that if the MathML implementation were able to reuse an inline-table object (instead of table), a number of bugs (Bug 130889, others) would go away.
Blocks: 184155
mass reassign to default owner
Assignee: karnaze → table
Status: ASSIGNED → NEW
QA Contact: amar → madhur
Target Milestone: Future → ---
Target Milestone: --- → Future
I believe a similar situation is occurring with the web site at www.eawt.org. When you click on one of the links on the left side of the page, nothing is displayed inside the window on the page where new data are supposed to be. The bad code, I suspect, is <iframe name="I1" height="100%" width="100%" border="0" frameborder="0" src="../xxxxxxx.asp">. The data load perfectly in IE 6. Also, the page was created using Front Page 5.
Attached image block and inline tables
Block tables on left, inline tables on right.
The CSS2.1 spec says that the baseline of an inline-table should be the baseline of the first row. (See 2nd to last paragraph on http://www.w3.org/Style/Group/css2-src/visudet.html) That doesn't seem to be respected in Firefox 0.9.1 (linux).
*** Bug 277057 has been marked as a duplicate of this bug. ***
*** Bug 342502 has been marked as a duplicate of this bug. ***
Blocks: 348577
Blocks: 361352
No longer blocks: 361352
Whiteboard: [awd:tbl] [Hixie-PF] → [awd:tbl] [Hixie-PF][reflow-refactor]
Patch in bug 9458.
Assignee: layout.tables → dbaron
Depends on: inline-block
Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor] → [awd:tbl] [Hixie-PF][reflow-refactor][patch]
Fixed by checkin of bug 9458 yesterday morning.
Status: NEW → RESOLVED
Closed: 25 years ago18 years ago
Resolution: --- → FIXED
This was documented a while ago.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: