Open Bug 1729996 Opened 3 years ago Updated 2 years ago

Copied screenshots have black border when zoom factor is 110%, 120%, or 133%

Categories

(Core :: Graphics, defect)

Firefox 86
defect

Tracking

()

Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- wontfix
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- wontfix
firefox95 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- fix-optional

People

(Reporter: cpeterson, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, Regression)

Details

(Keywords: polish, regression)

Attachments

(1 file)

Attached image screenshot.png (deleted) —

Steps to reproduce

  1. Load any page.
  2. Zoom the page to 110%, 120%, or 133%. The bug does not reproduce if you select a zoom factor 150%, 170%, or 200%!
  3. Right click on the page and select the "Take Screenshot" context menu item.
  4. Select a portion of the page and click the "Copy" button. The bug does not reproduce if you click the "Download" button!
  5. Paste the copied image into MS Paint or a Slack message.

Actual result

The image has a black border on the right and bottom edges. See the attached screenshot.

This bug is a regression from qcms bug 1684760 in Firefox 86. I bisected this regression to this pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=eaa05f1555688194b8b32ef84dfb6571a539d82a&tochange=89fef9703703e6ca5427be85d477097aa2a09ba4

I am running Windows 11 Beta.

Is this bug a duplicate of "Use zoom factor for all screenshot types" bug 1721200?

Keywords: regression
Version: unspecified → Firefox 86

I can only reproduce this bug for browser windows on my external monitor. If I drag the same window to my laptop's screen and take a new screenshot of the same page, the screenshot image does not have a black border.

I don't know if this is because the displays have different dimensions or are using different GPUs.

Windows says both my external monitor and laptop screen have resolution 3840x2160 with display scale "250% (Recommended)".

My laptop has two GPUs:

Intel(R) UHD Graphics 630
NVIDIA GeForce GTX 1050 Ti with Max-Q Design

But about:support says the Intel GPU is active whether my external monitor is connected or not.

I see this too w/ Quadro graphics. 4k monitor w/ 200% scaling.

Flags: needinfo?(jmuizelaar)

We're going to move this over to graphics, but feel free to move it back.
We're passing in the correct scale value [1], but we're seeing the image rendered differently depending on the zoom value.

Component: Screenshots → Graphics
Product: Firefox → Core
Severity: -- → S4
Keywords: polish
Has Regression Range: --- → yes

Probably because internally the zoom ratio is implemented as changing the integer number of app units per device pixel (default 60), but drawSnapshot platform functionality that is used to take screenshots needs to have the zoom ratio passed in as a float so there will be some inaccuracy at some zoom ratios.

Maybe we could fix this by making drawSnapshot draw at the current zoom ratio by default (ie without having to pass a float)?

Good news: I can't reproduce this bug in the new screenshots browser component (bug 1696573, screenshots.browser.component.enabled pref = true). So once the screenshots browser component ships, we can close this bug.

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

Attachment

General

Created:
Updated:
Size: