Emilio Cobos Álvarez
bcabeab0f8
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
..
2022-06-14 04:20:42 +00:00
2022-06-13 00:59:23 +00:00
2022-02-09 17:29:47 +00:00
2022-06-14 11:14:29 +00:00
2022-06-13 00:59:23 +00:00
2021-10-04 13:14:37 +00:00
2022-05-26 02:29:11 +00:00
2022-06-02 11:58:18 +00:00
2022-06-14 15:01:52 +00:00
2021-07-30 11:39:39 +00:00
2022-06-02 23:50:44 +00:00
2021-10-29 19:58:25 +00:00
2022-04-20 09:32:07 +00:00
2022-04-07 00:58:49 +00:00
2022-02-07 22:33:41 +00:00
2022-02-07 22:33:38 +00:00
2022-02-07 22:33:37 +00:00
2022-02-10 00:39:42 +00:00
2022-04-27 01:15:29 +00:00
2022-05-21 16:00:58 +00:00
2022-05-21 16:00:58 +00:00
2022-05-25 00:14:06 +00:00
2022-05-06 23:37:25 +00:00
2022-05-06 23:37:25 +00:00
2022-05-06 23:37:25 +00:00
2022-02-07 22:33:40 +00:00
2022-02-15 08:00:06 +00:00
2021-11-29 20:52:31 +00:00
2022-03-03 04:11:15 +00:00
2022-04-27 01:15:29 +00:00
2022-06-13 11:38:43 +00:00
2022-01-10 21:57:20 +00:00
2022-06-14 15:01:52 +00:00
2022-02-15 08:00:05 +00:00
2022-02-28 14:53:24 +00:00
2022-02-28 14:53:24 +00:00
2022-05-17 20:24:19 +00:00
2022-02-16 12:14:58 +02:00
2022-05-05 12:10:08 +00:00
2022-05-05 12:10:08 +00:00
2022-06-06 14:30:42 +00:00
2022-06-05 23:20:45 +00:00
2021-11-15 12:39:38 +00:00
2022-05-17 08:12:03 +00:00
2021-10-22 22:55:25 +00:00
2022-06-07 12:32:55 +00:00
2022-05-23 19:34:40 +00:00
2022-03-15 18:14:07 +00:00
2022-03-04 15:39:41 +00:00
2022-06-14 15:01:52 +00:00
2022-06-14 15:01:52 +00:00
2022-02-16 15:38:27 +00:00
2021-10-07 15:32:03 +00:00
2022-05-20 17:33:22 +00:00
2022-05-23 19:34:40 +00:00
2021-08-31 00:58:34 +00:00
2022-05-25 00:14:06 +00:00
2022-03-01 14:16:48 +00:00
2021-11-02 18:08:08 +00:00
2022-05-13 15:26:07 +00:00
2021-11-16 08:17:02 +00:00
2022-05-20 22:51:00 +00:00
2022-05-16 11:50:34 +00:00
2022-05-26 21:04:26 +00:00
2022-05-06 23:37:25 +00:00
2022-02-17 16:22:57 +00:00
2021-12-15 19:26:22 +00:00
2022-06-05 23:20:45 +00:00
2022-03-02 12:02:00 +00:00
2022-03-01 14:16:48 +00:00
2022-06-11 01:13:42 +03:00
2022-06-07 23:09:52 +00:00
2021-11-16 08:17:03 +00:00
2021-11-16 08:17:02 +00:00
2022-02-05 00:39:04 +00:00
2022-03-19 16:48:25 +00:00
2021-11-15 12:39:38 +00:00
2022-01-03 17:20:03 +00:00
2022-05-16 08:38:02 +00:00
2022-05-13 15:26:07 +00:00
2022-05-20 22:51:00 +00:00
2022-04-26 14:30:29 +00:00
2022-05-17 18:47:39 +00:00
2022-06-03 09:41:39 +00:00
2022-05-16 08:38:02 +00:00
2022-06-13 11:38:43 +00:00
2021-10-21 09:07:12 +00:00
2021-11-10 12:57:43 +00:00
2022-06-14 15:01:52 +00:00
2022-06-14 15:01:52 +00:00
2022-06-14 15:01:52 +00:00
2022-06-14 15:01:52 +00:00
2022-05-06 23:37:25 +00:00
2022-05-06 23:37:25 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-08 12:29:23 +03:00
2022-06-09 23:02:11 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-05-26 02:29:10 +00:00
2022-05-26 02:29:10 +00:00
2022-04-19 11:41:52 +00:00
2022-02-15 08:00:06 +00:00
2022-04-07 00:58:49 +00:00
2022-06-03 16:01:32 +00:00
2022-03-15 18:14:08 +00:00
2022-06-07 23:09:54 +00:00
2022-06-07 23:09:52 +00:00
2022-01-12 16:33:31 +00:00
2022-01-12 16:33:31 +00:00
2022-06-07 23:09:52 +00:00
2022-06-07 23:09:52 +00:00
2022-05-15 21:54:25 +00:00
2021-11-15 12:39:38 +00:00
2021-11-10 12:57:43 +00:00
2022-05-11 17:15:51 +00:00
2022-05-11 17:15:51 +00:00
2022-04-27 01:15:29 +00:00
2021-11-11 11:14:13 +00:00
2022-02-23 13:59:33 +00:00
2022-02-23 13:59:33 +00:00
2021-10-06 07:21:59 +00:00