Open Bug 1880641 Opened 1 year ago Updated 1 year ago

Shifting of toolbar in macOS fullscreen fails to convert device pixel to CSS px

Categories

(Core :: Widget: Cocoa, defect, P5)

Firefox 122
defect

Tracking

()

UNCONFIRMED

People

(Reporter: wangweixvan, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

  1. Open browser in macOS fullscreen mode so the menubar is hidden.
  2. Move mouse to the top to reveal the menubar.
  3. Observe that the browser toolbar shifts down, and correctly sticks with the menubar.
  4. Change layout.css.devPixelsPerPx pref to a value other than device DPI.
  5. Repeat steps 1-4.

Actual results:

The browser toolbar shifts for a wrong amount.
The shift amount is wrongly proportional to the devPixelsPerPx pref.

Expected results:

The browser toolbar should stick with the menubar.
The shift amount should be independent to the devPixelsPerPx pref.

The code at nsGlobalWindowOuter::MacFullscreenMenubarOverlapChanged passes a DesktopCoord value to the JavaScript handler shiftMacToolbarDown. I guess there misses a conversion from DesktopCoord to CSSCoord.

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

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Severity: -- → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.