Open Bug 1834592 Opened 2 years ago Updated 2 years ago

Graphics glitches when Firefox launched from a high DPI Windows app

Categories

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

Firefox 113
Unspecified
Windows
defect

Tracking

()

Tracking Status
firefox113 --- wontfix
firefox114 --- affected
firefox115 --- affected

People

(Reporter: alin.clincea, Unassigned)

Details

(Whiteboard: [win:sizing])

Attachments

(4 files)

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

Steps to reproduce:

With Firefox closed, from programs like QGIS Desktop or DB Browser for SQLite, when I click on the links from the About section (QGIS Home Page (menu item) or Website (menu item)).
Note that this behavior didn't occur when I tried the same steps in other programs (like Notepad++, for example).

Actual results:

Firefox is opened to the correct URLs, but the fonts look blocky and broken. Also, there is a thick white line at the right side of the main browser window. The same kind of line appears when I open the About dialog in Firefox. There, the line can be seen on the bottom side and there is an overlay of the dialog's content rectangle on the title bar.

Expected results:

As in all previous (recent) Firefox versions, the fonts should have looked smooth and no additional artifacts and overlays should have been noticed.

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

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

I don't think this is a Layout issue. It looks like something weird either at the Graphics level (resulting in strange scaling and/or antialiasing) or maybe -- given that it's apparently dependent on how Firefox is launched -- the Windows platform integration (Widget::Win32) code.

Given that there's also something else going on graphically -- the content of the About dialog is apparently misplaced, such that it overlaps the bottom half of the title bar -- maybe somehow the compositor is confused about the environment it's operating in? Are the parent and content processes not in agreement about where things belong on the screen?

Moving to Graphics for further triage....

Component: Layout: Text and Fonts → Graphics

One more thing: both starting apps had specific DPI settings: Properties > Compatibility > Change high DPI settings > {both checkboxes ticked; override high DPI...: System|System (extended)}.
I used these particular settings because my screen's resolution is 3840x2160 and several widgets in those apps weren't displayed correctly.
Whenever I remove the specific DPI settings from the starting apps, Firefox displays the content correctly.

Blocks: gfx-triage
Severity: -- → S3
Priority: -- → P3
Summary: Broken fonts when browser is launched from certain app links → Graphics glitches when Firefox launched from a high DPI Windows app
OS: Unspecified → Windows

Theory: part of our pipeline does its DPI detection through the process owner hierarchy, and part of it doesn't. To determine this, it would be really helpful if you would paste your "about:support" text (at least the Graphics section) to this Bug two times: once when launching Firefox normally, and once when launching it from a High DPI app such that you are seeing the rendering error. The information in those two reports will help determine if we are improperly calculating the DPI.

Flags: needinfo?(alin.clincea)

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Thank you for the detail. Looks like in the normal-launch case we are getting Display0: 1920x1080@60Hz scales:1.000000|1.250000, but in the app-launch case we are getting Display0: 1536x864@60Hz scales:1.000000|1.000000. In addition to trying to reproduce this, we now have enough information to try to solve it by working from first principles. Thank you.

I will attempt to repro.

Assignee: nobody → jgilbert
Status: NEW → UNCONFIRMED
Ever confirmed: false

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

I can repro.

Repro on Windows:

  1. Set OS display DPI scaling to 125%
  2. Pick another app Foo that you can cause to open Firefox/links somehow. (e.g. by clicking a website link in its About dialog)
  3. With Foo closed, right click on the exe, and edit its properties: Properties > Compatibility > Change high DPI settings > {both checkboxes ticked; override high DPI...: System|System (extended)}.
  4. Open Foo
  5. Cause Foo to open Firefox
  6. Observe poor quality rendering in Firefox, and about:support shows the faked resolution and scaling=1.0 from the OS.
Attachment #9340564 - Attachment description: comment #5 "normal" about:support → about:support "normal" (comment #5)
No longer blocks: gfx-triage
Component: Graphics → Graphics: WebRender
Priority: P3 → P2

This might be more related to Win32 widget component?

Component: Graphics: WebRender → Widget: Win32

Certainly sounds like it. :jgilbert, are you still working on this, or would you like to turn it over to us?

Flags: needinfo?(jgilbert)

I think she was just doing some initial investigative work on it. Please feel free to re-assign.

Flags: needinfo?(jgilbert)
Assignee: jgilbert → nobody
Priority: P2 → P3
Whiteboard: [win:sizing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: