Open Bug 1494514 Opened 7 years ago Updated 3 years ago

Link-open triggered from a low-DPI window but opened on high-DPI window renders as 1/4 size

Categories

(Core :: Layout, defect, P3)

64 Branch
x86_64
macOS
defect

Tracking

()

Tracking Status
firefox64 --- affected

People

(Reporter: loganfsmyth, Unassigned)

References

Details

Attachments

(2 files)

Attached file bug-low-dpi.tgz
This sounds related to https://bugzilla.mozilla.org/show_bug.cgi?id=1480182 but I figured I'd file it separately since I couldn't quite tell. On Gmail's chat, someone sent me an image. I had the chat window open on a low-DPI screen. When I clicked the link, the image opened in my primary browser window, but rendered at 1/4 size. Dragging the window between screens triggers a resize and fixes rendering. I created a simple reproduction to make everyone's life easier. Reproduction: 1. Extract the attached tgz 2. Run `python -m SimpleHTTPServer 8001` to serve the files 3. Open localhost:8001 4. Click the link to open a popup 5. Drag the popup onto a low-DPI screen 6. Click the link in the popop Expected: The cat gif should open in the original primary browser window at normal size. Actual: The cat gif opens on the high-DPI screen, but the window content is rendered a 1/4 scale.
Component: General → Window Management
Product: Firefox → Core
A quick look suggests that nsPresContext::mCurAppUnitsPerDevPixel is initialized to the wrong value when the window opens. Seems to be specific to when a window is opened, as in this test, via 'window.parent.open(...)' For example, at step 5, zoom the popup window a bit, and the new window in step 6 will be zoomed by that amount as well. I assume the scale is being incorrectly inherited from the parent window.
Component: Window Management → Layout
Priority: -- → P3
See Also: → 1480182

I took a look and the nice thing is that this repros on wayland too, so it should be trivial to debug with RR.

Bad thing is that I'm hitting https://github.com/mozilla/rr/issues/2331 all the time when trying to do so.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: