Device pixels and desktop pixels are not the same on macOS and Win7.
Expose the desktop-to-device scale to JS and use it appropriately.
Depends on D138038
Differential Revision: https://phabricator.services.mozilla.com/D138039
Device pixels and desktop pixels are not the same on macOS and Win7.
Expose the desktop-to-device scale to JS and use it appropriately.
Depends on D138038
Differential Revision: https://phabricator.services.mozilla.com/D138039
Make the ScreenOrientation part of the screen struct, as it should. Stop
using HAL to propagate just screen orientation updates, use the more
general screen manager.
Instead of HAL observers, add a simple observer service notification,
and clean a bunch of the code.
This will simplify bug 1754802 a bit, and is generally simpler.
Shouldn't change behavior. I've tested the events and some common
orientation locking use cases like Youtube, and they behave the same.
Differential Revision: https://phabricator.services.mozilla.com/D138477
It only pokes at the document's pres context, there's no need to
roundtrip through the outer window. No behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D138019
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.
Differential Revision: https://phabricator.services.mozilla.com/D133161
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
`select` event on text controls now dispatched immediately before
`selectionchange`. However, it needs to create `AsyncEventDispatcher` for
each. This cost may not be expensive, but they are called really a lot even
if there is no corresponding event listener.
Therefore, this patch makes `nsPIDOMWindow` and `EventListenerManager` have
`MayHave*EventListeners` flag separately for each, and makes
`SelectionChangeEventDispatcher` does not try to do create
`AsyncEventDispatcher` when there is no corresponding event listener.
Differential Revision: https://phabricator.services.mozilla.com/D131750
This patch makes sure the Tab Unloading feature does not unload tabs that have
active peer connections not to disrupt browsing experience based on WebRTC peer
connections.
To enable JS code to access the number of active peer connections, this patch
moves `nsPIDOMWindowInner::mTotalActivePeerConnections` to `WindowGlobalParent`.
Differential Revision: https://phabricator.services.mozilla.com/D128761
We cannot access ClientWebGLContext::mCanvasElement or its associated
nsIPrincipal off the main thread. We use the hash value of the principal
to limit how many WebGL contexts a single domain can create. We can
compute this when the worker is initialized for OffscreenCanvas worker
instances.
Differential Revision: https://phabricator.services.mozilla.com/D128530
OffscreenCanvas can be run on worker threads and is disabled by default.
The existing code trips asserts because we try to use the document,
which is main thread only, directly on the worker thread. This patch
caches the resist fingerprinting status for the worker when it is
created for future reference.
Differential Revision: https://phabricator.services.mozilla.com/D128510
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
Similar to the previous patch, there are a lot of QI from `EventTarget` to
window interfaces. This patch adds them, but unfortunately,
`nsPIDOMWindowInner` and `nsPIDOMWindowOuter` do not inherit `EventTarget`
directly, and they are in a public header instead of their concrete classes
(`nsGlobalWindowInner` and `nsGlobalWindowOuter`). So we cannot cast them
in `nsPIDOMWindow.h`, and it causes it's impossible to use the macros added
by the previous patch.
Differential Revision: https://phabricator.services.mozilla.com/D129782
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.
Differential Revision: https://phabricator.services.mozilla.com/D127630