Compare commits

...

62 Commits

Author SHA1 Message Date
yangzuohui
71526af2fb fix: fix launch crash when null device is disabled on Windows
add node flag node::ProcessInitializationFlags::kNoStdioInitialization

Co-Authored-By: yangliu <yangliu.leo@bytedance.com>
2025-10-10 12:37:45 -04:00
Niklas Wenzel
550e054168 docs: update Azure Trusted Signing availability (#48494)
* docs: update Azure Trusted Signing availability

Source: https://github.com/Azure/trusted-signing-action/issues/93#issuecomment-3383517386

* docs: remove unused link
2025-10-10 11:43:29 -04:00
Shelley Vohr
b992ead837 fix: dialog.showMessageBox defaultid on Windows (#48216)
* fix: dialog.showMessageBox defaultid on Windows

* Update shell/browser/ui/message_box_win.cc

Co-authored-by: Robo <hop2deep@gmail.com>

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-10-10 15:39:23 +02:00
Shelley Vohr
11f76118db fix: unexpected openExternal dialog on macOS Tahoe (#48502)
fix: unexpected openExternal dialog on macOS Tahoe
2025-10-10 12:48:44 +02:00
Robo
37c7487600 fix: crash when inspector evaluates on provisional frames (#48503) 2025-10-10 11:34:09 +02:00
reito
9e46efb8f7 feat: offscreen rendering support rgbaf16 hdr output format. (#48265)
* feat: offscreen rendering support rgbaf16

* docs: update doc

* docs: update doc.
2025-10-09 10:33:34 +02:00
dependabot[bot]
9c38917a14 build(deps): bump actions/github-script from 7.0.1 to 8.0.0 (#48329)
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](60a0d83039...ed597411d8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-09 10:33:24 +02:00
zoy
3a53c71324 fix: broken transparent window styles on resizable change (#48378)
* fix: wrong api call

* fix: consistency of the resize state

* fix: edge cases

* chore: add detailed comments

* fix: lint

* chore: only windows

* chore: use transparent
2025-10-09 09:49:20 +02:00
David Sanders
0d478ec69c ci: ignore lost communication with server annotation in audit (#48493) 2025-10-09 09:48:56 +02:00
Erick Zhao
9143f7c6e2 docs: clarify postinstall requirements (#48485)
postinstall
2025-10-09 09:48:47 +02:00
Erick Zhao
df86312e2f docs: add note for node_modules for Yarn and pnpm (#48484)
* Add instructions on using node_modules with Yarn

* update text for pnpm

---------

Co-authored-by: CodingOtto <otto+github@fysiker.fi>
2025-10-09 09:48:22 +02:00
Ulises Gascón
ffbae02a95 docs: add security escalation policy (#48317) 2025-10-08 15:19:07 -07:00
Sam Maddock
a87ee21f5c build: bump version in .nvmrc to 22 (#48413) 2025-10-08 14:21:55 -04:00
electron-roller[bot]
ea8f43f9b9 chore: bump node to v22.20.0 (main) (#48383)
* chore: bump node in DEPS to v22.20.0

* chore: fixup patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-08 15:19:08 +02:00
Fedor Indutny
e8e91c331a feat: dynamic ESM import in preload without context isolation (#48375)
Dynamic ESM import in non-context-isolated preload

Extend `HostImportModuleWithPhaseDynamically`'s routing to support
Node.js import resolution in non-context-isolated preloads through
`v8_host_defined_options` length check. The length of host defined
options is distinct between Blink and Node.js and we can use it to
determine which resolver to use.
2025-10-08 10:44:09 +02:00
Charles Kerr
49c1139ab9 chore: remove unused reference to api::BrowserView (#48474)
chore: remove unused reference to api::BrowserView

Unused since #35658 / 15c60143
2025-10-08 10:43:28 +02:00
dependabot[bot]
16bcd645b5 build(deps): bump actions/stale from 9.1.0 to 10.1.0 (#48477)
Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](5bef64f19d...5f858e3efb)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:56:23 +02:00
John Kleinschmidt
6756974828 build: fixup chromedriver and mksnapshot (#48470)
* build: update build tools to get proper exit codes from e build

xref: https://github.com/electron/build-tools/pull/759

* build: target zips directly

mksnapshot and chromedriver have issues with siso trying to run a separate build and zip step, so just target the zip target

* build: don't unzip chromedriver and mksnapshot in tests

The contents of these files are not used in testing, so we shouldn't unzip them.
2025-10-06 23:22:55 -04:00
Keeley Hammond
d6dfd4ed7a build: handle Metal toolchain being unbundled from Xcode 26 (#48467)
* chore: add metal patch dir

* chore: cherry-pick 2f564f1ca07b from angle (#48465)

* chore: update patch
2025-10-06 10:17:46 -04:00
Charles Kerr
a1ca9a8d55 refactor: DRY in App::SetAppLogPath() (#48452) 2025-10-05 12:32:28 -05:00
Charles Kerr
38e491689a perf: avoid a little extra work in InvokeIpcCallback() (#48456)
perf: two minor perf refactors in InvokeIpcCallback()

1. Allocate the CallbackScope on the stack instead of the heap
2. Skip a redundant call to  node::Environment::GetCurrent()
2025-10-04 21:52:53 -07:00
Niklas Wenzel
6e2be00f0f docs: recommend calling renderer process modules from preload script (#48427) 2025-10-04 18:44:10 +02:00
Charles Kerr
497b5a68a4 docs: clarify optional args in webFrame.executeJavaScript() (#48447) 2025-10-04 09:28:06 -05:00
Kaiichiro Ota
715808ecbe docs: mention that webUtils should be used via preload script (#45861)
* docs: mention that webUtils should be used via preload script

* docs: suppress lint errors

* docs: clarify webUtils usage scope

* docs: exclude potentially dangerous alert() in the example code

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: make linter happy

* docs: apply suggestion

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* docs: apply suggestion

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* docs: apply suggestion

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* docs: minor change

* docs: minor change

* docs: remove preload line

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2025-10-03 13:07:38 -07:00
Charles Kerr
01cab978f7 refactor: remove gin_helper::Arguments (#48374)
* refactor: make api::Clipboard::GetClipboardBuffer() private

* refactor: move GetClipboadBuffer() into anonymous namespace

* refactor: use gin::Arguments in StopRecording()

* refactor: use gin::Arguments in ImageView::New()

* refactor: use gin::Arguments in AppendSwitch()

* refactor: use gin::Arguments WebContentsView::New()

* refactor: make gin::Arguments arg const in WrappableBase::InitWithArgs()

This makes explicit that we are using it for wrapper + isolate, not the args values

* refactor: remove gin_helper::Arguments arg from ExposeAPI()

refactor: remove gin_helper::Arguments arg from ExposeAPIInWorld()

* refactor: remove gin_helper::Arguments arg from ElectronBindings::GetSystemMemoryInfo()

* refactor: remove gin_helper::Arguments arg from preload_utils::GetBinding()

* refactor: use gin::Arguments in OpenExternal()

* refactor: use gin::Arguments in ExecuteInWorld()

* refactor: use gin::Arguments in ExecuteJavaScript()

* refactor: use gin::Arguments in InvokeNew()

* refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()

* refactor: remove unused GetNextArgument() marshaller for gin_helper::Arguments

* refactor: remove unused #include gin_helper/arguments.h

* chore: remove unused gin_helper::Arguments

* fixup! refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()

Xref: https://github.com/electron/electron/pull/48447
2025-10-03 14:10:29 -05:00
zoy
7cb1552614 fix: accentColor set distinguishes the frame (#48405)
* fix: accentColor set distinguishes the frame

* chore: invalid change

* fix: lint
2025-10-03 20:10:18 +02:00
Niklas Wenzel
49c37b4daa docs: update allowed window.open options (#48428) 2025-10-03 01:29:26 +02:00
Robo
37a115b8fd fix: initialze featurelist before parsing features (#48411) 2025-10-03 01:18:14 +02:00
Shelley Vohr
e7e29ea876 fix: snapped window restoring to correct position (#48296) 2025-10-02 18:14:48 +02:00
Erick Zhao
b40a4befd4 docs: fix formatting in asar integrity (#48431) 2025-10-01 22:27:28 -07:00
dependabot[bot]
61a7303531 build(deps): bump github/codeql-action from 3.30.1 to 3.30.5 (#48420)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.1 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f1f6e5f6af...3599b3baa1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-30 18:36:57 +02:00
Fedor Indutny
6f9cd718c4 fix: runtime JS error that crashes GetPackageJSON (#48293)
We overriden the `GetPackageJSON` in Node.js to let us read files
straight from the ASAR file instead of disk. The override works by
providing a JS method with the limitation that it should not throw a
runtime error. However, this invariant was accidentally violated by
`asar.splitPath` that sometimes contrary to its' TypeScript definition
returned `false`.
2025-09-30 18:32:13 +02:00
Samuel Attard
a95180e080 build: add missing copied tarball to cloudstore paths (#48408)
It's guarunteed that `iojs-*` and `node-*` were the same origin file (we azcopy them) but this was missing in logs and it annoyed me
2025-09-29 11:16:39 -07:00
BILL SHEN
d4a5fdc8fc fix: add missed enum SaveRequestType to PdfViewerPrivate function (#48372)
fix: add missed SaveRequestType enum to PdfViewerPrivate function
2025-09-26 16:34:06 -04:00
avarayr
3a7c6dd4a5 fix: MacOS 26 Tahoe - stop overriding private cornerMask API to fix WindowServer GPU load (#48376)
fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike

Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth
vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window
shadow to be rendered from a fully transparent surface, causing the
WindowServer GPU load regression. Remove the `cornerMask` property and
the `_cornerMask` override so we stay on Apple’s default shadow path.
2025-09-26 12:41:16 -07:00
Robo
26e886c517 fix: disable NSAutoFillHeuristicController on macOS 26 (#48379)
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-09-26 08:40:55 +09:00
Charles Kerr
26a473db98 refactor: make api::Menu inherit from gin::Wrappable (#48351)
* refactor: make api::Menu inherit from gin::Wrappable*

* refactor: make api::Menu::kWrapperInfo const

* refactor: use three-arg version of GetConstructor in Menu

refactor: undo branch changes to two-arg version of GetConstructor

* fixup! refactor: make api::Menu inherit from gin::Wrappable*

fix: return type of Menu::New

* fixup! refactor: make api::Menu inherit from gin::Wrappable*

make MenuMac's constructor public so that cppgc can use it

* refactor: Pinnable -> SelfKeepAlive
2025-09-24 19:42:22 -05:00
Charles Kerr
6661457cdf refactor: prefer upstream gin::Arguments::ThrowTypeError() over gin_helper (#48368)
* refactor: use gin::Arguments::ThrowTypeError() in AutoUpdater::SetFeedURL()

* refactor: use gin::Arguments::ThrowTypeError() in Browser::Focus()

* refactor: use gin::Arguments::ThrowTypeError() in SystemPreferences::SetUserDefault()

* refactor: use gin::Arguments::ThrowTypeError() in UtilityProcessWrapper::Create()

* refactor: use gin::Arguments::ThrowTypeError() in UtilityProcessWrapper::PostMessage()

* refactor: use gin::Arguments::ThrowTypeError() in ElectronBundleMover::ShouldContinueMove()

* refactor: use gin::Arguments::ThrowTypeError() in OnClientCertificateSelected()

* refactor: use gin::Arguments::ThrowTypeError() in Session::ClearData()

* refactor: use gin::Arguments::ThrowTypeError() in ElectronBrowserContext::DisplayMediaDeviceChosen()

* refactor: use gin::Arguments::ThrowTypeError() in WebContents::ReplaceMisspelling()

* refactor: use gin::Arguments::ThrowTypeError() in WebContents::Print()

* chore: iwyu shell/common/gin_helper/error_thrower.h
2025-09-24 19:10:05 -05:00
John Kleinschmidt
b51e82c5fb test: rerun failed tests individually (#48205)
* test: rerun failed tests individually

* ci: use screencapture-nag-remover

Needed to bypass the popup message "bash" is requesting to bypass the system private window picker and directly access your screen and audio.

* Revert "chore: test with 1st quadrant of the window"

No longer needed because of the addition of the
screencapture-nag-remover script.

This reverts commit f4a7e04c0b.

* test: fixup navigationHistory flake

* rerun test up to 3 times
2025-09-24 13:35:14 -07:00
Charles Kerr
235fdc41f6 refactor: use gin::Arguments in BaseWindow (#48355)
* refactor: make api::Clipboard::GetClipboardBuffer() private

* refactor: move GetClipboadBuffer() into anonymous namespace

* refactor: use gin::Arguments in BaseWindow::MoveAbove()

refactor: use gin::Arguments in BaseWindow::SetAlwaysOnTop()

refactor: use gin::Arguments in BaseWindow::SetIgnoreMouseEvent()

* refactor: use gin::Arguments in BaseWindow::SetProgresBar()

* refactor: use gin::Arguments in BaseWindow::SetVisibleOnAllWorkspaces()

* refactor: use gin::Arguments in BaseWindow::SetVibrancy()

* refactor: use gin::Arguments in BaseWindow::SetAspectRatio()

* refactor: use gin::Arguments in BaseWindow::PreviewFile()

* refactor: use gin::Arguments in BaseWindow::SetThumbarButtons()

* refactor: use gin::Arguments in BaseWindow::SetBounds()

* refactor: use gin::Arguments in BaseWindow::SetContentBounds()

* refactor: use gin::Arguments in BaseWindow::SetSize()

* refactor: use gin::Arguments in BaseWindow::SetContentSize()

* refactor: use gin::Arguments in BaseWindow::SetSheetOffset()

* refactor: use gin::Arguments in BaseWindow::SetPosition()

* refactor: use gin::Arguments in BaseWindow::AddTabbedWindow()

* refactor: use gin::Arguments in BaseWindow::SetParentWindow()

* refactor: use gin::Arguments in BaseWindow::BaseWindow()

* refactor: use gin::Arguments in BaseWindow::SetAccentColor()

* refactor: use gin::Arguments in BaseWindow::SetTitleBarOverlay()
2025-09-24 09:39:16 -04:00
Charles Kerr
6bbbc1232e chore: remove unused, undocumented, untested executionMode arg from web_frame.executeJavaScriptInIsolatedWorld() (#48361)
chore: remove unused, undocumented execution mode arg from web_frame.executeJavaScriptInIsolatedWorld()
2025-09-24 08:13:49 -05:00
Niklas Wenzel
49335805d5 docs: mention setContentProtection macOS limitations (#48290) 2025-09-23 16:28:21 -05:00
John Kleinschmidt
b27e721f69 build: update patches (#48364)
chore: update patches
2025-09-23 16:37:38 -04:00
electron-roller[bot]
1fda08b8c8 chore: bump chromium to 142.0.7417.0 (main) (#48275)
* chore: bump chromium in DEPS to 142.0.7401.0

* 6911185: Reland "Send touch moves async immediately after scroll starts."

https://chromium-review.googlesource.com/c/chromium/src/+/6911185

* 6906887: mac: click through content area in main window

https://chromium-review.googlesource.com/c/chromium/src/+/6906887

* 6916667: Expose helper to eliminate duplicate recipes.

https://chromium-review.googlesource.com/c/chromium/src/+/6916667

* 6909842: Switch LegacyRenderWidgetHostHWND from atlcrack.h to msg_util.h.

https://chromium-review.googlesource.com/c/chromium/src/+/6909842

* 6884056: Remove the SecKeychain implementation for the Keychain interface

https://chromium-review.googlesource.com/c/chromium/src/+/6884056

* 6904906: Remove `WTF::` in renderer/core/[p-x].*/

https://chromium-review.googlesource.com/c/chromium/src/+/6904906

* 6556585: [persistent_cache]: PersistentCache for CodeCache

https://chromium-review.googlesource.com/c/chromium/src/+/6556585

* 6904864: Layout: Support abort on the text placeholder layout

https://chromium-review.googlesource.com/c/chromium/src/+/6904864

* chore: fixup patch indices

* chore: bump chromium in DEPS to 142.0.7402.0

* fixup! 6556585: [persistent_cache]: PersistentCache for CodeCache

* chore: fixup patch indices

* 6905244: [api] Remove deprecated `GetIsolate`

https://chromium-review.googlesource.com/c/v8/v8/+/6905244

* 6897694: Remove NativeTheme::UserHasContrastPreference().

https://chromium-review.googlesource.com/c/chromium/src/+/6897694

* 6897477: Remove GetPlatformHighContrastColorScheme() and enum.

https://chromium-review.googlesource.com/c/chromium/src/+/6897477

* 6918198: Reland "Rename display::Screen::GetScreen() to display::Screen::Get()"

https://chromium-review.googlesource.com/c/chromium/src/+/6918198

* 6907147: [LNA] add use counter for websocket mixed-content issues

https://chromium-review.googlesource.com/c/chromium/src/+/6907147

* 6914538: Replace WTF::String with blink::String

https://chromium-review.googlesource.com/c/website/+/6914538

* 6892538: [video pip] Allow touchscreen users to toggle live caption

https://chromium-review.googlesource.com/c/chromium/src/+/6892538

* chore: fix patch

* chore: bump chromium in DEPS to 142.0.7403.0

* build: remove ninja logs

* chore: fixup patch indices

* 6920670: [PDF] Change pdf_extension_util to return dictionaries

https://chromium-review.googlesource.com/c/chromium/src/+/6920670

* 6917864: Devirtualize and inline various NativeTheme getters.

https://chromium-review.googlesource.com/c/chromium/src/+/6917864

* 6920873: [PDF] Simplify PDFDocumentHelperClient::OnSaveURL()

https://chromium-review.googlesource.com/c/chromium/src/+/6920873

* build: don't kill blink/web_tests

* 6923655: Roll libc++ from 954086abf121 to b87b2bb112f8 (4 revisions)

https://chromium-review.googlesource.com/c/chromium/src/+/6923655

* 6905242: Reland "[CSP] Clarify report-only console messages."

https://chromium-review.googlesource.com/c/chromium/src/+/6905242

* fixup! 6897694: Remove NativeTheme::UserHasContrastPreference().

* chore: bump chromium in DEPS to 142.0.7405.0

* 6910012: [LNA] Enable LNA enforcement by default

https://chromium-review.googlesource.com/c/chromium/src/+/6910012

* 6929444: Combine GetInstanceForXXX() implementations.

https://chromium-review.googlesource.com/c/chromium/src/+/6929444

* 6927873: Rename native_widget_types.h -> native_ui_types.h

https://chromium-review.googlesource.com/c/chromium/src/+/6927873

* 6853978: Init perfetto really early in WebView

https://chromium-review.googlesource.com/c/chromium/src/+/6853978

* 6874886: Use only one picker observer to avoid getting duplicate notifications

https://chromium-review.googlesource.com/c/chromium/src/+/6874886

* chore: fixup patch indices

* fix: Protocol complex inline dtor

* chore: bump chromium in DEPS to 142.0.7407.0

* chore: bump chromium in DEPS to 142.0.7409.0

* chore: bump chromium in DEPS to 142.0.7411.0

* chore: bump chromium in DEPS to 142.0.7413.0

* fixup! 6905242: Reland "[CSP] Clarify report-only console messages."

* 6927233: Remove NativeTheme "use dark colors" bit.

https://chromium-review.googlesource.com/c/chromium/src/+/6927233

* chore: fixup patch indices

* 6899206: [PermissionOptions] Multi-state permission subscriptions & setting changes

https://chromium-review.googlesource.com/c/chromium/src/+/6899206

* chore: bump chromium in DEPS to 142.0.7415.0

* 6936895: [headless] Remove headless flag from views::Widget class

https://chromium-review.googlesource.com/c/chromium/src/+/6936895

We should probably followup on this to see if there is a way to do this without reverting this CL.

* 6937023: Reland "Use new DBus type system in dbus_xdg::Request"

https://chromium-review.googlesource.com/c/chromium/src/+/6937023

* chore: update patches

* 6944749: Add GN visibility list to //components/os_crypt/sync

https://chromium-review.googlesource.com/c/chromium/src/+/6944749

* Further replace sub_capture_target_version with CaptureVersion

https://chromium-review.googlesource.com/c/chromium/src/+/6935455

* fixup for lint

* chore: update filenames.libcxx.gni

* chore: bump chromium in DEPS to 142.0.7417.0

* 6944136: Reorder NativeTheme headers/.cc files.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6944136

* 6939701: [DSSC][4] Make FSVCI objects aware of their capture-version-source

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6939701

* 6944404: Remove extraneous callback call

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6944404

* 6936124: [FPF-CI]: Introduce blink::NoiseToken for fingerprinting protection

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6936124

* chore: update patches

* fixup! 6927233: Remove NativeTheme "use dark colors" bit.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6927233

* fixup! 6917864: Devirtualize and inline various NativeTheme getters.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6917864

* 6937588: Add initial OsSettingsProvider object, supplying caret blink interval.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6937588

* fixup! 6905242: Reland "[CSP] Clarify report-only console messages."

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6905242

* 6907515: Replace SingletonHwndObserver with a CallbackList on SingletonHwnd.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6907515

* 6910482: [Save to Drive] Implement retry functionality

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6910482

* fixup! 6927233: Remove NativeTheme "use dark colors" bit.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6927233

* Revert "build: remove ninja logs"

This reverts commit 72874740fd.

* test: fix flakey test picked from PR 48205

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>
2025-09-22 20:16:27 -07:00
Charles Kerr
19256a07dd refactor: use gin::Arguments in api::Clipboard (#48354)
* refactor: make api::Clipboard::GetClipboardBuffer() private

* refactor: remove unused gin_helper::Arguments* arg from Clipboard::ReadBuffer()

* refactor: remove unused gin_helper::Arguments* arg from Clipboard::ReadBookmark()

* refactor: move GetClipboadBuffer() into anonymous namespace

* refactor: use gin::Arguments in api::Clipboard
2025-09-23 04:12:47 +09:00
John Kleinschmidt
f62d7254c4 build: update build tools to get siso for forks fix (#48345) 2025-09-18 00:04:09 -04:00
Keeley Hammond
c7aa0b537d chore: cherry-pick ec6c18478382 from v8 (#48335)
* chore: cherry-pick ec6c18478382 from v8

* chore: update patches
2025-09-16 19:08:15 -07:00
Robo
048d620701 fix: remove unneeded handlescope from JS callbacks (#48318)
fix: remove handlescope from JS callbacks
2025-09-16 06:56:38 +09:00
Charles Kerr
15cdae1cf0 refactor: make api::NetLog inherit from gin::Wrappable (#48308)
* refactor: remove unused v8::Isolate* arg from NetLog ctor

* refactor: allocate api::NetLog on cpp heap

* refactor: make electron::api::Session::net_log_ a cppgc::Member<api::NetLog>

* refactor: remove unnecessary EscapableHandleScope

* chore: code style consistency
2025-09-16 06:29:46 +09:00
Shelley Vohr
bac383c219 feat: add fileSystem to ses.setPermissionCheckHandler (#48170)
feat: add fileSystem to ses.setPermissionCheckHandler
2025-09-15 17:00:58 -04:00
John Kleinschmidt
49eb165ef9 ci: Use Local Execution, Remote Caching (LERC) for fork PRS (#48319)
cleanup
2025-09-15 16:31:49 -04:00
Charles Kerr
a468ed7f10 refactor: narrow or remove gin arguments (#48300)
* refactor: narrow App:SetJumpList() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow WebContents::AddWorkSpace() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow ShowMessageBox() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow ShowOpenDialog() arg from gin::Arguments* to v8::Isolate*

* refactor: remove unused gin::Arguments* arg from OverrideGlobalPropertyFromIsolatedWorld()

* refactor: narrow WebContents::StartDrag() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow NetLog::StopLogging() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow Protocol::IsProtocolHandled() arg from gin::Arguments* to v8::Isolate*
2025-09-13 08:19:07 +09:00
Calvin
5444738721 fix: set ozone platform for wayland (#48301)
* fix: set ozone platform for wayland

* whoops, includes. thx charles
2025-09-13 08:17:06 +09:00
Charles Kerr
a6959ca97b refactor: allocate api::Debugger on cpp heap (#48266)
* refactor: remove unused isolate arg from Debugger ctor

* refactor: make Debugger ctor, dtor public

needed for cppgc::MakeGarbageCollected()

This is what upstream does, e.g. https://chromium-review.googlesource.com/c/chromium/src/+/6722236

* fixup! refactor: remove unused isolate arg from Debugger ctor

mark Debugger ctor as explicit

* refactor: in EventEmitterMixin, handle both old and new WrapperInfo types

* refactor: make electron::api::Debugger inherit from gin::Wrappable

* refactor: add api::Debugger::GetTypeName()

* refactor: add api::Debugger::GetClassName()
2025-09-11 16:03:17 -04:00
dependabot[bot]
45353ae38c build(deps): bump actions/setup-node from 4.4.0 to 5.0.0 (#48282)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](49933ea528...a0853c2454)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-10 21:35:54 -05:00
Charles Kerr
f702327dce refactor: avoid unused inheritance in ServiceWorkerMain (#48279)
ServiceWorkerMain does not need to inherit from EventEmitterMixin
2025-09-10 11:16:35 -05:00
dependabot[bot]
fda3a3d493 build(deps): bump github/codeql-action from 3.29.11 to 3.30.1 (#48283)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.11 to 3.30.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3c3833e0f8...f1f6e5f6af)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-10 09:47:34 -05:00
Michaela Laurencin
dae5dad167 docs: update release timeline for unsupported v35 (#48285) 2025-09-09 15:03:48 -07:00
John Kleinschmidt
940ebb6c7a chore: update patches (#48278) 2025-09-08 15:44:47 -04:00
electron-roller[bot]
793565e4be chore: bump chromium to 141.0.7390.7 (main) (#48212)
* chore: bump chromium in DEPS to 141.0.7381.3

* chore: update patches

* chore: bump chromium in DEPS to 141.0.7382.0

* chore: update patches

* chore: bump chromium in DEPS to 141.0.7384.0

* chore: bump chromium in DEPS to 141.0.7386.0

* [Extensions] Move devtools_page and chrome_url_overrides handlers

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6862700

* Reland "[api] Advance deprecation of GetIsolate"

Refs https://chromium-review.googlesource.com/c/v8/v8/+/6875273

* Move "system integrated UI" concept out of NativeTheme.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6867375

* chore: update patches

* Reland "[PermissionOptions] Return PermissionResult in callback for requests"

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6851838

* Reland "[exit-time-destructors] Enable by default"

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6859042

* chore: update patches

* [FSA] Revoke Read access after removing file via FileSystemAccess API

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6677249

* chore: IWYU

* [DevToolsUIBindings] Accept an object for `dispatchHttpRequest` params

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6877528

* chore: IWYU

* Pass navigation UI parameters on EnterFullscreen in EAM

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6874923

* chore: rm band-aid_over_an_issue_with_using_deprecated_nsopenpanel_api.patch

* Remove unused PreHandleMouseEvent

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6880411

* 6878583: siso: update to version 1.4.1

https://chromium-review.googlesource.com/c/chromium/src/+/6878583

* Fold native_theme_browser into native_theme.

https://chromium-review.googlesource.com/c/chromium/src/+/6882627

* fixup: Reland "[exit-time-destructors] Enable by default

https://chromium-review.googlesource.com/c/chromium/src/+/6859042

* chore: update filenames.libcxx.gni

* chore: IWYU

* fixup: chore: IWYU

* fixup: Reland "[exit-time-destructors] Enable by default

* fixup: Reland "[exit-time-destructors] Enable by default

* Remove common_theme.*; place its method in NativeTheme instead.

https://chromium-review.googlesource.com/c/chromium/src/+/6886029

* fixup: Reland "[exit-time-destructors] Enable by default

* Better track when WebPreferences need updates for color-related changes.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6886797

* chore: bump chromium in DEPS to 141.0.7390.7

* 6904664: Reland "Make BrowserContext::GetPath() const"

https://chromium-review.googlesource.com/c/chromium/src/+/6904664

* Restore read access after certain file modification operations

https://chromium-review.googlesource.com/c/chromium/src/+/6861041

* fixup: Move "system integrated UI" concept out of NativeTheme.

* fixup: Reland "[exit-time-destructors] Enable by default

* chore: update patches

* 6906096: Remove GetSysSkColor().

https://chromium-review.googlesource.com/c/chromium/src/+/6906096

* Inline implementation of SysColorChangeListener into the lone user.

https://chromium-review.googlesource.com/c/chromium/src/+/6905083

Also 6906096: Remove GetSysSkColor(). | https://chromium-review.googlesource.com/c/chromium/src/+/6906096

* fixup: 6906096: Remove GetSysSkColor()

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-09-08 12:57:15 +02:00
electron-roller[bot]
1f322ebce3 chore: bump node to v22.19.0 (main) (#48222)
* chore: bump node in DEPS to v22.19.0

* chore: fixup patch indices

* crypto: add tls.setDefaultCACertificates()

https://github.com/nodejs/node/pull/58822

* esm: js-string Wasm builtins in ESM Integration

https://github.com/nodejs/node/pull/59179

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-09-05 17:16:45 -04:00
Samuel Attard
f009e077f2 build: update spec deps for clean audit (#48238) 2025-09-03 15:05:49 -04:00
352 changed files with 5414 additions and 2538 deletions

View File

@@ -79,7 +79,7 @@ runs:
shell: bash
run: |
cd src
e build --target electron:electron_mksnapshot
e build --target electron:electron_mksnapshot_zip
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
# Remove unused args from mksnapshot_args
SEDOPTION="-i"
@@ -89,7 +89,6 @@ runs:
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
e build --target electron:electron_mksnapshot_zip
if [ "${{ inputs.target-platform }}" = "win" ]; then
cd out/Default
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
@@ -123,7 +122,6 @@ runs:
shell: bash
run: |
cd src
e build --target electron:electron_chromedriver
e build --target electron:electron_chromedriver_zip
if [ "${{ inputs.is-asan }}" != "true" ]; then

View File

@@ -172,7 +172,6 @@ runs:
run: |
rm -rf src/android_webview
rm -rf src/ios/chrome
rm -rf src/third_party/blink/web_tests
rm -rf src/third_party/blink/perf_tests
rm -rf src/chrome/test/data/xr/webvr_info
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src

View File

@@ -109,7 +109,7 @@ runs:
deps-file: src/DEPS
installation-dir: src/third_party/siso/cipd
target-platform: ${{ inputs.target-platform }}
package: infra/build/siso/${platform}
package: build/siso/${platform}
- name: Fixup angle git
if: ${{ inputs.target-platform != 'linux' }}
shell: bash

View File

@@ -15,7 +15,7 @@ runs:
git config --global core.preloadindex true
git config --global core.longpaths true
fi
export BUILD_TOOLS_SHA=fb34fbad068586d9a6e2bb4e4950bdcf9aaee862
export BUILD_TOOLS_SHA=706147b2376f55078f718576b28129a0457f1795
npm i -g @electron/build-tools
# Update depot_tools to ensure python
e d update_depot_tools

View File

@@ -13,7 +13,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js/npm
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: 20.19.x
- name: Setting Up Dig Site

View File

@@ -16,11 +16,11 @@ jobs:
contents: read
steps:
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22.17.x
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
id: audit-errors
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -73,6 +73,7 @@ jobs:
annotation_level === "failure" &&
!message.startsWith("Process completed with exit code") &&
!message.startsWith("Response status code does not indicate success") &&
!message.startsWith("The hosted runner lost communication with the server") &&
!/Unable to make request/.test(message) &&
!/The requested URL returned error/.test(message),
)

View File

@@ -75,7 +75,7 @@ jobs:
org: electron
- name: Generate Release Project Board Metadata
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
id: generate-project-metadata
with:
script: |

View File

@@ -37,7 +37,7 @@ jobs:
org: electron
- run: npm install @electron/fiddle-core@1.3.3 mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0 semver@7.6.0
- name: Add labels
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
id: add-labels
env:
ISSUE_BODY: ${{ github.event.issue.body }}

View File

@@ -113,7 +113,7 @@ jobs:
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: 20.19.x
cache: yarn

View File

@@ -70,7 +70,7 @@ jobs:
cp $(which node) /mnt/runner-externals/node20/bin/
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'win' }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: 20.19.x
- name: Add TCC permissions on macOS
@@ -110,11 +110,6 @@ jobs:
configure_sys_tccdb "$values"
fi
done
# Ref: https://github.com/getsentry/sentry-cocoa/blob/main/scripts/ci-enable-permissions.sh
if [ "$OSTYPE" = "darwin24" ]; then
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
fi
- name: Turn off the unexpectedly quit dialog on macOS
if: ${{ inputs.target-platform == 'macos' }}
run: defaults write com.apple.CrashReporter DialogType server
@@ -127,6 +122,12 @@ jobs:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Turn off screenshot nag on macOS
if: ${{ inputs.target-platform == 'macos' }}
run: |
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
src/electron/script/actions/screencapture-nag-remover.sh -a $(which bash)
src/electron/script/actions/screencapture-nag-remover.sh -a /opt/hca/hosted-compute-agent
- name: Setup SSH Debugging
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh || env.ACTIONS_STEP_DEBUG == 'true') }}
uses: ./src/electron/.github/actions/ssh-debug
@@ -176,22 +177,18 @@ jobs:
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Restore Generated Artifacts
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist, Mksnapshot & Chromedriver (win)
- name: Unzip Dist (win)
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
cd src/out/Default
Expand-Archive -Force dist.zip -DestinationPath ./
Expand-Archive -Force chromedriver.zip -DestinationPath ./
Expand-Archive -Force mksnapshot.zip -DestinationPath ./
- name: Unzip Dist, Mksnapshot & Chromedriver (unix)
- name: Unzip Dist (unix)
if: ${{ inputs.target-platform != 'win' }}
run: |
cd src/out/Default
unzip -:o dist.zip
unzip -:o chromedriver.zip
unzip -:o mksnapshot.zip
#- name: Import & Trust Self-Signed Codesigning Cert on MacOS
# if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
# run: |
@@ -227,7 +224,7 @@ jobs:
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
fi
fi
node script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
node script/yarn test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
else
chown :builduser .. && chmod g+w ..
chown -R :builduser . && chmod -R g+w .

View File

@@ -50,6 +50,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -16,7 +16,7 @@ jobs:
id: generate-token
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # tag: v9.1.0
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # tag: v10.1.0
with:
repo-token: ${{ steps.generate-token.outputs.token }}
days-before-stale: 90
@@ -39,7 +39,7 @@ jobs:
id: generate-token
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # tag: v9.1.0
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # tag: v10.1.0
with:
repo-token: ${{ steps.generate-token.outputs.token }}
days-before-stale: -1

2
.nvmrc
View File

@@ -1 +1 @@
20
22

View File

@@ -655,6 +655,7 @@ source_set("electron_lib") {
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/gtk:gtk_config",
"//ui/linux:display_server_utils",
"//ui/linux:linux_ui",
"//ui/linux:linux_ui_factory",
"//ui/wm",
@@ -688,7 +689,6 @@ source_set("electron_lib") {
"//components/app_launch_prefetch",
"//components/crash/core/app:crash_export_thunks",
"//third_party/libxml:xml_writer",
"//ui/native_theme:native_theme_browser",
"//ui/wm",
"//ui/wm/public",
]

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'141.0.7361.0',
'142.0.7417.0',
'node_version':
'v22.18.0',
'v22.20.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version':

View File

@@ -8,6 +8,12 @@ The Electron team will send a response indicating the next steps in handling you
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [npm contact form](https://www.npmjs.com/support) by selecting "I'm reporting a security vulnerability".
## Escalation
If you do not receive an acknowledgement of your report within 6 business days, or if you cannot find a private security contact for the project, you may escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
If the project acknowledges your report but does not provide any further response or engagement within 14 days, escalation is also appropriate.
## The Electron Security Notification Process
For context on Electron's security notification process, please see the [Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md#notifications) section of the Security WG's [Membership and Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md) Governance document.

View File

@@ -72,3 +72,6 @@ enterprise_cloud_content_analysis = false
# We don't use anything from here, and it causes target collisions
enable_linux_installer = false
# Disable "Save to Drive" feature in PDF viewer
enable_pdf_save_to_drive = false

View File

@@ -12,7 +12,7 @@ TEMPLATE_H = """
namespace electron::snapshot_checksum {
const std::string kChecksum = "{checksum}";
inline constexpr std::string_view kChecksum = "{checksum}";
} // namespace electron::snapshot_checksum

View File

@@ -23,6 +23,8 @@ static_library("chrome") {
"//chrome/browser/browser_process.h",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
"//chrome/browser/devtools/devtools_dispatch_http_request_params.cc",
"//chrome/browser/devtools/devtools_dispatch_http_request_params.h",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
"//chrome/browser/devtools/devtools_eye_dropper.cc",

View File

@@ -1570,11 +1570,18 @@ events.
Prevents the window contents from being captured by other apps.
On macOS it sets the NSWindow's [`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc) to [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
On Windows it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
On Windows, it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
For Windows 10 version 2004 and up the window will be removed from capture entirely,
older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
On macOS, it sets the `NSWindow`'s
[`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc)
to
[`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
Unfortunately, due to an intentional change in macOS, newer Mac applications that use
`ScreenCaptureKit` will capture your window despite `win.setContentProtection(true)`.
See [here](https://github.com/electron/electron/issues/48258#issuecomment-3269893618).
#### `win.isContentProtected()` _macOS_ _Windows_
Returns `boolean` - whether or not content protection is currently enabled.

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
On Linux, there is also a `selection` clipboard. To manipulate it
you need to pass `selection` to each method:

View File

@@ -193,6 +193,11 @@ Disables the Chromium [sandbox](https://www.chromium.org/developers/design-docum
Forces renderer process and Chromium helper processes to run un-sandboxed.
Should only be used for testing.
### --no-stdio-init
Disable stdio initialization during node initialization.
Used to avoid node initialization crash when the nul device is disabled on Windows platform.
### --proxy-bypass-list=`hosts`
Instructs Electron to bypass the proxy server for the given semi-colon-separated

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
The following is an example of setting up Electron to automatically submit
crash reports to a remote server:

View File

@@ -20,6 +20,12 @@ changes:
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
The `ipcRenderer` module is an [EventEmitter][event-emitter]. It provides a few
methods so you can send synchronous and asynchronous messages from the render
process (web page) to the main process. You can also receive replies from the

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
The `nativeImage` module provides a unified interface for manipulating
system images. These can be handy if you want to provide multiple scaled
versions of the same icon or take advantage of macOS [template images][template-image].

View File

@@ -939,14 +939,18 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
* `deprecated-sync-clipboard-read` _Deprecated_ - Request access to run `document.execCommand("paste")`
* `fileSystem` - Access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
* `requestingOrigin` string - The origin URL of the permission check
* `details` Object - Some properties are only available on certain permission types.
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
* `securityOrigin` string (optional) - The security origin of the `media` check.
* `mediaType` string (optional) - The type of media access being requested, can be `video`,
`audio` or `unknown`
`audio` or `unknown`.
* `requestingUrl` string (optional) - The last URL the requesting frame loaded. This is not provided for cross-origin sub frames making permission checks.
* `isMainFrame` boolean - Whether the frame making the request is the main frame
* `isMainFrame` boolean - Whether the frame making the request is the main frame.
* `filePath` string (optional) - The path of a `fileSystem` request.
* `isDirectory` boolean (optional) - Whether a `fileSystem` request is a directory.
* `fileAccessType` string (optional) - The access type of a `fileSystem` request. Can be `writable` or `readable`.
Sets the handler which can be used to respond to permission checks for the `session`.
Returning `true` will allow the permission and `false` will reject it. Please note that
@@ -968,6 +972,9 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
})
```
> [!NOTE]
> `isMainFrame` will always be `false` for a `fileSystem` request as a result of Chromium limitations.
#### `ses.setDisplayMediaRequestHandler(handler[, opts])`
* `handler` Function | null

View File

@@ -2,7 +2,10 @@
* `textureInfo` Object - The shared texture info.
* `widgetType` string - The widget type of the texture. Can be `popup` or `frame`.
* `pixelFormat` string - The pixel format of the texture. Can be `rgba` or `bgra`.
* `pixelFormat` string - The pixel format of the texture.
* `rgba` - The texture format is 8-bit unorm RGBA.
* `bgra` - The texture format is 8-bit unorm BGRA.
* `rgbaf16` - The texture format is 16-bit float RGBA.
* `codedSize` [Size](size.md) - The full dimensions of the video frame.
* `colorSpace` [ColorSpace](color-space.md) - The color space of the video frame.
* `visibleRect` [Rectangle](rectangle.md) - A subsection of [0, 0, codedSize.width, codedSize.height]. In OSR case, it is expected to have the full section area.

View File

@@ -87,6 +87,11 @@
paint event. Defaults to `false`. See the
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for
more details.
* `sharedTexturePixelFormat` string (optional) _Experimental_ - The requested output format of the shared texture. Defaults to `argb`.
The name is originated from Chromium [`media::VideoPixelFormat`](https://source.chromium.org/chromium/chromium/src/+/main:media/base/video_types.h) enum suffix and only subset of them are supported.
The actual output pixel format and color space of the texture should refer to [`OffscreenSharedTexture`](../structures/offscreen-shared-texture.md) object in the `paint` event.
* `argb` - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
* `rgbaf16` - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
the specified `preload` script in a separate JavaScript context. Defaults
to `true`. The context that the `preload` script runs in will only have

View File

@@ -4,6 +4,12 @@
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
`webFrame` export of the Electron module is an instance of the `WebFrame`
class representing the current frame. Sub-frames can be retrieved by
certain properties and methods (e.g. `webFrame.firstChild`).
@@ -139,7 +145,7 @@ by its key, which is returned from `webFrame.insertCSS(css)`.
Inserts `text` to the focused element.
### `webFrame.executeJavaScript(code[, userGesture, callback])`
### `webFrame.executeJavaScript(code[, userGesture][, callback])`
* `code` string
* `userGesture` boolean (optional) - Default is `false`.
@@ -160,7 +166,7 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
this limitation.
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture, callback])`
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture][, callback])`
* `worldId` Integer - The ID of the world to run the javascript
in, `0` is the default main world (where content runs), `999` is the

View File

@@ -4,6 +4,12 @@
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.
## Methods
The `webUtils` module has the following methods:
@@ -17,11 +23,27 @@ Returns `string` - The file system path that this `File` object points to. In th
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
```js @ts-nocheck
// Before
const oldPath = document.querySelector('input').files[0].path
// After
const { webUtils } = require('electron')
const newPath = webUtils.getPathForFile(document.querySelector('input').files[0])
// Before (renderer)
const oldPath = document.querySelector('input[type=file]').files[0].path
```
```js @ts-nocheck
// After
// Renderer:
const file = document.querySelector('input[type=file]').files[0]
electronApi.doSomethingWithFile(file)
// Preload script:
const { contextBridge, webUtils } = require('electron')
contextBridge.exposeInMainWorld('electronApi', {
doSomethingWithFile (file) {
const path = webUtils.getPathForFile(file)
// Do something with the path, e.g., send it over IPC to the main process.
// It's best not to expose the full file path to the web content if possible.
}
})
```

View File

@@ -39,8 +39,8 @@ consider using `webContents.setWindowOpenHandler` to customize the
BrowserWindow creation.
A subset of [`WebPreferences`](structures/web-preferences.md) can be set directly,
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `preload`,
`javascript`, `contextIsolation`, and `webviewTag`.
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `javascript`,
`contextIsolation`, and `webviewTag`.
For example:

View File

@@ -12,19 +12,28 @@ network problems. The best resolution is to try switching networks, or
wait a bit and try installing again.
You can also attempt to download Electron directly from
[electron/electron/releases](https://github.com/electron/electron/releases)
[GitHub Releases](https://github.com/electron/electron/releases)
if installing via `npm` is failing.
## When will Electron upgrade to latest Chrome?
If you need to install Electron through a custom mirror or proxy, see
the [Advanced Installation](./tutorial/installation.md) documentation for more details.
The Chrome version of Electron is usually bumped within one or two weeks after
a new stable Chrome version gets released. This estimate is not guaranteed and
depends on the amount of work involved with upgrading.
## How are Electron binaries downloaded?
Only the stable channel of Chrome is used. If an important fix is in beta or dev
channel, we will back-port it.
When you run `npm install electron`, the Electron binary for the corresponding version is downloaded
into your project's `node_modules` folder via npm's `postinstall` lifecycle script.
For more information, please see the [security introduction](tutorial/security.md).
This logic is handled by the [`@electron/get`](https://github.com/electron/get) utility package
under the hood.
## When will Electron upgrade to latest Chromium?
Every new major version of Electron releases with a Chromium major version upgrade. By releasing every
8 weeks, Electron is able to pull in every other major Chromium release on the very same day that it
releases upstream. Security fixes will be backported to stable release channels ahead of time.
See the [Electron Releases](./tutorial/electron-timelines.md) documentation for more details or
[releases.electronjs.org](https://releases.electronjs.org) to see our Release Status dashboard.
## When will Electron upgrade to latest Node.js?

View File

@@ -64,13 +64,10 @@ flipFuses(
)
```
:::tip Fuses in Electron Forge
With Electron Forge, you can configure your app's fuses with
[@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
in your Forge configuration file.
:::
> [!TIP]
> With Electron Forge, you can configure your app's fuses with
> [@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
> in your Forge configuration file.
## Providing the header hash
@@ -109,7 +106,7 @@ Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of th
The `@electron/asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value
(e.g. using the [`node:crypto`](https://nodejs.org/api/crypto.html) module).
### Windows
#### Windows
When packaging for Windows, you must populate a valid [resource](https://learn.microsoft.com/en-us/windows/win32/menurc/resources)
entry of type `Integrity` and name `ElectronAsar`. The value of this resource should be a JSON encoded dictionary
@@ -125,9 +122,6 @@ in the form included below:
]
```
:::info
For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
in the Electron Packager code.
:::
> [!NOTE]
> For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
> in the Electron Packager code.

View File

@@ -233,10 +233,10 @@ can find [its documentation here](https://www.electron.build/code-signing).
[Azure Trusted Signing][] is Microsoft's modern cloud-based alternative to EV certificates.
It is the cheapest option for code signing on Windows, and it gets rid of SmartScreen warnings.
As of May 2025, Azure Trusted Signing is [available][trusted-signing-availability] to US and
Canada-based organizations with 3+ years of verifiable business history. Microsoft is looking
to make the program more widely available. If you're reading this at a later point, it could
make sense to check if the eligibility criteria have changed.
As of October 2025, Azure Trusted Signing is available to US and Canada-based organizations
with 3+ years of verifiable business history and to individual developers in the US and Canada.
Microsoft is looking to make the program more widely available. If you're reading this at a
later point, it could make sense to check if the eligibility criteria have changed.
#### Using Electron Forge
@@ -267,6 +267,5 @@ See the [Windows Store Guide][].
[maker-squirrel]: https://www.electronforge.io/config/makers/squirrel.windows
[maker-msi]: https://www.electronforge.io/config/makers/wix-msi
[azure trusted signing]: https://azure.microsoft.com/en-us/products/trusted-signing
[trusted-signing-availability]: https://techcommunity.microsoft.com/blog/microsoft-security-blog/trusted-signing-public-preview-update/4399713
[forge-trusted-signing]: https://www.electronforge.io/guides/code-signing/code-signing-windows#using-azure-trusted-signing
[builder-trusted-signing]: https://www.electron.build/code-signing-win#using-azure-trusted-signing-beta

View File

@@ -13,7 +13,7 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | v22.18 | ✅ |
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | ✅ |
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | |
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | 🚫 |
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | 🚫 |

View File

@@ -32,7 +32,7 @@ This table gives a general overview of where ESM is supported and which ESM load
| Main | Node.js | N/A | <ul><li> [You must use `await` generously before the app's `ready` event](#you-must-use-await-generously-before-the-apps-ready-event) </li></ul> |
| Renderer (Sandboxed) | Chromium | Unsupported | <ul><li> [Sandboxed preload scripts can't use ESM imports](#sandboxed-preload-scripts-cant-use-esm-imports) </li></ul> |
| Renderer (Unsandboxed & Context Isolated) | Chromium | Node.js | <ul><li> [Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content) </li> <li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
| Renderer (Unsandboxed & Non Context Isolated) | Chromium | Node.js | <ul><li>[Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content)</li><li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li><li>[ESM preload scripts must be context isolated to use dynamic Node.js ESM imports](#esm-preload-scripts-must-be-context-isolated-to-use-dynamic-nodejs-esm-imports)</li></ul> |
| Renderer (Unsandboxed & Non Context Isolated) | Chromium | Node.js | <ul><li>[Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content)</li><li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
## Main process

View File

@@ -26,12 +26,12 @@ any dependencies in your app will not be installed.
## Customization
If you want to change the architecture that is downloaded (e.g., `ia32` on an
`x64` machine), you can use the `--arch` flag with npm install or set the
If you want to change the architecture that is downloaded (e.g., `x64` on an
`arm64` machine), you can use the `--arch` flag with npm install or set the
`npm_config_arch` environment variable:
```shell
npm install --arch=ia32 electron
npm install --arch=x64 electron
```
In addition to changing the architecture, you can also specify the platform
@@ -60,7 +60,7 @@ where `$VERSION` is the exact version of Electron).
If you are unable to access GitHub or you need to provide a custom build, you
can do so by either providing a mirror or an existing cache directory.
#### Mirror
### Mirror
You can use environment variables to override the base URL, the path at which to
look for Electron binaries, and the binary filename. The URL used by `@electron/get`
@@ -95,7 +95,7 @@ Electron release you may have to set `electron_use_remote_checksums=1` directly,
or configure it in a `.npmrc` file, to force Electron to use the remote `SHASUMS256.txt`
file to verify the checksum instead of the embedded checksums.
#### Cache
### Cache
Alternatively, you can override the local cache. `@electron/get` will cache
downloaded binaries in a local directory to not stress your network. You can use
@@ -120,7 +120,7 @@ The cache contains the version's official zip file as well as a checksum, and is
│ └── electron-v15.3.1-darwin-x64.zip
```
## Skip binary download
## Postinstall script
Under the hood, Electron's JavaScript API binds to a binary that contains its
implementations. Because this binary is crucial to the function of any Electron app,

View File

@@ -55,14 +55,27 @@ There are a few rules to follow for the purposes of this tutorial:
- _author_, _license_, and _description_ can be any value, but will be necessary for
[packaging][packaging] later on.
:::caution Install dependencies with a regular `node_modules` folder
Electron's packaging toolchain requires the `node_modules` folder to be physically on disk in the
way that npm installs Node dependencies. By default, [Yarn Berry](https://yarnpkg.com/) and
[pnpm](http://pnpm.io/) both use alternative installation strategies.
Therefore, you must set [`nodeLinker: node-modules`](https://yarnpkg.com/configuration/yarnrc#nodeLinker)
in Yarn or [`nodeLinker: hoisted`](https://pnpm.io/settings#nodelinker) in pnpm if you are using
those package managers.
:::
Then, install Electron into your app's **devDependencies**, which is the list of external
development-only package dependencies not required in production.
:::info Why is Electron a devDependency?
:::info Why is Electron a dev dependency?
This may seem counter-intuitive since your production code is running Electron APIs.
However, packaged apps will come bundled with the Electron binary, eliminating the need to specify
it as a production dependency.
This may seem counter-intuitive since your production code is running Electron APIs. Under the hood,
Electron's JavaScript API binds to a binary that contains its implementations. The packaging step for
Electron handles the bundling of this binary, eliminating the need to specify it as a production
dependency.
:::
@@ -70,6 +83,17 @@ it as a production dependency.
npm install electron --save-dev
```
:::warning
In order to correctly install Electron, you need to ensure that its `postinstall` lifecycle
script is able to run. This means avoiding the `--ignore-scripts` flag on npm and allowlisting
`electron` to run build scripts on other package managers.
This is likely to change in a future version of Electron. See
[electron/rfcs#22](https://github.com/electron/rfcs/pull/22) for more details.
:::
Your package.json file should look something like this after initializing your package
and installing Electron. You should also now have a `node_modules` folder containing
the Electron executable, as well as a `package-lock.json` lockfile that specifies

View File

@@ -629,8 +629,6 @@ filenames = {
"shell/common/gin_converters/usb_device_info_converter.h",
"shell/common/gin_converters/value_converter.cc",
"shell/common/gin_converters/value_converter.h",
"shell/common/gin_helper/arguments.cc",
"shell/common/gin_helper/arguments.h",
"shell/common/gin_helper/callback.cc",
"shell/common/gin_helper/callback.h",
"shell/common/gin_helper/cleaned_up_at_exit.cc",

View File

@@ -1034,14 +1034,12 @@ libcxx_headers = [
"//third_party/libc++/src/include/__fwd/get.h",
"//third_party/libc++/src/include/__fwd/ios.h",
"//third_party/libc++/src/include/__fwd/istream.h",
"//third_party/libc++/src/include/__fwd/map.h",
"//third_party/libc++/src/include/__fwd/mdspan.h",
"//third_party/libc++/src/include/__fwd/memory.h",
"//third_party/libc++/src/include/__fwd/memory_resource.h",
"//third_party/libc++/src/include/__fwd/ostream.h",
"//third_party/libc++/src/include/__fwd/pair.h",
"//third_party/libc++/src/include/__fwd/queue.h",
"//third_party/libc++/src/include/__fwd/set.h",
"//third_party/libc++/src/include/__fwd/span.h",
"//third_party/libc++/src/include/__fwd/sstream.h",
"//third_party/libc++/src/include/__fwd/stack.h",
@@ -1367,7 +1365,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__tree",
"//third_party/libc++/src/include/__tuple/find_index.h",
"//third_party/libc++/src/include/__tuple/ignore.h",
"//third_party/libc++/src/include/__tuple/make_tuple_types.h",
"//third_party/libc++/src/include/__tuple/sfinae_helpers.h",
"//third_party/libc++/src/include/__tuple/tuple_element.h",
"//third_party/libc++/src/include/__tuple/tuple_like.h",
@@ -1381,7 +1378,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/aligned_storage.h",
"//third_party/libc++/src/include/__type_traits/aligned_union.h",
"//third_party/libc++/src/include/__type_traits/alignment_of.h",
"//third_party/libc++/src/include/__type_traits/can_extract_key.h",
"//third_party/libc++/src/include/__type_traits/common_reference.h",
"//third_party/libc++/src/include/__type_traits/common_type.h",
"//third_party/libc++/src/include/__type_traits/conditional.h",
@@ -1462,6 +1458,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_trivially_relocatable.h",
"//third_party/libc++/src/include/__type_traits/is_unbounded_array.h",
"//third_party/libc++/src/include/__type_traits/is_union.h",
"//third_party/libc++/src/include/__type_traits/is_unqualified.h",
"//third_party/libc++/src/include/__type_traits/is_unsigned.h",
"//third_party/libc++/src/include/__type_traits/is_valid_expansion.h",
"//third_party/libc++/src/include/__type_traits/is_void.h",
@@ -1501,6 +1498,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__utility/cmp.h",
"//third_party/libc++/src/include/__utility/convert_to_integral.h",
"//third_party/libc++/src/include/__utility/declval.h",
"//third_party/libc++/src/include/__utility/default_three_way_comparator.h",
"//third_party/libc++/src/include/__utility/element_count.h",
"//third_party/libc++/src/include/__utility/empty.h",
"//third_party/libc++/src/include/__utility/exception_guard.h",
@@ -1511,6 +1509,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__utility/integer_sequence.h",
"//third_party/libc++/src/include/__utility/is_pointer_in_range.h",
"//third_party/libc++/src/include/__utility/is_valid_range.h",
"//third_party/libc++/src/include/__utility/lazy_synth_three_way_comparator.h",
"//third_party/libc++/src/include/__utility/move.h",
"//third_party/libc++/src/include/__utility/no_destroy.h",
"//third_party/libc++/src/include/__utility/pair.h",
@@ -1522,6 +1521,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__utility/small_buffer.h",
"//third_party/libc++/src/include/__utility/swap.h",
"//third_party/libc++/src/include/__utility/to_underlying.h",
"//third_party/libc++/src/include/__utility/try_key_extraction.h",
"//third_party/libc++/src/include/__utility/unreachable.h",
"//third_party/libc++/src/include/__variant/monostate.h",
"//third_party/libc++/src/include/__vector/comparison.h",

View File

@@ -20,6 +20,7 @@
"@types/temp": "^0.9.4",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.7.0",
"@xmldom/xmldom": "^0.8.11",
"buffer": "^6.0.3",
"chalk": "^4.1.0",
"check-for-leaks": "^1.2.1",

1
patches/angle/.patches Normal file
View File

@@ -0,0 +1 @@
cherry-pick-2f564f1ca07b.patch

View File

@@ -0,0 +1,125 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Mentovai <mark@chromium.org>
Date: Tue, 16 Sep 2025 16:46:36 -0400
Subject: mac: handle Metal toolchain being unbundled from Xcode 26
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Metal toolchain was formerly part of Xcode, but in Xcode 26, it has
been unbundled and is now a separate install. Attempting to use the
Metal toolchain without installing it results in a build error, such as:
error: error: cannot execute tool 'metal' due to missing Metal
Toolchain; use: xcodebuild -downloadComponent MetalToolchain
By running the suggested command, the Metal toolchain can be installed,
but the existing angle build does not know how to find it correctly.
For system Xcode installations, tools from the Metal toolchain (`metal`
and `metallib`) can be run via `xcrun`. This construct should work
equally well for older Xcode versions, for situations where its still
in use.
For the hermetic toolchain, well continue splicing the Metal toolchain
into the location it had previously been avialable (see
https://chromium-review.googlesource.com/c/6950738), although this is
subject to change in the future.
Bug: chromium:423933062, chromium:445400016
Change-Id: I139eca51938f7cecfec9b90fd488947160ef4ec9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6955000
Auto-Submit: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/metal/BUILD.gn b/src/libANGLE/renderer/metal/BUILD.gn
index 96e9ee8420810f6a3ca9a0c290d4a654200eb7b9..50ac42a5b9a0f7c8b3b161af40c598cb34ff132a 100644
--- a/src/libANGLE/renderer/metal/BUILD.gn
+++ b/src/libANGLE/renderer/metal/BUILD.gn
@@ -24,20 +24,56 @@ config("angle_metal_backend_config") {
}
if (metal_internal_shader_compilation_supported) {
+ template("run_metal_tool") {
+ action(target_name) {
+ forward_variables_from(invoker,
+ [
+ "deps",
+ "sources",
+ "outputs",
+ "metal_tool",
+ ])
+ script = "shaders/metal_wrapper.py"
+ if (use_system_xcode) {
+ # System Xcode: run metal and metallib via xcrun. Since Xcode 26.0, the
+ # Metal toolchain has been unbundled from Xcode, and must be installed
+ # separately by running `xcodebuild -downloadComponent MetalToolchain`.
+ # There is a vestigial metal executable in mac_bin_path, but its
+ # incapable of running successfuly without the
+ # rest of the Metal toolchain surrounding it. `xcrun` is able to find
+ # and run the correct Metal toolchain when properly installed.
+ #
+ # If youre using system Xcode and your build fails with this message:
+ # error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain
+ # then do what the error message suggests, and then retry your build.
+ args = [
+ "xcrun",
+ metal_tool,
+ ]
+ } else {
+ # Hermetic Xcode: at least for now, the Metal toolchain is
+ # “spliced” into the location in the hermetic toolchain where it lived
+ # before Xcode 26.0, so it can be run directly from there.
+ args = [ mac_bin_path + metal_tool ]
+ }
+
+ args += invoker.args
+ }
+ }
+
_metal_internal_shaders_air_file =
"$root_gen_dir/angle/mtl_internal_shaders_autogen.air"
- action("angle_metal_internal_shaders_to_air") {
- script = "shaders/metal_wrapper.py"
-
- outputs = [ _metal_internal_shaders_air_file ]
-
+ run_metal_tool("angle_metal_internal_shaders_to_air") {
_metal_internal_shaders_metal_source =
"shaders/mtl_internal_shaders_autogen.metal"
sources = [ _metal_internal_shaders_metal_source ]
+ outputs = [ _metal_internal_shaders_air_file ]
+
+ metal_tool = "metal"
+
args = [
- mac_bin_path + "metal",
"-c",
rebase_path(_metal_internal_shaders_metal_source, root_build_dir),
"-o",
@@ -60,17 +96,16 @@ if (metal_internal_shader_compilation_supported) {
_metal_internal_shaders_metallib_file =
"$root_gen_dir/angle/mtl_internal_shaders_autogen.metallib"
- action("angle_metal_internal_shaders_to_mtllib") {
- script = "shaders/metal_wrapper.py"
-
- outputs = [ _metal_internal_shaders_metallib_file ]
+ run_metal_tool("angle_metal_internal_shaders_to_mtllib") {
+ deps = [ ":angle_metal_internal_shaders_to_air" ]
sources = [ _metal_internal_shaders_air_file ]
- deps = [ ":angle_metal_internal_shaders_to_air" ]
+ outputs = [ _metal_internal_shaders_metallib_file ]
+
+ metal_tool = "metallib"
args = [
- mac_bin_path + "metallib",
rebase_path(_metal_internal_shaders_air_file, root_build_dir),
"-o",
rebase_path(_metal_internal_shaders_metallib_file, root_build_dir),

View File

@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
index 431214277314941c5ec031f03ad09e7f22800983..4cc48bbc3f8434876f35767c1a9f01d27388be99 100644
index 345c94f6e26e88aac77b9feb92bd8d6665234981..8ef2ab8987da63f321d1dbb79f2eded8b8209bfc 100644
--- a/crypto/digest/digest_extra.cc
+++ b/crypto/digest/digest_extra.cc
@@ -46,6 +46,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
@@ -47,6 +47,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
@@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index 710c6e6d110378d1db10d8c2ae57b2d844c603b9..dbb1e0cd5e9480d1ac7a86cbca6fae29d6a8dca4 100644
index b604aba00c1c6cea8002b6dc298ea5fe979589b1..1c123aa1dca09ae60c31be2a6dab9a64748eac17 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);

View File

@@ -28,7 +28,7 @@ RC2 Ciphers: rc2-40-cbc
It's unclear whether this would be accepted upstream. We should try regardless.
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
index 2622dc78d1da236862312f55bc0a40f26116486e..ac7aff6518ad5c2a0e48bd91d60a1f825851b634 100644
index 6513df01c4b3e4d33fc6b521d9aae78ec5499e73..52eb7fea420e3d81d274fd5c1e21e4da0229687f 100644
--- a/crypto/cipher/get_cipher.cc
+++ b/crypto/cipher/get_cipher.cc
@@ -31,6 +31,7 @@ static const struct {

View File

@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f8431434e42 100644
index 2e0db357135d54bc416bc94f4e3849267932c3b4..35f0430b5d1c1ed1676ea7a9e7e94e820126607b 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1206,7 +1206,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -1211,7 +1211,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
}
if (ret_code == 0) {
@@ -32,7 +32,7 @@ index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f84
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2567,13 +2567,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2602,13 +2602,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

View File

@@ -138,4 +138,9 @@ fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch
feat_add_support_for_embedder_snapshot_validation.patch
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
chore_add_electron_objects_to_wrappablepointertag.patch
band-aid_over_an_issue_with_using_deprecated_nsopenpanel_api.patch
chore_expose_isolate_parameter_in_script_lifecycle_observers.patch
revert_partial_remove_unused_prehandlemouseevent.patch
allow_electron_to_depend_on_components_os_crypt_sync.patch
disable_nsautofillheuristiccontroller_on_macos_26.patch
expose_referrerscriptinfo_hostdefinedoptionsindex.patch
inspectorpageagent_provisional_frame_speculative_fix.patch

View File

@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc9823ab51e5 100644
index a827f072e72d76dd52378cca4368932a4b2f4f3d..cc1b6cca3009e876f84f48df942df02fddd91e80 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -271,6 +271,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -273,6 +273,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler();
@@ -24,7 +24,7 @@ index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc98
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -380,7 +384,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -382,7 +386,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

View File

@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e90be3d39b 100644
index 284da783658bec333be748941784d43b13f6f244..18714ce8fc27c8d56c5deac27ba335078c452d0a 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderFrameObserver {
@@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver {
virtual void DidHandleOnloadEvents() {}
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
int32_t world_id) {}
@@ -23,10 +23,10 @@ index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e9
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 859113ed13e77dcdd72b2ab327b94e94492f5d24..51948d7fcae02bd85133a859989f93a07dd0e236 100644
index a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c..f337d61906651359eeb5228c112ad948f4f7a752 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4677,6 +4677,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4678,6 +4678,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 859113ed13e77dcdd72b2ab327b94e94492f5d24..51948d7fcae02bd85133a859989f93a0
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa56dbfa2dc 100644
index 2950a6f600aab24226ef59acabddc74c9b67cac8..f0f4335aa815ea50dbf9b720b41e4eb31f27fb90 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa5
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 5c1c325d1e4037b0b413c3519e963c5f0210086a..994dd3118dfa43816db60e5dfb61c00bf366e92d 100644
index 101e727b3a97bc764315eb694dc3975f9a408f9c..52e8828d8fffaba8ab05436cb4d727595f18238a 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -662,6 +662,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -661,6 +661,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -92,7 +92,7 @@ index 36baf908d3be8aed44ff60b8de2cffe2eee15efe..8d73ddb12013ce195026b9f63050cf33
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d2691fac2b7 100644
index b02b60ff5f6650332c54ecc66f6fdb274b737aa7..1aacf6f66b543a4ede6ab5d885143dd4a0821e8a 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d26
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index 081c8fabbcc514e47ff33d7e07a5eac3d112a518..e3fab574523a4b63069587b2fcaf30267fddf7c4 100644
index fcc0928abbc454281b022e0451d993651ecba42f..16066fe34ee0335a0dabe00b6890e5844349c0b5 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -81,6 +81,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {

View File

@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index 0b457d0742b24381718092d6af11f396fda30436..e1619eeeb8f29e6745da282a33a3464ec97aefb0 100644
index 2d612b3a8ceb61f02fbd96023140bc2c702db589..bb5b17fc884b78aa65c3885e11309a9c50f8e786 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -236,6 +236,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
@@ -246,6 +246,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
}
}
@@ -29,10 +29,10 @@ index 0b457d0742b24381718092d6af11f396fda30436..e1619eeeb8f29e6745da282a33a3464e
objects_.clear();
raw_objects_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index 939a99b2a086d5373f82fe96da73dabe02f6f9d8..fccc200b1b11076c8fcffde071a53598ffba9a12 100644
index 8c2be540757856a3e704764fe56003205b24812f..e31fbc01f68c0e92284a72298cac878d7247e7fb 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
@@ -91,6 +91,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
// This is only used to write custom format data.
void WriteData(std::u16string_view format, mojo_base::BigBuffer data);

View File

@@ -8,7 +8,7 @@ accessing Blink internals. Its inverse, which already exists, is used in
Android WebView.
diff --git a/third_party/blink/public/web/web_message_port_converter.h b/third_party/blink/public/web/web_message_port_converter.h
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e7521cb71b8 100644
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..cdf9bca3df292531831b6df0077ba211a29548aa 100644
--- a/third_party/blink/public/web/web_message_port_converter.h
+++ b/third_party/blink/public/web/web_message_port_converter.h
@@ -13,6 +13,7 @@
@@ -19,18 +19,20 @@ index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e75
} // namespace v8
namespace blink {
@@ -25,6 +26,9 @@ class BLINK_EXPORT WebMessagePortConverter {
@@ -25,6 +26,11 @@ class BLINK_EXPORT WebMessagePortConverter {
// neutered, it will return nullopt.
static std::optional<MessagePortChannel>
DisentangleAndExtractMessagePortChannel(v8::Isolate*, v8::Local<v8::Value>);
+
+ BLINK_EXPORT static v8::Local<v8::Value>
+ EntangleAndInjectMessagePortChannel(v8::Local<v8::Context>, MessagePortChannel);
+ EntangleAndInjectMessagePortChannel(v8::Isolate*,
+ v8::Local<v8::Context>,
+ MessagePortChannel);
};
} // namespace blink
diff --git a/third_party/blink/renderer/core/exported/web_message_port_converter.cc b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef732225d6 100644
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..bbd3c968027549b89087d9a4394f575d84213eba 100644
--- a/third_party/blink/renderer/core/exported/web_message_port_converter.cc
+++ b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
@@ -6,6 +6,7 @@
@@ -41,19 +43,20 @@ index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef
#include "third_party/blink/renderer/bindings/core/v8/v8_message_port.h"
#include "third_party/blink/renderer/core/messaging/message_port.h"
@@ -21,4 +22,15 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
@@ -21,4 +22,16 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
return port->Disentangle();
}
+v8::Local<v8::Value>
+WebMessagePortConverter::EntangleAndInjectMessagePortChannel(
+ v8::Isolate* isolate,
+ v8::Local<v8::Context> context,
+ MessagePortChannel port_channel) {
+ auto* execution_context = ToExecutionContext(context);
+ CHECK(execution_context);
+ auto* port = MakeGarbageCollected<MessagePort>(*execution_context);
+ port->Entangle(std::move(port_channel));
+ return port->ToV8(context->GetIsolate(), context->Global());
+ return port->ToV8(isolate, context->Global());
+}
+
} // namespace blink

View File

@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aabbba621cb 100644
index 8f425bd66fac7b36cee201c3e23c126dd14edf07..6216ad30ed15f11501e1d154258862f57941969e 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -48,6 +48,7 @@
@@ -19,9 +19,9 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
#include "content/public/browser/web_ui_data_source.h"
+#include "electron/shell/browser/electron_browser_context.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_mode.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform.h"
@@ -173,7 +174,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
@@ -178,7 +179,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
@@ -30,7 +30,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -197,7 +198,7 @@ void HandleAccessibilityRequestCallback(
@@ -224,7 +225,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
@@ -39,7 +39,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
bool web = mode.has_mode(ui::AXMode::kWebContents);
@@ -258,7 +259,7 @@ void HandleAccessibilityRequestCallback(
@@ -285,7 +286,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kIsScreenReaderActive, is_screen_reader_active);
std::string pref_api_type =
@@ -48,7 +48,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -326,11 +327,11 @@ void HandleAccessibilityRequestCallback(
@@ -353,11 +354,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
@@ -61,8 +61,8 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
+#endif
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -804,7 +805,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
#if BUILDFLAG(IS_WIN)
@@ -844,7 +845,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@@ -72,7 +72,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -858,7 +860,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -898,7 +900,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -82,7 +82,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -885,6 +888,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -925,6 +928,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -90,7 +90,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -897,6 +901,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -937,6 +941,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@@ -98,7 +98,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -940,11 +945,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -980,11 +985,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -115,7 +115,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
// Check to see if it is in the supported types list.
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
supported_types.end()) {
@@ -1014,8 +1021,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -1054,10 +1061,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
@@ -127,11 +127,13 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
+ registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false);
+#endif
}
void AccessibilityUIMessageHandler::OnVisibilityChanged(
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7f1648148 100644
index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83c1d1fa0a 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
@@ -27,6 +27,8 @@ namespace content {
@@ -28,6 +28,8 @@ namespace content {
class WebContents;
} // namespace content
@@ -140,7 +142,7 @@ index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
@@ -77,6 +79,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
@@ -79,6 +81,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler,
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
private:

View File

@@ -6,11 +6,11 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index 1d002528ba2b90d9c361c77ab00aeb1ccd000177..77f3b011f9c3710ac93ad20a92eafea0d35bb9a7 100644
index 318031e17f212b0e9a651dcc0e86e16af957ed8e..e68dcdc8039217ec59a60ef02c27b4f80f661d2a 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
(const std::optional<uint64_t> canvas_noise_token),
(std::optional<blink::NoiseToken> canvas_noise_token),
(override));
+ MOCK_METHOD(
@@ -23,10 +23,10 @@ index 1d002528ba2b90d9c361c77ab00aeb1ccd000177..77f3b011f9c3710ac93ad20a92eafea0
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ac7638da0c0b360d21b88e4e458d3687949884fa..45d2fe002330cb4aa7c81defaa5004d5e62e369a 100644
index 270750b9180a8ddab4f3cd2508fd398e07bf6377..20b2ae081a3710443ec919f1487dfbfe8f15de11 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -786,6 +786,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -785,6 +785,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -51,10 +51,10 @@ index 7944fe64e0da112fc670358b75506bb199bb5e4a..0e3c16c6af2a078943e9f39808134ab2
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index b14f5bc3f023c512a066ce9ec9f681c96b1fafc4..b930145db575eb8c4e84297ddd610bd90fb5d3a8 100644
index e95a313945397c6eff5514932ce15c5d4b6a8e1f..edb2638deb85dfd37651a00d4c370e51d94fcc6a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -580,8 +580,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -578,8 +578,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
// which updates `visibility_`, unless the host is hidden. Make sure no update
// is needed.
@@ -66,10 +66,10 @@ index b14f5bc3f023c512a066ce9ec9f681c96b1fafc4..b930145db575eb8c4e84297ddd610bd9
void RenderWidgetHostViewAura::EnsurePlatformVisibility(
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb19389b72203b 100644
index a599bc306198de0e172134ce4623b32b8fcd72fa..4960c518d49f98b39873d166597bfb4b5619ee02 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -75,6 +75,9 @@ class CONTENT_EXPORT RenderViewHost {
@@ -74,6 +74,9 @@ class CONTENT_EXPORT RenderViewHost {
virtual void WriteIntoTrace(
perfetto::TracedProto<TraceProto> context) const = 0;
@@ -80,34 +80,34 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
index 0dc1cd52dec74ede2117eb244e423d7f3ad322ea..352c64b3aec50546451a0033114e3a35dcf32136 100644
index 82ae7ab6279427e492ead6d1d386608eb9d3d844..2b79149bfcc0de968ffb45e310d697c5393f0d43 100644
--- a/content/test/test_page_broadcast.h
+++ b/content/test/test_page_broadcast.h
@@ -53,6 +53,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
const blink::ColorProviderColorMaps& color_provider_colors) override;
void UpdateCanvasNoiseToken(
std::optional<uint64_t> canvas_noise_token) override;
std::optional<blink::NoiseToken> canvas_noise_token) override;
+ void SetSchedulerThrottling(bool allowed) override {}
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
};
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index bcf8559d759e73e4f3f00710d263fe24cc801828..556f990868b862452156cec2354a90ae75352251 100644
index e7be05ec6dc5f517b4a6f849a262d12dc6c1ca3d..5f4f425c77c8aadf269edfaec658a8d2ad74b2cd 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -180,4 +180,7 @@ interface PageBroadcast {
@@ -182,4 +182,7 @@ interface PageBroadcast {
// the noise token at ReadyToCommit time and update blink::WebViews that
// were made at request time.
UpdateCanvasNoiseToken(uint64? canvas_noise_token);
UpdateCanvasNoiseToken(blink.mojom.NoiseToken? canvas_noise_token);
+
+ // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index b3553c0783a7b00e055f82ef0b72bd866284473d..c91e49807ec0b56d867504831118269116024626 100644
index 9c0fe6ad62872f05cfb1179b4b979139008976d2..6aca43e61ef7f1caea74c30e5c3ce4496d4c4188 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -365,6 +365,7 @@ class BLINK_EXPORT WebView {
@@ -366,6 +366,7 @@ class BLINK_EXPORT WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -116,10 +116,10 @@ index b3553c0783a7b00e055f82ef0b72bd866284473d..c91e49807ec0b56d8675048311182691
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 316e686d00b72bf9d2e153221bfc3b97dbad8b61..b9799837c7ce14fc76045700b30e1358d4705251 100644
index cd57d63a452cb4444d5d0b11b06c65c5bc11f5f1..68a102327e22302587f7cc402cb26ef2f02b261e 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2490,6 +2490,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2504,6 +2504,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 316e686d00b72bf9d2e153221bfc3b97dbad8b61..b9799837c7ce14fc76045700b30e1358
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -3999,10 +4003,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -4012,10 +4016,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,7 +155,7 @@ index 316e686d00b72bf9d2e153221bfc3b97dbad8b61..b9799837c7ce14fc76045700b30e1358
// Do not throttle if the page should be painting.
bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index efcec3ebab3e60b66c2444e9a5c755c945f052cf..85cd9599cb5169f01c9096d9da89cff59930d1be 100644
index 7879bd064e9ef324e12b5c2f522f9c8a4fa29ad5..950df20815a607b678e0e67a19d22d37b579b85d 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -166,7 +166,7 @@ index efcec3ebab3e60b66c2444e9a5c755c945f052cf..85cd9599cb5169f01c9096d9da89cff5
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -941,6 +942,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -943,6 +944,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Mon, 15 Sep 2025 15:52:55 -0400
Subject: Allow electron to depend on components/os_crypt/sync.
This is necessary after
https://chromium-review.googlesource.com/c/chromium/src/+/6944749
landed. That CL notes that "new code should use os_crypt async",
so we can remove this patch once we migrate our code to use
os_crypt async.
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
index 81fc444043b67858371142075f98ad9aff162fc3..7ab1c6d1422e19afa603d9b3eeeb30044fb9c7b3 100644
--- a/components/os_crypt/sync/BUILD.gn
+++ b/components/os_crypt/sync/BUILD.gn
@@ -10,6 +10,7 @@ import("//components/os_crypt/sync/features.gni")
component("sync") {
# New code should use os_crypt async.
visibility = [
+ "//electron:*",
"//chrome/browser",
"//chrome/browser/prefs:impl",
"//chrome/browser/ui",

View File

@@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on
process-level command line switches, as before.
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index e66a1b104fbcb6ac81b745a28588a994533745ff..08abd32cebf89d434bf60b4fd420430e88540adc 100644
index c0362530043cdaffc008d0c90d55cb9522db1557..3eb37d797feccdbb2a9d4b4f26e222b6f837b802 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -32,7 +32,7 @@ index e66a1b104fbcb6ac81b745a28588a994533745ff..08abd32cebf89d434bf60b4fd420430e
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b90875b82819c 100644
index 30572628d5d221e58159391f6bfd8e01525291bd..6020cce84810b9515298b65880091ebb97559688 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
@@ -43,7 +43,7 @@ index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b9087
#include "build/build_config.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -462,6 +463,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -464,6 +465,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
bool increment_local_surface_id_for_mainframe_same_doc_navigation = true;
#endif // BUILDFLAG(IS_ANDROID)
@@ -64,7 +64,7 @@ index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b9087
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index 36e04a5f887fd9102b3d74a4230132ecee780c1b..8e53242f1be83920ca64c95c31aa674e04d2bb81 100644
index ccba9b7353c87d2e2bced7770920c976865c0d65..4d93ef8c1976cf533c32bc9c17dbf6b81f2b59c6 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -8,6 +8,7 @@
@@ -129,7 +129,7 @@ index 36e04a5f887fd9102b3d74a4230132ecee780c1b..8e53242f1be83920ca64c95c31aa674e
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index dd6185b0eacf942d902505ac23bf88059bf2786a..f3f1c71f241db0a90144909971412009e5510b6e 100644
index 9827715ad3cd306a0ec18fb6b2936ecf8677af21..66cbaf3a5b19a38295cad04d0e978de417984370 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -8,9 +8,11 @@ import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";

View File

@@ -1,108 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Avi Drissman <avi@chromium.org>
Date: Thu, 21 Aug 2025 07:33:53 -0700
Subject: Band-aid over an issue with using deprecated NSOpenPanel API
Because deprecated and broken NSOpenPanel API is used, the open panel
will sometimes incorrectly misunderstand a folder to be a package and
return it as a user selection when folders are disallowed from
selection. In that case, skip it.
Bug: 40861123
Bug: 41275486
Bug: 440106155
Change-Id: Ia0459a2bb76a30f4e126bd83069d7e13894d62f6
Fixed: 438779953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6867298
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Christine Hollingsworth <christinesm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1504534}
diff --git a/components/remote_cocoa/app_shim/select_file_dialog_bridge.mm b/components/remote_cocoa/app_shim/select_file_dialog_bridge.mm
index f0b8108a7f8a63f66664c6c5ad3ada0bf60805b3..67380a76c699d1c2db0d3a96671bb92657c4a6d3 100644
--- a/components/remote_cocoa/app_shim/select_file_dialog_bridge.mm
+++ b/components/remote_cocoa/app_shim/select_file_dialog_bridge.mm
@@ -225,7 +225,7 @@ - (void)popupAction:(id)sender {
// Unfortunately, there's no great way to do strict type matching with
// NSOpenPanel. Setting explicit extensions via -allowedFileTypes is
// deprecated, and there's no way to specify that strict type equality should
- // be used for -allowedContentTypes (FB13721802).
+ // be used for -allowedContentTypes (https://crbug.com/41275486, FB13721802).
//
// -[NSOpenSavePanelDelegate panel:shouldEnableURL:] could be used to enforce
// strict type matching, however its presence on the delegate means that all
@@ -235,6 +235,10 @@ - (void)popupAction:(id)sender {
//
// Therefore, use the deprecated API, because it's the only way to remain
// performant while achieving strict type matching.
+ //
+ // TODO(https://crbug.com/440106155): Possibly reconsider using
+ // -panel:shouldEnableURL: if the speed impact is judged to be acceptable
+ // nowadays.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -479,8 +483,8 @@ - (void)popupAction:(id)sender {
// See -[ExtensionDropdownHandler popupAction:] as to why file extensions
// are collected here rather than being converted to UTTypes.
- // TODO(FB13721802): Use UTTypes when strict type matching can be
- // specified.
+ // TODO(https://crbug.com/440106155, FB13721802): Use UTTypes when strict
+ // type matching can be specified.
NSString* ext_ns = base::SysUTF8ToNSString(ext);
if (![file_extensions_array containsObject:ext_ns]) {
[file_extensions_array addObject:ext_ns];
@@ -571,18 +575,46 @@ - (void)popupAction:(id)sender {
}
NSString* path = url.path;
- // There is a bug in macOS where, despite a request to disallow file
- // selection, files/packages are able to be selected. If indeed file
- // selection was disallowed, drop any files selected.
- // https://crbug.com/40861123, FB11405008
- if (!open_panel.canChooseFiles) {
+ if (base::mac::MacOSMajorVersion() < 14) {
+ // There is a bug in macOS (https://crbug.com/40861123, FB11405008)
+ // where, despite a request to disallow file selection, files/packages
+ // are able to be selected. If indeed file selection was disallowed,
+ // drop any files selected. This issue is fixed in macOS 14, so only
+ // do the workaround on previous releases.
+ if (!open_panel.canChooseFiles) {
+ BOOL is_directory;
+ BOOL exists =
+ [NSFileManager.defaultManager fileExistsAtPath:path
+ isDirectory:&is_directory];
+ BOOL is_package =
+ [NSWorkspace.sharedWorkspace isFilePackageAtPath:path];
+ if (!exists || !is_directory || is_package) {
+ continue;
+ }
+ }
+ }
+
+ // As long as FB13721802 remains unfixed, this class uses extensions to
+ // filter what files are available rather than UTTypes. This deprecated
+ // API has a problem, however. If you specify an extension to be shown
+ // as available, then the NSOpenPanel will assume that any directory
+ // that has that extension is a package, and will offer it to the user
+ // for selection even if directory selection isn't otherwise allowed.
+ // Therefore, if directories are disallowed, filter out any that find
+ // their way in if they're not actually packages.
+ //
+ // TODO(https://crbug.com/440106155, FB13721802): Possibly reconsider
+ // using -panel:shouldEnableURL: if the speed impact is judged to be
+ // acceptable nowadays, and drop this band-aid.
+ if (!open_panel.canChooseDirectories) {
BOOL is_directory;
BOOL exists =
[NSFileManager.defaultManager fileExistsAtPath:path
isDirectory:&is_directory];
BOOL is_package =
[NSWorkspace.sharedWorkspace isFilePackageAtPath:path];
- if (!exists || !is_directory || is_package) {
+ if (!exists || (is_directory && !is_package)) {
+ NSLog(@"dropping %@", path);
continue;
}
}

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df233b75e2 100644
index cdb5b9246087b5678cf6a0f2713f6238dafc13de..7efbe7524c5ddd3785fff0e2d8901f931f024f48 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index e57912ad2d06ccd3d5c0f4d958a0735d1fab9997..7aeff27d6005d70f962fcbd90e6902987e3abd09 100644
index 72f642cb098bb6bbb445b49823663a7deb316842..902f472c8c52dd4fe52f46fbb97034b041153f65 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -738,10 +738,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -751,10 +751,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index e57912ad2d06ccd3d5c0f4d958a0735d1fab9997..7aeff27d6005d70f962fcbd90e690298
if (!Client())
return false;
@@ -795,6 +791,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -808,6 +804,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index e72bdff1c640ae6f6cbf91727a01985ccf9bd83b..40059b155b5ea9882a2ae4b624c68d3335fdc9f9 100644
index 67b5911d7815b47aafe1df1030c96a903e495df1..4813b0dc361219ad30a7e745a7906fa396c3950c 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -124,6 +124,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
@@ -128,6 +128,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("drm"),
perfetto::Category("drmcursor"),
perfetto::Category("dwrite"),

View File

@@ -11,10 +11,10 @@ To accomplish this, we need to make simdutf's config public here
for use by third_party/electron_node.
diff --git a/third_party/simdutf/BUILD.gn b/third_party/simdutf/BUILD.gn
index 5fbce38841f04dad38f202f529ae84c609c6a8de..9f5ef9bceade8e30bbd2be616b9143e9708fefd8 100644
index 68f1ed4e012cff5e0abd64a153a329518860689d..eeb846525e58f038733318915a770bafa22cafc5 100644
--- a/third_party/simdutf/BUILD.gn
+++ b/third_party/simdutf/BUILD.gn
@@ -6,9 +6,14 @@ source_set("header") {
@@ -8,9 +8,14 @@ source_set("header") {
sources = [ "simdutf.h" ]
}

View File

@@ -10,10 +10,10 @@ Needed for:
2) //electron/shell/common:web_contents_utility
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 981abc2963aaaa8f4cf283cdc0807907500b65eb..4be2f078f0c9890d0bcca635a82711386abae077 100644
index 8e91c465c68bec818253820ecaeeb7c3feb180a2..fea8bb9f87c007775a2bb6e1abe1ec498a8b19b4 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -382,6 +382,8 @@ mojom("interfaces") {
@@ -371,6 +371,8 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

View File

@@ -11,15 +11,15 @@ This patch can (and should) be removed when we can prevent those symbols
from being stripped in the release build.
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 0611cd47ef35d3b137a3278896a9174ae2fc3c31..a076c0f461b50fea86679a148b857739f7ec2c3d 100644
index 21bd22896d7bca4d4a133677286f7f8ad1b224f2..53654e4467fa4ae57ce42bd971b1be3a11654aaf 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -88,7 +88,7 @@ declare_args() {
# have the same LLVM revisions as us, making bitcode useless to them.
@@ -85,7 +85,7 @@ declare_args() {
# Chrome's clang. crbug.com/1033839
use_thin_lto =
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
- (is_linux || is_win || is_mac ||
+ (is_linux || is_win ||
(is_ios && use_lld && !is_cronet_build) ||
- (is_linux || is_win || is_mac || (is_ios && use_lld) ||
+ (is_linux || is_win || (is_ios && use_lld) ||
(is_android && target_os != "chromeos") ||
(is_chromeos && is_chromeos_device)))

View File

@@ -33,10 +33,10 @@ index e648bb4ed2ff72441faa8773e449e0b6174f5af5..fd2c1d3ac575d10de7d5c09e4418d172
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index a8c2f5c562df8974ad02128a363e11ecd489031f..ca1bf94b55f1412599abbbe47063f0ce036c2352 100644
index 790764062094479f25b33a0dfa3e143472e0a077..a9997872138b2d58d279103e4cac3c92f2091f0a 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4795,7 +4795,7 @@ static_library("browser") {
@@ -4807,7 +4807,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index a8c2f5c562df8974ad02128a363e11ecd489031f..ca1bf94b55f1412599abbbe47063f0ce
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 9fb0b20dd5feb4f4b6ee4d97bcf9fc8e1b43d89c..a55f08cfa09eb2b1afbaab780db2a275ad490d78 100644
index 8bcc85cfd507f23c9651ea0a006fd6464ecd134f..92e88e0c8f764a779d7c899b423b589a0302b4bd 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7500,9 +7500,12 @@ test("unit_tests") {
@@ -7516,9 +7516,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 9fb0b20dd5feb4f4b6ee4d97bcf9fc8e1b43d89c..a55f08cfa09eb2b1afbaab780db2a275
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8428,6 +8431,10 @@ test("unit_tests") {
@@ -8430,6 +8433,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index 9fb0b20dd5feb4f4b6ee4d97bcf9fc8e1b43d89c..a55f08cfa09eb2b1afbaab780db2a275
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8484,7 +8491,6 @@ test("unit_tests") {
@@ -8486,7 +8493,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
everywhere, without having to import("//electron/.../flags.gni").
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index b1b5e79b92bea8ea05770d8c48cb4366938d71c5..16664ed3ab4b0ceecd4c74e44e57cca0dc57dc9b 100644
index 24a1d143954ae05ae0b79b0994b76ef9218fb848..5c9b2ed8ba48a1056560ca1cd1d5b976aee4815c 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

View File

@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index a024e6e435303a67cfd994d28b5a45a1d5343926..34715a1bbd1820c0d78b86cd9155bcf055778d94 100644
index 7dcefd2bceb209c6e74445259fac00e3e2280ff7..3a233d2e9dafc2093ead8f9c9104d06fe6176252 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -860,6 +860,7 @@ target(libcxx_target_type, "libc++") {
@@ -841,6 +841,7 @@ target(libcxx_target_type, "libc++") {
# need to explicitly depend on libc++.
visibility = [
"//build/config:common_deps",

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index e812aff087701b5d38fcb0b916335e21f5713040..4f8e3a08890ed7498b29a900ccf4bbda5f9cb494 100644
index 25bc5fd2f2158b95a7d6dff6a9a30c967c052149..ff0406154e44a3b12ec732e836fc1e65dadfd326 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9819,6 +9819,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9826,6 +9826,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index e812aff087701b5d38fcb0b916335e21f5713040..4f8e3a08890ed7498b29a900ccf4bbda
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a22f9897c47cc0fe0846fd631b0f094c0ded669a..5e35d7af2bcf9078887f4e2658e3f067f3b4f1b7 100644
index 29597a3a6f01fcff65de5624e583b03a1e34dd6f..6c067803c35a4e98ec99df6e28015f3b36e67e4f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5304,6 +5304,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5319,6 +5319,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.initially_hidden = renderer_started_hidden;
create_params.initial_popup_url = params.target_url;
@@ -35,7 +35,7 @@ index a22f9897c47cc0fe0846fd631b0f094c0ded669a..5e35d7af2bcf9078887f4e2658e3f067
// Even though all codepaths leading here are in response to a renderer
// trying to open a new window, if the new window ends up in a different
// browsing instance, then the RenderViewHost, RenderWidgetHost,
@@ -5359,6 +5363,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5373,6 +5377,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// Sets the newly created WebContents WindowOpenDisposition.
new_contents_impl->original_window_open_disposition_ = params.disposition;
@@ -48,7 +48,7 @@ index a22f9897c47cc0fe0846fd631b0f094c0ded669a..5e35d7af2bcf9078887f4e2658e3f067
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -5400,12 +5410,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5414,12 +5424,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -62,10 +62,10 @@ index a22f9897c47cc0fe0846fd631b0f094c0ded669a..5e35d7af2bcf9078887f4e2658e3f067
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 90cc84198b7f23c6a07ab503f60a577fdfba5baa..722b27b8adaf86624058ace5f9b5871ff0ede627 100644
index 15a83f61ed4e31ba34cbc19995cd9d68b1599f1d..9cf9fefad46a6c2ead4085adc76e0c07369f641a 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -661,6 +661,10 @@ struct CreateNewWindowParams {
@@ -662,6 +662,10 @@ struct CreateNewWindowParams {
pending_associated_remote<blink.mojom.Widget> widget;
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
@@ -77,10 +77,10 @@ index 90cc84198b7f23c6a07ab503f60a577fdfba5baa..722b27b8adaf86624058ace5f9b5871f
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 51635fb9f5da026fea3d25f0aa0d2d3f05017504..6a6b444270c3fcd084da7a63d8cc491e30b1eb20 100644
index 9d950e48dca63c6ec6899674cdfa98b1b4847542..fd15151cbe0c67164f07a730668f9b5ad0af2f40 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -872,6 +872,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -885,6 +885,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -90,7 +90,7 @@ index 51635fb9f5da026fea3d25f0aa0d2d3f05017504..6a6b444270c3fcd084da7a63d8cc491e
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index f9131c7b44751e3ab51a8db52ca22202138aeada..77addfedac20cf8ecf656321dda53ada149f17ff 100644
index 6dbfa4f14a5a610b49e58193f50d7337c998e7e1..f93858d6cb4cb89075e9ed7ee50f4e86df37c279 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -201,6 +201,7 @@ class NetworkService;
@@ -101,7 +101,7 @@ index f9131c7b44751e3ab51a8db52ca22202138aeada..77addfedac20cf8ecf656321dda53ada
} // namespace network
namespace sandbox {
@@ -1444,6 +1445,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1458,6 +1459,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -111,10 +111,10 @@ index f9131c7b44751e3ab51a8db52ca22202138aeada..77addfedac20cf8ecf656321dda53ada
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943f06978ad 100644
index 87e310a5473bec20b1326f3202cf2bf603227c04..968cddc769e2bf0bb56359b36bc03cbce6539da1 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -32,6 +32,17 @@ namespace content {
@@ -34,6 +34,17 @@ namespace content {
WebContentsDelegate::WebContentsDelegate() = default;
@@ -133,7 +133,7 @@ index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943
WebContents* source,
const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d 100644
index 16ce42f605513b641cc2ac07e34bfe3a017c5a7a..23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,6 +18,7 @@
@@ -152,7 +152,7 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
#include "content/public/common/window_container_type.mojom-forward.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
@@ -384,6 +386,16 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -388,6 +390,16 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@@ -170,10 +170,10 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 55ff46bd1c24b2341317102f6308a66c1b5aeb23..859113ed13e77dcdd72b2ab327b94e94492f5d24 100644
index 12047149fcd73050b5ee6645fa269153daf1836f..a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6770,6 +6770,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6776,6 +6776,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -232,10 +232,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 23a95863dc888a9ffb4b09c2b034665ef1186f7c..558f6afcdf8faa91744ac2143a03de88c0965366 100644
index 68ab3d483fe60671de50ec8952a0f71f103e4ad3..7ea5e45c08d7af439cf3eec041391ed7902ec865 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2354,6 +2354,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2333,6 +2333,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index 901485a978b095c44d344c05564b943b5240a4e0..724d42a18a7a093608e665542859eb3c5bb81243 100644
index 5eb6e4d1815a7a56c7fff1d6f095e6c7e8127b84..808d897ba80abb9cced32a02cb7026305afe0dd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -226,6 +226,7 @@ vs-chromium-project.txt
@@ -18,10 +18,10 @@ index 901485a978b095c44d344c05564b943b5240a4e0..724d42a18a7a093608e665542859eb3c
/google_apis/gcm/gcm.xml
/googleurl
diff --git a/third_party/.gitignore b/third_party/.gitignore
index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de1614826d39 100644
index 21adf9c5bd1887e765659a81192338de49028c71..1e64aca78c8609dd9de22d023622f14f58489364 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -46,7 +46,9 @@
@@ -45,7 +45,9 @@
/directxsdk
/dragonbox/src
/edk2
@@ -31,7 +31,7 @@ index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de16
/espresso/lib/
/eyesfree/src
/fast_float/src
@@ -94,6 +96,7 @@
@@ -93,6 +95,7 @@
/mocha
/mockito/src
/nacl_sdk_binaries/
@@ -39,7 +39,7 @@ index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de16
/ninja
/node/*.tar.gz
/node/linux/
@@ -139,7 +142,7 @@
@@ -138,7 +141,7 @@
/spirv-cross/src
/spirv-headers/src
/spirv-tools/src

View File

@@ -8,18 +8,21 @@ electron objects that extend gin::Wrappable and gets
allocated on the cpp heap
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
index 80ec409efe1635390887d1324be661643818abff..112a23f81680f5fcc2b016d8f5362e3a03507c8a 100644
index 80ec409efe1635390887d1324be661643818abff..7b23fbcb16958a37a3ad4d313326c0cd37bf05d4 100644
--- a/gin/public/wrappable_pointer_tags.h
+++ b/gin/public/wrappable_pointer_tags.h
@@ -66,7 +66,10 @@ enum WrappablePointerTag : uint16_t {
@@ -66,7 +66,13 @@ enum WrappablePointerTag : uint16_t {
kTextInputControllerBindings, // content::TextInputControllerBindings
kWebAXObjectProxy, // content::WebAXObjectProxy
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
- kLastPointerTag = kWrappedExceptionHandler,
+ kElectronApp, // electron::api::App
+ kElectronSession, // electron::api::Session
+ kElectronDebugger, // electron::api::Debugger
+ kElectronEvent, // gin_helper::internal::Event
+ kLastPointerTag = kElectronEvent,
+ kElectronMenu, // electron::api::Menu
+ kElectronNetLog, // electron::api::NetLog
+ kElectronSession, // electron::api::Session
+ kLastPointerTag = kElectronSession,
};
static_assert(kLastPointerTag <

View File

@@ -0,0 +1,272 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Mon, 1 Sep 2025 18:17:13 +0900
Subject: chore: expose isolate parameter in script lifecycle observers
Needed after https://chromium-review.googlesource.com/c/v8/v8/+/6875273
where callsites that deal with multiple contexts need to distinguish
the current isolate.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 79d59c3f4d3d2d5ff39bd65ded489183247656a8..20b49742578ccf363738ee032228f30a4cd676ea 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -398,6 +398,7 @@ class CONTENT_EXPORT ContentRendererClient {
// WillDestroyServiceWorkerContextOnWorkerThread() is called.
virtual void WillEvaluateServiceWorkerOnWorkerThread(
blink::WebServiceWorkerContextProxy* context_proxy,
+ v8::Isolate* const isolate,
v8::Local<v8::Context> v8_context,
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 18714ce8fc27c8d56c5deac27ba335078c452d0a..263405c605a0477b7a39bc274d7ee03be0b9cac5 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -141,7 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver {
int32_t world_id) {}
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
int32_t world_id) {}
- virtual void WillReleaseScriptContext(v8::Local<v8::Context> context,
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context> context,
int32_t world_id) {}
virtual void DidClearWindowObject() {}
virtual void DidChangeScrollOffset() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f337d61906651359eeb5228c112ad948f4f7a752..82cbd10f0817a85d1275519a3f93c687c0314aaa 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4684,10 +4684,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
observer.DidInstallConditionalFeatures(context, world_id);
}
-void RenderFrameImpl::WillReleaseScriptContext(v8::Local<v8::Context> context,
+void RenderFrameImpl::WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context> context,
int world_id) {
for (auto& observer : observers_)
- observer.WillReleaseScriptContext(context, world_id);
+ observer.WillReleaseScriptContext(isolate, context, world_id);
}
void RenderFrameImpl::DidChangeScrollOffset() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index f0f4335aa815ea50dbf9b720b41e4eb31f27fb90..319f222565e4ef25206cc44d33ec5e291b8ea089 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -604,7 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl
int world_id) override;
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
int world_id) override;
- void WillReleaseScriptContext(v8::Local<v8::Context> context,
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context> context,
int world_id) override;
void DidChangeScrollOffset() override;
blink::WebMediaStreamDeviceObserver* MediaStreamDeviceObserver() override;
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 37691ecee7a72b2ec47ff575239f628116cf136b..c67e3faf7440514e203e5b15a68fc34525a045a2 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -318,6 +318,7 @@ void ServiceWorkerContextClient::WorkerContextStarted(
}
void ServiceWorkerContextClient::WillEvaluateScript(
+ v8::Isolate* const v8_isolate,
v8::Local<v8::Context> v8_context) {
DCHECK(worker_task_runner_->RunsTasksInCurrentSequence());
start_timing_->script_evaluation_start_time = base::TimeTicks::Now();
@@ -336,8 +337,8 @@ void ServiceWorkerContextClient::WillEvaluateScript(
DCHECK(proxy_);
GetContentClient()->renderer()->WillEvaluateServiceWorkerOnWorkerThread(
- proxy_, v8_context, service_worker_version_id_, service_worker_scope_,
- script_url_, service_worker_token_);
+ proxy_, v8_isolate, v8_context, service_worker_version_id_,
+ service_worker_scope_, script_url_, service_worker_token_);
}
void ServiceWorkerContextClient::DidEvaluateScript(bool success) {
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 1f5e24bc38d6ced52e4773236522e9520efc6f6d..a22ca5968fce5e6a0c436ec9b40f0e2f7c1482cf 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -165,7 +165,8 @@ class ServiceWorkerContextClient
void WorkerContextStarted(
blink::WebServiceWorkerContextProxy* proxy,
scoped_refptr<base::SequencedTaskRunner> worker_task_runner) override;
- void WillEvaluateScript(v8::Local<v8::Context> v8_context) override;
+ void WillEvaluateScript(v8::Isolate* const isolate,
+ v8::Local<v8::Context> v8_context) override;
void DidEvaluateScript(bool success) override;
void WillInitializeWorkerContext() override;
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 22fdb490c7803f3bf864d9e0e6dc618e4d83480b..3f3367b5039e28b07acd1b326724958d764171c2 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -615,6 +615,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
void Dispatcher::WillEvaluateServiceWorkerOnWorkerThread(
blink::WebServiceWorkerContextProxy* context_proxy,
+ v8::Isolate* const isolate,
v8::Local<v8::Context> v8_context,
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c9988b069b2 100644
--- a/extensions/renderer/dispatcher.h
+++ b/extensions/renderer/dispatcher.h
@@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver,
// variables.
void WillEvaluateServiceWorkerOnWorkerThread(
blink::WebServiceWorkerContextProxy* context_proxy,
+ v8::Isolate* const isolate,
v8::Local<v8::Context> v8_context,
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc
index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb27e54244 100644
--- a/extensions/renderer/extension_frame_helper.cc
+++ b/extensions/renderer/extension_frame_helper.cc
@@ -439,6 +439,7 @@ void ExtensionFrameHelper::DidCreateScriptContext(
}
void ExtensionFrameHelper::WillReleaseScriptContext(
+ v8::Isolate* const isolate,
v8::Local<v8::Context> context,
int32_t world_id) {
extension_dispatcher_->WillReleaseScriptContext(
diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h
index e16f370211ba014f778e7b9021b83988a5d27661..a79b20fe95050d6e92615711988384deea3fa1e0 100644
--- a/extensions/renderer/extension_frame_helper.h
+++ b/extensions/renderer/extension_frame_helper.h
@@ -188,7 +188,8 @@ class ExtensionFrameHelper
blink::WebDocumentLoader* document_loader) override;
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override;
- void WillReleaseScriptContext(v8::Local<v8::Context>,
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context>,
int32_t world_id) override;
void OnDestruct() override;
void DidClearWindowObject() override;
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd16fd295b 100644
--- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
+++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
@@ -120,7 +120,8 @@ class WebServiceWorkerContextClient {
//
// |v8_context| is the V8 context of the worker and is used to support
// service workers in Chrome extensions.
- virtual void WillEvaluateScript(v8::Local<v8::Context> v8_context) {}
+ virtual void WillEvaluateScript(v8::Isolate* const isolate,
+ v8::Local<v8::Context> v8_context) {}
// Called when initial script evaluation finished for the main script.
// |success| is true if the evaluation completed with no uncaught exception.
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 52e8828d8fffaba8ab05436cb4d727595f18238a..6743653f5018c06d3e173aaacdca7275c6ec703f 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -665,7 +665,8 @@ class BLINK_EXPORT WebLocalFrameClient {
int32_t world_id) {}
// WebKit is about to release its reference to a v8 context for a frame.
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context>,
int32_t world_id) {}
// Geometry notifications ----------------------------------------------
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 2e8653654686f4fc775288f059ff27daa38e02d5..b0e061525f442952e5f8a90fed7002830dbb4bc3 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -108,11 +108,12 @@ void LocalWindowProxy::DisposeContext(Lifecycle next_status,
ScriptState::Scope scope(script_state_);
v8::Local<v8::Context> context = script_state_->GetContext();
+ CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
// The embedder could run arbitrary code in response to the
// willReleaseScriptContext callback, so all disposing should happen after
// it returns.
- GetFrame()->Client()->WillReleaseScriptContext(context, world_->GetWorldId());
- CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
+ GetFrame()->Client()->WillReleaseScriptContext(
+ GetIsolate(), context, world_->GetWorldId());
MainThreadDebugger::Instance(GetIsolate())
->ContextWillBeDestroyed(script_state_);
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 8d73ddb12013ce195026b9f63050cf33f0bfb0fd..078f0e67e8de6a05178e8e2410f61784fe656dee 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -303,7 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
int32_t world_id) = 0;
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
int32_t world_id) = 0;
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context>,
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 1aacf6f66b543a4ede6ab5d885143dd4a0821e8a..c695d942e295d9137a284e5536a10d49a055bbf4 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -303,10 +303,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
}
void LocalFrameClientImpl::WillReleaseScriptContext(
+ v8::Isolate* const isolate,
v8::Local<v8::Context> context,
int32_t world_id) {
if (web_frame_->Client()) {
- web_frame_->Client()->WillReleaseScriptContext(context, world_id);
+ web_frame_->Client()->WillReleaseScriptContext(isolate, context, world_id);
}
}
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index 16066fe34ee0335a0dabe00b6890e5844349c0b5..cc84479f65bdbe56cb4b38bfcef0d752bbe68d35 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -83,7 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
int32_t world_id) override;
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
int32_t world_id) override;
- void WillReleaseScriptContext(v8::Local<v8::Context>,
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context>,
int32_t world_id) override;
// Returns true if we should allow register V8 extensions to be added.
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index d8f3b11c98fd58baa9995762a29847b9fd760c84..5a9c9356a2098dfa9d28a5d30b19b492463216c8 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -422,7 +422,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
int32_t world_id) override {}
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
int32_t world_id) override {}
- void WillReleaseScriptContext(v8::Local<v8::Context>,
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
+ v8::Local<v8::Context>,
int32_t world_id) override {}
bool AllowScriptExtensions() override { return false; }
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
index 17860c80651c526e03fd06e4b644c3332b241be7..741a8587e95789038168eb500d3995724e11b47d 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
@@ -181,6 +181,7 @@ void ServiceWorkerGlobalScopeProxy::WillEvaluateScript() {
ScriptState::Scope scope(
WorkerGlobalScope()->ScriptController()->GetScriptState());
Client().WillEvaluateScript(
+ WorkerGlobalScope()->ScriptController()->GetScriptState()->GetIsolate(),
WorkerGlobalScope()->ScriptController()->GetContext());
top_level_script_evaluation_start_time_ = base::TimeTicks::Now();
}

View File

@@ -10,10 +10,10 @@ Subject: chore: "grandfather in" Electron Views and Delegates
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
diff --git a/ui/views/view.h b/ui/views/view.h
index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d275513b80e 100644
index 7f70b4f6062e369e2198fc12ff507786283a13c7..22cae8f202357d848bd57aff1ee22abfcc6efed6 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -80,6 +80,19 @@ class ArcNotificationContentView;
@@ -81,6 +81,19 @@ class ArcNotificationContentView;
class WideFrameView;
} // namespace ash
@@ -33,7 +33,7 @@ index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d27
namespace exo {
class ShellSurfaceBase;
}
@@ -324,6 +337,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -325,6 +338,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public:
class OwnedByClientPassKey {
private:
@@ -49,7 +49,7 @@ index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d27
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e075f4095 100644
index ff9c5abfdb02d9798b1491e2bbc296f2c7c74398..47d8a897d58b0d3829734105e81b887684dd009b 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -168,6 +168,12 @@ namespace crostini {
@@ -73,7 +73,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
@@ -465,6 +472,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -464,6 +471,7 @@ class VIEWS_EXPORT WidgetDelegate {
};
class RegisterDeleteCallbackPassKey {
private:
@@ -81,7 +81,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
@@ -922,6 +930,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
@@ -921,6 +929,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
View* GetContentsView() override;
private:

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index 5625973d8cb18de3c77fbf001e02fdf2827f60fb..5d50a77051a9d2d906ec547796469d980eb42a35 100644
index 71850795591e1a479620f1348c6adc705db9e839..8821ee4429727630e6600d7f85f0999d3f4b2270 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -133,6 +133,7 @@ class KeyStorageLinux;

View File

@@ -34,10 +34,10 @@ index 2dc44d4787d5198cff7be2cf98ad5acf2d3a9a0b..27a0335aac2bd4239616cf71f5d015c9
class ScrollEvent;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 315356b513e9f2c0ce7658aefeb69d0ac327c4de..54a94e1348fa196eaee8314076c47286c9ab0bcc 100644
index c60e51f4e1a789caf5ad9c54e496f3e72a327b51..f4fa30c1621e2eb78913ea97a993eb0a3528f36c 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1367,6 +1367,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
@@ -1363,6 +1363,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
return background_paint_brush_;
}
@@ -49,10 +49,10 @@ index 315356b513e9f2c0ce7658aefeb69d0ac327c4de..54a94e1348fa196eaee8314076c47286
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
return new DesktopNativeCursorManagerWin();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index dcda976f4c3cc0ba6bcf015d5bf7435df009ae30..13cfa18bf406f244ec361a1230ccce440ad9785a 100644
index baee602a2ce7207ba937c4e46ad8b896bec7ca92..cef7afbf408e38798c398c23dc3e964bd1d95d17 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -273,6 +273,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -272,6 +272,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
HBRUSH GetBackgroundPaintBrush() override;
@@ -61,10 +61,10 @@ index dcda976f4c3cc0ba6bcf015d5bf7435df009ae30..13cfa18bf406f244ec361a1230ccce44
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1fa92aa8d 100644
index 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127195ed253 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3239,15 +3239,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3244,15 +3244,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
}
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.
@@ -86,7 +86,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
return 0;
}
}
@@ -3270,6 +3274,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3275,6 +3279,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
// handle alt-space, or in the frame itself.
is_right_mouse_pressed_on_caption_ = false;
ReleaseCapture();
@@ -94,7 +94,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
// expect screen coordinates.
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
@@ -3277,7 +3282,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3282,7 +3287,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
w_param = static_cast<WPARAM>(SendMessage(
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
if (w_param == HTCAPTION || w_param == HTSYSMENU) {
@@ -114,7 +114,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
}
} else if (message == WM_NCLBUTTONDOWN &&
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
index 2aa7ca1f713da54d12c7ac78103a260a4744d040..7449d7642022145fc1be76b299fa1db2d724122b 100644
index 5e075296a09099e419fcbf7af2772767592edcd8..459339a4c0f0534f4c0ca8ddcb087fc75465beca 100644
--- a/ui/views/win/hwnd_message_handler_delegate.h
+++ b/ui/views/win/hwnd_message_handler_delegate.h
@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3a9264493f90fb8e82e34e13328d74c00d156966..dd274924f1c26efbc9fc3683f69647a0933a9855 100644
index d30a9d94cfc30035b39d510ded65f271c9c51bb1..705e848acfc76a6b2e3a4dffb9e8ae8f86d54cbc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5275,7 +5275,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5290,7 +5290,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above.

View File

@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 8221d7b96395b06ee177be302dd476c83f569eaf..4c4500421f9cd164ab49b85457e6e37e0b4a703c 100644
index 19a127d46584ece213442b24beaa6ec45bf3fa14..d8045edd0a207b41e60dbae66a0f50eec31b2d8a 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -226,7 +226,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

View File

@@ -27,12 +27,12 @@ index c390a83277f564f1a67a7dcffa36b9d77a35bc0b..b13273a4b194ad5e8ca2d1639ebca831
// When the enterprise policy is not set, use finch/feature flag choice.
return base::FeatureList::IsEnabled(
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
index 1362d0c69043ac5d1f7e72cf7ac72c272193844c..08efd98ca16555f6a7bbfb4ae3165130e843c981 100644
index 8f124aa7a67717f3efc52d22dfcef0776ff4cad3..d21e5b49f3a06c5f78e38b45e8be89530fdfd435 100644
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -271,10 +271,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
@@ -245,10 +245,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
#if BUILDFLAG(ENABLE_PDF_INK2)
bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) {
+# if 0
PrefService* prefs =
@@ -42,7 +42,7 @@ index 1362d0c69043ac5d1f7e72cf7ac72c272193844c..08efd98ca16555f6a7bbfb4ae3165130
+#endif
+ return true;
}
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
#endif // BUILDFLAG(ENABLE_PDF_INK2)
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd60960228 100644

View File

@@ -7,10 +7,10 @@ Pending upstream patch, this gives us fuller access to the window.open params
so that we will be able to decide whether to cancel it or not.
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
index 7a9effeec99682ef063ebe71f209e6ed9fc4cad4..71ef44be47a8665ee36449a38333ddf9cff33ad4 100644
index 047f1258f951f763df2ca0ba355b19d19337826b..9fc7114312212fbe38ddec740b4aebbcd72cb0f8 100644
--- a/chrome/browser/media/offscreen_tab.cc
+++ b/chrome/browser/media/offscreen_tab.cc
@@ -287,8 +287,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
@@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -80,20 +80,20 @@ index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d9
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5cf1070e3f407fdb1748b2171b3974933d4610c1..96960883dd68c511d66414f66cf989d28bd4eb36 100644
index 2b9d9a80fb34b5083b6b038ff12714ad6bd363d7..85197b1500bbcdfbd2286b32a0188c0ca2436e07 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2390,8 +2390,7 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
@@ -2386,7 +2386,8 @@ bool Browser::IsWebContentsCreationOverridden(
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
- const std::string& frame_name,
const std::string& frame_name,
- const GURL& target_url) {
+ const GURL& target_url,
+ const content::mojom::CreateNewWindowParams& params) {
if (IsActorOperatingOnWebContents(
if (actor::IsActorOperatingOnWebContents(
profile(), content::WebContents::FromRenderFrameHost(opener))) {
// If an ExecutionEngine is acting on the opener, prevent it from creating
@@ -2403,7 +2402,7 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2398,7 +2399,7 @@ bool Browser::IsWebContentsCreationOverridden(
return (window_container_type ==
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url,
@@ -103,10 +103,10 @@ index 5cf1070e3f407fdb1748b2171b3974933d4610c1..96960883dd68c511d66414f66cf989d2
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index e80708919d3122d92f6fe63e5c111c999860762e..fb19037baa4cb95f8d581f4ccf984f0b19b6ca70 100644
index b4ed72663324d359109813a5b22b6796568097f5..86153748bc72142aafc0b0b53d922e2d22d4d372 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -951,8 +951,7 @@ class Browser : public TabStripModelObserver,
@@ -954,8 +954,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -145,7 +145,7 @@ index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 08b9f7ad8544011ee1cbb9bc9857ea06e2fa2c0b..69f666bdc05662bc40e133022b5364cbbbbbdb39 100644
index 46382dbe43df6abb75ca7825de116d7ed2d1cea6..b07cfad74ec54ad251012dca57c8f44760ba13c1 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -103,8 +103,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -159,10 +159,10 @@ index 08b9f7ad8544011ee1cbb9bc9857ea06e2fa2c0b..69f666bdc05662bc40e133022b5364cb
}
content::WebContents* CreateCustomWebContents(
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db1951cccbb95 100644
index 73008c08f2b4fd31636b0df232fc7cd66a69fcaf..a09bfe9af4cb4cd7e1e70b4df4900901a8336894 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -202,14 +202,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -205,14 +205,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -180,7 +180,7 @@ index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db195
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index 13afd2de87888e927d8baf77f4c3de65179c52f5..06de4a27e625745947d2c119fa8f5eb555d99a1d 100644
index fb21bd2cd47618838fb449df5fcf63ee28206146..b0faf6ee23fdc3b104e780e445202350fa155946 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -84,8 +84,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -222,10 +222,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 95ea7eb743ae3e4de52741be7f2969bbf86d8a29..c9472325e55052ead090c55704b590bb6722c429 100644
index d7cf36715b036c29d881c84a07c0d3b7f73d609f..11c0124b6f3f1599b5a56ba7817e946a871316cc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5238,8 +5238,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5253,8 +5253,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ &&
delegate_->IsWebContentsCreationOverridden(
opener, source_site_instance, params.window_container_type,
@@ -236,7 +236,7 @@ index 95ea7eb743ae3e4de52741be7f2969bbf86d8a29..c9472325e55052ead090c55704b590bb
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d42b36b11 100644
index 968cddc769e2bf0bb56359b36bc03cbce6539da1..08c983ac6a8e5733431ba00e1288f6d6b087eee6 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -250,10 +250,10 @@ index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d..d0842904102fee982bc8502478a0a9067bb77904 100644
index 23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8..2e8e60c8ebe837fc68318bd5c13dbd0c873c4292 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -364,8 +364,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -368,8 +368,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance,
mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -356,10 +356,10 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 570cfeb6c74f04d4748648b86661ccf603c71452..da8b64d70e5b26431a576cc52316210fce36f99a 100644
index fdc6afbf9048fa254d6f361b36765cf95d5eb521..16d297a3f6bde6bc4c038b79a057700aec68b689 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -582,8 +582,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -584,8 +584,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -384,10 +384,10 @@ index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d1
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 1d95f5b521d7ab586fcecda6d6f822b432480367..b534327a8bd5b2c31522339b30caf123734c5cc3 100644
index 64ecdeb50b861825c9b55a930ff18c36818cad0b..e037d5607f8e1f3acb4ed018080de1b3357647be 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -208,8 +208,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -206,8 +206,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -398,7 +398,7 @@ index 1d95f5b521d7ab586fcecda6d6f822b432480367..b534327a8bd5b2c31522339b30caf123
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index 42e0654da5659ba647529c4b0b97ec5df61d59a1..406e2ca73c182005014b56824e89ddfb25fd28f5 100644
index 0e0f67908ca8c97bd0dfe4c4a8e008c74010c623..27ecb428739e2548a42f1485f8b7279a84f7190c 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(

View File

@@ -11,10 +11,10 @@ not need this dependency.
refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603
diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn
index fffee1ca3d0ab493c616e18ecdc0a4fb6525f974..11816e864deb4244c4a2d87ccd89c0a5f632a024 100644
index db1a2f393af2b561cb7d13861bc37f81ab3227c8..d371808e1e59e2dbb2da8790a2212cc001caa772 100644
--- a/chrome/browser/ui/color/BUILD.gn
+++ b/chrome/browser/ui/color/BUILD.gn
@@ -85,9 +85,6 @@ source_set("mixers") {
@@ -87,9 +87,6 @@ source_set("mixers") {
]
}
@@ -23,4 +23,4 @@ index fffee1ca3d0ab493c616e18ecdc0a4fb6525f974..11816e864deb4244c4a2d87ccd89c0a5
- }
}
if (!is_ios && !is_android) {
if (!is_android) {

View File

@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
NOTREACHED();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0326bb438 100644
index ac62aeecad617ce559d3248a61f3e19220d2e6bc..9e6b5b1c84ee1289fd3978fc7430f86b03165521 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
@@ -147,7 +147,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
@@ -145,7 +145,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
const bool registered =
platform_global_shortcut_listener_->RegisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(),
@@ -52,7 +52,7 @@ index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0
if (registered) {
registered_hot_keys_.insert(accelerator);
}
@@ -162,14 +163,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
@@ -160,14 +161,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
platform_global_shortcut_listener_->UnregisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
@@ -70,7 +70,7 @@ index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0
int modifiers = 0;
if (is_alt_down) {
modifiers |= ui::EF_ALT_DOWN;
@@ -180,6 +182,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
@@ -178,6 +180,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
if (is_shift_down) {
modifiers |= ui::EF_SHIFT_DOWN;
}

View File

@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852fb311088 100644
index 9240e8485a8dc895eb455b1418fc7559e52a5dd5..e9444e765ac8ac595b799be7feeb6a483c6acf9f 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -272,8 +272,13 @@ void AsanProcessInfoCB(const char*, bool*) {
@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) {
}
#endif // defined(ADDRESS_SANITIZER)
@@ -25,7 +25,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -302,11 +307,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
#endif // V8_USE_EXTERNAL_STARTUP_DATA
@@ -40,7 +40,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -950,7 +956,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -951,7 +957,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -50,7 +50,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
blink::TrialTokenValidator::SetOriginTrialPolicyGetter(
base::BindRepeating([]() -> blink::OriginTrialPolicy* {
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index 8b02f553e2fc29da88c3e14c05a7ee82210eab51..14f2e66d5ecda6e860724a3ab946eaaffba33d6d 100644
index fee2fab8ab33a3829f055b0408e9e763443016cc..678c636c9ca08f8113dc67aafaf9761f33a7f0e5 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -5,6 +5,7 @@
@@ -73,7 +73,7 @@ index 8b02f553e2fc29da88c3e14c05a7ee82210eab51..14f2e66d5ecda6e860724a3ab946eaaf
return new ContentClient();
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c08af8c7fb 100644
index 8151396412bf6981f3424526386ad6257b8c895d..ac5041c1666ac968251768f604f92434d92e374d 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -9,6 +9,7 @@
@@ -84,8 +84,8 @@ index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c0
#include <vector>
#include "base/notreached.h"
@@ -174,6 +175,8 @@ class CONTENT_EXPORT ContentMainDelegate {
virtual bool ShouldHandleConsoleControlEvents();
@@ -181,6 +182,8 @@ class CONTENT_EXPORT ContentMainDelegate {
virtual bool ShouldInitializePerfetto(InvokedIn invoked_in);
#endif
+ virtual std::string_view GetBrowserV8SnapshotFilename();

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1fac42e9e 100644
index 25c9e17bd063cc07fd2727474395a9276c4a000d..413f3019bd55388e8ebc8fe39af766b7c61e9924 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1956,6 +1956,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1957,6 +1957,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1975,9 +1995,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1976,9 +1996,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1985,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1986,9 +2004,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -82,10 +82,10 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 4383a2dd4a132e3012c206404399d73ac2d40ad4..912921c2b448e2badac50e8a7ed527aeb8f433a9 100644
index 1f5672f1aae610f2511a5a40885750f987871c8c..199a69a9c45e066a50f48298dae2dbcd06560d5b 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -214,9 +214,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
@@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
}
}
#elif BUILDFLAG(IS_MAC)
@@ -99,7 +99,7 @@ index 4383a2dd4a132e3012c206404399d73ac2d40ad4..912921c2b448e2badac50e8a7ed527ae
#endif
return window_id;
@@ -319,7 +323,7 @@ class NativeDesktopMediaList::Worker
@@ -321,7 +325,7 @@ class NativeDesktopMediaList::Worker
base::WeakPtr<NativeDesktopMediaList> media_list_;
DesktopMediaID::Type source_type_;
@@ -108,7 +108,7 @@ index 4383a2dd4a132e3012c206404399d73ac2d40ad4..912921c2b448e2badac50e8a7ed527ae
const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
const bool add_current_process_windows_;
const bool auto_show_delegated_source_list_;
@@ -601,6 +605,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
@@ -603,6 +607,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
FROM_HERE,
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
media_list_));
@@ -121,7 +121,7 @@ index 4383a2dd4a132e3012c206404399d73ac2d40ad4..912921c2b448e2badac50e8a7ed527ae
}
void NativeDesktopMediaList::Worker::OnCaptureResult(
@@ -1008,6 +1018,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
@@ -1009,6 +1019,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
base::Unretained(worker_.get()),
std::move(native_ids), thumbnail_size_));

View File

@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 59c8d5a2e687ac6148889c87f353b33959e276f6..7ef10194f02e32a9ec137f7f2519c4a834b81b7a 100644
index 3798a24ce4aedb6aa2954d8f99b603bf08f1179d..3f466acfb286b44a8d1ecc7ffd4faf4635a66643 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -561,7 +561,11 @@
@@ -558,7 +558,11 @@
return;
host()->WasHidden();

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6a6114453 100644
index b70623b56267fb7df71519a2c19a04a658f766e2..0bae000a3491e03196bbba033621d389c6150225 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -847,6 +847,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -840,6 +840,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -21,24 +21,23 @@ index c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6
// Prompts should remain open and functional across tab switches.
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index f07055487abd76b2a72ba555ff1b5bcd996bbd3a..7d46db80c667900576cf46264034890203020a75 100644
index 636f09a8ac86e7c3f7b8dcdc285792f18f5c5989..276852573eade86f1bc9690e3c78a6279e9ff5af 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1026,6 +1026,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// cpu-priority boosted to run discard logic.
void SetIsDiscarding(bool is_discarding);
@@ -1031,6 +1031,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
return synthetic_gesture_controller_.get();
}
+ // Electron: Prevents the widget from getting hidden.
+ bool disable_hidden_ = false;
+
protected:
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index f4c657fe36eba54948cacf9770d9c6c1b55b5fe5..b14f5bc3f023c512a066ce9ec9f681c96b1fafc4 100644
index 7b6b19812f5f1989e39d9c33b387159380beb544..e95a313945397c6eff5514932ce15c5d4b6a8e1f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -644,7 +644,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -642,7 +642,7 @@ void RenderWidgetHostViewAura::HideImpl() {
CHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Perry <perryuwang@tencent.com>
Date: Wed, 24 Sep 2025 09:56:23 -0700
Subject: Disable NSAutoFillHeuristicController on macOS 26
The reason for this issue is that NSAutoFillHeuristicController is
enabled by default on macOS 26. In pages with <input> tags, browser
process sends synchronized IPC messages to renderer process. At this
point, if the renderer process also sends synchronized IPC messages to
the browser process, it will cause a deadlock.
This bug can be reproduced on many websites. From the perspective of
user experience, we should first disable this feature on macOS 26.
Bug: 446070423, 446481994
Change-Id: I2d3855648980a22678548e373756fc156e28ecd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6965487
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1520058}
diff --git a/content/app/mac_init.mm b/content/app/mac_init.mm
index 603c25a1bd4a11b9dbe57ac6add81647302e63be..963f45a8936850b59013390faf7890bc4215f2d9 100644
--- a/content/app/mac_init.mm
+++ b/content/app/mac_init.mm
@@ -6,6 +6,7 @@
#import <Cocoa/Cocoa.h>
+#include "base/mac/mac_util.h"
#include "content/common/mac/system_policy.h"
namespace content {
@@ -29,6 +30,19 @@ void InitializeMac() {
@"NSAppSleepDisabled" : @YES,
}];
+ if (base::mac::MacOSVersion() >= 26'00'00) {
+ [NSUserDefaults.standardUserDefaults registerDefaults:@{
+ // Disable NSAutoFillHeuristicController on macOS 26. On macOS 26, the
+ // browser process sends synchronized IPC messages to the renderer process
+ // on pages with <input> tags. At this point, if the renderer process
+ // sends a synchronized IPC message to the browser process, it will cause
+ // a deadlock.
+ // https://crbug.com/446070423
+ // https://crbug.com/446481994
+ @"NSAutoFillHeuristicControllerEnabled" : @NO,
+ }];
+ }
+
SetSystemPolicyCrashKeys();
}

View File

@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 95f034ecf921265304cde98d2ce163a2ab09887a..315356b513e9f2c0ce7658aefeb69d0ac327c4de 100644
index 86592f9197fa84cbce782ed237cdac74f60e77e1..c60e51f4e1a789caf5ad9c54e496f3e72a327b51 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -619,7 +619,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -615,7 +615,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) {
@@ -19,10 +19,10 @@ index 95f034ecf921265304cde98d2ce163a2ab09887a..315356b513e9f2c0ce7658aefeb69d0a
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index df17e97666de639f05b92a79ee7fbd4a3da6c64f..f404c718e0242ec9269e7d14eb236aa928fb5d58 100644
index 0477bf1b33e5cd17e6d16ccd63f4bc53e303042f..f3f42f2c3ae4b185b0647902a2409bc9b25a152f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1050,8 +1050,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -1049,8 +1049,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

View File

@@ -21,7 +21,7 @@ index 9dac402705385087ced2df2db757a07246984a94..cb49b4f085026658e920699ed285d524
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
#endif
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index 698b29e9c31a2695cac30bf85c97a216ff8a6257..dbc38d0d87803496ce122da62e639f2a0334e0f6 100644
index 43a2543499c1f21eb8d1e9a559466edbe15af9f5..dd4399819ef62187e038af40caff3e8018cba8dd 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -205,6 +205,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {

View File

@@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Fedor Indutny <indutny@signal.org>
Date: Wed, 24 Sep 2025 10:08:48 -0700
Subject: Expose ReferrerScriptInfo::HostDefinedOptionsIndex
In `shell/common/node_bindings.cc`'s
`HostImportModuleWithPhaseDynamically` we route dynamic imports to
either Node.js's or Blink's resolver based on presence of Node.js
environment, process type, etc. Exporting `HostDefinedOptionsIndex`
allows us to route based on the size of `v8_host_defined_options` data
which enables us to support dynamic imports in non-context-isolated
preload scripts.
diff --git a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.cc b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.cc
index 1b797783987255622735047bd78ca0e8bb635d5e..b209c736bb80c186ed51999af1dac0a1d50fc232 100644
--- a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.cc
+++ b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.cc
@@ -12,15 +12,6 @@ namespace blink {
namespace {
-enum HostDefinedOptionsIndex : size_t {
- kBaseURL,
- kCredentialsMode,
- kNonce,
- kParserState,
- kReferrerPolicy,
- kLength
-};
-
// Omit storing base URL if it is same as ScriptOrigin::ResourceName().
// Note: This improves chance of getting into a fast path in
// ReferrerScriptInfo::ToV8HostDefinedOptions.
diff --git a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
index 0119624a028bec3e53e4e402938a98fe6def1483..743865839448748fe00e3e7d5027587cb65393c9 100644
--- a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
+++ b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
@@ -23,6 +23,15 @@ class CORE_EXPORT ReferrerScriptInfo {
STACK_ALLOCATED();
public:
+ enum HostDefinedOptionsIndex : size_t {
+ kBaseURL,
+ kCredentialsMode,
+ kNonce,
+ kParserState,
+ kReferrerPolicy,
+ kLength
+ };
+
ReferrerScriptInfo() {}
ReferrerScriptInfo(const KURL& base_url,
network::mojom::CredentialsMode credentials_mode,

View File

@@ -33,11 +33,11 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 7721b8e827d9aac6e90ddfe3de264f41915219f2..1bc4f24c3f0eb843033d2aa541d81e910f8021b0 100644
index 95822f635b61da7c63b5a1babf93bb61cb786293..892fa1d8d340906d359685894da6553377cda73b 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1872,6 +1872,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
@@ -1907,6 +1907,13 @@ void NetworkContext::EnableDurableMessageCollector(
it->second->AddReceiver(std::move(receiver));
}
+void NetworkContext::SetUserAgent(const std::string& new_user_agent) {
@@ -51,24 +51,24 @@ index 7721b8e827d9aac6e90ddfe3de264f41915219f2..1bc4f24c3f0eb843033d2aa541d81e91
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index b9f201ccf04433a29083cd15cfe599fe9600c9c0..137aaf96a8d02b81afe64fde6b19ed1153569941 100644
index 56f1eec94a33c2c9a6289b12ac20323b4bef13d9..1b99211c9c96efba0713e953e708712d6c3714a6 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -326,6 +326,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@@ -335,6 +335,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
const base::UnguessableToken& throttling_profile_id,
mojo::PendingReceiver<network::mojom::DurableMessageCollector> receiver)
override;
+ void SetUserAgent(const std::string& new_user_agent) override;
void SetAcceptLanguage(const std::string& new_accept_language) override;
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd4002d0bd0b 100644
index 840eff6ece73983a3b98673adbbb3cfd825565fe..5159d804c493bf2ae08d2786187c614efc96cf23 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1288,6 +1288,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -1337,6 +1337,9 @@ interface NetworkContext {
mojo_base.mojom.UnguessableToken throttling_profile_id,
pending_receiver<DurableMessageCollector> receiver);
+ // Updates the user agent to be used for requests.
+ SetUserAgent(string new_user_agent);
@@ -77,10 +77,10 @@ index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd40
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 70a5ab342a8954354a3d8245d30df9520cfd398d..02700030ab651b6f8f0aecfe6857ca40e6f3839f 100644
index 6f0fe6423e8be903d4e38b783d31443c6ce89db5..9a5d7ad5d6e84e8b824c1614ee006c4984817929 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -161,6 +161,7 @@ class TestNetworkContext : public mojom::NetworkContext {
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override {}

View File

@@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index b9799837c7ce14fc76045700b30e1358d4705251..5b3ab0837b5a85b4e7dd1685db75f65cd4d5ff43 100644
index 68a102327e22302587f7cc402cb26ef2f02b261e..ccdbf101d07b9f8baa043894ea7f48a56e7d3ecb 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -1890,6 +1890,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1900,6 +1900,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View File

@@ -12,28 +12,23 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index 3f8801c6042ef2b20635838e4d4c572d89b94601..055b15ff72844cd54c60cc92042a5465ce2870ad 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -210,6 +210,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
+ if (theme_source() == ThemeSource::kForcedLight) return false;
+ if (theme_source() == ThemeSource::kForcedDark) return true;
return should_use_dark_colors_;
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 67d63aa0048c2a4e331763a869b46bc1142b921c..34ddc49fe66c1824734a6d524af68862892801e2 100644
index 8391cd1469516e83b2cc1466e121bfeed5497c8e..6bed02855d0917805a43fab111d41702af94368e 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -459,6 +459,23 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
bool use_custom_frame = true) const;
@@ -493,6 +493,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
void set_page_colors(PageColors page_colors) { page_colors_ = page_colors; }
PreferredColorScheme preferred_color_scheme() const {
+ if (theme_source() == ThemeSource::kForcedLight) return PreferredColorScheme::kLight;
+ if (theme_source() == ThemeSource::kForcedDark) return PreferredColorScheme::kDark;
return preferred_color_scheme_;
}
void set_preferred_color_scheme(PreferredColorScheme preferred_color_scheme) {
@@ -536,6 +538,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
// Whether dark mode is forced via command-line flag.
static bool IsForcedDarkMode();
+
+ enum ThemeSource {
+ kSystem,
+ kForcedDark,
@@ -45,32 +40,21 @@ index 67d63aa0048c2a4e331763a869b46bc1142b921c..34ddc49fe66c1824734a6d524af68862
+ }
+
+ void set_theme_source(ThemeSource theme_source) {
+ bool original = ShouldUseDarkColors();
+ bool was_dark = preferred_color_scheme() == PreferredColorScheme::kDark;
+ theme_source_ = theme_source;
+ if (ShouldUseDarkColors() != original) NotifyOnNativeThemeUpdated();
+ if ((preferred_color_scheme() == PreferredColorScheme::kDark) != was_dark) {
+ NotifyOnNativeThemeUpdated();
+ }
+ }
+
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -714,6 +731,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
std::optional<base::TimeDelta> caret_blink_interval_;
bool use_overlay_scrollbars_ = false;
protected:
explicit NativeTheme(
ui::SystemTheme system_theme = ui::SystemTheme::kDefault);
@@ -590,6 +610,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
std::optional<ui::ColorProviderKey::SchemeVariant> scheme_variant_;
bool should_use_system_accent_color_ = true;
base::TimeDelta caret_blink_interval_;
+ ThemeSource theme_source_ = ThemeSource::kSystem;
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 0c6d689295a03fc088b57487037d85f4d634a5f4..8e3bab233e8611c68e79d53f125560f4fb086a1e 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -697,6 +697,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
if (InForcedColorsMode() && !IsForcedDarkMode()) {
return false;
}
+ if (theme_source() == ThemeSource::kForcedLight) return false;
+ if (theme_source() == ThemeSource::kForcedDark) return true;
return NativeTheme::ShouldUseDarkColors();
}
raw_ptr<NativeTheme> associated_web_instance_ = nullptr;

View File

@@ -17,7 +17,7 @@ which removed range-requests-supported on non-http protocols. See https://issues
for more information.
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index 5972dcf91aeb8446af4fa0b902b086a5492815bd..ac37d7f601f24d9ec53c4c1fd5e00c8a262e1580 100644
index 23d5e86aad9509159c74fef32419e26ca68b2e4c..767e6b7e4c85f9f2fafac282c4ebc6ba80e52528 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -11,8 +11,10 @@
@@ -104,7 +104,7 @@ index 8c92f1c0c5028069cdad967b5be2bccf8005ed43..8b49dc182296f7f277981aed29b58947
using InitializeCB = base::OnceCallback<void(bool)>;
void Initialize(InitializeCB init_cb) override;
diff --git a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
index 1b5dc45902fc30386dfcb98a19d532e3be46706b..fb2c7f09c210f6aa178e663b1c1ce91468c71e10 100644
index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9ab700a03 100644
--- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
+++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
@@ -8,6 +8,7 @@

View File

@@ -173,7 +173,7 @@ index 213eaa5ec6d657a659726cb38103e8bd671fe907..f497447c598198bf690758b1d1c5c6fe
void OnFileChooserDestroy(GtkWidget* dialog);
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
index eb3d997598631b220c3566748f23a5cdac3e4692..b4b2f7294ce6e9349a4a8a05f614e93359eca25a 100644
index b0f4b3df0a4f10b306ba2d25e5fd51440a25bcd4..4ac06587203d2d2adf1390d9256e537e8cf7b21d 100644
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -224,6 +224,21 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -262,7 +262,7 @@ index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443
} // namespace ui
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc007ee5fed8 100644
index 37e3d53abeca3a90649064053100cf9938b1f406..87dfa1e1c230f3aba90ba9520684828e958de093 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -25,6 +25,7 @@
@@ -272,7 +272,7 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
+#include "electron/shell/browser/ui/file_dialog.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/native_ui_types.h"
@@ -96,7 +97,7 @@ void OnGetPropertyReply(dbus::Response* response) {
: ServiceAvailability::kNotAvailable;
}
@@ -294,8 +294,8 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
+ file_dialog::StartPortalAvailabilityTestInBackground();
}
DbusByteArray PathToByteArray(const base::FilePath& path) {
@@ -170,17 +174,20 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
std::vector<uint8_t> PathToByteArray(const base::FilePath& path) {
@@ -171,17 +175,20 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
GetMainTaskRunner() = base::SequencedTaskRunner::GetCurrentDefault();
dbus_xdg::SetSystemdScopeUnitNameForXdgPortal(
@@ -318,17 +318,17 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
}
bool SelectFileDialogLinuxPortal::IsRunning(
@@ -385,11 +392,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -386,11 +393,14 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
const PortalFilterSet& filter_set) {
DbusDictionary dict;
dbus_xdg::Dictionary dict;
+ std::string accept_label = button_label().empty() ? "" : button_label();
+
switch (type_) {
case SelectFileDialog::SELECT_UPLOAD_FOLDER:
- dict.PutAs(kFileChooserOptionAcceptLabel,
- DbusString(l10n_util::GetStringUTF8(
- IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON)));
- dict[kFileChooserOptionAcceptLabel] =
- dbus_utils::Variant::Wrap<"s">(l10n_util::GetStringUTF8(
- IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
+ if (accept_label.empty()) {
+ accept_label = l10n_util::GetStringUTF8(
+ IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON);
@@ -336,12 +336,13 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
[[fallthrough]];
case SelectFileDialog::SELECT_FOLDER:
case SelectFileDialog::Type::SELECT_EXISTING_FOLDER:
@@ -402,6 +412,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -403,6 +413,11 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
break;
}
+ if (!accept_label.empty()) {
+ dict.PutAs(kFileChooserOptionAcceptLabel, DbusString(accept_label));
+ dict[kFileChooserOptionAcceptLabel] =
+ dbus_utils::Variant::Wrap<"s">(accept_label);
+ }
+
if (!default_path.empty() && base::IsStringUTF8(default_path.value())) {

View File

@@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache.
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa438467fdf4 100644
index b798ae06446d68fe74e7fef3ade515e9c77f1f73..0b0ecebef9e34986a95e4d9f3b52fcce19f2d686 100644
--- a/content/browser/code_cache/generated_code_cache.cc
+++ b/content/browser/code_cache/generated_code_cache.cc
@@ -8,6 +8,7 @@
@@ -28,21 +28,11 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
using storage::BigIOBuffer;
@@ -43,7 +45,7 @@ constexpr char kSeparator[] = " \n";
// We always expect to receive valid URLs that can be used as keys to the code
// cache. The relevant checks (for ex: resource_url is valid, origin_lock is
-// not opque etc.,) must be done prior to requesting the code cache.
+// not opaque etc.,) must be done prior to requesting the code cache.
//
// This function doesn't enforce anything in the production code. It is here
// to make the assumptions explicit and to catch any errors when DCHECKs are
@@ -53,33 +55,55 @@ void CheckValidKeys(const GURL& resource_url,
GeneratedCodeCache::CodeCacheType cache_type) {
@@ -53,39 +55,55 @@ void CheckValidResource(const GURL& resource_url,
GeneratedCodeCache::CodeCacheType cache_type) {
// If the resource url is invalid don't cache the code.
DCHECK(resource_url.is_valid());
- bool resource_url_is_chrome_or_chrome_untrusted =
+
+ // There are 3 kind of URL scheme compatible for the `resource_url`.
+ // 1. http: and https: URLs.
+ // 2. chrome: and chrome-untrusted: URLs.
@@ -55,16 +45,22 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
- resource_url_is_chrome_or_chrome_untrusted ||
- blink::CommonSchemeRegistry::IsExtensionScheme(resource_url.scheme()));
-
- // The chrome and chrome-untrusted schemes are only used with the WebUI
- // code cache type.
- DCHECK_EQ(resource_url_is_chrome_or_chrome_untrusted,
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
+ const bool resource_url_embedder =
+ base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme());
+ DCHECK(resource_url_http || resource_url_webui || resource_url_embedder);
}
void CheckValidContext(const GURL& origin_lock,
GeneratedCodeCache::CodeCacheType cache_type) {
- // |origin_lock| should be either empty or should have
- // Http/Https/chrome/chrome-untrusted schemes and it should not be a URL with
- // opaque origin. Empty origin_locks are allowed when the renderer is not
- // locked to an origin.
- bool origin_lock_is_chrome_or_chrome_untrusted =
+
+ const bool resource_url_embedder =
+ base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme());
+ DCHECK(resource_url_http || resource_url_webui || resource_url_embedder);
+
+ // |origin_lock| should be either empty or should have code cache allowed
+ // schemes (http/https/chrome/chrome-untrusted or other custom schemes added
+ // by url::AddCodeCacheScheme), and it should not be a URL with opaque
@@ -86,8 +82,7 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
- // code cache type.
- DCHECK_EQ(origin_lock_is_chrome_or_chrome_untrusted,
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
- DCHECK_EQ(resource_url_is_chrome_or_chrome_untrusted,
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
+
+ const bool origin_lock_for_embedder =
+ base::Contains(url::GetCodeCacheSchemes(), origin_lock.scheme());
+
@@ -100,16 +95,14 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
+ case GeneratedCodeCache::kJavaScript:
+ case GeneratedCodeCache::kWebAssembly:
+ DCHECK(!origin_lock_for_webui);
+ DCHECK(!resource_url_webui);
+ break;
+ case GeneratedCodeCache::kWebUIJavaScript:
+ DCHECK(origin_lock_for_webui);
+ DCHECK(resource_url_webui);
+ break;
+ }
+
+ // The custom schemes share the cache type with http(s).
+ if (origin_lock_for_embedder || resource_url_embedder) {
+ if (origin_lock_for_embedder) {
+ DCHECK(cache_type == GeneratedCodeCache::kJavaScript ||
+ cache_type == GeneratedCodeCache::kWebAssembly);
+ }
@@ -117,7 +110,7 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
// Generates the cache key for the given |resource_url|, |origin_lock| and
diff --git a/content/browser/code_cache/generated_code_cache.h b/content/browser/code_cache/generated_code_cache.h
index 94602e2319d3f7ed557da98e0598c9f96d986260..0a9a856d8bd9d702eb49e45a54c141a39f5ec622 100644
index a01f0d96ef33ce9460a851b072b7ceed5227dee3..f7e39b28cc0ba2251123925c01083a7935f46f56 100644
--- a/content/browser/code_cache/generated_code_cache.h
+++ b/content/browser/code_cache/generated_code_cache.h
@@ -51,12 +51,14 @@ class CONTENT_EXPORT GeneratedCodeCache {
@@ -259,38 +252,38 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58
+
} // namespace content
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e74b348406 100644
index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed12bfade6 100644
--- a/content/browser/renderer_host/code_cache_host_impl.cc
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
@@ -6,6 +6,7 @@
@@ -7,6 +7,7 @@
#include <string_view>
#include <utility>
+#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_functions.h"
@@ -29,6 +30,7 @@
#include "third_party/blink/public/common/scheme_registry.h"
@@ -36,6 +37,7 @@
#include "third_party/blink/public/mojom/loader/code_cache.mojom-data-view.h"
#include "url/gurl.h"
#include "url/origin.h"
+#include "url/url_util.h"
using blink::mojom::CacheStorageError;
@@ -36,6 +38,11 @@ namespace content {
namespace {
@@ -55,6 +57,11 @@ GeneratedCodeCache::CodeCacheType MojoCacheTypeToCodeCacheType(
}
}
+bool ProcessLockURLIsCodeCacheScheme(const ProcessLock& process_lock) {
+ return base::Contains(url::GetCodeCacheSchemes(),
+ process_lock.lock_url().scheme());
+ process_lock.GetProcessLockURL().scheme());
+}
+
bool CheckSecurityForAccessingCodeCacheData(
const GURL& resource_url,
int render_process_id,
@@ -46,39 +53,57 @@ bool CheckSecurityForAccessingCodeCacheData(
@@ -65,39 +72,56 @@ bool CheckSecurityForAccessingCodeCacheData(
// Code caching is only allowed for http(s) and chrome/chrome-untrusted
// scripts. Furthermore, there is no way for http(s) pages to load chrome or
@@ -305,14 +298,14 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
// suspicious activity.
- if (resource_url.SchemeIs(content::kChromeUIScheme) ||
- resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
- if (!process_lock.is_locked_to_site()) {
- if (!process_lock.IsLockedToSite()) {
- // We can't tell for certain whether this renderer is doing something
- // malicious, but we don't trust it enough to store data.
- return false;
- }
+ if (resource_url.SchemeIsHTTPOrHTTPS()) {
if (process_lock.matches_scheme(url::kHttpScheme) ||
process_lock.matches_scheme(url::kHttpsScheme)) {
if (process_lock.MatchesScheme(url::kHttpScheme) ||
process_lock.MatchesScheme(url::kHttpsScheme)) {
- if (operation == CodeCacheHostImpl::Operation::kWrite) {
+ return true;
+ }
@@ -327,15 +320,15 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
+ return false;
+ }
+
+ if (resource_url.SchemeIs(kChromeUIScheme) ||
+ resource_url.SchemeIs(kChromeUIUntrustedScheme)) {
+ if (process_lock.matches_scheme(kChromeUIScheme) ||
+ process_lock.matches_scheme(kChromeUIUntrustedScheme)) {
+ if (resource_url.SchemeIs(content::kChromeUIScheme) ||
+ resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
+ if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
+ process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
+ return true;
+ }
+ }
+ if (operation == CodeCacheHostImpl::Operation::kWrite) {
+ if (process_lock.matches_scheme(url::kHttpScheme) ||
+ process_lock.matches_scheme(url::kHttpsScheme)) {
+ if (process_lock.MatchesScheme(url::kHttpScheme) ||
+ process_lock.MatchesScheme(url::kHttpsScheme)) {
mojo::ReportBadMessage("HTTP(S) pages cannot cache WebUI code");
}
+ if (ProcessLockURLIsCodeCacheScheme(process_lock)) {
@@ -348,35 +341,34 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
// Other schemes which might successfully load chrome or chrome-untrusted
// scripts, such as the PDF viewer, are unsupported but not considered
- // dangerous.
- return process_lock.matches_scheme(content::kChromeUIScheme) ||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme);
- return process_lock.MatchesScheme(content::kChromeUIScheme) ||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme);
+ // dangerous. Similarly, the process might not be locked to a site.
+ return false;
}
- if (resource_url.SchemeIsHTTPOrHTTPS() ||
- blink::CommonSchemeRegistry::IsExtensionScheme(resource_url.scheme())) {
- if (process_lock.matches_scheme(content::kChromeUIScheme) ||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme)) {
- if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
- // It is possible for WebUI pages to include open-web content, but such
- // usage is rare and we've decided that reasoning about security is easier
- // if the WebUI code cache includes only WebUI scripts.
- return false;
- }
- return true;
+
+ if (base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme())) {
+ return ProcessLockURLIsCodeCacheScheme(process_lock);
}
if (operation == CodeCacheHostImpl::Operation::kWrite) {
@@ -433,6 +458,7 @@ std::optional<GURL> CodeCacheHostImpl::GetSecondaryKeyForCodeCache(
process_lock.matches_scheme(url::kHttpsScheme) ||
process_lock.matches_scheme(content::kChromeUIScheme) ||
process_lock.matches_scheme(content::kChromeUIUntrustedScheme) ||
@@ -530,6 +554,7 @@ std::optional<GURL> CodeCacheHostImpl::GetSecondaryKeyForCodeCache(
process_lock.MatchesScheme(url::kHttpsScheme) ||
process_lock.MatchesScheme(content::kChromeUIScheme) ||
process_lock.MatchesScheme(content::kChromeUIUntrustedScheme) ||
+ ProcessLockURLIsCodeCacheScheme(process_lock) ||
blink::CommonSchemeRegistry::IsExtensionScheme(
process_lock.lock_url().scheme())) {
return process_lock.lock_url();
process_lock.GetProcessLockURL().scheme())) {
return process_lock.GetProcessLockURL();
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
index 225e017909b8869231b870eaaf161a0b5e93e2a0..846a5251429630b8528a84a3d67ed56cb28df5a1 100644
--- a/content/common/url_schemes.cc

View File

@@ -7,10 +7,10 @@ This is implemented as a magic "window id" that instead of pulling an SCStream m
instead farms out to the screen picker.
diff --git a/content/browser/media/capture/desktop_capture_device_mac.cc b/content/browser/media/capture/desktop_capture_device_mac.cc
index afb657b7c9e1ede1273532b16428d37cc5d75c59..16707cf516cd34682c84ea2ccebddaa0f84e01f8 100644
index 120590a93bbc5a47e73c5d5515b7ad07b2364eb6..50a8b0dfe5400d1ab9da2893088583e4f815a140 100644
--- a/content/browser/media/capture/desktop_capture_device_mac.cc
+++ b/content/browser/media/capture/desktop_capture_device_mac.cc
@@ -29,7 +29,7 @@ class DesktopCaptureDeviceMac : public IOSurfaceCaptureDeviceBase {
@@ -28,7 +28,7 @@ class DesktopCaptureDeviceMac : public IOSurfaceCaptureDeviceBase {
~DesktopCaptureDeviceMac() override = default;
// IOSurfaceCaptureDeviceBase:
@@ -46,7 +46,7 @@ index e2771b7b281274cdcb601a5bc78a948ad592087b..48d116823a28213e50775f378e6ce04c
// OnStop is called by StopAndDeAllocate.
virtual void OnStop() = 0;
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b4049610fd49da 100644
index c2d8bbafa39c05f25641f2fd3491ef7f84f4f6a1..5506583824e10d664f32c71d63fda1aabccbdd31 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -27,6 +27,61 @@
@@ -134,19 +134,16 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
_errorCallback = errorCallback;
}
return self;
@@ -211,29 +270,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
@@ -224,28 +283,50 @@ class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
base::OnceCallback<void(content::DesktopMediaID::Id, SCStream*)>;
class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
: public IOSurfaceCaptureDeviceBase,
- public ScreenCaptureKitResetStreamInterface {
+ public ScreenCaptureKitResetStreamInterface
+ {
public:
explicit ScreenCaptureKitDeviceMac(const DesktopMediaID& source,
- SCContentFilter* filter)
+ [[maybe_unused]] SCContentFilter* filter)
- SCContentFilter* filter,
+ [[maybe_unused]] SCContentFilter* filter,
StreamCallback stream_created_callback)
: source_(source),
- filter_(filter),
stream_created_callback_(std::move(stream_created_callback)),
device_task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()) {
SampleCallback sample_callback = base::BindPostTask(
device_task_runner_,
@@ -164,7 +161,6 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
initWithSampleCallback:sample_callback
+ cancelCallback:cancel_callback
errorCallback:error_callback];
+
+ if (@available(macOS 15.0, *)) {
+ auto picker_callback = base::BindPostTask(
+ device_task_runner_,
@@ -192,7 +188,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
void OnShareableContentCreated(SCShareableContent* content) {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -301,7 +384,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -313,7 +394,7 @@ void CreateStream(SCContentFilter* filter) {
return;
}
@@ -201,7 +197,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
// Update the content size. This step is neccessary when used together
// with SCContentSharingPicker. If the Chrome picker is used, it will
// change to retina resolution if applicable.
@@ -310,6 +393,9 @@ void CreateStream(SCContentFilter* filter) {
@@ -322,6 +403,9 @@ void CreateStream(SCContentFilter* filter) {
filter.contentRect.size.height * filter.pointPixelScale);
}
@@ -211,7 +207,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
gfx::RectF dest_rect_in_frame;
actual_capture_format_ = capture_params().requested_format;
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
@@ -323,6 +409,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -335,6 +419,7 @@ void CreateStream(SCContentFilter* filter) {
stream_ = [[SCStream alloc] initWithFilter:filter
configuration:config
delegate:helper_];
@@ -219,7 +215,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
{
NSError* error = nil;
bool add_stream_output_result =
@@ -480,7 +567,7 @@ void OnStreamError() {
@@ -495,7 +580,7 @@ void OnStreamError() {
if (fullscreen_module_) {
fullscreen_module_->Reset();
}
@@ -228,7 +224,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
} else {
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
FROM_HERE, "Stream delegate called didStopWithError");
@@ -503,23 +590,41 @@ void OnUpdateConfigurationError() {
@@ -518,23 +603,41 @@ void OnUpdateConfigurationError() {
}
// IOSurfaceCaptureDeviceBase:
@@ -285,18 +281,16 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
}
void OnStop() override {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -577,8 +682,9 @@ void ResetStreamTo(SCWindow* window) override {
}
@@ -593,7 +696,7 @@ void ResetStreamTo(SCWindow* window) override {
private:
+ static int active_streams_;
+
const DesktopMediaID source_;
- SCContentFilter* const filter_;
+ static int active_streams_;
StreamCallback stream_created_callback_;
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
// The actual format of the video frames that are sent to `client`.
@@ -594,6 +700,10 @@ void ResetStreamTo(SCWindow* window) override {
@@ -610,6 +713,10 @@ void ResetStreamTo(SCWindow* window) override {
// Helper class that acts as output and delegate for `stream_`.
ScreenCaptureKitDeviceHelper* __strong helper_;
@@ -307,7 +301,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
// This is used to detect when a captured presentation enters fullscreen mode.
// If this happens, the module will call the ResetStreamTo function.
std::unique_ptr<ScreenCaptureKitFullscreenModule> fullscreen_module_;
@@ -606,6 +716,8 @@ void ResetStreamTo(SCWindow* window) override {
@@ -622,6 +729,8 @@ void ResetStreamTo(SCWindow* window) override {
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
};
@@ -317,7 +311,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
// Although ScreenCaptureKit is available in 12.3 there were some bugs that
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1a9626dca 100644
index 77f6994c9963b57f7e9334bce6fefabdc6ee63e7..a02ca47ea5dea272640737cfffedc8529087c12e 100644
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
@@ -321,8 +321,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
@@ -356,7 +350,7 @@ index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1
kMaxNumberOfBuffers, std::move(receiver),
std::move(receiver_on_io_thread)),
diff --git a/content/public/browser/desktop_media_id.h b/content/public/browser/desktop_media_id.h
index 294b5f79955ba72976f8ba127fd19556c81e322c..27553e51b281575c5cb7a4ba4dab06d19704388e 100644
index b90a88a115247bd0c62abb18771220e37a441d2f..f908a95727633e903bd56d2bc8608bba167de4e7 100644
--- a/content/public/browser/desktop_media_id.h
+++ b/content/public/browser/desktop_media_id.h
@@ -27,6 +27,8 @@ struct CONTENT_EXPORT DesktopMediaID {
@@ -369,13 +363,13 @@ index 294b5f79955ba72976f8ba127fd19556c81e322c..27553e51b281575c5cb7a4ba4dab06d1
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
// Assigns integer identifier to the |window| and returns its DesktopMediaID.
diff --git a/media/capture/video_capture_types.h b/media/capture/video_capture_types.h
index 53e8077c9c0b635df0abdeca43fa9a6373c68252..2805e36cc42190d8197d83f5df235094570e3d5d 100644
index 949af1a45ab1b0180a767d89f8837df531041dfe..81d0550107f1d5f38b5ef7d658099ea2ca35d3a6 100644
--- a/media/capture/video_capture_types.h
+++ b/media/capture/video_capture_types.h
@@ -355,6 +355,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
// Flag indicating whether HiDPI mode should be enabled for tab capture
// sessions.
bool is_high_dpi_enabled = true;
@@ -364,6 +364,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
// of the capture is dynamically changed, as for example when using
// share-this-tab-instead.
uint32_t capture_version_source = 0;
+
+ std::optional<bool> use_native_picker;
};

View File

@@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
parent process to read from the pipe.
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
index 0a7e292f77a30f76eb413785551d7fa57acf1799..091628a0dd3ca9b4bdf06d484595342bc70e4427 100644
index 4490b007072cbdb5d5d42bc74ad1eb3c183e86ed..0f365510982d897bc089ab3c97643109a4fcc8af 100644
--- a/content/browser/child_process_launcher.h
+++ b/content/browser/child_process_launcher.h
@@ -33,6 +33,7 @@
@@ -707,10 +707,10 @@ index c5fee4ad8b246bc1113a383794c6101bade24df3..61f0a0f62795b30105c42da363205284
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a305966c6833c4 100644
index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a59a58a837 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -588,11 +588,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@@ -592,11 +592,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
// command line flag.
ResultCode LaunchWithoutSandbox(
const base::CommandLine& cmd_line,
@@ -723,7 +723,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
options.feedback_cursor_off = true;
// Network process runs in a job even when unsandboxed. This is to ensure it
// does not outlive the browser, which could happen if there is a lot of I/O
@@ -895,7 +893,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
@@ -899,7 +897,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
// static
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
@@ -732,7 +732,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
SandboxDelegate* delegate,
TargetPolicy* policy) {
const base::CommandLine& launcher_process_command_line =
@@ -909,7 +907,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -913,7 +911,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
}
// Add any handles to be inherited to the policy.
@@ -741,7 +741,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
policy->AddHandleToShare(handle);
if (!policy->GetConfig()->IsConfigured()) {
@@ -924,6 +922,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -928,6 +926,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@@ -755,7 +755,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
#endif
if (!delegate->PreSpawnTarget(policy))
@@ -935,7 +940,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -939,7 +944,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// static
ResultCode SandboxWin::StartSandboxedProcess(
const base::CommandLine& cmd_line,
@@ -764,7 +764,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
SandboxDelegate* delegate,
StartSandboxedProcessCallback result_callback) {
SandboxLaunchTimer timer;
@@ -945,7 +950,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -949,7 +954,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
*base::CommandLine::ForCurrentProcess())) {
base::Process process;
ResultCode result =
@@ -773,7 +773,7 @@ index a0a8545a9c967f1059119cf3dda849fa7d96cb15..3a3a9c1e2fa3ad88eaf721da75a30596
DWORD last_error = GetLastError();
std::move(result_callback).Run(std::move(process), last_error, result);
return SBOX_ALL_OK;
@@ -955,7 +960,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -959,7 +964,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
timer.OnPolicyCreated();
ResultCode result = GeneratePolicyForSandboxedProcess(

View File

@@ -20,7 +20,7 @@ making three primary changes to Blink:
* Controls whether the CSS rule is available.
diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
index bb284c62d1d0dcd693bcb092044e6723bb339258..3c754cf37c18d0d17dc27e184ba5e8c5ebf8bdae 100644
index 55b9d698a53e8cc7bc4422b0dbe8a5df71e23e11..b0ce80b13c8f214db027765048170bd40851f68a 100644
--- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
+++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
@@ -48,6 +48,7 @@ enum CSSSampleId {
@@ -45,10 +45,10 @@ index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97ca
'internal-forced-visited-'):
internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index 27e52d4fd24d575fded2016a720d4587d5fb1998..e39ad72d2d3e56ff918f3274be86633e930fd24f 100644
index 2df4e7b0d00dacfe0b31640da59f4d4a4aa951bd..446853fbb199c1dbe321f0a3652c57e609aed11f 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -8966,6 +8966,26 @@
@@ -9010,6 +9010,26 @@
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
},
@@ -76,10 +76,10 @@ index 27e52d4fd24d575fded2016a720d4587d5fb1998..e39ad72d2d3e56ff918f3274be86633e
{
name: "-internal-visited-color",
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc
index 687332cf68b3b826d7dcbd5dc10d47f0cd7ce688..653bbb8aef7e6edb31d63b02a9799d5454ce8d57 100644
index 4f2eff535fe0a74f612fa67ba0c88442350a0473..b4c8bfe3cf2652b4f9b79ff7b13bf22c1a5880db 100644
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
@@ -352,6 +352,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
@@ -354,6 +354,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
return a.DominantBaseline() == b.DominantBaseline();
case CSSPropertyID::kDynamicRangeLimit:
return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit();
@@ -89,10 +89,10 @@ index 687332cf68b3b826d7dcbd5dc10d47f0cd7ce688..653bbb8aef7e6edb31d63b02a9799d54
return a.EmptyCells() == b.EmptyCells();
case CSSPropertyID::kFill:
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
index 8833941b927a076a73336b5d651c033258c13793..525f2303efbe9222567a1bbcdbc7321d5d93048f 100644
index ca097bf7d6334fe281f0af2015701b0af7036194..9c5bca32a5ebbfc666e1f941ac99b25fb59fa0c3 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -12289,5 +12289,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
@@ -12367,5 +12367,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
CSSValueID::kNone>(stream);
}
@@ -130,10 +130,10 @@ index 8833941b927a076a73336b5d651c033258c13793..525f2303efbe9222567a1bbcdbc7321d
} // namespace css_longhand
} // namespace blink
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
index 7a5a5e370daea769e710f56a8004d79efa721268..4ba371436c33049952d919dc734be835dfbc783a 100644
index b6968dd7370614c4a32e015da09b22db55b4143b..53ddeac758bfb89b4a77039a5e2d583e5d600f73 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -4022,6 +4022,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
@@ -4049,6 +4049,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
return PositionTryFallback(scoped_name, tactic_list);
}
@@ -150,10 +150,10 @@ index 7a5a5e370daea769e710f56a8004d79efa721268..4ba371436c33049952d919dc734be835
const CSSValue& value) {
const auto& list = To<CSSValueList>(value);
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
index 6b801bce099cf7311d487e3fae5065cb11529ca7..4e1c37274e29144a769a5a4916b07d4fa8b86e1d 100644
index 1f98f1086257c02f653f7e6acafc32a165668f52..9a1a436607a3d8c91a49e99d3eabef971e2fea9f 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
@@ -434,6 +434,7 @@ class StyleBuilderConverter {
@@ -441,6 +441,7 @@ class StyleBuilderConverter {
static PositionTryFallback ConvertSinglePositionTryFallback(
StyleResolverState&,
const CSSValue&);
@@ -201,10 +201,10 @@ index 0802c73aa4aaf4e1fb5efd367758f19c36691f71..5f06c0af277a7c937e694470beac707a
return result;
}
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 4c0ab9ea098c76063ece82ee79e4fb6465f822c8..2eaf538e48407a4cb12d1509e012f41847c716f2 100644
index 09065ad3e03dddb25863ad7ef2e0e8e51af56a9d..08853e8624545824bade5061f6b8394f6309ecb7 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1659,6 +1659,8 @@ component("platform") {
@@ -1673,6 +1673,8 @@ component("platform") {
"widget/widget_base.h",
"widget/widget_base_client.h",
"windows_keyboard_codes.h",
@@ -312,7 +312,7 @@ index 7e3d46902fbf736b4240eb3fcb89975a7b222197..57fdc89fc265ad70cb0bff8443cc1026
auto DrawAsSinglePath = [&]() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index e58bd2c672fcfd68b7dbc0c861d5be1d2a099e97..7dbe46a7390a988c21b2fbfbd5fbb3a3e822b7f5 100644
index 9ecc66cab0d9640835b1075ead0f4ae12bb92937..3cbdebcfcb0b6b30a1cd55e45121d77f8c32220f 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -214,6 +214,10 @@
@@ -324,5 +324,5 @@ index e58bd2c672fcfd68b7dbc0c861d5be1d2a099e97..7dbe46a7390a988c21b2fbfbd5fbb3a3
+ status: "stable",
+ },
{
name: "Accelerated2dCanvas",
settable_from_internals: true,
// crbug.com/439682405
name: "AbortByPlaceholderLayout",

View File

@@ -39,7 +39,7 @@ index aed835411f5728c5685baa43eda2dd1585119b18..0e66085b1c457c1f1f6be241c7d331d7
gpu::SurfaceHandle child_window) {
NOTREACHED();
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
index 9e94f648060e9873a120f2c45591ad599a2e62df..93dabe09e44bda68644dcab568a827a92c550e4a 100644
index 07fe1ea0e8e5f28428a164eedc28d4e5150ab13b..1a20c4b5765ce504c64c0dabfe3080fb65dbc03d 100644
--- a/components/viz/host/host_display_client.h
+++ b/components/viz/host/host_display_client.h
@@ -39,6 +39,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
@@ -90,11 +90,11 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index de0ed691367bda45e5310b1f132171e3a1f2dd3f..53848189bc02cd73446409667ad918e456727ce9 100644
index 88b4d3e2d965ee6930b4d5dd49c75af079c1bcff..17846f135a333b0f0a2755ad55d2492a4fd33693 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -174,6 +174,8 @@ viz_component("service") {
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
@@ -176,6 +176,8 @@ viz_component("service") {
"display_embedder/skia_output_surface_shared_image_interface.h",
"display_embedder/skia_render_copy_results.cc",
"display_embedder/skia_render_copy_results.h",
+ "display_embedder/software_output_device_proxy.cc",
@@ -564,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1
gpu::SyncPointManager* GetSyncPointManager() override;
gpu::Scheduler* GetGpuScheduler() override;
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index 0c9dabd7e85042499b60d0a27a506745771bea6f..5f1896f4494b86c8385d3f5415863f5a7167715a 100644
index d8f825a29c50f47a35ef2ff4dc03c0a8d27d877d..4dba804d04626183c749b75b317fd26ee6d57f54 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -386,8 +386,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@@ -585,10 +585,10 @@ index 0c9dabd7e85042499b60d0a27a506745771bea6f..5f1896f4494b86c8385d3f5415863f5a
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index e063835e87f08e6a2359886a96d7b78954e3d5b2..34bcf67726f64466d11a56d7a315ce7e05a0cb3d 100644
index 78a96bff9ba9e24dababf758ba38f9b430b39a14..7b46e68f52e3c13f731ce486706004423c871eb1 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -119,7 +119,6 @@ interface DisplayClient {
@@ -120,7 +120,6 @@ interface DisplayClient {
// Creates a LayeredWindowUpdater implementation to draw into a layered
// window.
@@ -597,7 +597,7 @@ index e063835e87f08e6a2359886a96d7b78954e3d5b2..34bcf67726f64466d11a56d7a315ce7e
// Sends the created child window to the browser process so that it can be
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index 3066550e422058eec23d5fe3e655625f5446d694..7358b05a646a2f80717a91182c4929776a404179 100644
index ad6f66db209484678e74807f091f03683307e7ce..73a5100e4e2f321f88829ba9a311f1c2f04823c6 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -39,6 +39,7 @@ struct RootCompositorFrameSinkParams {
@@ -620,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d853beb90cc 100644
index 986569ff285a2a5be21e715dacf6072de92ebe79..2544d15677ac20c83118d5552c94eed103ac1eaa 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -87,6 +87,7 @@ class DisplayPrivate;
@@ -647,7 +647,7 @@ index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d85
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
@@ -189,6 +199,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -195,6 +205,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -657,7 +657,7 @@ index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d85
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -630,6 +643,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -635,6 +648,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

View File

@@ -82,7 +82,7 @@ index 3bcbb33700b2b9349795c05c12e44b4fafcc0370..b55c72e236f05591d41b7146eab16621
}
diff --git a/crypto/apple/keychain.h b/crypto/apple/keychain.h
index 2438c3947f330fb496886b85c8eaf49767c68413..dc7da2fd2819eb64f2083de722a1b2771380abd5 100644
index b5e604c525d66c172c80f65f38cdb23dccd4259d..7f48d66c83cf41d6d097eb43e271dd5ab43d01e9 100644
--- a/crypto/apple/keychain.h
+++ b/crypto/apple/keychain.h
@@ -18,6 +18,14 @@
@@ -97,10 +97,10 @@ index 2438c3947f330fb496886b85c8eaf49767c68413..dc7da2fd2819eb64f2083de722a1b277
+using AppleSecKeychainItemRef = SecKeychainItemRef;
+#endif
+
// DEPRECATED: use `KeychainV2` instead.
// Wraps the KeychainServices API in a very thin layer, to allow it to be
// mocked out for testing.
@@ -46,13 +54,18 @@ class CRYPTO_EXPORT Keychain {
@@ -45,13 +53,18 @@ class CRYPTO_EXPORT Keychain {
// std::vector<uint8_t> arm is populated instead.
virtual base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
@@ -170,63 +170,6 @@ index d2b9526f9a0bfa9d12a594c35c71499810cb6bb0..aef0eb3508fc37e3a0e9e1c27a71e1aa
+}
+#endif
+
} // namespace crypto::apple
diff --git a/crypto/apple/keychain_seckeychain.cc b/crypto/apple/keychain_seckeychain.cc
index 4ad5acbf29607fe2ea28637f5470599984e317db..61056948062f3fcb5138e309b9f5019c96f9ce00 100644
--- a/crypto/apple/keychain_seckeychain.cc
+++ b/crypto/apple/keychain_seckeychain.cc
@@ -25,14 +25,15 @@ KeychainSecKeychain::~KeychainSecKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus>
KeychainSecKeychain::FindGenericPassword(std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
base::AutoLock lock(GetMacSecurityServicesLock());
uint32_t password_length = 0;
void* password_data = nullptr;
OSStatus status = SecKeychainFindGenericPassword(
nullptr, service_name.length(), service_name.data(),
account_name.length(), account_name.data(), &password_length,
- &password_data, nullptr);
+ &password_data, item);
if (status != noErr) {
return base::unexpected(status);
}
@@ -58,6 +59,11 @@ OSStatus KeychainSecKeychain::AddGenericPassword(
password.data(), nullptr);
}
+OSStatus KeychainSecKeychain::ItemDelete(AppleSecKeychainItemRef item) const {
+ base::AutoLock lock(GetMacSecurityServicesLock());
+ return SecKeychainItemDelete(item);
+}
+
#pragma clang diagnostic pop
} // namespace crypto::apple
diff --git a/crypto/apple/keychain_seckeychain.h b/crypto/apple/keychain_seckeychain.h
index 991b2c8debaa1812812fb04e7ab6bf437c874691..191ea7532d269eae7a975229b12227cd32b56ede 100644
--- a/crypto/apple/keychain_seckeychain.h
+++ b/crypto/apple/keychain_seckeychain.h
@@ -20,12 +20,17 @@ class CRYPTO_EXPORT KeychainSecKeychain : public Keychain {
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,
std::string_view account_name,
base::span<const uint8_t> password) const override;
+
+#if !BUILDFLAG(IS_IOS)
+ OSStatus ItemDelete(SecKeychainItemRef itemRef) const override;
+#endif // !BUILDFLAG(IS_IOS)
};
} // namespace crypto::apple
diff --git a/crypto/apple/mock_keychain.cc b/crypto/apple/mock_keychain.cc
index 080806aaf3fc10548b160850ad36ef3519ea2b6f..21f04059d67ba41118face6ee9327aa05e854362 100644
@@ -254,10 +197,10 @@ index 080806aaf3fc10548b160850ad36ef3519ea2b6f..21f04059d67ba41118face6ee9327aa0
IncrementKeychainAccessHistogram();
return kPassword;
diff --git a/crypto/apple/mock_keychain.h b/crypto/apple/mock_keychain.h
index 40fb4e1f75a2b7f021a8a20b01d63c7e3b8c5fa3..3c3f41e7ffcaeb74aaff872ce3b54027312ec0dd 100644
index 680efe0312c81449e069c19d9c6ef146da7834db..b49c2ba5f639344ab57e9f14c098effc38729d1f 100644
--- a/crypto/apple/mock_keychain.h
+++ b/crypto/apple/mock_keychain.h
@@ -37,13 +37,18 @@ class CRYPTO_EXPORT MockKeychain : public Keychain {
@@ -36,13 +36,18 @@ class CRYPTO_EXPORT MockKeychain : public Keychain {
// Keychain implementation.
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,

View File

@@ -28,7 +28,7 @@ index 33e23680b927d417b0882c7572fe32dc2d2b90c3..9413492f8e0fd6c5371c66329e1ad6d4
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index a41f344dca8ec3a9004874f4820b742c27999738..222c1d749174e434878cc762625ac8aabe10f5e6 100644
index 054d0d7e9f62c197ab4e1db82e67eadced3f815d..578fccb657443110d6da486d31afe38c57ac00e3 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -322,7 +322,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,

View File

@@ -37,10 +37,10 @@ index 4c6da7daa167e8e687d43b6c59948fdc694052f7..1f9a142462146f1cef675455a782996b
allow_cookies_from_browser == other.allow_cookies_from_browser &&
include_request_cookies_with_response ==
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 3137a61cba8ea72aaa422fadaf4f530b22832aa5..3bb07ad3981e21563debfab1d8080767fd349c72 100644
index 759539fe29d5599936254e1ddf50ff54b4fa8c46..6fba963f21ac5a3b4bb1e140e5120ccdee1720bc 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -91,6 +91,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -99,6 +99,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
bool has_user_activation = false;
bool allow_cookies_from_browser = false;
bool include_request_cookies_with_response = false;
@@ -49,10 +49,10 @@ index 3137a61cba8ea72aaa422fadaf4f530b22832aa5..3bb07ad3981e21563debfab1d8080767
mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer;
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index 1d4476c7a6d75bf1a02dc874c971068ab99345bd..4b5113ce912bdbe8eb75482bb9d5361272a3a628 100644
index 828d1d573b4710cddacf84a5cc16058831c7a4d4..fb7dc02e15863212d705a60eeab665e0833b1e4a 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -64,6 +64,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@@ -67,6 +67,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
out->allow_cookies_from_browser = data.allow_cookies_from_browser();
out->include_request_cookies_with_response =
data.include_request_cookies_with_response();
@@ -61,10 +61,10 @@ index 1d4476c7a6d75bf1a02dc874c971068ab99345bd..4b5113ce912bdbe8eb75482bb9d53612
return false;
}
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index 933a3ccdbea3182035a6626f6c288719ce46ab62..5fdc6cd9539ed4501bc577b7eefb629e0d8912f0 100644
index 3a028b9a2ff0cac114bca857f3a87c4ed331e0a1..e53ed3ceef61961bce7b9ce45098f83c82ea23ce 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -101,6 +101,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -108,6 +108,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
const network::ResourceRequest::TrustedParams& trusted_params) {
return trusted_params.include_request_cookies_with_response;
}
@@ -76,10 +76,10 @@ index 933a3ccdbea3182035a6626f6c288719ce46ab62..5fdc6cd9539ed4501bc577b7eefb629e
network::ResourceRequest::TrustedParams::EnabledClientHints>&
enabled_client_hints(
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index 02651c7b3b0cb0ab8fd3a4c84ab5b39b0e773536..0cbf060b11cc47c24e5cde0d36edb88cd50d5c98 100644
index 950d6e0fa3e5304b2d28db0e284f9697d0c9f45c..048900b092875f3dd01b8a3cd813f5a44d1355e1 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -103,6 +103,9 @@ struct TrustedUrlRequestParams {
@@ -111,6 +111,9 @@ struct TrustedUrlRequestParams {
// client which should not be able to see them.
bool include_request_cookies_with_response = false;
@@ -112,10 +112,10 @@ index 3a5fbaea905e7c01caee3659ff3be06e8def5615..89da9461e8290b8099456e5222f27877
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff93d826afe 100644
index 9c6f41c82539ec428defa5e093b8a2d780f6e0ee..5214e695c71ccdaf995bc21f30bf1a16d4f5082c 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -398,6 +398,9 @@ URLLoader::URLLoader(
@@ -403,6 +403,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
TaskRunner(request.priority)),
per_factory_orb_state_(context.GetMutableOrbState()),
@@ -125,7 +125,7 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
devtools_request_id_(request.devtools_request_id),
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -536,7 +539,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
@@ -542,7 +545,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@@ -134,7 +134,7 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1151,6 +1154,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1161,6 +1164,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@@ -155,10 +155,10 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
ad_auction_event_record_request_helper_.HandleResponse(
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 6ba39c957af7927b060be59f7d8837a3e2d41215..e52a276b0dd671317797104d85ccf75f5a333153 100644
index 21dc5e84807eb89a4e331e5cca5b38f08c41f72d..9f55ff05f239df939833d98d45d455e864f4f2c3 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -615,6 +615,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -622,6 +622,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View File

@@ -7,10 +7,10 @@ Subject: feat: filter out non-shareable windows in the current application in
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 42705a5c59fb76ba4a6a17a060e215436307de49..7e17594c30ac3cf8cb484b53563b03fc75bd2e0b 100644
index 404085d1ccf3ea7f4d11941efa64dc1a193552e0..c2d8bbafa39c05f25641f2fd3491ef7f84f4f6a1 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -254,8 +254,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
@@ -266,8 +266,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
// fallback. See https://crbug.com/325530044.
if (source_.id == display.displayID ||
source_.id == webrtc::kFullDesktopScreenId) {

Some files were not shown because too many files have changed in this diff Show More