Open Bug 960818 Opened 10 years ago Updated 2 years ago

Relatively positioned content is missing when printed / print previewed, if its 'top' or 'bottom' properties shift it off of its static-position's page

Categories

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

All
Linux
defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss, testcase)

Attachments

(2 files)

If a relatively-positioned element has "top"/"bottom" properties large enough to shift it to coordinates on a different printed page than its static position, then it's not rendered in printed output. (or in print preview)

(might be a dupe of an existing bug; apologies if so)

Testcase attached.

(Noticed while inspecting the comcast speedtest URL for bug 958991, using our dev tools. That page has lots of relatively-positioned content with e.g. "top: -550px", and at least one piece of it doesn't show up in print-preview due to this bug here.)
Blocks: 521204
Keywords: dataloss
Attachment #8361385 - Attachment description: testcase 1: element transformed up 6in (off of page 2) → testcase 1: element transformed up 6in (off the top of page 2)
Attachment #8361385 - Attachment description: testcase 1: element transformed up 6in (off the top of page 2) → testcase 1: element is moved up 6in (off the top of page 2)
Attachment #8361396 - Attachment description: testcase 2: element transformed down 12in (off the bottom of page 1) → testcase 2: element is moved down 12in (off the bottom of page 1)
Summary: Relatively positioned content is missing when printed / print previewed, if its top/bottom is set to shift it off of its natural page → Relatively positioned content is missing when printed / print previewed, if its 'top' or 'bottom' properties are set to shift it off of its static-position's page
Summary: Relatively positioned content is missing when printed / print previewed, if its 'top' or 'bottom' properties are set to shift it off of its static-position's page → Relatively positioned content is missing when printed / print previewed, if its 'top' or 'bottom' properties shift it off of its static-position's page
Priority: -- → P4

Bug 1640197 should fix "testcase 2", but not "testcase 1". I think it should be possible to fix that case too if we generalize BuildPreviousPageOverflow to also paint overflow from pages following the current page.
https://searchfox.org/mozilla-central/rev/919f7400e2e12bc963ee2ae8400ef961972c3059/layout/generic/nsPageFrame.cpp#566

Keywords: testcase

... to be clear: we probably need a separate BuildNextPageOverflow since we need to paint the current page first to get the correct paint layering. That is, first BuildPreviousPageOverflow, then the current page, then BuildNextPageOverflow.

Depends on: 1721908
No longer depends on: 1721908
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: