Closed Bug 1662389 Opened 4 years ago Closed 4 years ago

[macOS] 200% Scale paper output does not match Print Preview

Categories

(Core :: Printing: Output, defect, P1)

Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: vlucaci, Assigned: nordzilla)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [old-ui+] [print2020_v81])

Attachments

(2 files)

Attached image IMG_20200901_115645.jpg

Affected versions

  • 81.0b4
  • 82.0a1

Affected platforms

  • macOS 10.15.6

Steps to reproduce

  1. Launch FF.
  2. Go to https://www.htmldog.com/examples/pullquotes2.html
  3. Trigger the Print UI modal.
  4. More Settings.
  5. Increase custom scale to 200%.
  6. Print.

Expected result

  • Print Preview content matches the paper output .

Actual result

  • Print preview content is not the same as the actual paper output.

Suggested Severity

  • Seeing as how this issue affects 1 platform, it does however affect actual print output so I would consider it is an S3.

Regression range

  • Will return with regression ASAP.

Additional notes

  • Printer is connected via USB and never manifested this behavior before.
  • MacBook Pro mid2012 16GB, 256SSD
  • Printer Xerox Phaser 3020
  • This issue does not manifest for the old UI.
  • Opening the old UI after selection is made does not recognize it and the option is greyed out.

Went as far back as 07-25-2020 and reproduced this issue with the same repro steps. This issue does not seem like a regression.

Has Regression Range: --- → no

Also reproduces when printing to PDF.

Erik: Is this something you could look into?

Severity: -- → S3
Flags: needinfo?(enordin)
Priority: -- → P1

Yep, I'll look into it.

Flags: needinfo?(enordin)
Assignee: nobody → enordin
Status: NEW → ASSIGNED

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #0)

Affected platforms

  • macOS 10.15.6
    [...]
    Suggested Severity
  • Seeing as how this issue affects 1 platform, it does however affect actual print output so I would consider it is an S3.

To clarify: have you already determined that this is mac-specific? (Did you happen to test windows/linux already?)

I tested on Linux Nightly and wasn't able to reproduce there (with "Save to PDF" as my choice of printer, if that matters). The 200%-scale PDF matched the 200%-scale preview.

Flags: needinfo?(vlad.lucaci)

We handle nsIPrintSettings.scaling internally by setting it on mZoomRatio and then the presContext, don't we? So why do we even have the nsPrintSettingsX::SetScaling? It seems like we should just remove that.

Then again we also have the nsPrintSettingsGTK::SetScaling override, but that doesn't break things for you Daniel? Does gtk_print_settings_set_scale actually do anything? What if you manually set that to some higher values?

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #0)

  • This issue does not manifest for the old UI.

It does for me. And by "old UI" we're talking about the system print dialog, right? Since print preview has never been supported on macOS before.

  • Opening the old UI after selection is made does not recognize it and the option is greyed out.

I assume this was from another bug and isn't relevant here?

(In reply to Jonathan Watt [:jwatt] from comment #5)

Does gtk_print_settings_set_scale actually do anything?

Other than acting as a way for us to store and convey the scaling information to our internal code, it actually does not seem to do anything. I added a gtk_print_settings_set_scale call to nsDeviceContextSpecGTK::StartPrintJob to manually bump the scale on the GtkPrintSettings that we pass off to the gtk_print_job_new call. That had no affect at all on prints to a physical printer.

So I think the right thing for this bug is to remove nsPrintSettingsX::Get/SetScaling.

(In reply to Daniel Holbert [:dholbert] from comment #4)

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #0)

Affected platforms

  • macOS 10.15.6
    [...]
    Suggested Severity
  • Seeing as how this issue affects 1 platform, it does however affect actual print output so I would consider it is an S3.

To clarify: have you already determined that this is mac-specific? (Did you happen to test windows/linux already?)

I tested on Linux Nightly and wasn't able to reproduce there (with "Save to PDF" as my choice of printer, if that matters). The 200%-scale PDF matched the 200%-scale preview.

Yes, I have already determined that this issue is only present for the macOS platform. I was not able to reproduce this issue on Windows or Ubuntu(be it Print to PDF)

Flags: needinfo?(vlad.lucaci)
Blocks: 1662934
Pushed by enordin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b16dbd54bc1c
Fix double print scaling on macOS r=AlaskanEmily

Comment on attachment 9173796 [details]
Bug 1662389 - Fix double print scaling on macOS r=alaskanemily

Beta/Release Uplift Approval Request

  • User impact if declined: Print scaling on macOS will be doubled (e.g. 50% will scale down to 25%, and 200% will scale up to 400%)
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The current behavior is already broken. If this patch has a bug, nothing will change in that regard. No changes were made that should cause a crash etc.
  • String changes made/needed:
Attachment #9173796 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Comment on attachment 9173796 [details]
Bug 1662389 - Fix double print scaling on macOS r=alaskanemily

Approved for 81.0b6.

Attachment #9173796 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: