Closed Bug 2033184 Opened 5 months ago Closed 28 days ago

Table borders missing in print on later pages

Categories

(Core :: Layout: Tables, defect)

Firefox 149
defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: martin, Assigned: gankovalexander)

References

(Depends on 1 open bug)

Details

Attachments

(3 files)

When formatting a table with collapsed borders in the header but inner borders in the table data everything is formatted correctly for the browser view, but in print preview and when printing the inner borders are only visible on the first printed page.

To reproduce just open the demo html file and enter print preview. Check for differences at the end of page 1 versus start of page 2.

Attachment #9571350 - Attachment description: ff149_demo_screen.png → Screenshot of print preview at the first bug occurence

When using the same rules for "th" elements the print looks fine.

E.g. change line 14 from
td { border: 1px solid black; padding-left: 2em; padding-right: 2em; }
to
th, td { border: 1px solid black; padding-left: 2em; padding-right: 2em; }

Tables with border-collapse: collapse are buggy in printing. This may be related to bug 332740.

Severity: -- → S3
Depends on: 332740

Three separate defects made a border-collapsed table lose borders when printed across pages:

  • SetDamageArea() used nsTableRowFrame::GetNextRow(), which continues into the row group's next-in-flow, so the damage area was a row longer than the page and the iterator ended before the position where accumulated block-direction segments are flushed.
  • IsAfterRepeatedHeader() could never fire, so those segments were not restarted below a repeated header and kept the header's border width.
  • BCInlineDirSeg::mAjaCell resolved to the repeated header cell, so the border below it was painted in that cell's style.
Assignee: nobody → gankovalexander
Status: NEW → ASSIGNED

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62405 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch

Upstream PR merged by moz-wptsync-bot

QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.