Commit Graph

2337 Commits

Author SHA1 Message Date
Greg Stoll
6b9c668503 Bug 1901197: do synchronous Content Analysis for clipboard operations on a background thread r=dlp-reviewers,ipc-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D215457
2024-07-04 01:24:53 +00:00
Bob Owen
23fd0c8083 Bug 1903523: Only preload DLLs in content process when sandbox requires it. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D215228
2024-06-28 20:03:55 +00:00
Jan-Niklas Jaeschke
914d043b7d Bug 1901064, part 1 - Preserve user activation when Fission is disabled. r=edgar,dom-core,tabbrowser-reviewers,mak,geckoview-reviewers,ohall
The code path that was used for loading a document
with fission disabled did not take user activation into account.
This made almost all WPTs for Text Fragments fail,
since they depend on this flag to decide if
a text directive is allowed to be scrolled to.

This patch makes sure that the user activation is
also available for code paths that run through
`CanonicalBrowsingContext::FixupAndLoadURIString()`
to load a document.

This is done by adding a flag `hasValidUserGestureActivation`
to the `nsIOpenWindowInfo`, which carries it through
the JS stack for loading a document.

Differential Revision: https://phabricator.services.mozilla.com/D213401
2024-06-26 14:24:35 +00:00
Nika Layzell
4a297e61cd Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-24 23:19:26 +00:00
Tom Schuster
feaa0c77a1 Bug 1904004 - Use OriginAttributes::IsPrivateBrowsing instead of open coding PBM checks. r=timhuang,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,necko-reviewers,kershaw,dom-storage-reviewers,janv,canaltinova,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D214532
2024-06-24 11:06:18 +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
Sebastian Hengst
e43a62744c Backed out 2 changesets (bug 1901064) for blocking the backout of bug 1888756
Backed out changeset 0e582d262ca8 (bug 1901064)
Backed out changeset 992a876144a0 (bug 1901064)
2024-06-21 12:07:33 +02:00
Nika Layzell
c8530b3657 Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-20 19:24:49 +00:00
Jan-Niklas Jaeschke
245ec27b92 Bug 1901064, part 1 - Preserve user activation when Fission is disabled. r=edgar,dom-core,tabbrowser-reviewers,mak,geckoview-reviewers,ohall
The code path that was used for loading a document
with fission disabled did not take user activation into account.
This made almost all WPTs for Text Fragments fail,
since they depend on this flag to decide if
a text directive is allowed to be scrolled to.

This patch makes sure that the user activation is
also available for code paths that run through
`CanonicalBrowsingContext::FixupAndLoadURIString()`
to load a document.

This is done by adding a flag `hasValidUserGestureActivation`
to the `nsIOpenWindowInfo`, which carries it through
the JS stack for loading a document.

Differential Revision: https://phabricator.services.mozilla.com/D213401
2024-06-20 15:00:31 +00:00
Cristian Tuns
cd4bca3a0a Backed out 8 changesets (bug 1901851, bug 1728331) for causing bc failures in browser_docshell_type_editor.js CLOSED TREE
Backed out changeset 2cf5cad90099 (bug 1728331)
Backed out changeset d920c2d72d00 (bug 1728331)
Backed out changeset 9e5bd0186aa6 (bug 1728331)
Backed out changeset 45735575df21 (bug 1728331)
Backed out changeset fbafea1663e3 (bug 1901851)
Backed out changeset 30bdf88d3bb7 (bug 1901851)
Backed out changeset 1d994915bd71 (bug 1901851)
Backed out changeset 0b3249432b9c (bug 1901851)
2024-06-19 20:51:53 -04:00
Nika Layzell
b5bd2ffdef Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-19 20:14:48 +00:00
Bob Owen
3e68592f61 Bug 1901554 p2: Preload DLLs and add registry access for WMF software encoding. r=handyman
We will be able to remove these once encoding is moved to a utility process.

Differential Revision: https://phabricator.services.mozilla.com/D213257
2024-06-14 10:39:56 +00:00
Bob Owen
06c48c40a8 Bug 1901550: Call GetCpuFrequencyMHz to cache the value before lowering sandbox. r=handyman
This function reads the registry and will be blocked with USER_RESTRICTED access
token level.

Differential Revision: https://phabricator.services.mozilla.com/D213255
2024-06-14 10:39:55 +00:00
Bob Owen
1e8e9f32be Bug 1901514: Preload dbghelp.dll before sandbox lowering in content processes in debug builds. r=handyman
This DLL is sometimes loaded during debug tests runs.

Differential Revision: https://phabricator.services.mozilla.com/D213253
2024-06-14 10:39:54 +00:00
Bob Owen
d092b3f438 Bug 1739831: Preload textshaping.dll before sandbox lowering in content processes. r=handyman
This is used by DirectWrite in some fallback scenarios.

Differential Revision: https://phabricator.services.mozilla.com/D213251
2024-06-14 10:39:53 +00:00
Bob Owen
be4161f048 Bug 1901503: Preload softokn3.dll and freebl3.dll before sandbox lowering in content processes. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D213250
2024-06-14 10:39:53 +00:00
Bob Owen
c6ef110ac5 Bug 1900990: Preload avrt.dll before sandbox lowering in content processes. r=handyman
This will fail with USER_RESTRICTED access token and is required for audio
processing.

Differential Revision: https://phabricator.services.mozilla.com/D213248
2024-06-14 10:39:52 +00:00
Alexandre Lissy
01de72ed38 Bug 1884378 - SandboxProfiler integration within processes r=padenot,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D213216
2024-06-14 10:17:38 +00:00
Nika Layzell
11d3698341 Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-06-05 00:06:48 +00:00
Norisz Fay
ed9f22a2fc Backed out changeset 1034029ae9ed (bug 1681457) for causing failures on test_window_close.html CLOSED TREE 2024-06-01 00:10:26 +03:00
Nika Layzell
7025bc892e Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-05-31 17:27:15 +00:00
Sean Feng
e58c698426 Bug 1894265 - Ensure spectre mitigation for fission content process can only be disabled when ORB is enabled r=nika,jandem
Differential Revision: https://phabricator.services.mozilla.com/D210727
2024-05-21 13:36:03 +00:00
az
f6bfa61fd9 Bug 1889129 - Remove Android codec support probe from content process initialization r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D209177
2024-05-06 19:30:28 +00:00
Olli Pettay
142218144b Bug 1892278 - Add a pref'ed off memory-pressure when a content process moves to background, r=kaya
Differential Revision: https://phabricator.services.mozilla.com/D207898
2024-04-18 20:21:11 +00:00
Sean Feng
0f45ff8550 Bug 1884870: Clear ancestors' focus when child document loses the focus r=hsivonen,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D205135
2024-03-27 20:48:28 +00:00
aiunusov
14a031c1cc Bug 1883869 - Make ContentProcessMessageManager::LoadScript become fallible r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D204612
2024-03-20 11:57:04 +00:00
Edgar Chen
fec46e51b8 Bug 1858627 - Use ManagedEndpoint for PClipboardReadRequest construction; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D201657
2024-03-13 20:44:06 +00:00
Cristian Tuns
4e35ce0b65 Backed out 4 changesets (bug 1858627) for causing build bustages with "-p style --lib" CLOSED TREE
Backed out changeset 7f3f50c77406 (bug 1858627)
Backed out changeset 96327aab8126 (bug 1858627)
Backed out changeset 0655d0feb163 (bug 1858627)
Backed out changeset d3a1b3ac7611 (bug 1858627)
2024-03-13 05:23:51 -04:00
Edgar Chen
de46d58509 Bug 1858627 - Use ManagedEndpoint for PClipboardReadRequest construction; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D201657
2024-03-13 01:07:16 +00:00
Norisz Fay
6b73c14ada Backed out 4 changesets (bug 1858627) for causing build bustage CLOSED TREE
Backed out changeset eaf5e6b7ddd4 (bug 1858627)
Backed out changeset 9efc1874ac78 (bug 1858627)
Backed out changeset 8f4ca2ab875b (bug 1858627)
Backed out changeset 02f94f12c3ef (bug 1858627)
2024-03-13 01:47:31 +02:00
Edgar Chen
81db36e2b8 Bug 1858627 - Use ManagedEndpoint for PClipboardReadRequest construction; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D201657
2024-03-12 21:51:52 +00:00
Natalia Csoregi
c447e5b344 Backed out 4 changesets (bug 1858627) for causing clipboard/paste failures. CLOSED TREE
Backed out changeset ad694926aa45 (bug 1858627)
Backed out changeset aca702ea720f (bug 1858627)
Backed out changeset 1d5175296606 (bug 1858627)
Backed out changeset 05b957fe3079 (bug 1858627)
2024-03-06 11:52:20 +02:00
Edgar Chen
1ccdda25b5 Bug 1858627 - Use ManagedEndpoint for PClipboardReadRequest construction; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D201657
2024-03-06 00:30:58 +00:00
Gabriele Svelto
e1e9346196 Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Paul Zuehlcke
3ca315fcd6 Bug 1865749 - Update CookieServiceChild cookie list on storage access grant. r=cookie-reviewers,bvandersloot,valentin
Differential Revision: https://phabricator.services.mozilla.com/D199266
2024-02-09 17:28:06 +00:00
Stanca Serban
7c361328fa Backed out 2 changesets (bug 1865749) for causing mochitests failures.
Backed out changeset 967745446a3f (bug 1865749)
Backed out changeset 77f629fe7298 (bug 1865749)
2024-02-08 21:15:38 +02:00
Paul Zuehlcke
caf4932531 Bug 1865749 - Update CookieServiceChild cookie list on storage access grant. r=cookie-reviewers,bvandersloot,valentin
Differential Revision: https://phabricator.services.mozilla.com/D199266
2024-02-08 15:26:21 +00:00
Byron Campen
41c01396bd Bug 1876526: Make cubeb singleton refcounted. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D200178
2024-02-08 13:08:29 +00:00
Natalia Csoregi
0533973f49 Backed out 3 changesets (bug 1876526) for causing crashes due to CubebDeviceEnumerator.cpp. CLOSED TREE
Backed out changeset 2d60a4692649 (bug 1876526)
Backed out changeset cd358cbc7365 (bug 1876526)
Backed out changeset 60c24f7a2294 (bug 1876526)
2024-02-07 21:29:11 +02:00
Byron Campen
03d62f28e2 Bug 1876526: Make cubeb singleton refcounted. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D200178
2024-02-07 15:36:22 +00:00
Makoto Kato
8c7a39e69f Bug 1586471 - Part 3. Allow to drop data from external application on GeckoView. r=dom-core,geckoview-reviewers,amejiamarmol,edgar
The dropped item is set on drop event handler in Android. Current
Gecko's implementation caches dropped item as `DataTransfer` when any
drag events are fired. It will works on desktop platform, but doesn't
on GeckoView. Even if drop item is set by handling drop event,
`DataTransfer`'s cache isn't refreshed.

So if drop event is received, we re-fill DataTransfer on GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D197331
2024-01-28 07:49:53 +00:00
Nika Layzell
88d10dcf09 Bug 1874739 - Part 11: Make PWebBrowserPersistDocument refcounted, r=ipc-reviewers,mccr8
This is part of removing [ManualDealloc] from all protocols which manage other
protocols.

Differential Revision: https://phabricator.services.mozilla.com/D198621
2024-01-19 20:23:21 +00:00
Nika Layzell
944d7769da Bug 1874739 - Part 10: Make PTestShell refcounted, r=ipc-reviewers,mccr8
This is part of removing [ManualDealloc] from all protocols which manage other
protocols.

Differential Revision: https://phabricator.services.mozilla.com/D198620
2024-01-19 20:23:21 +00:00
Nika Layzell
b8e00bdc5f Bug 1874739 - Part 9: Make PSpeechSynthesis refcounted, r=eeejay
This is part of removing [ManualDealloc] from all protocols which manage other
protocols.

Differential Revision: https://phabricator.services.mozilla.com/D198619
2024-01-19 20:23:21 +00:00
Tooru Fujisawa
9fb2cbc815 Bug 1873330 - Part 5: Add UserActivation::Modifiers parameters for window.open-related functions. r=smaug
Pass UserActivation::Modifiers from nsGlobalWindowOuter::OpenInternal
to nsPIWindowWatcher.openWindowWithRemoteTab, through the following interfaces
and protocol:
  * nsPIWindowWatcher.openWindow2
  * nsIWindowProvider.provideWindow
  * PContent.CreateWindow or PContent.CreateWindowInDifferentProcess
  * nsPIWindowWatcher.openWindowWithRemoteTab

Differential Revision: https://phabricator.services.mozilla.com/D197863
2024-01-11 17:24:03 +00:00
Jonathan Watt
61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt
370a929ccb Bug 1865918 p4. Update CreateContentViewerForActor to reflect nsIDocumentViewer's new name. r=emilio
Depends on D194289

Differential Revision: https://phabricator.services.mozilla.com/D194290
2023-11-22 13:50:57 +00:00
Jonathan Watt
efb5a74fbc Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
Andrew McCreight
3500853294 Bug 1859535, part 1 - Remove dead code from nsPluginHost. r=dom-core,sefeng
Technically IncrementChromeEpoch is called, but the value is never used.

Also remove some unused includes.

Differential Revision: https://phabricator.services.mozilla.com/D191188
2023-11-20 17:44:19 +00:00
Edgar Chen
a3fe0c33fa Bug 1852947 - Redesign the async clipboard read API; r=nika
In bug 1755863, we introduce two async APIs in `nsIClipboard` to make async
clipboard API reads the clipboard data asynchronously. When reading, async
clipboard API first check the available types, and then retrieve the actual data
for that type. This process has a potential race condition: the clipboard content
might change between the time between the time we check the types and when we
retrieve the data. Although we currently fetch the actual data immediately after
checking available types (in line with the spec), this minimizes the chance of
encountering this race condition. However, if we would like to support retrieving
the data only when `getType()` is invoked (bug 1691825), this potential race
condition could become a significant issue.

Furthermore, bug 1777448 aims to have a way to track the clipboard data and suppress
the paste context menu when the clipboard data originates from a same-origin page.
This also requires a better way to track read requests, clipboard content and
invalidate the request when the system's clipboard content is changed.

After some refacting around nsBaseClipboard, all platform now use sequence
number to track clipboard content, so `nsIAsyncGetClipboardData` can be associated
with a sequence number and deemed invalid if the associated sequence number isn't
matched the latest system value.

With these new API, it also becomes possible to write some tests.

Depends on D191409

Differential Revision: https://phabricator.services.mozilla.com/D182108
2023-11-14 09:21:24 +00:00