Closed Bug 1645284 Opened 4 years ago Closed 4 years ago

Fullpage screenshots do not respect chosen DPR value

Categories

(DevTools :: General, defect)

77 Branch
defect

Tracking

(firefox-esr68 unaffected, firefox-esr78 wontfix, firefox77 wontfix, firefox78 wontfix, firefox79 wontfix, firefox80 wontfix, firefox81 wontfix, firefox82 wontfix, firefox83 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- wontfix
firefox81 --- wontfix
firefox82 --- wontfix
firefox83 --- fixed

People

(Reporter: paul0123, Assigned: evilpies)

References

(Regression)

Details

(Keywords: dev-doc-complete, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Took a fullpage screenshot with CTRL+SHIFT+K and the ":screeshot --fullpage --dpr 2" command.

Actual results:

The code did not respect my specified DPR value. See the actual code: https://searchfox.org/mozilla-central/source/devtools/shared/screenshot/capture.js#100-109
As a result, I receive a grainy, low resolution fullpage screenshot.

Expected results:

The code should respect my chosen DPR value and produce a higher resolution fullpage screenshot.

I would like to add this bug is new in Firefox 77. I downgraded to Firefox 76 and was able to get high resolution screenshots without any DPR manipulation.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Screenshots
Status: UNCONFIRMED → NEW
Component: Screenshots → General
Ever confirmed: true
Product: Firefox → DevTools
Regressed by: 766661
Has Regression Range: --- → yes

I honestly think the implementation in bug 766661 is too naive. We should multiply the current size by dpr and have some kind of cut-off. Better yet, we should actually find out why taking the screenshot can apparently fail silently. If we can actually throw an error in that case we could just re-try with a lower dpr.

Set release status flags based on info from the regressing bug 766661

Honza can you set the priority and severity in this bug?

Flags: needinfo?(odvarko)

@Nicolas, can you reproduce this bug?

Honza

Flags: needinfo?(odvarko) → needinfo?(nchevobbe)

I am able to reproduce this on DevEdition/Aurora. I am trying to take fullscreen screenshots at --dpr 2, these fail. I can't even take a 1920x1080 screenshot at twice DPR aka 4K. The implementation in bug 766661 seem way too strict.

I'm also seeing this on macOS with a 4k monitor.

Even when setting the --dpr flag, the resulting image is blurry. This occurs when copying to the clipboard, or saving the image.

:screenshot --dpr 2 --fullpage --clipboard
Screenshot copied to clipboard.
The device pixel ratio was reduced to 1 as the resulting image was too large

This occurs with Firefox 78.0.2 and Firefox Developer Edition 79.0b6.

I'm chiming in to report this issue as well. I'm saving reasonably small pages, which always worked well in the past and produced a nice screenshot. Now Firefox insists on making a low-resolution image, shoving the following insult in my face:

"The device pixel ratio was reduced to 1 as the resulting image was too large"

I can't get it to produce a good resolution screenshot even using "--dpr 2" (in combination with --fullpage).

More generally – guys; why do you keep breaking the screenshot feature? This feature worked perfectly fine in Firefox many years ago. Since then you've made multiple changes and all of them have been unnecessary worsening and breakage.

Auto-complete used to work with the old syntax, now it doesn't. High-resolution screenshots used to work, now they don't.

What makes you think this "work" you're doing is an improvement? It's almost like your software would work better if you didn't touch it!

Also, the resulting image (after forcing DPR to 1) is only 76 kB. Come the f*** on! What's wrong with you? How would a DPR 2 image be too large?

Small bump :P
I faced the same issue, I had a workflow based on this, and I can't do bevause fullpage and dpr arguments arent compatible in last firefox version.

Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f17d2959d8da When taking a fullscreen screenshot accept any DPR, but try again when too large. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Keywords: dev-doc-needed
Flags: needinfo?(nchevobbe)
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: