feat: Port all patches to Electron 42#135
Merged
Merged
Conversation
* workflows: Copy across BrightSign CI workflows from dev. * workflows: Temp change to debug new auth method * workflows: Another temp hack to debug * workflows: Another temp hack to debug * workflows: Change to use Github App authentication instead of using a PAT token. * workflows: Use version of ec2 runner with a fix for authentication in stop case. * workflows: Update ec2 runner version again. * workflows: Update to an AMI image that has pkg-config installed. * workflows: Use new leave_ec2_instance_running debug parameter from the ec2 runner action * workflows: Temp hack to stop EC2 instances being terminated after test run to debug failures. * workflows: Update to the ami that has pkg-config installed. * workflows: Update to a newer ami image that has dependencies installed properly. * workflows: Remove hack that set leave_ec2_instance_running to true for debugging purposes. * workflows: Switch to correct AWS account. OS-14873: Switch to using chromium export_tarball.py (#10) * workflows: Switch to using chromium export_tarball.py to create src tarball for release * workflows: Use ELECTRON_VERSION env var when calling export_tarball.py * workflows: Add missing $ when accessing env.SOURCE_RELEASE_FILE_NAME * workflows: Set src tarball upload to be after gclient sync again * workflows: Fix electron_package_name from .tgz to .gz * workflows: Remove commented out line Cherry picked from: 23ffb1e: feat: OS-14592 Create BrightSign CI workflows 5027fb7: OS-14873: Switch to using chromium export_tarball.py (#10) actions: Disable GPU when run unit tests on CI Cherry picked from: 6353866: feat: OS-14592 Create BrightSign CI workflows 367fa4d: actions: Disable GPU when run unit tests on CI actions: Fixes to github actions for electron 36 actions: Update sccache to v0.10.0 Cherry picked from: 997b44e: feat: OS-14592 Create BrightSign CI workflows 5e56953: actions: Fixes to github actions for electron 36 f35dc7d: actions: Update sccache to v0.10.0
Increase disk image size from 150GB to 200GB to resolve out of space failures during CI builds. Update ec2-image-id to the new AMI (ami-0aa7bb41d6a04e736) built with the larger disk.
…uild This target has been removed
* transparent redirect: Make redirects from one file to another transparent * webRequest: Add new test case to api-web-request-spec for transparent and normal redirects fix: Clear content-type and last modified from file fetches: OS-16593 (#39) Clear content-type and last modified from file fetches: OS-16593 Cherry picked from: 67a9eec: feat: OS-14993 Make redirects from one file to another transparent (#12)
…#11) file urls: Path to force mime sniffing for file urls in Chromium fix: Patch mime sniffer for html utf8 bom, svg and xml files OS-16547 (#37) * fix: mime sniffer handle html utf8 bom, svg files and xml comments OS-16547 * fix: stop binary sniffer overriding mime type for xml files Cherry picked from: 96b26cf: feat: OS-14967 Patch to force mime sniffing for file urls in Chromium (#11) 782601e: fix: Patch mime sniffer for html utf8 bom, svg and xml files OS-16547 (#37)
Description of Change Allow the passing of a quota to the session.fromPartition() API. This patch allows partitions to have a quota size, which in turn persuades the storage manager to run a garbage collector(at specific times) to free reclaimable storage space. Checklist - [x] PR description included and stakeholders cc'd - [x] npm test passes - [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md) - [x] relevant documentation is changed or added - [x] [PR release notes](https://github.com/electron/clerk/blob/master/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/master/README.md#examples). Release Notes notes: Allow the passing of a quota to the session.fromPath() API. Cherry picked from: 571273c: feat : backport, Allow partitions to have app set quotas OS-14197 (#14)
* wayland: Add BrightSign custom set-z-index feature A custom feature has been added to BrightSign Weston server to enable a z-index to be set to top level xdg windows. This patch adds the functionality into third_party/wayland and chromium ui/ozone/platform/wayland. * wayland: Add fixup patch to add missing include * fixup: Fix for storage quota test case Cherry picked from: 0cf7a25: feat: Add BrightSign custom set-z-index feature to Wayland (#17)
OS-14345: Add a webpreference to disable pinch to zoom In chromium pinch to zoom can be disabled globally using the command line switch disable-pinch. BrightSign has a requirement to beable to disable pinch to zoom at a browser window level. This patch adds enable_pinch_zoom as a webpreference and sets its value in RenderWidgetHostViewEventHandler. The webpreference will present on all platforms, but the change to set it is only present in aura (linux). The webpreference will only be used if disable-pinch has not been set on the command line. Cherry picked from: 370cbab: feat: Add a webpreference to disable pinch to zoom (#24)
Weston backend refuses to send deletion requests outside selection area. Newly written text is in selection area, but old text is not. This casues old text to be not deletable. Deleting outside the selection area doesn't seem to be a problem as in EXO window manager mentioned in the code comment. Cherry picked from: 996ca5b: fix: Fix weston-keyboard backspace problem with existing text
wayland: Retry display server connection before giving up Brightsign weston server instance might not be up when Electron tries to connect to it. Added a patch to force 5 retries one second apart before giving up on it. Co-authored-by: Caner Altinbasak <cal@brightsign.biz> Cherry picked from: 7daf599: fix: Retry wayland display server connection before giving up (#29)
Electron doesn't support setting the opacity of the BrowserWindow on Linux platforms. Brightsign added support for changing the opacity of the window via wayland extensions. This is now a valid test for Linux. squash this to Add support for changing opacity on ozone wayland platform Cherry picked from: e355132: fix: Fix setOpacity test
This patch uses a the BrightSign SetZOrderLevel custom Weston extension to enable setting an absolute z-order for a window. Upstream-Status: Unsuitable Cherry picked from: 5a51e91: feat: Add bs z-order absolute level
This change adds a call to SetOpacity for OZONE_PLATFORM_WAYLAND. It requires patches to Chromium that are included in the BrightSign Electron repo which contain the Chromium changes for supporting SetOpacity in the ozone wayland code. Upstream-Status: Unsuitable Cherry picked from: e16d7f0: feat: Add support for changing opacity on ozone wayland platform
Electron provides no implementation for SetIgnoreMouseEvents when using Wayland. This patch provides uses the Chromium mouse lock functionality to achieve a way of ignoring mouse events when using Wayland. The change goes together with changes in our Electron App to listen to the "focus" event and trigger a call to setIgnoreMouseEvents. This allows us to workaround the issue of mouse lock being automatically disabled when a BrowserWindow gains focus. Using mouse lock for disabling mouse events works fine for our use case. Cherry picked from: 703d152: feat: Add support for SetIgnoreMouseEvents on Wayland platform
* OS-17652: Add support for window rotation * Mention windowTransform webpreference is for Linux * Add window rotation test case --------- Signed-off-by: Tariq Bashir <120014322+t-bashir-bs@users.noreply.github.com> test: Improve html window rotation tests (#67) Improve html window rotation tests fix: Add missing implementation for rotating popups in html widgets (#72) * Fix rotated popup windows * Add extra test for popup window rotation Cherry picked from: 0947088: feat: Add support for window rotation OS-17652 (#65) 5d09884: test: Improve html window rotation tests (#67) 96a6d5d: fix: Add missing implementation for rotating popups in html widgets (#72)
Cherry picked from: fb38bc7: fix: Disable changing mouse cursor (OS-17765)
fix: Fix eglGetPlatformDisplayEXT OS-18172 eglGetPlatformDisplayEXT wasn't working as expected. Because it was registered as EGL extension, but it should have been a EGL client extension. After this change, EGL display gets initialised correctly and compositor gets HW accelerated. Cherry picked from: a9d3b19: Add support for eglGetPlatformDisplayExt 9e16132: fix: Fix eglGetPlatformDisplayEXT OS-18172
After the change to disable the chromium error page from being shown on load failures, navigation errors are handled silently rather than committing a chrome-error:// page. That behavior change exposed a Chromium-side interaction with BTM (Bounce Tracking Mitigations, feature name DIPS) on newer Chromium versions: * BTM is enabled by default and uses a profile-scoped SQLite database with exclusive locking. * During tests, multiple Electron processes can start against the same user data directory. * Once one process opens the BTM DB, another process can hit SQLITE_BUSY. * Chromium treats this as a fatal condition in btm_database.cc, causing startup/test crashes with "database is locked". Why this did not show up on older Chromium 120: * BTM/DIPS was not active there in the same way, so this lock path was not present. What this change does: * Adds features::kBtm to the disabled feature list in electron/shell/browser/feature_list.cc. Why this is the right mitigation: * The crash started after the navigation error-page behavior change because silent error handling changed navigation lifecycle outcomes. * Disabling BTM removes the DB-lock contention path entirely without reverting the intended navigation-error UX behavior. * BTM is a Chrome anti-bounce-tracking feature and is not required for Electron app correctness.
The getGPUInfo fixture used an invalid data URL in gpu-info.js: data:text/html;<canvas></canvas> A valid data URL needs a comma before the payload: data:text/html,<canvas></canvas> With the invalid URL, navigation does not complete, so did-finish-load never fires and the test process waits until timeout. This surfaced after we changed load-failure handling to suppress the Chromium error page. Previously, the error page could still trigger did-finish-load and hide the bad fixture URL. Fix the fixture URL so the page loads and getGPUInfo runs reliably.
After a rejected loadURL call, the test could wait for did-stop-loading after that event had already fired, causing a 30s timeout. Only wait for did-stop-loading when webContents.isLoading() is true. This avoids the missed-event race and stabilizes the cached result test.
Brightsign sets the z-order of the window with Wayland extensions. BrowserWindow.setAlwaysOnTop doesn't move the window to the top as Electron expects after this change. squash this to "Add bs z-order absolute level" Cherry picked from: a5fdfaa: fix: Fix the BrowserWindow.setAlwaysOnTop test
… windows Instead of manually tracking keyboard focus with GrabKeyboardEvents (which was reverted due to regressions), use the Weston-side zwp_surface_activation_control_v1 protocol to tell the compositor that non-activatable surfaces should not steal keyboard focus. When a WaylandWindow is created with activatable=false, we now: 1. Bind to zwp_surface_activation_control_manager_v1 in WaylandConnection 2. Get an activation control object for the surface 3. Call set_no_activate on it This prevents Weston from sending wl_keyboard.leave to the previously focused window when an unfocusable window is clicked, so physical keyboard input continues working alongside virtual keyboard windows. Also cleans up the orphaned GrabKeyboardEvents/UngrabKeyboardEvents code from the previous workaround.
The test was relying on navigating to about:blank, which triggers a navigation error due to our patch that prevents navigating to the error page on navigation failures. This caused a load failure instead of a load complete, making `did-finish-load` never fire. Use a local HTTP server to serve a blank page instead.
Resolve calls in GetBlobData/OnGetBlobData were passing v8::Null(isolate), which is v8::Localv8::Primitive. That instantiated gin::ConvertToV8<v8::Localv8::Primitive>, but gin::Converter for that type has no ToV8, causing build failure. Cast null to v8::Value before resolving: v8::Null(isolate).Asv8::Value() This keeps behavior unchanged (still resolves with null) and restores compilation.
…-20963 The built-in PDF viewer was not working on BrightSign devices, showing only a grey background. The root cause was a combination of missing process isolation for extensions and context mismatches between incognito and original sessions. When site isolation is disabled via --disable-site-isolation-trials, all sites share a default SiteInstance with URL http://unisolated.invalid/. The extension system could not identify extension processes from this generic URL, so ProcessMap was never populated and RendererStartupHelper never activated extensions in their renderers. Adding a DoesSiteRequireDedicatedProcess override that returns true for chrome-extension:// URLs ensures extensions always get their own process with the correct site URL regardless of site isolation settings. SiteInstanceGotProcess was guarded behind IsOffTheRecord(), preventing ProcessMap insertion for incognito contexts. Since ExtensionRegistry and ProcessMap factories redirect incognito contexts to the original context, removing this guard allows extensions loaded in the default session to be found and registered in the ProcessMap when running in incognito. IsSameContext did a pointer comparison that failed when comparing an incognito context with its original context. Since RendererStartupHelper is keyed to the original context but guest renderer processes use the incognito context, InitializeProcess skipped them entirely and the renderer never received LoadExtensions or ActivateExtension messages. IsSameContext now also compares original contexts, matching Chrome browser behavior. The extension system services (ProcessMap, ExtensionRegistry, etc.) must be initialized for in-memory sessions via CreateBrowserContextServices so that KeyedService lookups and factory redirects work correctly. However LoadComponentExtensions is still skipped for off-the-record contexts to avoid a DCHECK in task_queue_util.cc that prohibits extension task queue operations on OTR contexts. Component extensions loaded in the default session are accessible from OTR sessions through factory redirects. The DCHECK on extension_system() was removed since the accessor may be called on incognito contexts.
Added the Chromium patch for integrating Brightsign video player with Chromium. fix: Fix assertion with multiple video player instances. OS-15582 (#25) Renderer diffrentiates between video player instances using the DelegateId. Derive WebMediaPlayerBrightsign from WebMediaPlayerDelegate::Observer and initialise WebMediaPlayerDelegate instance. Provide DelegateId when Observer requests for it to avoid assertion. video: Compositor integration for Brightsign Video Player Brightsign video player uses a customised version of VideoHoleFrames, which sends video player factory and z-index of the video frames. These are handled as Overlay planes. Our custom BrightsignUnderlay strategy sends the geometry, opacity and visibility information via libvid. feat: WebMediaPlayerBrightsign: Set new is_video_tag param in vid_player_load (#32) WebMediaPlayerBrightsign: Set new is_video_tag param in vid_player_load feat: Add latest fixes to compositor integration for Brightsign VideoPlayer (#33) feat: Add latest fixes to compositor integration for Brightsign Video Player Update the existing BrightSign custom BrightsignUnderlay strategy code with the latest fixes that were made in the QtWebEngine version. fix: Pass attributes to video_player and correct conversion OS-16220 (#34) The html5 element attributes were not been set when passed to video_player_load. Also, some time parameters were being converted from std::chrono to int64 when passed to the c wrapper. However, they weren't being converted back correctly. Specifically the duration parameter when set to std::chrono::milliseconds::zero() was being treated as an int64 and therefore ending up with an incorrect negative value. fix: Add fix for single video with hwz cannot be hidden OS-16518 (#35) webmediaplayer_brightsign: Apply the fix for OnceCallback crash OS-16749 Applied the webmediaplayer_brightsign for the OnceCallback crash found in OS-16749. fix: Fix media player interface after Electron28 upgrade Interfaces have changes and WebInbandTextTrack does not exist any more. This patch is to get Electron compile with new interface. Cherry picked from: dc2f2de: feat: Add support for brightsign video player f4078f1: fix: Fix assertion with multiple video player instances. OS-15582 (#25) 8609bc5: video: Compositor integration for Brightsign Video Player 6e1d724: feat: WebMediaPlayerBrightsign: Set new is_video_tag param in vid_player_load (#32) 51d48c1: feat: Add latest fixes to compositor integration for Brightsign VideoPlayer (#33) 0febd19: fix: Pass attributes to video_player and correct conversion OS-16220 (#34) 55e3edd: fix: Add fix for single video with hwz cannot be hidden OS-16518 (#35) 7017af4: webmediaplayer_brightsign: Apply the fix for OnceCallback crash OS-16749
…OS-19067 LoadCallback provides audio/video tracks found in the stream. I've added AddVideoTrack, AddAudioTrack calls for each track in the stream. The strings in StringMapVector are freed after initial callback. LoadCallback method was getting called with StringMapVector, which had char *'s pointing to freed memory. Converted internal API structures to std types, which then can be binded and copied over in callbacks. feat(text_tracks): Add support for in-band text tracks OS-18886 Added minimum interfaces available in WebMediaPlayerClient to inform HtmlMediaElement with the text tracks found in the stream. Majority of the logic for creating unique ids, and management of tracks are carried over from QtWebEngine based Chromium. Unlike the previous implementation, the ownership of the TextTrack instances will be managed by HtmlMediaElement.
Patched Chromium to receive --video-codecs-supported and --audio-codecs-supported flags for defining decode capabilities of the players. Brightsign process knows the decoder capabilities and should define these when launching Electron.
cherry-picked from: 0a1966f
… repo Agent-Logs-Url: https://github.com/brightsign/electron/sessions/94b64f55-a86a-4367-8c73-c24653efa6bb Co-authored-by: t-bashir-bs <120014322+t-bashir-bs@users.noreply.github.com>
caneraltinbasak
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Port all patches from Electron 28 to Electron 42
Checklist
npm testpassesRelease Notes
Notes: