Open
Bug 735633
Opened 13 years ago
Updated 3 years ago
border-collapsed borders count for table column width computation as split between left/right side of the border, pixel-rounded in favor of left, leading to surprising width results
Categories
(Core :: Layout: Tables, defect, P5)
Core
Layout: Tables
Tracking
()
NEW
People
(Reporter: mingos.nospam, Unassigned)
References
()
Details
Attachments
(1 file)
|
2.65 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643
Steps to reproduce:
Created a table with empty cells; one of the empty cells has a border around it, the others don't: http://jsfiddle.net/WACLY/6/
Actual results:
The cell with a border is displayed (which is logical and expected), but makes the empty cell without a border that comes before it appear as well, while hiding all the others.
See the fiddle for visual and textual feedback: http://jsfiddle.net/WACLY/6/
Expected results:
The cell right before the one with the border should have a zero width as well.
OR
All empty cells should be displayed.
I'm not sure which one is the correct behaviour as I was unable to find info on this in the W3C spec.
| Reporter | ||
Comment 1•13 years ago
|
||
Also, this only happens with border-collapse: collapse.
Updated•13 years ago
|
Comment 3•13 years ago
|
||
Firefox(11.0-14.0a1) gets same results as IE9(Windows7) and IE10CP(Windows8CP).
Comment 4•11 years ago
|
||
this is still like on report [CONFIRMED]
but i can't confirm if this is a spec or a bug
some additonal information:
IE 11 -> same than FF
Chrome -> shows all cells
Opera -> shows less than FF
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Tables
Ever confirmed: true
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86 → All
Version: 11 Branch → Trunk
The basic phenomenon here is that excess width in tables is distributed proportionally to the existing width. See:
https://hg.mozilla.org/mozilla-central/file/e7806c9c83f3/layout/tables/BasicTableLayoutStrategy.cpp#l680
http://dbaron.org/css/intrinsic/#distributetocols
I agree that the case described as "Firefox goes crazy" is a bug. I haven't looked into any of the other differences.
Oh, I see -- this is using border-collapse:collapse, which means that we're attributing half of the border to the cell on one side and half to the other, rounded to pixels, with preference for giving more to the cell on the top or left side of the border. This means that the left border of the cell "with a border" actually counts for the cell to its left.
Priority: -- → P5
Summary: Table layout corner case bug: some cells are displayed, some are hidden → border-collapsed borders count for table column width computation as split between left/right side of the border, pixel-rounded in favor of left, leading to surprising width results
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•