Commit graph

987634 commits

Author SHA1 Message Date
Stephen A Pohl
079a60b807 Bug 1833923: Start detecting when the Fn key is pressed on macOS, which allows for built-in macOS shortcuts (such as Fn+e for the emoji picker) to start working. r=masayuki, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D235051
2025-01-21 18:38:30 +00:00
Stephen A Pohl
ac23821998 Bug 1855346: Ensure that menu items added by macOS also don't execute commands when we expect all commands to be suppressed. Inspired by research by :chesterbr and :bintoro, and a patch by :chesterbr. r=mstange a=RyanVM 2024-11-02 02:13:05 +00:00
stransky
7f9d4c2f2c Bug 1908196 [Linux] Drag&Drop - try to get text/uri-list first and convert it to text/x-moz-url r=emilio a=RyanVM
Try to get  text/uri-list first and then fallback to text/x-moz-url.
text/x-moz-url MIME tends to be poorly supported by third party apps,
we got only one file instead of file list or nothing at all.

Differential Revision: https://phabricator.services.mozilla.com/D231160
2024-12-05 12:48:33 +00:00
Sean Feng
781ee9b6ac Bug 1889406 - Notify the focus/active BC to content process for subframes when BrowserParent is first created r=dom-core,hsivonen a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D221534
2024-09-19 17:10:51 +00:00
Andrew Osmond
cd9ded6063 Bug 1936601. r=lsalzman a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D234803

Differential Revision: https://phabricator.services.mozilla.com/D234973
2025-01-21 17:54:30 +00:00
John Schanck
681c87d49d Bug 1930028 - relax focus requirement for conditional WebAuthn get request. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D234570

Differential Revision: https://phabricator.services.mozilla.com/D235032
2025-01-21 17:53:36 +00:00
Kagami Sascha Rosylight
4a2a47858d Bug 1941210 - Strongly grab FetchStreamReader while waiting for writing a=RyanVM
Nothing strongly grabs ReadableStream nor FetchStreamReader while waiting for nsIAsyncOutputStream to respond. mAsyncWaitReader should now strongly grab the reader until the output stream responds.

Original Revision: https://phabricator.services.mozilla.com/D234031

Differential Revision: https://phabricator.services.mozilla.com/D234838
2025-01-21 14:19:52 +00:00
Kagami Sascha Rosylight
3c5adfebf2 Bug 1939295 - Add OutputStreamHolder a=RyanVM
Similar to InputStreamHolder, this adds OutputStreamHolder to FetchStreamReader:

1. OutputStreamHolder is not part of the cycle collection but is freed when FetchStreamReader goes away
2. nsIAsyncOutputStream holds OutputStreamHolder which only weakly hold FetchStreamReader, allowing FetchStreamReader to be cycle collected.
3. GlobalTeardownObserver is not added here as we only accept JS ReadableStream here instead of nsIInputStream, which is part of the cycle collection unlike nsIInputStream.

Original Revision: https://phabricator.services.mozilla.com/D233553

Differential Revision: https://phabricator.services.mozilla.com/D233934
2025-01-21 14:19:51 +00:00
Valentin Gosu
dfa27511a2 Bug 1940508 - Add null check to HandshakeDoneInternal before using mTransaction r=necko-reviewers,jesup a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D233563
2025-01-08 22:45:14 +00:00
Emilio Cobos Álvarez
9d4d229f61 Bug 1919414 - Don't use Gecko's pages per sheet code in the native print dialog. r=dholbert, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D232628
2024-12-19 17:58:42 +00:00
Andrew Osmond
0da259d042 Bug 1794360 - Fail to clone ImageBitmap if no data surface available. r=gfx-reviewers,lsalzman a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D229927
2024-11-22 14:59:39 +00:00
ffxbld
3151d7494c No Bug, mozilla-esr128 repo-update HSTS HPKP remote-settings - a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D234822
2025-01-20 13:16:10 +00:00
David Shin
e1cd5a9300 Bug 1938927: Cyclic dependencies consisting only of non-computed custom properties should not mark any non-custom property as invalid-at-computed time. r=firefox-style-system-reviewers,emilio a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D232858
2025-01-06 14:00:03 +00:00
Nicolas Chevobbe
cd9b1a656c Bug 1845152 - [devtools] Make sure the input is focused before triggering keyboard event in setProperty. r=devtools-reviewers,ochameau a=test-only
Differential Revision: https://phabricator.services.mozilla.com/D233821
2025-01-13 14:39:33 +00:00
Paul Zuehlcke
81d6efa641 Bug 1932555, a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D231928

Differential Revision: https://phabricator.services.mozilla.com/D234663
2025-01-18 17:10:55 +00:00
Andrew Osmond
14d6750744 Bug 1936844. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D231955

Differential Revision: https://phabricator.services.mozilla.com/D234037
2025-01-18 17:08:49 +00:00
Emilio Cobos Álvarez
be57358481 Bug 1940994 - Simplify XUL tree image cache a bit. r=dholbert, a=RyanVM 2025-01-16 20:56:25 -05:00
Lee Salzman
adc035d41f Bug 1939583. r=aosmond a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D233969
2025-01-13 18:08:16 +00:00
Randell Jesup
7ac5f6d340 Bug 1938469: Clean up Cancel() r=bwc,necko-reviewers,kershaw a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D233437
2025-01-10 17:04:43 +00:00
Tooru Fujisawa
23dedf3bdc Bug 1939710 - Add ScriptSource reader before getting the units. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D234130

Differential Revision: https://phabricator.services.mozilla.com/D234518
2025-01-17 01:21:09 +00:00
ffxbld
b0d3fa9f64 No Bug, mozilla-esr128 repo-update HSTS HPKP remote-settings tld-suffixes - a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D234482
2025-01-17 00:55:44 +00:00
Rob Wu
2502103aef Bug 1932263 - Support persistent listeners in notifications API a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D232859

Differential Revision: https://phabricator.services.mozilla.com/D232944
2025-01-15 16:02:38 +00:00
Andreas Pehrson
3b44fd107c Bug 1920264 - Add crashtest. r=jmaher a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D224560

Differential Revision: https://phabricator.services.mozilla.com/D232484
2025-01-15 13:37:13 +00:00
Andreas Pehrson
8e3846cc98 Bug 1920264 - Don't key CamerasChild callbacks on CaptureEngine. a=RyanVM
Capture id is already unique.

Original Revision: https://phabricator.services.mozilla.com/D223970

Differential Revision: https://phabricator.services.mozilla.com/D232483
2025-01-15 13:37:13 +00:00
Andreas Pehrson
a9bb060835 Bug 1918746 - Don't stop video capturers before reconfiguring them. a=RyanVM
Already today we reconfigure capturers without stopping them in cases where they
are shared between multiple gUM/gDM requests: We find the device capability
(for cameras) that satisfies all the requested capabilities (downscaling, frame
dropping allowed) and call StartCapture again with that.

Thus, there is no concern about camera backends not supporting this call
sequence.

Desktop capture backends have a simpler API (only Start, for Stop they have to
be destroyed) and are not actually re-started. Resolution is always captured in
full and frame rate is controlled by the timer that triggers CaptureFrame().

This patch makes content processes not request capture to be stopped when
updating their requested capability. This means the path described above will be
exercised more. This also brings with it some invariants that no longer hold,
but are handled explicitly instead: capabilities for a captureId may now be
updated on the fly, without prior removal.

Original Revision: https://phabricator.services.mozilla.com/D222242

Differential Revision: https://phabricator.services.mozilla.com/D232482
2025-01-15 13:37:13 +00:00
Andreas Pehrson
8052ab5fcf Bug 1918996 - Use SCShareableContentStyleNone on macOS 15. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D222270

Differential Revision: https://phabricator.services.mozilla.com/D232481
2025-01-15 13:37:12 +00:00
Andreas Pehrson
a17385e9ad Bug 1918096 - Enable SCContentSharingPicker by default (limited to macOS 15). a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D221997

Differential Revision: https://phabricator.services.mozilla.com/D232480
2025-01-15 13:37:12 +00:00
Andreas Pehrson
14bdfde828 Bug 1918096 - Make SckPickerHandle thread safe. a=RyanVM
We cannot guarantee that the thread it is used on is static, as both the
VideoCapture and DesktopCapture threads can come and go.

Original Revision: https://phabricator.services.mozilla.com/D222082

Differential Revision: https://phabricator.services.mozilla.com/D232479
2025-01-15 13:37:11 +00:00
Andreas Pehrson
29a1a17e5e Bug 1918096 - In ScreenCapturerSck skip some processing when possible. a=RyanVM
No need to update the last frame unless it has changed.

Original Revision: https://phabricator.services.mozilla.com/D221942

Differential Revision: https://phabricator.services.mozilla.com/D232478
2025-01-15 13:37:11 +00:00
Andreas Pehrson
d701b54d00 Bug 1918096 - In ScreenCapturerSck adapt to sources that change resolution. a=RyanVM
If the resolution is smaller than the allocated surface, we crop.
If the resolution is larger than the allocated surface, we reconfigure with a
larger surface.

The allocated surface has the size we told it to have in the
SCStreamConfiguration, in pixels.

If the source is a screen, the size is pretty static. Changing display settings
  could affect it.
If the source is a window, the size is initially the size of the window. The
  user resizing the window affects the size.
If the source is multiple windows, the size initially seems to be that of the
  display they're sitting on. Windows across multiple displays are not captured
  into the same surface, as of macOS 14.

Original Revision: https://phabricator.services.mozilla.com/D221941

Differential Revision: https://phabricator.services.mozilla.com/D232477
2025-01-15 13:37:11 +00:00
Andreas Pehrson
4b571c5078 Bug 1918096 - In ScreenCapturerSck improve dictionary ergonomics. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D221940

Differential Revision: https://phabricator.services.mozilla.com/D232476
2025-01-15 13:37:10 +00:00
Andreas Pehrson
a1ab9c47be Bug 1918096 - Reject gUM/gDM request if video track ends before first frame. a=RyanVM
This case gets hit if the SCContentSharingPicker is cancelled by the user.

Original Revision: https://phabricator.services.mozilla.com/D221854

Differential Revision: https://phabricator.services.mozilla.com/D232474
2025-01-15 13:37:10 +00:00
Andreas Pehrson
5d960a5dff Bug 1918096 - Wire up SCContentSharingPicker using Pipewire desktop capture UX. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D221853

Differential Revision: https://phabricator.services.mozilla.com/D232473
2025-01-15 13:37:09 +00:00
Andreas Pehrson
214997aab3 Bug 1918096 - Generate libwebrtc moz.build files. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D221852

Differential Revision: https://phabricator.services.mozilla.com/D232472
2025-01-15 13:37:09 +00:00
Andreas Pehrson
7478866e66 Bug 1918096 - Integrate SCContentSharingPicker into ScreenCapturerSck. a=RyanVM
This works by creating ScreenCapturerSck with a sck_allow_system_picker
DesktopCaptureOptions flag.

The flow is similar to the Pipewire capturer in that SelectSource has no effect.
Start() brings up the system picker, and:
- automatically starts capture on selection, also reconfigures on future
  selection changes.
- signals a stop by setting the permanent error flag on cancel or error.

The system picker is configured for both single display and multiple windows to
give users as much power over what they share as possible. There is an
application mode also, but other browsers are not allowing access to that as of
now.

Original Revision: https://phabricator.services.mozilla.com/D221851

Differential Revision: https://phabricator.services.mozilla.com/D232471
2025-01-15 13:37:09 +00:00
Andreas Pehrson
f0386c29c1 Bug 1915562 - Enable ScreenCaptureKit backend for screen sharing. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D220566

Differential Revision: https://phabricator.services.mozilla.com/D232470
2025-01-15 13:37:08 +00:00
Andreas Pehrson
fa3604412d Bug 1915562 - For the SCK backend, Add a pref to allow enumerating displays with the CG backend. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D220565

Differential Revision: https://phabricator.services.mozilla.com/D232469
2025-01-15 13:37:08 +00:00
Andreas Pehrson
785cdf2355 Bug 1914837 - Always initialize DesktopCapturer::pid. a=RyanVM
This member is patched on top of libwebrtc. New backends could be added from
under us. It needs to be initialized.

Original Revision: https://phabricator.services.mozilla.com/D220265

Differential Revision: https://phabricator.services.mozilla.com/D232468
2025-01-15 13:37:07 +00:00
Andreas Pehrson
d6ac71e87e Bug 1914837 - Simplify DesktopDeviceInfo and friends. a=RyanVM
This removes a lot of duplicate code with some help from templates.
It also brings the code in DesktopDisplayDevice and DesktopTab into the realm of
C++.

Original Revision: https://phabricator.services.mozilla.com/D220264

Differential Revision: https://phabricator.services.mozilla.com/D232467
2025-01-15 13:37:07 +00:00
Andreas Pehrson
cb97531101 Bug 1915082 - From ScreenCapturerSck request frames in sRGB colorspace. a=RyanVM
The desktop capture path has no colorspace handling for RGB, and libyuv assumes
sRGB by default. ScreenCaptureKit returns frames in the display's colorspace
unless told otherwise. On modern macs this is 'Display P3' and will render
inaccurately when interpreted as sRGB.

Original Revision: https://phabricator.services.mozilla.com/D220219

Differential Revision: https://phabricator.services.mozilla.com/D232466
2025-01-15 13:37:07 +00:00
Andreas Pehrson
703748e91e Bug 1914835 - With ScreenCaptureKit embed the mouse cursor directly. a=RyanVM
The MouseCursorMonitor on macOS is rather expensive, as for every pulled frame
it compares all pixels of the cursors used for the current and last frames.
Getting to the pixels may also incur a conversion.

Note that this comparison happens even if the backend reports it had embedded
the cursor already, as the embedding only affects composing the monitored cursor
into a captured frame.

Original Revision: https://phabricator.services.mozilla.com/D220092

Differential Revision: https://phabricator.services.mozilla.com/D232465
2025-01-15 13:37:06 +00:00
Andreas Pehrson
9c82df3fbe Bug 1914196 - Wire up a startup pref to enable the ScreenCaptureKit backend. a=RyanVM
It is a startup pref since the source ids enumerated by a backend are usually
tied to that backend, so we do not want to allow switching backend between
enumeration and start of capture.

Original Revision: https://phabricator.services.mozilla.com/D219815

Differential Revision: https://phabricator.services.mozilla.com/D232464
2025-01-15 13:37:06 +00:00
Andreas Pehrson
91fe3f2303 Bug 1914196 - Simplify how prefs are set on DesktopCaptureOptions. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D219814

Differential Revision: https://phabricator.services.mozilla.com/D232463
2025-01-15 13:37:05 +00:00
Andreas Pehrson
287e88affc Bug 1914196 - Build with ScreenCaptureKit on macOS. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D219813

Differential Revision: https://phabricator.services.mozilla.com/D232462
2025-01-15 13:37:05 +00:00
Andreas Pehrson
ac30135b8d Bug 1914196 - Generate webrtc moz.build files. a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D219812

Differential Revision: https://phabricator.services.mozilla.com/D232461
2025-01-15 13:37:04 +00:00
Andreas Pehrson
0665a7ffc2 Bug 1914196 - Cherry-pick upstream libwebrtc commit c2f0260894 a=RyanVM
Upstream commit: https://webrtc.googlesource.com/src/+/c2f02608946e393367edf31bc7d4888c23002576
       Restrict ScreenCaptureKit capturer to macOS 14+.

       ScreenCapturerSCK uses some fields that were not available in macOS 13
       but the code compiles with the older SDK because of missing annotations
       that were added in the macOS 15 SDK.

       Bug: chromium:351843815
       Change-Id: Ic1a89b4cab43d6ee81d447ccc33ef94439752c45
       Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356860
       Reviewed-by: Alexander Cooper <alcooper@chromium.org>
       Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
       Cr-Commit-Position: refs/heads/main@{#42624}

Original Revision: https://phabricator.services.mozilla.com/D219811

Differential Revision: https://phabricator.services.mozilla.com/D232460
2025-01-15 13:37:04 +00:00
Andreas Pehrson
694cef13a7 Bug 1914196 - Cherry-pick upstream libwebrtc commit 2086ff5d33 a=RyanVM
Upstream commit: https://webrtc.googlesource.com/src/+/2086ff5d33facefe4624d65ad0d1e96c7b872f57
       Mac SCK capturer: Set per-frame capture_time_ms and DPI values.

       This sets the correct frame DPI according to the pixels/DIPs ratio.
       It also sets the capture_time_ms for consistency with ScreenCapturerMac.

       Bug: chromium:327458809
       Change-Id: Ibb0074756e262dd1ce6f2897f60f0d939ddb7fd3
       Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355442
       Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
       Reviewed-by: Alexander Cooper <alcooper@chromium.org>
       Auto-Submit: Lambros Lambrou <lambroslambrou@chromium.org>
       Cr-Commit-Position: refs/heads/main@{#42534}

Original Revision: https://phabricator.services.mozilla.com/D219810

Differential Revision: https://phabricator.services.mozilla.com/D232459
2025-01-15 13:37:04 +00:00
Andreas Pehrson
5ec5a92598 Bug 1914196 - Cherry-pick upstream libwebrtc commit 3069c60ada a=RyanVM
Upstream commit: https://webrtc.googlesource.com/src/+/3069c60adafff3a40ec679c29f9e685f9ac59a45
       Add desktop-capture option for ScreenCaptureKit on macOS.

       This option will allow clients to control which ScreenCapturer is used,
       for versions of macOS that support ScreenCaptureKit. The default is to
       use the previous code, to avoid breaking current users of the module.

       Bug: chromium:327458809
       Change-Id: Ib0f9390c85d726016a39eea4fda9b8bd14a094c3
       Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355020
       Reviewed-by: Alexander Cooper <alcooper@chromium.org>
       Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
       Cr-Commit-Position: refs/heads/main@{#42518}

Original Revision: https://phabricator.services.mozilla.com/D219809

Differential Revision: https://phabricator.services.mozilla.com/D232458
2025-01-15 13:37:03 +00:00
Andreas Pehrson
c795c04b44 Bug 1914196 - Cherry-pick upstream libwebrtc commit d4a6c3f76f a=RyanVM
Upstream commit: https://webrtc.googlesource.com/src/+/d4a6c3f76fc3b187115d1cd65f4d1fffd7bebb7c
       New macOS screen-capturer which uses ScreenCaptureKit.

       This supports:
       * Full-screen capture from any display, via SelectSource().
       * Changing the display, via SelectSource(), while capture is running.
       * Handling screen-resolution changes while capture is running.
       * Capturing from high-DPI displays at their native resolution.
       * Basic damage-tracking: the frame's updated-region is either set to
         empty, or the full frame area.

       It currently does not support:
       * Window capture.
       * Excluded windows.
       * Full-desktop capture across all displays.
       * More detailed damage-tracking.

       The capturer is not yet enabled. Followup CLs will add a
       DesktopCaptureOption to enable this capturer on supported versions of
       macOS.

       Bug: chromium:327458809
       Change-Id: Ie619f6c6c1d6edf0fb9320d4fece578754a732dc
       Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352544
       Reviewed-by: Johannes Kron <kron@webrtc.org>
       Reviewed-by: Alexander Cooper <alcooper@chromium.org>
       Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
       Cr-Commit-Position: refs/heads/main@{#42510}

Original Revision: https://phabricator.services.mozilla.com/D219808

Differential Revision: https://phabricator.services.mozilla.com/D232457
2025-01-15 13:37:03 +00:00
Alex Franchuk
d5f15ed6e6 Bug 1940763 - Load all available locales in the crash reporter client a=RyanVM
This includes the embedded en-US locale. This way, no matter what
happens, we will only crash due to localization if we have a logic error
like not adding a localization string id to the fluent file.

Original Revision: https://phabricator.services.mozilla.com/D233760

Differential Revision: https://phabricator.services.mozilla.com/D234211
2025-01-15 02:58:48 +00:00