Closed Bug 1427141 Opened 4 years ago Closed 2 years ago

CSS page-break-before can cause elements to disappear in HTML tables

Categories

(Core :: Printing: Output, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr68 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: joshua.bremer, Assigned: mats)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [layout:print-triage:p1][frag2020_v73])

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce:

Printed the attached HTML file. (Note: I have tried this with different page break implementations; page-break-before and page-break-after)


Actual results:

 the first page has all the content displayed, the second page is missing the second and third elements that contain text.


Expected results:

Both pages when printed should look identical, or at least have the same text content.
Blocks: 1308876
Keywords: dupeme
It's documented at https://www.fxsitecompat.com/en-CA/docs/2017/page-break-before-after-in-print-stylesheet-may-lead-to-lack-or-overlap-of-elements/
Component: Untriaged → Printing: Output
Product: Firefox → Core
Thank you for the nice reduced testcase.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: CSS Page breaks can cause elements to disappear → [Layout] CSS Page breaks can cause elements to disappear (HTML tables)
Summary: [Layout] CSS Page breaks can cause elements to disappear (HTML tables) → [Layout] CSS page-break-before can cause elements to disappear (HTML tables)
Version: 56 Branch → Trunk
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Keywords: regression
Regressed by: 1308876
No longer regressed by: 1308876
No longer blocks: 1308876
Regressed by: 1308876
Blocks: 521204
Whiteboard: [layout:print-triage:p1]
Summary: [Layout] CSS page-break-before can cause elements to disappear (HTML tables) → CSS page-break-before can cause elements to disappear in HTML tables
Duplicate of this bug: 1588480
Blocks: 1601429
Attached file Testcase #2

The text "THIS IS PAGE 2" is missing in Print Preview.

Assignee: nobody → mats

FTR, the origin of the Reset() call in the else-branch I'm removing
is bug 397428. I think this is before we had a break-before status,
or at least before our table code knew how to deal with it, so it
might have been correct to change an INCOMPLETE status into COMPLETE
in those days. It seems the intent was to push the row-group:
https://bugzilla.mozilla.org/show_bug.cgi?id=397428#c14
"... and they all set aStatus to NS_FRAME_COMPLETE, which is logical
because we want to push this entire rowgroup to a new page and try
to reflow the row again..."

Nowadays though, returning a break-before status is the correct
way to do that.

Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/111c247a2bca
Request a break before the row-group if its first row doesn't fit.  r=TYLin
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Is this something we should consider uplifting to Beta for Fx72 or can this ride Fx73 to release?

Flags: needinfo?(mats)
Flags: in-testsuite+

Meh, this has been broken for years and is a rarely used feature so there's no rush.

Flags: needinfo?(mats)
Blocks: 1406356
Blocks: 1470436
Whiteboard: [layout:print-triage:p1] → [layout:print-triage:p1][frag_v73]
Whiteboard: [layout:print-triage:p1][frag_v73] → [layout:print-triage:p1][frag2020_v73]
You need to log in before you can comment on or make changes to this bug.