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

RESOLVED FIXED in mozilla1.9.1a2

Status

()

Core
Printing: Output
RESOLVED FIXED
16 years ago
9 years ago

People

(Reporter: Claudio Weber Abramo, Assigned: fantasai)

Tracking

({testcase, verified1.9.0.2})

Trunk
mozilla1.9.1a2
testcase, verified1.9.0.2
Points:
---
Bug Flags:
blocking1.9 -
wanted1.9.0.x +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(6 attachments, 1 obsolete attachment)

(Reporter)

Description

16 years ago
[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.

Comment 1

15 years ago
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
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE

Comment 2

15 years ago
verified.
Status: RESOLVED → VERIFIED

Comment 3

10 years ago
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

Comment 4

10 years ago
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

Comment 5

10 years ago
Created attachment 321916 [details]
Screen capture that line 28 and 29 are not properly displayed
Please attach the testcase to the bug, so it won't go missing.
(Assignee)

Comment 7

10 years ago
Created attachment 322042 [details]
simplified testcase
(Assignee)

Comment 8

10 years ago
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
(Assignee)

Updated

10 years ago
Keywords: testcase
OS: Windows NT → All
Hardware: PC → All
(Assignee)

Comment 9

10 years ago
Created attachment 322051 [details] [diff] [review]
patch

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)
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
Flags: blocking1.9?
What about the top:auto case? This won't be right in that case?
(Assignee)

Comment 11

10 years ago
Created attachment 322730 [details]
simplified testcase with auto top

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.
(Assignee)

Comment 12

10 years ago
Created attachment 322732 [details]
testcase with margin
(Assignee)

Comment 13

10 years ago
Created attachment 322733 [details] [diff] [review]
patch v2

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-
(Assignee)

Updated

10 years ago
Attachment #322733 - Flags: approval1.9?
(Assignee)

Comment 17

10 years ago
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.
(Assignee)

Comment 19

10 years ago
top: <length> || (top:auto && bottom: auto;) elements that span pages, actually.
Hmm, I guess so.
(Assignee)

Comment 21

9 years ago
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?
(Assignee)

Comment 22

9 years ago
Created attachment 328776 [details] [diff] [review]
reftests
Attachment #328776 - Flags: review?(roc)
(Assignee)

Updated

9 years ago
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?
http://hg.mozilla.org/index.cgi/mozilla-central/rev/d6384ffd49f1
http://hg.mozilla.org/index.cgi/mozilla-central/rev/4b6b3b388fe2

hg patches, please...
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago9 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
(Assignee)

Updated

9 years ago
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+
(Assignee)

Comment 27

9 years ago
Checked into CVS for 1.9.0.2.
(Assignee)

Updated

9 years ago
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.
Keywords: fixed1.9.0.2 → verified1.9.0.2
You need to log in before you can comment on or make changes to this bug.