'page-orientation' is also applying rotation to the page after the one it is set on in Google Docs
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox119 | --- | unaffected |
firefox120 | --- | unaffected |
firefox121 | --- | wontfix |
firefox123 | --- | wontfix |
firefox124 | --- | wontfix |
firefox125 | --- | verified |
People
(Reporter: jwatt, Assigned: alaskanemily)
References
(Regression)
Details
(Keywords: regression)
Attachments
(5 files)
I'm not sure when this started happening, but `page-orientation' rotations have started additionally applying to the page after the page that they are set on in Google Docs.
Note: Google account must have been opted in to native Firefox printing to test properly.
Examples:
The page with the text "Page 3" should not be rotated to landscape:
https://docs.google.com/document/d/1SetfZ2cx7J0BJanXnWTABzKexzwP4p-dQ--XSEAeiqs/edit
The page with "p2" should not be rotated to landscape:
https://docs.google.com/document/d/1N9kDNCdB-6YLW-Y0fLt_--9LyaN-hvFX4t-B6KoEOe0/edit
Updated•11 months ago
|
Comment 1•11 months ago
|
||
Regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=cf925ae475f57ab952364974520a3bcded6c50af&tochange=d171871eb9d27852fb8a80b30a78ff9150c649da
--> Regression from bug 1819335
(Note for release managers etc. who might be concerned about this regression: this won't affect users on the live google docs site at this point, since this is related to a google docs feature that's disabled-for-Firefox-by-default at the google account level except for a few select google accounts of engineers working on the feature.)
Comment 2•11 months ago
|
||
Set release status flags based on info from the regressing bug 1819335
Updated•11 months ago
|
Comment 3•11 months ago
|
||
Here's a simpler testcase (in that the issue happens slightly earlier in the doc):
https://docs.google.com/document/d/1oYQF2Bc2eUgMe7OQxPTaAmJxcVQgZRCay109P5BKdB0/edit
In Firefox Nightly print-preview for that^ document (properly opted in to native google docs printing), Page 2 is unexpectedly rotated to be displayed in landscape mode here, when it should be shown in portrait mode.
Updated•10 months ago
|
Reporter | ||
Comment 4•10 months ago
•
|
||
Dumping the frame tree shows that the following page's PageContentFrame is (erroneously) being assigned the page name of the preceeding page. Hence the 'landscape' page's style is also applying to the page after the page that it was supposed to apply to.
The following PageContentFrame is erroneously being given the previous page's page name if the frame for the previous page has an empty PrincipalChildList()
. So if the div only contains an absolutely positioned children, for example, as we have when printing the pages of a Google doc.
Comment 5•10 months ago
|
||
comment 4 inspired me to write this reduced testcase.
In Firefox, this renders with all the content on page 1. In Chrome, "page 2" ends up on page 2, as it should.
Comment 6•10 months ago
|
||
Here's a testcase where the page:a
div is literally empty, just to simplify things a bit further (empty empty PrincipalChildList()
as jwatt mentioned).
We still put all the content on page 1, when in fact the content that follows that div should go on page 2.
Reporter | ||
Comment 7•10 months ago
|
||
Yeah, that seems to be a different bug, I think. I'll attach a reduced testcase that reproduces the bug that we're getting on Google docs.
Reporter | ||
Comment 8•10 months ago
|
||
Reporter | ||
Comment 9•10 months ago
|
||
I talked with Emily about this, and since this is a page name issue as opposed to a page-orientation
issue, she'll work on this.
Reporter | ||
Comment 10•10 months ago
|
||
FWIW, since I got it, the page name gets assigned to the following page when its frame is created under this stack:
nsIFrame::GetStylePageName
nsIFrame::ComputePageValue
nsCSSFrameConstructor::ConstructPageFrame
nsCSSFrameConstructor::CreateContinuingFrame
mozilla::PrintedSheetFrame::Reflow
nsContainerFrame::ReflowChild
nsPageSequenceFrame::Reflow
nsContainerFrame::ReflowChild
nsCanvasFrame::Reflow
nsContainerFrame::ReflowChild
nsHTMLScrollFrame::ReflowScrolledFrame
nsHTMLScrollFrame::ReflowContents
nsHTMLScrollFrame::Reflow
nsContainerFrame::ReflowChild
mozilla::ViewportFrame::Reflow
mozilla::PresShell::DoReflow
mozilla::PresShell::ProcessReflowCommands
mozilla::PresShell::DoFlushLayout(bool
mozilla::PresShell::DoFlushPendingNotifications
mozilla::PresShell::FlushPendingNotifications
mozilla::PresShell::DoFlushPendingNotifications
mozilla::PresShell::FlushPendingNotifications
nsPrintJob::ReflowPrintObject
The ComputePageValue() call seems weird to me, since we're calling it on aPrevPageFrame
to decide the following page's page name... ComputePageValue
finds the most deeply nested first in-flow descendant, and returns its page name. In the gdocs case it iterates down the tree to the nsBlockFrame
that corresponds to the div
that has the page name set on it, and returns that page name up to nsCSSFrameConstructor::ConstructPageFrame
which sets it on the next page frame, unfortunately.
If the PrincipalChildList()
of the previous page frame is not empty, then presumably what happens is that the PrincipalChildList check in nsIFrame::ComputePageValue results in different behavior.
Assignee | ||
Comment 12•9 months ago
|
||
Updated•9 months ago
|
Assignee | ||
Comment 13•9 months ago
|
||
This is more complex than what is strictly necessary to reproduce this issue,
but is reflective of a situation we keep having problems with.
Comment 14•8 months ago
|
||
Comment 16•8 months ago
|
||
Backed out for causing wpt failures on page-size-007-print.html.
Updated•8 months ago
|
Comment 18•7 months ago
|
||
Comment 19•7 months ago
|
||
Backed out for causing wpt failures in page-name-unnamed-trailing-001-print.html
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | /css/css-page/page-name-unnamed-trailing-001-print.html | Testing http://web-platform.test:8000/css/css-page/page-name-unnamed-trailing-001-print.html == http://web-platform.test:8000/css/css-page/page-name-unnamed-trailing-001-print-ref.html
Comment 21•7 months ago
|
||
Comment 22•7 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c7176374b72f
https://hg.mozilla.org/mozilla-central/rev/20489367d1be
Updated•7 months ago
|
Assignee | ||
Updated•7 months ago
|
Comment 24•7 months ago
|
||
The patch landed in nightly and beta is affected.
:alaskanemily, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox124
towontfix
.
For more information, please visit BugBot documentation.
Updated•7 months ago
|
Comment 25•6 months ago
|
||
Reproduced the page orientation issue on Firefox 121.0a1 (2023-11-16) on macOS 14.4 by using the provided TCs (Comment 0 and Comment 8).
The issue is fixed and the pages are shown as expected on latest Firefox Nightly (2024-03-17). Tests were performed on macOS 14.4, Ubuntu 23.10 and Windows 11.
Assignee | ||
Updated•6 months ago
|
Description
•