Closed Bug 1647851 Opened 4 years ago Closed 3 years ago

Printing changes to support @page rule size attribute

Categories

(Core :: Printing: Setup, enhancement, P2)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

(Regressed 1 open bug)

Details

Attachments

(3 files)

  • Adding querying ability to the printers (even if it's just dummied out), see bug 1646829
  • "Negotiation" code to find the ideal paper size. We could begin with this just choosing to split up oversize and center undersize images on the default/chosen paper size.
  • Page size information could be stored on the nsPrintData.

I'm still unsure of the following aspects:

  • How will we need to handle media queries on the page-rules? Does this already work?
  • What do we do about the RenderContext? How does it handle changing paper size from print preview currently?
Flags: needinfo?(emcdonough)
Depends on: 1647480
No longer depends on: 1646829
Flags: needinfo?(emcdonough)
Flags: needinfo?(emcdonough)
Depends on: 1650886

This isn't finished. Headers and footers do not correctly align to either the
full sheet or the scaled/cropped page.

Attachment #9223271 - Attachment description: Bug 1647851 Part 2 - WIP apply CSS page-size when printing. → Bug 1647851 Part 2 - Apply CSS page-size when printing

These aren't WPT because the CSS-page spec gives a large range of correct
behavior for handling page-size when printing. We also don't expect Firefox's
default handling to remain the same as it is implemented in this bug.

Ideally we would be able to give a range of possible correct results for a WPT
that tests printing, but for now we are just testing the specific behavior we
implement.

See Also: → 1717138
Blocks: 1717703
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/af6772261f2b
Part 1 - Use a computed type for page-size which converts paper sizes to a Size2D. r=emilio
https://hg.mozilla.org/integration/autoland/rev/1c18b7c90eb8
Part 2 - Apply CSS page-size when printing r=emilio
https://hg.mozilla.org/integration/autoland/rev/4aee63294f39
Part 3 - Add basic tests for applying page-size when printing r=dholbert
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
See Also: → 1720554
Flags: needinfo?(emcdonough)
No longer blocks: 1763246
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: