Closed Bug 1673987 Opened 3 years ago Closed 1 year ago

[css3-page] Implement page-orientation in @page rules for pages

Categories

(Core :: CSS Parsing and Computation, enhancement, P2)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed
firefox120 --- disabled
firefox121 --- disabled
firefox122 --- verified

People

(Reporter: svoisen, Assigned: jwatt)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [layout:backlog])

Attachments

(3 files, 2 obsolete files)

See: https://drafts.csswg.org/css-page-3/#page-orientation-prop

Allows for changing orientation post-layout so that pages (particularly named pages) can be displayed in a different orientation.

We will need this as part of work to improve printing workflows for G Suite (now Google Workspace).

Blocks: 1521655
Assignee: nobody → jwatt
Depends on: 1798312
Depends on: 1798323
Keywords: dev-doc-needed
Summary: [css3-page] Implement page-orientation property in @page rules → [css3-page] Implement page-orientation in @page rules for pages
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/f17459f7537c
Implement page-orientation in @page rules for multiple pages-per-sheet. r=AlaskanEmily
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

MDN work can be tracked here - https://github.com/mdn/content/issues/24390

Has this been released in Nightly, even behind a flag?
I have tried this with & without this flag, in 112.0a1 (2023-02-16) (64-bit) (MacOS): layout.css.page.orientation.enabled
Here is an example codepen this is working as I would expect in Chrome Version 110.0.5481.100 (Official Build) (x86_64)

(In reply to Noemi Erli[:noemi_erli] from comment #5)

https://hg.mozilla.org/mozilla-central/rev/f17459f7537c

Has this been released in Nightly.
See comment - https://bugzilla.mozilla.org/show_bug.cgi?id=1673987#c7

Will defer to jwatt if I am wrong, but I believe we expect this to be enabled for multiple pages-per-sheet currently, and in Nightly only.

Flags: needinfo?(jwatt)

(In reply to Emily McDonough [:alaskanemily] from comment #9)

Will defer to jwatt if I am wrong, but I believe we expect this to be enabled for multiple pages-per-sheet currently, and in Nightly only.

Thank you

Documentation, Data & BCD updated/added

Just need to add this to Experimental_Features or release notes, awaiting on confirmation from jwatt.

Depends on: 1824852

There appears to be some inconsistencies with the way this feature is working in Firefox Nightly.
Firstly it adds an empty page at the end of the print output, this does not happen on Chromium based browsers.
Secondly the layout with the page headers and footers respects the orientation but the page itself does not

I have attached 2 PDFs to show this:

  • page-orientation-example-from-firefox-nightly.pdf
  • page-orientation-example-from-chrome.pdf

Test URL: https://developer.mozilla.org/en-US/docs/Web/CSS/@page/page-orientation#result

Blocks: 1833244
Depends on: 1859926
Attachment #9316809 - Attachment is obsolete: true
Attachment #9316831 - Attachment is obsolete: true

I have verified this fix in Nightly v122.0a1. This fix was introduced in Nightly v118.0a1 from 22-08-2023 in bug 1833244. The steps of verification are:

  1. Load https://developer.mozilla.org/en-US/docs/Web/CSS/@page/page-orientation#result
  2. Print the "Section in Portrait/Upright" frame
    Fixed behavior: All pages are displayed in portrait, but page 2 content is rotated to the left and page 3 content is rotated to the right.
    Faulty behavior: All pages are displayed in portrait, but all 2 pages display the content upright.
    Changeset: https://hg.mozilla.org/mozilla-central/rev/e5eaba75408a

Unfortunately, it appears that the fix only works on the Nightly channel because the Beta v121.0b8 and Release v120.0.1 and v119.0.1 still reproduce the issue just like a Nightly before the fix. Is this expected/intended, Jonathan? Tests were performed on Windows 10, MacOS 11 and Ubuntu 22 and the results were the same. Thank you!

OS: Unspecified → All
Hardware: Unspecified → Desktop

It's expected, because the behavior has been behind a pref. Bug 1869880 has just landed a pref change to allow this behavior to ride the trains. For current Beta/release, you can enable the pref manually.

Flags: needinfo?(jwatt)
Depends on: 1875144
Depends on: 1875182
You need to log in before you can comment on or make changes to this bug.