Closed Bug 159914 Opened 23 years ago Closed 17 years ago

Printing a div's content "eats" a few line down the first page

Categories

(Core :: Printing: Output, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: cwabramo, Assigned: fantasai.bugs)

References

()

Details

(Keywords: testcase, verified1.9.0.2)

Attachments

(6 files, 1 obsolete file)

[This was submitted previously but didn't show in my bug list, so I am re-submitting it.] A div's content do not completely print. Only the first page is printed.
correct me if I'm wrong anyone, but I feel this is a DUP of bug 122750 *** This bug has been marked as a duplicate of 122750 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified.
Status: RESOLVED → VERIFIED
This has only *partially* been fixed by bug 154892. The breaking down the first page doesn't happen properly, the last line is only partially printed, and in fact two lines have not been printed between the first and the second page (I have a modified test case with numbers on the line that makes that more visible). Changing the bug title to reflect this, reopening the bug.
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
Summary: Printing a div's content prints only the first page → Printing a div's content "eats" a few line down the first page
I have put on line a modified version of the test case that shows the problem more precisely through line numbers : http://jmdesp.free.fr/i18n/bug_159914/example4.html
Assignee: rods → nobody
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: sujay → printing
Please attach the testcase to the bug, so it won't go missing.
Attached file simplified testcase
It seems like the y position is not being subtracted from the available height. The calculation is there on line 429, but is maybe using the wrong values.
Assignee: nobody → fantasai.bugs
Keywords: testcase
OS: Windows NT → All
Hardware: PC → All
Attached patch patch (obsolete) — Splinter Review
This fixes the test case. It's a very simple fix for printing dataloss, so I think it should get fixed in the FF3.0(.x) cycle. It doesn't handle bottom-positioned cases, but those are pretty complicated with pagination. I can try to write a patch for that, too, but I'd like to do that separately.
Attachment #322051 - Flags: superreview?(roc)
Attachment #322051 - Flags: review?(roc)
Status: NEW → ASSIGNED
Flags: blocking1.9?
What about the top:auto case? This won't be right in that case?
The auto position seems to be incorporated into the offset data already. This testcase works, for instance. It's cases where we have top: auto; and bottom: something fixed; that would be problematic here.
Attached file testcase with margin
Attached patch patch v2Splinter Review
Forgot to subtract out margins, too. Now copying the y position calculation below.
Attachment #322051 - Attachment is obsolete: true
Attachment #322733 - Flags: superreview?(roc)
Attachment #322733 - Flags: review?(roc)
Attachment #322051 - Flags: superreview?(roc)
Attachment #322051 - Flags: review?(roc)
What about bottom margin and border? I guess we don't care much if the bottom margin goes off the page. But the border?
Hmm, I guess that should be OK.
Attachment #322733 - Flags: superreview?(roc)
Attachment #322733 - Flags: superreview+
Attachment #322733 - Flags: review?(roc)
Attachment #322733 - Flags: review+
Not going to block 1.9 for this, but 3.0.1 will like it a lot!
Flags: wanted1.9.0.x?
Flags: blocking1.9?
Flags: blocking1.9-
Attachment #322733 - Flags: approval1.9?
Rationale: This is a very simple, low-risk fix for printing dataloss.
That's true, but this is also going to be fairly rare (only affecting top:auto abs-pos elements that span pages) and something that didn't work at all before in FF2, so not a regression.
top: <length> || (top:auto && bottom: auto;) elements that span pages, actually.
Comment on attachment 322733 [details] [diff] [review] patch v2 This has been sitting on wanted1.9.0.x? and approval1.9? since May. Trying approval1.9.0.2?... Rationale: This is a very simple, low-risk fix for printing dataloss.
Attachment #322733 - Flags: approval1.9.0.2?
Attached patch reftestsSplinter Review
Attachment #328776 - Flags: review?(roc)
Attachment #328776 - Flags: review?(roc)
fantasai, can you get this landed on mozilla-central? We need some bake time before considering for 1.9.0.x.
Flags: wanted1.9.0.x? → wanted1.9.0.x+
Keywords: checkin-needed
Whiteboard: [needs to land on mozilla-central before 1.9 approval]
Comment on attachment 322733 [details] [diff] [review] patch v2 Please re-request approval after this lands and bakes on mozilla-central.
Attachment #322733 - Flags: approval1.9?
Attachment #322733 - Flags: approval1.9.0.2?
Status: ASSIGNED → RESOLVED
Closed: 23 years ago17 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs to land on mozilla-central before 1.9 approval]
Target Milestone: --- → mozilla1.9.1a2
Attachment #322733 - Flags: approval1.9.0.2?
Comment on attachment 322733 [details] [diff] [review] patch v2 Approved for 1.9.0.2. Please land in CVS. a=ss Be sure to land the tests as well.
Attachment #322733 - Flags: approval1.9.0.2? → approval1.9.0.2+
Checked into CVS for 1.9.0.2.
Keywords: fixed1.9.0.2
Verified on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.2) Gecko/2008090512 Firefox/3.0.2, and Fx3.0.2build4 on Vista. Print Preview displays the document correctly as does the paper printout, using the three test cases here.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: