vertical writing-modes misalign text in table cells with rowspan > 1
Categories
(Core :: Layout: Tables, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: mpk, Assigned: jfkthame)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: parity-chrome, testcase)
Attachments
(1 file, 1 external file)
|
3.66 KB,
text/html
|
Details |
When a table header or data cell (<th> or <td>) spans multiple rows (rowspan > 1) and a vertical writing mode is applied, the text inside the cell is incorrectly aligned (see attached testcase). Chromium-based browsers (Chrome, Edge, etc.) seem to render this correctly.
Steps to reproduce:
- Save and open the attached testcase in Firefox.
- Observe the red text inside the tables.
Actual result:
For all vertical writing-modes, the text is not centered vertically when the cell spans multiple rows (rowspan > 1).
Expected result:
The text should be vertically centered within the multi-row cell, as it is in Chromium or when rowspan is either not used at all or set to 1.
This was reproduced with Firefox 144, 145 and 146 on FreeBSD and Android, but likely affects all platforms.
Comment 1•1 year ago
|
||
Thanks for the bug report! This is likely "just" a version of bug 1310551; it looks like we're laying out the vertical-writing-mode text here without knowing what their inline-size (height) will be, so we size their cell as if the text doesn't have to line-wrap. We would likely have to do additional passes of layout to avoid this problem.
(Bug 1310551 mentions cases where we end up with 0 block-size i.e. width, but I believe it's got some associated bugs where we end up with a single-line block-size instead, too, for similar reasons.)
Comment 2•1 year ago
|
||
(I cleared the various version-specific flags because this affects ~every Firefox since writing-mode support was first introduced, so it's likely not useful to track version-specific affected/wontfix statuses here.)
| Assignee | ||
Comment 3•1 year ago
|
||
Interestingly, unlike many examples of bug 1310551-like issues, the broken rendering is not fixed by triggering an extra reflow, e.g. by zooming the page.
(A workaround would be to wrap the row-span cell contents in a <div> and apply the orthogonal writing mode to that instead of to the cell itself; this appears to give the expected result.)
| Assignee | ||
Comment 4•5 days ago
|
||
The content's inline-size spans the rows, so it must be laid out using the final row sizes
for text-align in orthogonal cells to work correctly.
Updated•5 days ago
|
| Assignee | ||
Comment 5•5 days ago
|
||
With the change here (which builds on the patch currently landing in bug 2060385), all the examples in the testcase render as expected.
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/65314 for changes under testing/web-platform/tests
Comment 8•2 days ago
|
||
| bugherder | ||
Upstream PR merged by moz-wptsync-bot
Description
•