gecko-dev/dom
Emilio Cobos Álvarez c64d0fcaa6 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 11:37:25 +00:00
..
abort Bug 1757635 - Part 2: Use NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS where applicable r=smaug 2022-05-25 23:41:26 +00:00
animation Bug 1754897 - Part 7: Factor out the check of PseudoStyleType for animations. r=emilio 2022-06-13 20:26:47 +00:00
audiochannel
base Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 11:37:25 +00:00
battery Bug 1772747 - Cleanup dom/geolocation, dom/system, dom/battery and dom/canvas includes r=sylvestre 2022-06-06 08:13:34 +00:00
bindings Bug 1773242 - Add better error message when consuming non-Uint8Array. r=smaug 2022-06-14 07:42:29 +00:00
broadcastchannel Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth 2022-06-08 15:24:27 +00:00
browser-element Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs 2022-05-17 20:24:19 +00:00
cache Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
canvas Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame 2022-06-13 00:59:23 +00:00
chrome-webidl Bug 1773811 - Fix APZ autoscroll coordinates. r=tnikkel 2022-06-13 00:54:33 +00:00
clients Bug 1773088 - Part 2: Stop requiring an actor to serialize StructuredCloneData over IPC, r=asuth 2022-06-08 15:24:27 +00:00
commandhandler
console
credentialmanagement
crypto Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug 2022-06-05 20:54:59 +00:00
debugger
docs
encoding
events Bug 1769257 - run a subset of mochitests with a conditioned profile. r=ahal 2022-06-10 19:57:36 +00:00
fetch Bug 1773242 - Add better error message when consuming non-Uint8Array. r=smaug 2022-06-14 07:42:29 +00:00
file Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth 2022-06-08 15:24:27 +00:00
filehandle
filesystem Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth 2022-06-08 15:24:27 +00:00
flex
fs Bug 1758055 - Move DOM bindings to api folder. r=janv,dom-storage-reviewers 2022-06-08 10:23:19 +00:00
gamepad Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug 2022-06-05 20:54:59 +00:00
geolocation Bug 1772747 - Cleanup dom/geolocation, dom/system, dom/battery and dom/canvas includes r=sylvestre 2022-06-06 08:13:34 +00:00
grid
html Bug 1773523 - allow_xul_xbl support in manifests. r=mccr8,gbrown 2022-06-09 19:01:01 +00:00
imptests
indexedDB Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth 2022-06-08 15:24:27 +00:00
interfaces Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug 2022-06-07 23:09:52 +00:00
ipc Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel 2022-06-14 11:37:25 +00:00
jsurl
l10n Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
locales Bug 1773667 - Add console logging for file:// script loads. r=freddyb 2022-06-13 08:02:13 +00:00
localstorage Bug 1769290 - Part 9: Apply mozilla-js-handle-rooted-typedef against dom/localstorage,locks,media,midi,notification,payments r=smaug 2022-06-05 20:54:59 +00:00
locks Bug 1769290 - Part 9: Apply mozilla-js-handle-rooted-typedef against dom/localstorage,locks,media,midi,notification,payments r=smaug 2022-06-05 20:54:59 +00:00
manifest Bug 1770727 - Fix ESLint rule mozilla/use-services on sjs files and expose Services to sjs files. r=Gijs 2022-06-07 19:14:08 +00:00
mathml Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame 2022-06-13 00:59:23 +00:00
media Bug 1773642 - Refresh openbsd webrtc config after bug 1661450. r=mjf 2022-06-14 04:19:04 +00:00
messagechannel
midi Bug 1769266 - Use smart pointers in MIDI runnables r=mccr8 2022-06-07 12:51:08 +00:00
network
notification Bug 1772094 - Part 6: Use plain object for lazy getter in dom/notification/. r=mossop 2022-06-07 04:29:13 +00:00
offline
origin-trials Bug 1770885 - Avoid key copy + re-verification in CreateECPublicKey. r=keeler 2022-06-02 12:13:43 +00:00
payments Bug 1769290 - Part 9: Apply mozilla-js-handle-rooted-typedef against dom/localstorage,locks,media,midi,notification,payments r=smaug 2022-06-05 20:54:59 +00:00
performance Bug 1762482 - update PerformanceMeasure to User Timing L3. r=sefeng,smaug 2022-05-31 16:48:14 +00:00
permission
plugins
power
prio
promise Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug 2022-06-05 20:55:00 +00:00
prototype Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug 2022-06-07 23:09:52 +00:00
push Bug 1769257 - run a subset of mochitests with a conditioned profile. r=ahal 2022-06-10 19:57:36 +00:00
quota Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
reporting Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs 2022-05-18 08:13:19 +00:00
res
script Backed out 5 changesets (bug 1761242, bug 1744822, bug 1761252) for causing browser-chrome failures in netwerk/test/browser/browser_103_assets.js CLOSED TREE 2022-06-08 18:56:35 +03:00
security Bug 1773667 - Add console logging for file:// script loads. r=freddyb 2022-06-13 08:02:13 +00:00
serializers Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
serviceworkers Bug 1769257 - run a subset of mochitests with a conditioned profile. r=ahal 2022-06-10 19:57:36 +00:00
simpledb Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug 2022-06-05 20:55:00 +00:00
smil Bug 1770829 - Use ColorMix for interpolated colors in the computed style rather than ComplexColorRatios. r=barret 2022-06-03 19:11:07 +00:00
storage
streams Bug 1757635 - Part 2: Use NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS where applicable r=smaug 2022-05-25 23:41:26 +00:00
svg Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug 2022-06-07 23:09:52 +00:00
system Bug 1774073: Backout bug 1704500 from mozilla-central and mozilla-beta r=cmartin 2022-06-13 19:14:06 +00:00
tests Bug 1596164 - Use PR_Now instead of location service's acquired time. r=geckoview-reviewers,agi 2022-06-14 04:20:42 +00:00
u2f
url
vr Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug 2022-06-05 20:55:00 +00:00
webauthn Bug 1757635 - Part 2: Use NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS where applicable r=smaug 2022-05-25 23:41:26 +00:00
webbrowserpersist Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
webgpu Bug 1752188: Move GPUBufferDescriptor validation to server. r=jgilbert 2022-06-06 06:33:13 +00:00
webidl Bug 1772494 - Remove ErrorEventInit's error default, r=peterv 2022-06-13 09:33:24 +00:00
webscheduling Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug 2022-06-05 20:55:00 +00:00
webshare
websocket
workers Bug 1771776 - Use AUTO_PROFILER_LABEL_DYNAMIC_CSTR instead of AUTO_PROFILER_LABEL_DYNAMIC_CSTRING so that the dynamic string is captured even while the profiler is not running. r=florian 2022-06-13 14:12:41 +00:00
worklet Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana 2022-06-07 12:32:55 +00:00
xhr Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE 2022-06-11 01:13:42 +03:00
xml
xslt
xul Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug 2022-06-07 23:09:52 +00:00
jar.mn
metrics.yaml
moz.build