Commit Graph

812 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
79aa0d7606 Bug 1958322 - Plumb pip mode to Gecko. r=padenot,hiro,geckoview-reviewers,webidl,saschanaz,smaug,calu
Differential Revision: https://phabricator.services.mozilla.com/D244794
2025-04-09 18:04:42 +00:00
Norisz Fay
b263c6627a Backed out 9 changesets (bug 1620998) for causing multiple crash related failures
Backed out changeset 274ab6fba51b (bug 1620998)
Backed out changeset 731b7a72161e (bug 1620998)
Backed out changeset 5dad868cb181 (bug 1620998)
Backed out changeset 49618d90e1da (bug 1620998)
Backed out changeset cc14d8374efa (bug 1620998)
Backed out changeset 31f3cc43e800 (bug 1620998)
Backed out changeset fde49d4de714 (bug 1620998)
Backed out changeset 857c23185317 (bug 1620998)
Backed out changeset 97f0f061357e (bug 1620998)
2025-04-02 02:23:33 +03:00
Gabriele Svelto
6259c76b43 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

The crash helper process is started when the first exception handler is set
on desktop platforms and before loading libxul on Android. In both cases
starting this process happens asynchronously so that neither the main process
nor child processes have to wait for it to come up. If a crash happens before
the crash helper has started, the crashed process will wait for it to fully
come up and then proceed with regular crash generation.

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-04-01 15:13:42 +00:00
Cosmin Sabou
e3d0bc89ab Backed out 9 changesets (bug 1620998) for causing build bustages. CLOSED TREE
Backed out changeset 72781375abd5 (bug 1620998)
Backed out changeset 30edb461ed99 (bug 1620998)
Backed out changeset a027ff2de570 (bug 1620998)
Backed out changeset 821e4224085a (bug 1620998)
Backed out changeset e90f6557d883 (bug 1620998)
Backed out changeset 47e7a1a2796e (bug 1620998)
Backed out changeset dbf8543d39d4 (bug 1620998)
Backed out changeset e72d5596ac91 (bug 1620998)
Backed out changeset b351cb3d0b54 (bug 1620998)
2025-04-01 01:34:43 +03:00
Gabriele Svelto
c544442459 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

The crash helper process is started when the first exception handler is set
on desktop platforms and before loading libxul on Android. In both cases
starting this process happens asynchronously so that neither the main process
nor child processes have to wait for it to come up. If a crash happens before
the crash helper has started, the crashed process will wait for it to fully
come up and then proceed with regular crash generation.

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-03-31 21:23:14 +00:00
kernp25
4d18975ff5 Bug 1945924 - Replace SchemeIsFoo functions with the inlined SchemeIs() call. r=valentin,emilio,necko-reviewers,geckoview-reviewers,anti-tracking-reviewers,core-sessionstore-reviewers,ohall,farre
No behavior change intended.

Differential Revision: https://phabricator.services.mozilla.com/D236756
2025-03-31 14:25:54 +00:00
Stanca Serban
bd48863fb7 Backed out 7 changesets (bug 1954597) for causing mochitests-plain failures. CLOSED TREE
Backed out changeset 0b09daddf739 (bug 1954597)
Backed out changeset 05d17ea7f2e2 (bug 1954597)
Backed out changeset 1307991fb492 (bug 1954597)
Backed out changeset 151b845bce94 (bug 1954597)
Backed out changeset 9a22e9141e79 (bug 1954597)
Backed out changeset c5dcd2282414 (bug 1954597)
Backed out changeset 7300dcf3e46f (bug 1954597)
2025-03-27 08:51:41 +02:00
Nika Layzell
ceafd2c43b Bug 1954597 - Part 2: Refactor ValidatePrincipal to allow the logic to be used from a content process, r=smaug
This involved moving the logic into ProcessIsolation.cpp, closer to the rest of
the process selection logic. The existing method is preserved, to be used as a
convenience for callers.

As the new logic is closer to the rest of the process selection logic, this
also simplifies the remote type parsing logic to perform direct string compares
against the remoteType's site-origin. If origin keying of processes is added in
the future, this will likely need to be updated to handle that case.

Differential Revision: https://phabricator.services.mozilla.com/D241879
2025-03-26 19:21:15 +00:00
Goloman Adrian
7a6f0dd01d Backed out 10 changesets (bug 1942805, bug 1620998) for causing grandle and ui failures.
Backed out changeset b840c4565b11 (bug 1942805)
Backed out changeset 7acecab7051d (bug 1620998)
Backed out changeset bad9fd65a113 (bug 1620998)
Backed out changeset 11b93a07b5b1 (bug 1620998)
Backed out changeset c6e1addf36e0 (bug 1620998)
Backed out changeset be300aa07606 (bug 1620998)
Backed out changeset fb9daf29a61a (bug 1620998)
Backed out changeset 2ee28adc6f8e (bug 1620998)
Backed out changeset ef24c2b9784c (bug 1620998)
Backed out changeset 8f5c82b3dbe5 (bug 1620998)
2025-02-19 21:24:01 +02:00
Gabriele Svelto
5b7d8fdf9a Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-19 12:58:34 +00:00
Stanca Serban
4b816a2102 Backed out 10 changesets (bug 1620998, bug 1565033) for causing xpcshell failures.
Backed out changeset b2a854b53890 (bug 1565033)
Backed out changeset 72e6d58417a6 (bug 1620998)
Backed out changeset 36cbb4c4de20 (bug 1620998)
Backed out changeset 26b4bd0a30fe (bug 1620998)
Backed out changeset 5f24f386b12c (bug 1620998)
Backed out changeset 954fcb2f8ae1 (bug 1620998)
Backed out changeset 48a67f641eff (bug 1620998)
Backed out changeset e342d2531f46 (bug 1620998)
Backed out changeset 1be788431dae (bug 1620998)
Backed out changeset bcb528abe29d (bug 1620998)
2025-02-13 04:18:34 +02:00
Gabriele Svelto
e2f7a6a1c8 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-12 14:06:10 +00:00
Sandor Molnar
77eb9e958e Backed out 9 changesets (bug 1620998) for causing multiple xpc failures. CLOSED TREE
Backed out changeset d261d33c1778 (bug 1620998)
Backed out changeset 159fa2982a24 (bug 1620998)
Backed out changeset 7b2fd4d66216 (bug 1620998)
Backed out changeset 81bf2c760466 (bug 1620998)
Backed out changeset bd4719db23d2 (bug 1620998)
Backed out changeset 074b06a16323 (bug 1620998)
Backed out changeset 0d6ef1c8e871 (bug 1620998)
Backed out changeset 0a7a0876a987 (bug 1620998)
Backed out changeset fe27920e71da (bug 1620998)
2025-02-11 19:23:09 +02:00
Gabriele Svelto
849a598e7b Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-11 13:46:06 +00:00
Alexandru Marc
e3b8358964 Backed out 9 changesets (bug 1620998) for causing multiple failures
Backed out changeset fbdd468c1a87 (bug 1620998)
Backed out changeset 186864c03143 (bug 1620998)
Backed out changeset 76fdeb0d5f29 (bug 1620998)
Backed out changeset 948a12c0b735 (bug 1620998)
Backed out changeset d851c9093643 (bug 1620998)
Backed out changeset cd9fd4003d4c (bug 1620998)
Backed out changeset 285a2c5f5da3 (bug 1620998)
Backed out changeset 63b77e1967fb (bug 1620998)
Backed out changeset e15cdf03ffee (bug 1620998)
2025-02-10 13:36:08 +02:00
Gabriele Svelto
c1aedcc20f Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-10 09:17:47 +00:00
Butkovits Atila
9868b151e8 Backed out 9 changesets (bug 1620998) for causing failures at basicWindowDotPrintTest. CLOSED TREE
Backed out changeset de1e828b253c (bug 1620998)
Backed out changeset ef91568228cc (bug 1620998)
Backed out changeset e0f97d7fe45c (bug 1620998)
Backed out changeset 7c45366aff86 (bug 1620998)
Backed out changeset c75348ac4b7f (bug 1620998)
Backed out changeset 0745243849c4 (bug 1620998)
Backed out changeset 56f508d896f8 (bug 1620998)
Backed out changeset 312a462ada77 (bug 1620998)
Backed out changeset fa59ccaa08b8 (bug 1620998)
2025-02-04 19:11:50 +02:00
Gabriele Svelto
648fede404 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-04 14:37:02 +00:00
Butkovits Atila
97942d0763 Backed out 9 changesets (bug 1620998) for causing bustages. CLOSED TREE
Backed out changeset cc1abb70a660 (bug 1620998)
Backed out changeset b7e67d55d83b (bug 1620998)
Backed out changeset dc2b27fce35f (bug 1620998)
Backed out changeset 4b2403fe71c0 (bug 1620998)
Backed out changeset e935faca4155 (bug 1620998)
Backed out changeset 18c68507ca1f (bug 1620998)
Backed out changeset 0d751b3fa172 (bug 1620998)
Backed out changeset 62a35ddaa958 (bug 1620998)
Backed out changeset bde29ceab1b2 (bug 1620998)
2025-02-04 14:21:32 +02:00
Gabriele Svelto
21fb9231d1 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-02-04 11:24:18 +00:00
Adam Vandolder
2ba689d99e Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-12-05 01:20:07 +00:00
Nika Layzell
6e6f459f9b Bug 1931062 - Part 1: Always set browser priority in BrowserParent constructor, r=mccr8
Without this change if we're in a new process, we won't lower the priority when
navigating a background browser into the process. This should ensure we always
re-compute priority after creating a new BrowserParent, even if the
BrowsingContext is not active.

Differential Revision: https://phabricator.services.mozilla.com/D229548
2024-12-04 20:27:47 +00:00
Goloman Adrian
05b7d33317 Backed out changeset 4d19e4620e63 (bug 1924861) for causing bc failures @browser_stop_pending.js. CLOSED TREE 2024-12-04 09:11:45 +02:00
Adam Vandolder
87c9038ba7 Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-12-04 04:17:36 +00:00
Cosmin Sabou
82fbc8fbe4 Backed out changeset a8d030efc4ea (bug 1924861) for causing bc failures on browser_stop_pending. 2024-12-02 01:21:14 +02:00
Adam Vandolder
f6e7455adc Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-12-01 04:13:01 +00:00
Sandor Molnar
7e190c9386 Backed out changeset b94afd94ed9c (bug 1924861) for causing multiple bc failures. CLOSED TREE 2024-11-30 20:40:15 +02:00
Adam Vandolder
5f7b028386 Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-11-29 23:38:09 +00:00
Edgar Chen
997fb832b3 Bug 1932512 - Pass BrowsingContext to nsIColorPicker::Init; r=geckoview-reviewers,win-reviewers,mac-reviewers,emilio,spohl,m_kato,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D229682
2024-11-25 14:03:25 +00:00
Emilio Cobos Álvarez
30929e04af Bug 1930476 - Improve units in nsFrameLoader and related code. r=geckoview-reviewers,jwatt,ohall
Use LayoutDevice units for most these things, since it's what they are:

  ScreenIntSize(presContext->AppUnitsToDevPixels(size.width), ...

Is clearly a lie :)

Differential Revision: https://phabricator.services.mozilla.com/D228586
2024-11-12 15:16:50 +00:00
serge-sans-paille
5946338a6a Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-30 11:05:24 +00:00
Tamas Szentpeteri
8285dfaab8 Backed out changeset 4b1409597101 (bug 1920718) for causing bp bustages on rapl.cpp. 2024-10-08 23:27:18 +03:00
serge-sans-paille
1966f9a43c Bug 1920718 - Annotate all global variable with runtime initialization as MOZ_RUNINIT r=application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-08 16:49:51 +00:00
Julian Descottes
161f9b2b25 Bug 1921119 - Add canceledReason to RemoteWebProgressRequest r=nika
The canceledReason is added to the RequestData used to build the
RemoteWebProgressRequest. This canceledReason is useful for consumers such
as WebDriverBiDi which need to emit different error messages depending on
the reason why a specific navigation request was canceled.

Differential Revision: https://phabricator.services.mozilla.com/D223174
2024-09-25 21:25:40 +00:00
Masayuki Nakano
bfa50cbcb0 Bug 1863611 Make EventStateManager send content command events to focused remote process r=smaug
Currently, `EventStateManager` handles some content commands only in the parent
process.  Therefore, if `eSetSelection` event or something is being handled in
the focused remote process, the command may be disabled yet.

Avoiding the race conditions, we should handle the content command events in the
focused process.

Differential Revision: https://phabricator.services.mozilla.com/D222789
2024-09-20 08:12:33 +00:00
Cristian Tuns
8b350cfc18 Backed out changeset 1590ecab1ea1 (bug 1863611) for causing bc failures in browser_test_contentCommand_immediately_after_setSelection.js CLOSED TREE 2024-09-19 22:00:15 -04:00
Masayuki Nakano
61ad8758cb Bug 1863611 Make EventStateManager send content command events to focused remote process r=smaug
Currently, `EventStateManager` handles some content commands only in the parent
process.  Therefore, if `eSetSelection` event or something is being handled in
the focused remote process, the command may be disabled yet.

Avoiding the race conditions, we should handle the content command events in the
focused process.

Differential Revision: https://phabricator.services.mozilla.com/D222789
2024-09-19 22:41:20 +00:00
Gregory Pappas
585a81049b Bug 1899147 - Remove input_event_queue.supported pref r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221985
2024-09-12 15:02:28 +00:00
David Parks
7c7f364d0d Bug 1912340: Use correct principal for remotely dragged data-transfer contents r=m_kato
This comment assumes dom.events.datatransfer.protected.enabled=false.  when
dom.events.datatransfer.protected.enabled=true (which matches the spec and is
not the default), the behavior is fine as-is.

Since bug 1871222 (by one perspective) moved drag sessions from PContents to
PBrowsers, we need to update permission handling for in-process "remote"
sessions (ones that started on one PBrowser and currently target another). When
the target and source are in the same process, they don't properly handle
privileged DataTransfer access.  We are currently denying privileged access to
some in-process principals because we incorrectly use the system principal. The
system principal always happens to give the right result for out-of-process
remote sessions, which were the only kind that existed before bug 1871222.

This solution creates the "remote" DataTransfer with the "correct" (not system)
principal of its source content.  However, this misses the case where two
different browsers are at the same location (same principal) -- each would
incorrectly get privileged access to the other's DataTransfer in a drag.  We
avoid that case by limiting the change to extension processes.  This means that
remote DataTransfers created in the extension process will check for protected
access using a principal check against the drag-source-element's principal but,
otherwise, DataTransfers will continue to use the system principal for the
check.

Differential Revision: https://phabricator.services.mozilla.com/D219074
2024-08-22 18:51:52 +00:00
Hiroyuki Ikezoe
29265bc3fa Bug 1831649 - Propagate the software keyboard height change into nsPresContext. r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D204166
2024-08-06 07:46:21 +00:00
Tom Schuster
c051081043 Bug 1809713 - Make DataTransfer use Maybe<ClipboardType>. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D214585
2024-07-29 11:52:34 +00:00
Stanca Serban
b74d1bcd26 Backed out 12 changesets (bug 1831649) for causing multiple failures.
Backed out changeset 501dc3134ae1 (bug 1831649)
Backed out changeset 21235ab42839 (bug 1831649)
Backed out changeset 279fdf36aac1 (bug 1831649)
Backed out changeset 17fb50534fae (bug 1831649)
Backed out changeset b2718b2f730d (bug 1831649)
Backed out changeset a05aa1c75ece (bug 1831649)
Backed out changeset becfb23cd6b4 (bug 1831649)
Backed out changeset 2d0e7e662530 (bug 1831649)
Backed out changeset 22538f7bdc88 (bug 1831649)
Backed out changeset 4ddecb37950f (bug 1831649)
Backed out changeset 1e6ed8b78e8f (bug 1831649)
Backed out changeset 6e96a1a01c24 (bug 1831649)
2024-07-18 06:13:43 +03:00
Hiroyuki Ikezoe
56a2fb332d Bug 1831649 - Propagate the software keyboard height change into nsPresContext. r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D204166
2024-07-18 00:31:12 +00:00
Otto Länd
ee85122101 Bug 1893119: apply code formatting via Lando
# ignore-this-changeset
2024-07-04 07:52:52 +00:00
David Parks
447704fe80 Bug 1893119: Part 18 - Copy/Move MaybeAddBrowser, RemoveAllBrowsers and MustUpdateDataTransfer from nsIDragService to nsIDragSession r=geckoview-reviewers,gstoll,m_kato
MustUpdateDataTransfer is a simple function that makes more sense on
nsIDragSession.

MaybeAddBrowser records BrowserParents for processes with existing drag
sessions.  There may be such processes before the parent process
even has a drag session, so they cannot be tied to drag sessions.  We tie
them to the drag service, until the service creates a drag session in
the process, at which point we move them to the drag session.  Since
the session and service are still the same object and each now has methods
with these names, we leave part of session's implementation commented out
so that we run correctly instead of looping infinitely.  The code is
exposed when the objects separate later in the patch series.

Finally, the implementation of TakeSessionBrowserListFromService currently
amounts to a nop, but it will have substace when the service and session
are separated.

Differential Revision: https://phabricator.services.mozilla.com/D211081
2024-07-04 07:48:10 +00:00
David P
c32e8a504a Bug 1893119: Part 16 - Make nsBaseDragService weakly remember PBrowsers instead of PContents r=nika,win-reviewers,rkraesig
nsBaseDragService keeps track of the processes that might need to cancel a drag with EndDragSession and this is technically correct since the drag session is a singleton in the child process, but this series of patches changes those sessions to be per-PuppetWidget/BrowserChild.  This allows content processes to distinguish which of its browsers is engaged in a drag.

Differential Revision: https://phabricator.services.mozilla.com/D211062
2024-07-04 07:48:09 +00:00
David P
805b8742ba Bug 1893119: Part 3 - Add widget to nsContentUtils::GetDragSession r=gstoll,rkraesig
Updates each client of the nsContentUtils method to get the right drag session -- the one for the widget that is currently the source or target of the drag session.
The change to nsDOMWindowUtils::DispatchDOMEventViaPresShellForTesting() supports the change to WidgetDragEvent::InitDropEffectForTests() and enabled a
large number of test fixes in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D211067
2024-07-04 07:48:04 +00:00
David P
e15b705378 Bug 1886604: Part 2: Add synthesizeMockDragAndDrop r=edgar
Add synthesizeMockDragAndDrop test function to test elements
drag-dropped inside of Firefox.  This uses the new MockDragService to
avoid native DND.  It is a more-complete variant of synthesizeDragAndDrop
and synthesizePlainDragAndDrop.  It works by:

1. Creating the environment for the test.
2. Gathering coordinates of the source and target elements from their
respective content processes.
3. Setting up event handlers on the elements to detect any relevant events
they may receive.  This allows us to detect not only events that aren't sent
when they should be but also events that are sent that shouldn't be.
4. Synthesizing mouse events to initiate the drag-session.  This and
the remaining steps work by first telling the relevant content process(es)
what events to expect (and which not to), then sending the event, and
finally collecting the results and submitting them to mochitest.
5. Synthesizing drag events with the MockDragServiceController, to emulate
the behavior of (Windows) native drag-and-drop.  This is a coarse
approximation of the Win32 API DoDragDrop.
6. Cleaning up the event handlers.

The test does not yet try to mock things like the drag cursor image, although
that should be possible without native DND behavior.  The same is true for
some more minor aspects of the platform-specific behavior of our DND.

Differential Revision: https://phabricator.services.mozilla.com/D205641
2024-07-04 01:03:33 +00:00
Nika Layzell
279b50ebe8 Bug 1728331 - Part 4: Make ContentParent KeepAlives explicit with RAII references, r=smaug,dom-worker-reviewers,asuth
This is a fairly significant patch, however it would be difficult to break it
down into smaller patches:

1) The various mechanisms used to manage ContentParent lifecycles have been
   merged together into a common "KeepAlive" system. A process will
   begin shutdown when its keepalive count reaches 0. (though it will
   still wait for all BrowserParents to also be dead before sending the
   actual shutdown message as before).

   This replaces a number of bespoke systems for tracking BrowserParent
   instances in different lifecycle states, remote workers, ongoing
   process switches, and preallocated processes.

2) KeepAlives are now managed automatically by a UniquePtr variant
   (Unique[Threadsafe]ContentParentKeepAlive). This makes the hand-off
   over KeepAlive lifecycles explicit, even for workers.

3) All KeepAlives are now keyed by a BrowserId, which will be 0 for keepalives
   not associated with a specific tab. This allows the new process
   selection logic to count all tabs other than the one being navigated
   when deciding which process to use.

4) The process switching logic now tracks it's KeepAlive with a BrowserId,
   meaning that ongoing process switches are considered when performing
   process selection, even if the BrowserParent hasn't been created yet.

Differential Revision: https://phabricator.services.mozilla.com/D213338
2024-06-24 23:19:28 +00:00
Aron Cseh
b01be1057e Backed out 9 changesets (bug 1901851, bug 1728331) for causing remote worker crashes. a=backout
Backed out changeset 30bbda0eb197 (bug 1728331)
Backed out changeset dabd7d6836c8 (bug 1728331)
Backed out changeset 9e04f49c926e (bug 1728331)
Backed out changeset 779ac735736c (bug 1728331)
Backed out changeset 1d413fe340a0 (bug 1728331)
Backed out changeset 15608efcbeb6 (bug 1901851)
Backed out changeset f711bbec11b2 (bug 1901851)
Backed out changeset 8bb1d267d08f (bug 1901851)
Backed out changeset b29282956a04 (bug 1901851)
2024-06-22 00:52:24 +03:00