Closed Bug 563436 Opened 15 years ago Closed 7 months ago

Content is progressively compressed to left in print/print-preview, with margin-right & float:left

Categories

(Core :: Printing: Output, defect)

x86
All
defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox124 --- wontfix
firefox125 --- fixed

People

(Reporter: dholbert, Assigned: TYLin)

References

(Blocks 2 open bugs, )

Details

(Keywords: regression, testcase)

Attachments

(5 files)

STEPS TO REPRODUCE: 1. Print-preview attached testcase. ACTUAL RESULTS: * 1st page looks fine. * 2nd page has much skinnier column of content than 1st page. * 3rd page & beyond have content compressed to only allow 1 char per line. EXPECTED RESULTS: 2nd page and beyond should have same column-width as 1st page. (or at least, no skinnier of a column)
Attached file testcase 1
Summary: Content is progressively compressed to left in print-preview, with margin-right & float:left → Content is progressively compressed to left in print/print-preview, with margin-right & float:left
This bug is visible in mozilla-central nightlies, as well as Firefox 3.6: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100503 Minefield/3.7a5pre Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.5pre) Gecko/20100503 Namoroka/3.6.5pre It doesn't affect Firefox 3.5, however: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8
Keywords: testcase
Adding the URL that I reduced the testcase from. There also might already be an open bug on this, with a testcase... I had some pangs of deja vu when reducing this.
I can reproduce on windows so marking OS to "All". However, the number pattern I get on page 2 is different than what you show in the PDF. Regression range: works: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090713 Minefield/3.6a1pre http://hg.mozilla.org/mozilla-central/rev/b9012a18d2c6 broken: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090714 Minefield/3.6a1pre http://hg.mozilla.org/mozilla-central/rev/9b4dd06e1c9d http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b9012a18d2c6&tochange=9b4dd06e1c9d
OS: Linux → All
Thanks Matt! Based on that regression range, this looks like a regression from bug 503183.
Blocks: 503183
Attached image Windows image crop
An image to show the different number pattern I saw compared to the original PDF.
(In reply to comment #6) > However, the number pattern > I get on page 2 is different than what you show in the PDF. That Windows vs Linux difference is expected -- it could be caused by width differences in the (platform-specific) fonts, and/or differences in default page-margin widths.
Issues still reproducible on the latest Nightly 49.0a1 Build ID 20160505030327;
Bug still present on the latest dev edition 59.0b10 build 20180215111455.
This page (https://biorob2.epfl.ch/pages/cabelguen/) shows the same problem, but is it the same bug or something else? There is no "float" style on the text.
Severity: normal → S3

Remove prevRect and comments that don't seem useful; move variable
declarations closer to their usage sites. This is a preparation for Part 2.

This doesn't change behavior.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

prevInFlow.ISize(wm) has subtracted the margin in the inline-axis. If we use
it as the current overflow container continuation's available inline-size, we
might subtract the margin again when computing its auto inline-size [1], which
leads to progressively compressed inline-size as we see in various testcases.
However, fixing availSpace is not correct because not all types of frames
computes their inline-sizes using the available inline-size.

This patch generalizes the solution for flex item in bug 1811548, i.e. we always
override inline-size for the current overflow container continuation.

[1] https://searchfox.org/mozilla-central/rev/ff6e63804e6f7b548a26338708663093ce16be11/layout/generic/nsIFrame.cpp#6736-6737

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4630d52e22d6 Part 1 - Minor clean up in ReflowOverflowContainerChildren(). r=dholbert https://hg.mozilla.org/integration/autoland/rev/cec72c3f4e5b Part 2 - Always override inline-size for overflow container frames. r=dholbert,layout-reviewers
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45118 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 521204
Duplicate of this bug: 581994
Duplicate of this bug: 649802
Duplicate of this bug: 1033149
Duplicate of this bug: 1122468
Blocks: 1881137
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: