Open Bug 1805776 Opened 3 years ago Updated 2 years ago

[Wayland] Responsive Design Mode "DPR=1" setting produces zoomed-and-clipped screenshots, when captured on HiDPI screen configuration

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

[This might be the same as, or related to, bug 1760711; I'm not sure. Setting see-also for now.]

STR:

  1. In Ubuntu display settings, turn on "Fractional Scaling" and set Scale to 125%.* (these are the settings I'm testing with)
  2. Start Firefox with a fresh profile
  3. Visit https://example.org/ , and do Ctrl+Shift+M to enter responsive design mode.
  4. At the top of RDM, note that DPR is set to 2 (which I'm guessing is 125% rounded up). Click that menu and choose 1 instead.
  5. Right-click the page and choose "Take Screenshot"
  6. Choose "Save visible" (or full page; the bug repro's either way)
  7. (optional) Click "Copy" or "Download" to complete the screenshot, and inspect the result (by e.g. pasting the image or opening the download)

ACTUAL RESULTS:
After step 6 when you click "Save visible", the page visualization suddenly gets more zoomed in (so that the header-text "Example" is as wide as the viewport), though the viewport remains the same on-screen size; this ends up clipping a portion of the page that was previously visible. And it's actually clipped in the final result as well. So, you don't get a useful screenshot.

EXPECTED RESULT:
A faithful screenshot of the visible portion of the page.

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

  1. At the top of RDM, note that DPR is set to 2 (which I'm guessing is 125% rounded up). Click that menu and choose 1 instead.

Note: at first I assumed that this^ might be leaving me in a temporarily broken state which might need some form of purging. But no amount of reloading or exiting-and-reentering RDM after this step seems to make a difference; I still get the same result.

Attached video screencast of bug

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

ACTUAL RESULTS:
After step 6 when you click "Save visible", the page visualization suddenly gets more zoomed in

You can see this at t=6s in my attached screencast.

(FWIW I'm using Ubuntu 22.04, with Gnome on Wayland. Not sure if this issue is Wayland-specific or not -- I can't usefully test non-Wayland Ubuntu configurations on this machine at the moment.)

Regression range is just the commit that enabled Wayland on Nightly (bug 1749174):
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5ed2c0d1e7819e74a8816219e6154f1707e52d85&tochange=96732a2f2846c158ac1c1dc9f1f2f9b1d676df83

So: looks like this is a Wayland-specific issue.

Before that commit, RDM mode defaults to DPR=1 (which works properly)
After that commit, RDM mode defaults to DPR=2, and I hit this bug.

(window.devicePixelRatio seems to have changed as well, corresponding to my observed DPR default values. Before bug 1749174, window.devicePixelRatio reports 1 in a regular tab visiting e.g. example.org. After bug 1749174, it reports 2. Though Ubuntu settings report that my resolution is 2560x1440 with 125% pixel scaling.)

Blocks: wayland
Component: Responsive Design Mode → Widget: Gtk
Depends on: 1749174
Product: DevTools → Core
Summary: Responsive Design Mode "DPR=1" setting produces bogus screenshots, when captured on HiDPI screen configuration → [Wayland] Responsive Design Mode "DPR=1" setting produces bogus screenshots, when captured on HiDPI screen configuration
Summary: [Wayland] Responsive Design Mode "DPR=1" setting produces bogus screenshots, when captured on HiDPI screen configuration → [Wayland] Responsive Design Mode "DPR=1" setting produces zoomed-and-clipped screenshots, when captured on HiDPI screen configuration
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: