46 bytes, text/x-phabricator-request
|Details | Review|
The nsView::DoResetWidgetBounds use nsDeviceContext::GetDesktopToDeviceScale()  for getting the scale of the monitor by using  FindScreen method. The FindScreen does not work under Wayland because we cannot obtain window absolute position from the server. Because the scale returned by GetDesktopToDeviceScale() returns always 1 or 2 (depends on which monitor is primary) it leads to wrong popup menu placement under wayland.  https://searchfox.org/mozilla-central/rev/9e7995b3c384945740985107a4de601b27904718/view/nsView.cpp#363  https://searchfox.org/mozilla-central/rev/9e7995b3c384945740985107a4de601b27904718/gfx/src/nsDeviceContext.cpp#725
In the Wayland we don't know the absolute position of the window, so we cannot use it to determine on which monitor the window is. We need to use parent window scale factor to scale popup windows, otherwise popup windows will be wrongly placed in the hi+normal dpi monitor setup.
Comment on attachment 9008054 [details] Bug 1490297 Use parent window scale factor for the popup windows under Wayland; r?bzbarsky Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9008054 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/c5b3caf36ddf Use parent window scale factor for the popup windows under Wayland; r=mattwoodrow
I'm sorry, but this bug has made the latest Nightly completely unusable due to bug 1493081, and leaving it in its current state isn't acceptable. I'll have to back this out and retrigger Nightlies.
Link to backout: https://hg.mozilla.org/mozilla-central/rev/bb920e419166
You need to log in before you can comment on or make changes to this bug.