mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +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 |
||
---|---|---|
.. | ||
test | ||
AppWindow.cpp | ||
AppWindow.h | ||
components.conf | ||
LiveResizeListener.h | ||
moz.build | ||
nsAppShellCID.h | ||
nsAppShellService.cpp | ||
nsAppShellService.h | ||
nsAppShellWindowEnumerator.cpp | ||
nsAppShellWindowEnumerator.h | ||
nsChromeTreeOwner.cpp | ||
nsChromeTreeOwner.h | ||
nsContentTreeOwner.cpp | ||
nsContentTreeOwner.h | ||
nsIAppShellService.idl | ||
nsIAppWindow.idl | ||
nsIWindowlessBrowser.idl | ||
nsIWindowMediator.idl | ||
nsIWindowMediatorListener.idl | ||
nsIXULBrowserWindow.idl | ||
nsWindowMediator.cpp | ||
nsWindowMediator.h |