Closed Bug 1209773 Opened 4 years ago Closed 4 years ago

"Screenshot Node" does not respect display devicePixelRatio


(DevTools :: Inspector, defect)

Not set


(Not tracked)



(Reporter: potch, Assigned: zer0, Mentored)


(Whiteboard: [good first bug][lang=js][polish-backlog][difficulty=easy])


Open Firefox DevTools on a display at >1 devicePixelRatio
Inspect element in Markup View
Right click, and select "Screenshot Node"

Screenshot resolution is the dimensions of the element in display pixels

Screenshot resolution is dimensions of the element in CSS pixels

Example: screenshot of 16x16px element on 2x display should be 32x32px output pixels, not 16x16.
GCLI screenshot supports a dPR option, so we just need to hook it up, I think.
Mentor: jryans
Whiteboard: [good first bug][lang=js]
Whiteboard: [good first bug][lang=js] → [good first bug][lang=js][polish-backlog]
Whiteboard: [good first bug][lang=js][polish-backlog] → [good first bug][lang=js][polish-backlog][difficulty=easy]
Summary: "Screenshot Node" does not respect display DPI → "Screenshot Node" does not respect display devicePixelRatio
Assignee: nobody → zer0
I can't reproduce this bug on DevEdition (44.0a2 (2015-11-10) on OS X. I loaded this data URL:

data:text/html,<div style="width:16px;height:16px; background-image: url(; background-size: 16px"></div>

Then I used directly the command `screenshot --selector div`: the images saved is 16x16 on a display with pixel ratio of 1, and 32x32 on a display with pixel ratio of 2.

Potch, could you check if the issue is still present, and in which version of Firefox? Could you also test the same thing I tested and in case provide a way to reproduce it? Thanks!
Flags: needinfo?(thepotch)
Looks like the bug is not reproduced anymore in current Firefox 43 beta (43.0b1 build 20151103023037). Can't find a way to mark the bug as WFM.

FWIW, screenshots themselves are clipped, i.e. some area at the right (approx. 35px wide for me at OS-level zoom of 200%) is not included in the screenshot. This is probably what bug 1210031 and bug 1220349 are about.
Closing this bug as WFM, potch feel free to reopen it.
Closed: 4 years ago
Flags: needinfo?(thepotch)
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.