gecko-dev/xpfe/appshell
Emilio Cobos Álvarez ee23efc9b5 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 15:01:52 +00:00
..
test
AppWindow.cpp Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 15:01:52 +00:00
AppWindow.h Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 15:01:52 +00:00
components.conf
LiveResizeListener.h
moz.build
nsAppShellCID.h
nsAppShellService.cpp Bug 1772432 - Fix Windows build bustage. 2022-06-03 12:23:00 +02:00
nsAppShellService.h
nsAppShellWindowEnumerator.cpp
nsAppShellWindowEnumerator.h
nsChromeTreeOwner.cpp Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 15:01:52 +00:00
nsChromeTreeOwner.h
nsContentTreeOwner.cpp Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 15:01:52 +00:00
nsContentTreeOwner.h
nsIAppShellService.idl
nsIAppWindow.idl Bug 1769619 - Introduce nsIDocShellTreeOwner::primaryContentBrowsingContext, r=smaug 2022-05-17 22:11:33 +00:00
nsIWindowlessBrowser.idl
nsIWindowMediator.idl
nsIWindowMediatorListener.idl
nsIXULBrowserWindow.idl Bug 1756323 - Fix tooltip coordinates in presence of full zoom. r=jfkthame 2022-02-21 17:30:08 +00:00
nsWindowMediator.cpp Bug 1738185: Update the error handling in the mediator around mReady status. r=mccr8 2021-11-03 15:25:10 +00:00
nsWindowMediator.h