Closed Bug 1953285 Opened 3 months ago Closed 1 month ago

Incorrect message when taking a full page screenshot that's too large

Categories

(DevTools :: General, defect, P3)

Firefox 136
defect

Tracking

(firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: regspam, Assigned: rohitborse8, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(1 file)

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

Steps to reproduce:

This is just a minor issue, but I thought I should report anyway.

  1. Navigate to https://rbc.ru and press and hold Space till all the content is loaded.
  2. Press F12 to open DevTools, enable the "Take screenshot of the entire page" button (a camera one) if it's not enabled yet.
  3. Click on the button.

Actual results:

Firefox saves the screenshot and shows a message at the top of DevTools panel: "The image was cut off to 1263 x 10000 as the resulting image was too large".

Expected results:

The image is actually larger (3157 x 25000 on my machine) and the message should report correct screenshot limitations.

The Bugbug bot thinks this bug should belong to the 'Firefox::Screenshots' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Screenshots

This belongs in DevTools. Similar functionality but different string: https://searchfox.org/mozilla-central/search?q=The+image+was+cut+off&path=&case=false&regexp=false

Component: Screenshots → General
Product: Firefox → DevTools

We are probably not including the DPR in the error message.
Can be a good first bug, Nicolas will mentor this one.

Mentor: nchevobbe
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: good-first-bug
Priority: -- → P3
Whiteboard: [lang=js]

I'm interested in working on it

Flags: needinfo?(nchevobbe)

(In reply to Rohit Borse from comment #4)

I'm interested in working on it

Thanks Rohit, the bug is now yours

The message comes from https://searchfox.org/mozilla-central/rev/126697140e711e04a9d95edae537541c3bde89cc/devtools/server/actors/utils/capture-screenshot.js#97

text: L10N.getFormatStr("screenshotTruncationWarning", width, height),

we should probably take the ratio in consideration https://searchfox.org/mozilla-central/rev/126697140e711e04a9d95edae537541c3bde89cc/devtools/server/actors/utils/capture-screenshot.js#150

const ratio = args.snapshotScale;

let me know if you have any question!

Assignee: nobody → rohitborse8
Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f50b03a25c70 Incorrect message when taking a full page screenshot that's too large. r=devtools-reviewers,nchevobbe Incorrecty passing value of height and width in message - fixed.
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: