Closed Bug 1721265 Opened 3 years ago Closed 3 years ago

Printing output should default to landscape when printing a document with a landscape page-size

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

Details

Attachments

(3 files)

No description provided.
Blocks: 851441
Blocks: 1723239

Hey Emilio, do you have any insight into why the resolved pageSize style is always auto in this patch? https://hg.mozilla.org/try/rev/73d8a4c58a457d2dd004630440b69ac1fb59f7b0

Flags: needinfo?(emilio)

I'm confused, I apply that patch, I tweak layout.css.page-size.enabled=true, and print-preview a simple document like this:

<!doctype html>
<style>
  @page { size: landscape }
</style>

I see correctly the landscape orientation processed. What am I missing?

Flags: needinfo?(emilio)

This adds an optional paper orientation to PrintPreviewResultInfo populates it
from the CSS page size when finishing print preview. The value is then placed
in the PrintPreviewSuccessInfo to be sent to the frontend.

The value is not used by the frontend yet.

TODO: We don't actually reflow to the specified orientation initially yet.

This should ideally be returning a StyleOrientation, but due to the include
order we can't use that type in this file.

Attachment #9239020 - Attachment description: Bug 1721265 Part 1 - WIP: Send information about CSS page-size values to the print frontend through FinishPrintPreview → Bug 1721265 Part 2 - Send information about CSS page-size values to the print frontend through FinishPrintPreview

When a page-size that is not auto or square exists the print preview will use
the orientation of this page-size when doing initial reflow. The frontend
applies the orientation to the print settings without updating settings and
causing a second reflow, and the orientation selector is hidden.

Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4abac7efc49a Part 1 - Add method to ServoStyleSet to determine if the default page-size is landscape or portrait. r=emilio https://hg.mozilla.org/integration/autoland/rev/19478f86e1de Part 2 - Send information about CSS page-size values to the print frontend through FinishPrintPreview r=emilio https://hg.mozilla.org/integration/autoland/rev/000302929625 Part 3 - Use page-size orientation information in print preview r=emilio,emalysz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: