display: inline-table not implemented

RESOLVED FIXED in Future

Status

()

Core
Layout: Tables
P3
normal
RESOLVED FIXED
18 years ago
3 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: dbaron)

Tracking

(Blocks: 1 bug, {css2, dev-doc-complete, testcase})

Trunk
Future
css2, dev-doc-complete, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor][patch], URL)

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
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.
(Reporter)

Updated

18 years ago
Blocks: 18218

Updated

18 years ago
Assignee: troy → karnaze
Component: Layout → HTMLTables
(Assignee)

Comment 1

18 years ago
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?
(Reporter)

Comment 2

18 years ago
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.

Updated

18 years ago
QA Contact: petersen → chrisd

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M14
(Reporter)

Updated

18 years ago
Keywords: css2
(Reporter)

Comment 3

18 years ago
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...

Updated

18 years ago
Target Milestone: M14 → M16

Updated

18 years ago
Summary: {css2} display: inline-table makes contents dissappear → display: inline-table makes contents dissappear

Comment 4

17 years ago
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.

Comment 5

17 years ago
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
Last Resolved: 17 years ago
Resolution: --- → REMIND
Summary: display: inline-table makes contents dissappear → display: inline-table not implemented
(Reporter)

Comment 6

17 years ago
Reopening and moving to Future to keep this bug on our "potential dups" radar.
Status: RESOLVED → REOPENED
Keywords: correctness, testcase
OS: Windows 98 → All
Hardware: PC → All
Resolution: REMIND → ---
Target Milestone: M16 → Future
(Reporter)

Comment 7

17 years ago
Taking QA per managerial policy.
(Reporter)

Updated

17 years ago
QA Contact: chrisd → py8ieh=bugzilla
(Reporter)

Comment 8

17 years ago
Taking QA per managerial policy.
(Reporter)

Comment 9

17 years ago
*** Bug 58175 has been marked as a duplicate of this bug. ***

Updated

17 years ago
Status: REOPENED → ASSIGNED

Comment 10

17 years ago
Ian, your testcase gives a 404. Could you attach the testcase to the bug.
(Reporter)

Comment 11

17 years ago
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.

Comment 12

16 years ago
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>
(Assignee)

Comment 13

16 years ago
margin-left: auto; margin-right: auto;

Comment 14

16 years ago
*** Bug 68293 has been marked as a duplicate of this bug. ***

Comment 15

16 years ago
*** Bug 68293 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

16 years ago
QA Contact: ian → amar

Comment 16

16 years ago
*** Bug 48589 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

16 years ago
Whiteboard: [Hixie-PF]
*** Bug 82741 has been marked as a duplicate of this bug. ***

Comment 18

16 years ago
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 !!
(Reporter)

Comment 19

16 years ago
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?

Updated

16 years ago
Whiteboard: [Hixie-PF] → [awd:tbl] [Hixie-PF]

Comment 20

15 years ago
Created attachment 74623 [details]
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.

Comment 21

15 years ago
*** Bug 135994 has been marked as a duplicate of this bug. ***

Comment 22

15 years ago
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..)

Comment 23

15 years ago
Created attachment 78676 [details]
shows bugs in inline table display

here's the attachment I promised. ;)

Comment 24

15 years ago
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).
(Assignee)

Comment 25

15 years ago
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.
(Assignee)

Comment 26

15 years ago
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.

Comment 27

15 years ago
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.'   

Comment 28

15 years ago
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.

Updated

14 years ago
Blocks: 184155

Comment 29

14 years ago
mass reassign to default owner
Assignee: karnaze → table
Status: ASSIGNED → NEW
QA Contact: amar → madhur
Target Milestone: Future → ---

Updated

14 years ago
Target Milestone: --- → Future

Comment 30

14 years ago
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.

Updated

13 years ago

Comment 31

13 years ago
Created attachment 147925 [details]
block and inline tables

Block tables on left, inline tables on right.

Comment 32

13 years ago
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. ***

Comment 34

11 years ago
*** Bug 342502 has been marked as a duplicate of this bug. ***

Updated

11 years ago
Blocks: 348577
Blocks: 361352
No longer blocks: 361352
Whiteboard: [awd:tbl] [Hixie-PF] → [awd:tbl] [Hixie-PF][reflow-refactor]
(Assignee)

Comment 35

11 years ago
Patch in bug 9458.
Assignee: layout.tables → dbaron
Depends on: 9458
Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor] → [awd:tbl] [Hixie-PF][reflow-refactor][patch]
(Assignee)

Updated

10 years ago
Depends on: 367332
Keywords: dev-doc-needed
(Assignee)

Comment 36

10 years ago
Fixed by checkin of bug 9458 yesterday morning.
Status: NEW → RESOLVED
Last Resolved: 17 years ago10 years ago
Resolution: --- → FIXED
Depends on: 371249
This was documented a while ago.
Keywords: dev-doc-needed → dev-doc-complete
Depends on: 404030

Updated

7 years ago
You need to log in before you can comment on or make changes to this bug.