Open Bug 1660016 Opened 5 years ago Updated 5 years ago

Table's column not displaying properly

Categories

(Core :: Layout: Tables, defect)

79 Branch
defect

Tracking

()

People

(Reporter: pierrick.alamartine, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

I reproduced the issue in jsfiddle here :
https://jsfiddle.net/rknofuby/3/

Actual results:

In the code you can see that the "display: hidden" property of the xfs_17 column affects the xfs_18 column and hides it as well.

Expected results:

In Chrome the column displays properly and the button inside it is shown.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout: Tables
Product: Firefox → Core
Attached file reduced html

It looks like the display: none on a table cell is causing it to be ignored in counting columns, so that the <col width="0"> that was intended to apply to the suppressed cell is instead applying to the next one.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

So I guess the issue is about whether width on the cell should take priority over col width=""... Not clear to me it should but...

Isn't it primarily about which col width="" should apply to the second cell? According to https://drafts.csswg.org/css-display/#box-generation, regarding display: none,

Markup-based relationships, however, are not affected by these values, as they are solely rendering-time effects. For example, although they may affect which table cell appears in a column, they do not affect which table cell is associated with a particular column element.

So if I'm understanding correctly, the display: none property on the first cell (in the comment 2 testcase) should not affect the association of the second cell with the second col element, and so it should still have width=300.

Hmmm, fair. Though then how does it work with anonymous cells and such? That is handwavy at best.

Note that other browsers make the column zero-sized if you remove the explicit width on the cell, so they also seem to be using the box tree for this.

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

Attachment

General

Created:
Updated:
Size: