mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
0b6ca42c5b
So the issue here is that my patch made GetTopLevelWidget() return the top level window across the widget chain, including this one in particular: https://searchfox.org/mozilla-central/rev/387f3edbef37d31b2e91fb0812c74b54729e86ff/layout/base/nsDocumentViewer.cpp#2339 We have two AppWindows parented: * Top level browser -> Alert window. It seems it's know that cocoa windows that aren't shown yet may have a HiDPI scale factor different from their actual screen's scale factor: * https://searchfox.org/mozilla-central/rev/387f3edbef37d31b2e91fb0812c74b54729e86ff/widget/cocoa/nsCocoaWindow.mm#1895-1935 This causes the alert window have a devicePixelRatio of 2 but the top level have a devicePixelRatio of 1. Which means that nsDeviceContext thinks we have a DPI of 1, but AppWindow and co have a DPI of 2, causing this mismatch. Fix this by making GetTopLevelWidget actually return the nsCocoaWindow widget for the alert, not the other. This restores the behavior for cocoa, but changes it for Windows and Linux (Android can't have nested top level windows, afaict). Given windows and Linux both had the concept of "top level widget" in a similar fashion, I think we can try this. I'll add a smaller fix for uplift purposes. Differential Revision: https://phabricator.services.mozilla.com/D227875 |
||
---|---|---|
.. | ||
appshell |