Commit graph

931 commits

Author SHA1 Message Date
Edgar Chen
88a7cf9866 Bug 1683281 - Part 2: Move proxy handler utility functions from DOMJSProxyHandler.h to ProxyHandlerUtils.h; r=peterv
Depends on D103469

Differential Revision: https://phabricator.services.mozilla.com/D112277
2022-03-10 22:44:27 +00:00
Sean Feng
f61ec1c3d7 Bug 1741671 - Enable BFCache for pages with beforeunload event listeners on Desktop r=smaug
The changes only made it works in SHIP(session-history-in-parent) only.

Differential Revision: https://phabricator.services.mozilla.com/D131715
2022-03-03 19:13:47 +00:00
Cristian Tuns
1a0b214ad9 Backed out 2 changesets (bug 1741671) for causing wpt failures on back-forward-cache/events.html CLOSED TREE
Backed out changeset 7fffe4e20ea8 (bug 1741671)
Backed out changeset fc9c97d475c2 (bug 1741671)
2022-03-01 14:44:53 -05:00
Sean Feng
3380a4df7d Bug 1741671 - Enable BFCache for pages with beforeunload event listeners on Desktop r=smaug
The changes only made it works in SHIP(session-history-in-parent) only.

Differential Revision: https://phabricator.services.mozilla.com/D131715
2022-03-01 18:50:45 +00:00
Hector Zhao
1efb3c674c Bug 1700292 - Draw scroll marks on horizontal scrollbar as well. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D139001
2022-03-01 13:19:00 +00:00
Yulia Startsev
79409316d1 Bug 1742437 - re-scope all generic module/script loader files under js/loader; r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D138133
2022-02-21 15:39:09 +00:00
Norisz Fay
4c85ac47c5 Backed out 12 changesets (bug 1742437) for causing Bp-hybrid bustages on ModuleLoader.obj
Backed out changeset 7d5683180ac3 (bug 1742437)
Backed out changeset a48aff5f2555 (bug 1742437)
Backed out changeset 7e54a223001d (bug 1742437)
Backed out changeset 3a34d557d474 (bug 1742437)
Backed out changeset f29451ea18dc (bug 1742437)
Backed out changeset c0bd1d29be62 (bug 1742437)
Backed out changeset 8b970fb6e4e6 (bug 1742437)
Backed out changeset 729c48e34d6b (bug 1742437)
Backed out changeset 9355004c7f6a (bug 1742437)
Backed out changeset 0a5f61274aed (bug 1742437)
Backed out changeset a50f60a612d3 (bug 1742437)
Backed out changeset 0ac6d9d26e2b (bug 1742437)
2022-02-18 00:00:41 +02:00
Yulia Startsev
499559431e Bug 1742437 - re-scope all generic module/script loader files under js/loader; r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D138133
2022-02-17 15:57:52 +00:00
Emilio Cobos Álvarez
a8883d1cfc Bug 1753836 - Fix callers of screenForRect to pass desktop pixels. r=jfkthame,Gijs
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
2022-02-16 12:18:12 +00:00
smolnar
33c038ec0d Backed out 6 changesets (bug 1753836) for causing mochitest failures in test_event_screenXY_with_zoom. CLOSED TREE
Backed out changeset a572cbc0fac2 (bug 1753836)
Backed out changeset 371a495ff728 (bug 1753836)
Backed out changeset 774af76be463 (bug 1753836)
Backed out changeset faa8a8f2d40f (bug 1753836)
Backed out changeset 9209832ecffe (bug 1753836)
Backed out changeset db443ce0406d (bug 1753836)
2022-02-16 01:47:51 +02:00
Emilio Cobos Álvarez
c879265a3a Bug 1753836 - Fix callers of screenForRect to pass desktop pixels. r=jfkthame,Gijs
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
2022-02-15 22:25:04 +00:00
Emilio Cobos Álvarez
28290f66db Bug 1754858 - Simplify screen orientation API implementation. r=smaug,m_kato,geckoview-reviewers
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
2022-02-15 20:22:54 +00:00
Jan de Mooij
32fccb425b Bug 1754405 part 1 - Remove JSID_IS_STRING/JSID_TO_STRING. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D138272
2022-02-10 09:13:17 +00:00
Emilio Cobos Álvarez
03ade0a619 Bug 1753995 - Move devicePixelRatio getter from outer to inner window. r=smaug
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
2022-02-07 18:23:35 +00:00
Tim Huang
f44147bdb9 Bug 1750844 - Part 1: Expose client principal to windows. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136319
2022-01-20 21:38:55 +00:00
Kagami Sascha Rosylight
0096bc4b41 Bug 1750818 - Convert TestUtils to a namespace r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136268
2022-01-19 06:45:35 +00:00
Kagami Sascha Rosylight
624a3640bf Bug 1669552 - Add TestUtils support for WPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D135942
2022-01-14 18:36:59 +00:00
Jonathan Watt
7e25ffb0ec Bug 1749003 - Remove unnecessary includes and other mentions of nsIWebBrowserPrint. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D135339
2022-01-07 14:46:30 +00:00
Tom Schuster
35d22f07bc Bug 1746186 - Don't observablely sniff objects in reportError(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D133916
2021-12-20 21:29:08 +00:00
Kagami Sascha Rosylight
87ef553bcc Bug 1743439 - Part 1: Mark callers in dom/animation and dom/base as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133360
2021-12-09 19:56:08 +00:00
Alexandru Michis
8941bcbb1e Backed out 6 changesets (bug 1743439) for causing bustages in AnimationEventDispatcher.h
CLOSED TREE

Backed out changeset 792c405d4afc (bug 1743439)
Backed out changeset 0376e73c7dce (bug 1743439)
Backed out changeset 23202094bc00 (bug 1743439)
Backed out changeset ba0fa3a8fa0e (bug 1743439)
Backed out changeset 7ad2746ec876 (bug 1743439)
Backed out changeset a919ef50cf33 (bug 1743439)
2021-12-09 19:36:12 +02:00
Kagami Sascha Rosylight
d428dbd282 Bug 1743439 - Part 1: Mark callers in dom/animation and dom/base as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133360
2021-12-09 17:16:48 +00:00
Mike Hommey
8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
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
2021-12-08 21:37:11 +00:00
Tim Huang
bf00e6e2cf Bug 1731999 - Part 2: Use regular principal for service workers if pref 'privacy.partition.serviceWorkers' is false. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D131787
2021-11-30 13:40:31 +00:00
Tim Huang
4e521d6a11 Bug 1731982 - Part 3: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-11-25 13:11:30 +00:00
Masayuki Nakano
71fc64caea Bug 1735745 - Make SelectionChangeEventDispatcher dispatch select event and selectchange event only when there may be corresponding event listeners r=smaug
`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
2021-11-25 07:09:23 +00:00
Toshihito Kikuchi
599a77edff Bug 1734099 - Never unload tabs with active RTCPeerConnection instances. r=peterv,jesup
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
2021-11-18 22:59:12 +00:00
Andrew Osmond
32fecf4098 Bug 1657375 - Cache the principal hash value for OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
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
2021-11-09 20:16:05 +00:00
Andrew Osmond
3c9cebcd6e Bug 1735874 - Fix broken resist fingerprinting with OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
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
2021-11-09 20:16:04 +00:00
Hiroyuki Ikezoe
fbdae21c47 Bug 1739541 - Drop ScrollOrigin argument from ScrollByCSSPixels. r=botond
All call sites of ScrollByCSSPixels specify ScrollOrigin::Relative.

Differential Revision: https://phabricator.services.mozilla.com/D130415
2021-11-09 09:19:24 +00:00
Alexandru Michis
490a04115c Backed out 12 changesets (bug 1731982, bug 1736401) for causing crashes. a=backout
DONTBUILD

Backed out changeset ab85eef8a4fd (bug 1736401)
Backed out changeset 347ce2439936 (bug 1731982)
Backed out changeset fa0ff1505daa (bug 1731982)
Backed out changeset 5b1f2b0a5673 (bug 1731982)
Backed out changeset 4adc65d2f1a3 (bug 1731982)
Backed out changeset a8700204af07 (bug 1731982)
Backed out changeset 88bd00ed8d94 (bug 1731982)
Backed out changeset 80bd8c79b931 (bug 1731982)
Backed out changeset 58ca3a94fec0 (bug 1731982)
Backed out changeset 0b28570dea43 (bug 1731982)
Backed out changeset 23524ce67bb9 (bug 1731982)
Backed out changeset d29cc06a65db (bug 1731982)
2021-11-09 09:23:38 +02:00
Gerald Squelart
5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`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
2021-11-08 23:59:35 +00:00
Tim Huang
c35eb67c83 Bug 1731982 - Part 3: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-11-08 14:30:54 +00:00
Cristian Tuns
1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart
7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`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
2021-11-05 05:52:28 +00:00
Masayuki Nakano
c84dfd928f Bug 1455514 - part 2: Add accessors and static helper methods to retrieve nsPIDOMWindowInner, nsPIDOMWindowOuter and nsPIWindowRoot r=smaug
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
2021-11-02 13:03:43 +00:00
Butkovits Atila
47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Tim Huang
a224b370aa Bug 1731982 - Part 4: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-10-19 06:33:07 +00:00
Gerald Squelart
df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Cosmin Sabou
49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Tim Huang
2d6e94fded Bug 1731982 - Part 4: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-10-18 12:20:32 +00:00
Cristian Tuns
dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang
b9ab62c1fd Bug 1731982 - Part 4: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-10-15 20:00:02 +00:00
Cristian Tuns
d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang
416ff60440 Bug 1731982 - Part 4: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-10-13 11:18:53 +00:00
Noemi Erli
cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang
2876ad56cf Bug 1731982 - Part 4: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
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
2021-10-12 18:55:19 +00:00
Karl Tomlinson
e91d1ff3ec Bug 1732410 wait for focus before proceeding for enumerateDevices() Promises r=jib,nika
https://github.com/w3c/mediacapture-main/pull/574

Focus on browser chrome widgets is accepted provided the tab is fully active
and foreground.
https://github.com/w3c/mediacapture-main/issues/752#issuecomment-742036800

Differential Revision: https://phabricator.services.mozilla.com/D127051
2021-10-11 20:44:39 +00:00
Jens Stutte
2c7cda331d Bug 1731564: Use motivated SpinEventLoopUntil inside dom/*. r=smaug
Depends on D126714

Differential Revision: https://phabricator.services.mozilla.com/D126957
2021-10-07 08:06:11 +00:00
Marian-Vasile Laza
18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00