mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
9 Commits
fix-codesp
...
cherry-pic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2059f82d72 | ||
|
|
5d80264944 | ||
|
|
dae76c2885 | ||
|
|
a368c5da0c | ||
|
|
1b2679b315 | ||
|
|
15acf70760 | ||
|
|
324eb0eb1c | ||
|
|
0e4ee9f03a | ||
|
|
ae94cefdba |
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
buildtools:
|
||||
image: ghcr.io/electron/devcontainer:933c7d6ff6802706875270bec2e3c891cf8add3f
|
||||
image: ghcr.io/electron/devcontainer:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
||||
|
||||
volumes:
|
||||
- ..:/workspaces/gclient/src/electron:cached
|
||||
|
||||
16
.github/actions/fix-sync/action.yml
vendored
16
.github/actions/fix-sync/action.yml
vendored
@@ -37,6 +37,22 @@ runs:
|
||||
installation-dir: third_party/esbuild
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/esbuild/${platform}
|
||||
- name: Fix rollup
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
|
||||
dependency: rollup_libs
|
||||
deps-file: src/third_party/devtools-frontend/src/DEPS
|
||||
installation-dir: third_party/rollup_libs
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/rollup_libs/${platform}
|
||||
- name: Sync native rollup libs
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
cd src/third_party/devtools-frontend/src
|
||||
python3 scripts/deps/sync_rollup_libs.py
|
||||
- name: Fix rustc
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
|
||||
2
.github/workflows/archaeologist-dig.yml
vendored
2
.github/workflows/archaeologist-dig.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
|
||||
with:
|
||||
node-version: 22.21.x
|
||||
node-version: 24.12.x
|
||||
- name: Setting Up Dig Site
|
||||
run: |
|
||||
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
|
||||
|
||||
6
.github/workflows/build-git-cache.yml
vendored
6
.github/workflows/build-git-cache.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
container:
|
||||
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
|
||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
||||
options: --user root
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
container:
|
||||
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
|
||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||
volumes:
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
# This job updates the same git cache as linux, so it needs to run after the linux one.
|
||||
needs: build-git-cache-linux
|
||||
container:
|
||||
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
|
||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
||||
options: --user root
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
|
||||
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
|
||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
||||
required: true
|
||||
skip-macos:
|
||||
type: boolean
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
id: set-output
|
||||
run: |
|
||||
if [ -z "${{ inputs.build-image-sha }}" ]; then
|
||||
echo "build-image-sha=933c7d6ff6802706875270bec2e3c891cf8add3f" >> "$GITHUB_OUTPUT"
|
||||
echo "build-image-sha=a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
2
.github/workflows/linux-publish.yml
vendored
2
.github/workflows/linux-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
|
||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
required: false
|
||||
|
||||
2
.github/workflows/macos-publish.yml
vendored
2
.github/workflows/macos-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
|
||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
||||
required: true
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
|
||||
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
@@ -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@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v3.29.5
|
||||
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
.github/workflows/windows-publish.yml
vendored
2
.github/workflows/windows-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
|
||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
||||
required: true
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'145.0.7618.0',
|
||||
'145.0.7628.0',
|
||||
'node_version':
|
||||
'v24.11.1',
|
||||
'nan_version':
|
||||
|
||||
@@ -612,7 +612,7 @@ Returns `string` - The current application directory.
|
||||
may backup this directory to cloud storage.
|
||||
* `sessionData` The directory for storing data generated by `Session`, such
|
||||
as localStorage, cookies, disk cache, downloaded dictionaries, network
|
||||
state, devtools files. By default this points to `userData`. Chromium may
|
||||
state, DevTools files. By default this points to `userData`. Chromium may
|
||||
write very large disk cache here, so if your app does not rely on browser
|
||||
storage like localStorage or cookies to save user data, it is recommended
|
||||
to set this directory to other locations to avoid polluting the `userData`
|
||||
|
||||
@@ -317,7 +317,7 @@ By default inspector websocket url is available in stderr and under /json/list e
|
||||
|
||||
### `--experimental-network-inspection`
|
||||
|
||||
Enable support for devtools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.
|
||||
Enable support for DevTools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.
|
||||
|
||||
### `--no-deprecation`
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Returns:
|
||||
* `reason` string - Reason for detaching debugger.
|
||||
|
||||
Emitted when the debugging session is terminated. This happens either when
|
||||
`webContents` is closed or devtools is invoked for the attached `webContents`.
|
||||
`webContents` is closed or DevTools is invoked for the attached `webContents`.
|
||||
|
||||
#### Event: 'message'
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ The following methods are available on instances of `Extensions`:
|
||||
* `options` Object (optional)
|
||||
* `allowFileAccess` boolean - Whether to allow the extension to read local files over `file://`
|
||||
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
|
||||
devtools extensions on `file://` URLs. Defaults to false.
|
||||
DevTools extensions on `file://` URLs. Defaults to false.
|
||||
|
||||
Returns `Promise<Extension>` - resolves when the extension is loaded.
|
||||
|
||||
@@ -83,7 +83,7 @@ const path = require('node:path')
|
||||
app.whenReady().then(async () => {
|
||||
await session.defaultSession.extensions.loadExtension(
|
||||
path.join(__dirname, 'react-devtools'),
|
||||
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
||||
// allowFileAccess is required to load the DevTools extension on file:// URLs.
|
||||
{ allowFileAccess: true }
|
||||
)
|
||||
// Note that in order to use the React DevTools extension, you'll need to
|
||||
|
||||
@@ -36,7 +36,7 @@ everything will be reset to the OS default. By default `themeSource` is `system
|
||||
Settings this property to `dark` will have the following effects:
|
||||
|
||||
* `nativeTheme.shouldUseDarkColors` will be `true` when accessed
|
||||
* Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the dark UI.
|
||||
* Any UI Electron renders on Linux and Windows including context menus, DevTools, etc. will use the dark UI.
|
||||
* Any UI the OS renders on macOS including menus, window frames, etc. will use the dark UI.
|
||||
* The [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS query will match `dark` mode.
|
||||
* The `updated` event will be emitted
|
||||
@@ -44,7 +44,7 @@ Settings this property to `dark` will have the following effects:
|
||||
Settings this property to `light` will have the following effects:
|
||||
|
||||
* `nativeTheme.shouldUseDarkColors` will be `false` when accessed
|
||||
* Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the light UI.
|
||||
* Any UI Electron renders on Linux and Windows including context menus, DevTools, etc. will use the light UI.
|
||||
* Any UI the OS renders on macOS including menus, window frames, etc. will use the light UI.
|
||||
* The [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS query will match `light` mode.
|
||||
* The `updated` event will be emitted
|
||||
|
||||
@@ -1512,7 +1512,7 @@ will not work on non-persistent (in-memory) sessions.
|
||||
* `options` Object (optional)
|
||||
* `allowFileAccess` boolean - Whether to allow the extension to read local files over `file://`
|
||||
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
|
||||
devtools extensions on `file://` URLs. Defaults to false.
|
||||
DevTools extensions on `file://` URLs. Defaults to false.
|
||||
|
||||
Returns `Promise<Extension>` - resolves when the extension is loaded.
|
||||
|
||||
@@ -1538,7 +1538,7 @@ const path = require('node:path')
|
||||
app.whenReady().then(async () => {
|
||||
await session.defaultSession.loadExtension(
|
||||
path.join(__dirname, 'react-devtools'),
|
||||
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
||||
// allowFileAccess is required to load the DevTools extension on file:// URLs.
|
||||
{ allowFileAccess: true }
|
||||
)
|
||||
// Note that in order to use the React DevTools extension, you'll need to
|
||||
|
||||
@@ -62,7 +62,7 @@ console.log(webContents)
|
||||
### `webContents.getAllWebContents()`
|
||||
|
||||
Returns `WebContents[]` - An array of all `WebContents` instances. This will contain web contents
|
||||
for all windows, webviews, opened devtools, and devtools extension background pages.
|
||||
for all windows, webviews, opened DevTools, and DevTools extension background pages.
|
||||
|
||||
### `webContents.getFocusedWebContents()`
|
||||
|
||||
@@ -958,7 +958,7 @@ win.loadURL('https://github.com')
|
||||
|
||||
#### Event: 'devtools-reload-page'
|
||||
|
||||
Emitted when the devtools window instructs the webContents to reload
|
||||
Emitted when the DevTools window instructs the webContents to reload
|
||||
|
||||
#### Event: 'will-attach-webview'
|
||||
|
||||
@@ -1865,66 +1865,20 @@ Removes the specified path from DevTools workspace.
|
||||
|
||||
* `devToolsWebContents` WebContents
|
||||
|
||||
Uses the `devToolsWebContents` as the target `WebContents` to show devtools.
|
||||
Uses the `devToolsWebContents` as the target `WebContents` to show DevTools.
|
||||
|
||||
The `devToolsWebContents` must not have done any navigation, and it should not
|
||||
be used for other purposes after the call.
|
||||
|
||||
By default Electron manages the devtools by creating an internal `WebContents`
|
||||
By default, Electron manages the DevTools by creating an internal `WebContents`
|
||||
with native view, which developers have very limited control of. With the
|
||||
`setDevToolsWebContents` method, developers can use any `WebContents` to show
|
||||
the devtools in it, including `BrowserWindow`, `BrowserView` and `<webview>`
|
||||
tag.
|
||||
the DevTools in it, such as [`BrowserWindow`](./browser-window.md) or [`WebContentsView`](./web-contents-view.md).
|
||||
|
||||
Note that closing the devtools does not destroy the `devToolsWebContents`, it
|
||||
is caller's responsibility to destroy `devToolsWebContents`.
|
||||
Note that closing the DevTools does not destroy the `devToolsWebContents`, it
|
||||
is the caller's responsibility to destroy `devToolsWebContents` manually.
|
||||
|
||||
An example of showing devtools in a `<webview>` tag:
|
||||
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
* { margin: 0; }
|
||||
#browser { height: 70%; }
|
||||
#devtools { height: 30%; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<webview id="browser" src="https://github.com"></webview>
|
||||
<webview id="devtools" src="about:blank"></webview>
|
||||
<script>
|
||||
const { ipcRenderer } = require('electron')
|
||||
const emittedOnce = (element, eventName) => new Promise(resolve => {
|
||||
element.addEventListener(eventName, event => resolve(event), { once: true })
|
||||
})
|
||||
const browserView = document.getElementById('browser')
|
||||
const devtoolsView = document.getElementById('devtools')
|
||||
const browserReady = emittedOnce(browserView, 'dom-ready')
|
||||
const devtoolsReady = emittedOnce(devtoolsView, 'dom-ready')
|
||||
Promise.all([browserReady, devtoolsReady]).then(() => {
|
||||
const targetId = browserView.getWebContentsId()
|
||||
const devtoolsId = devtoolsView.getWebContentsId()
|
||||
ipcRenderer.send('open-devtools', targetId, devtoolsId)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
```js
|
||||
// Main process
|
||||
const { ipcMain, webContents } = require('electron')
|
||||
|
||||
ipcMain.on('open-devtools', (event, targetContentsId, devtoolsContentsId) => {
|
||||
const target = webContents.fromId(targetContentsId)
|
||||
const devtools = webContents.fromId(devtoolsContentsId)
|
||||
target.setDevToolsWebContents(devtools)
|
||||
target.openDevTools()
|
||||
})
|
||||
```
|
||||
|
||||
An example of showing devtools in a `BrowserWindow`:
|
||||
An example of showing DevTools in a `BrowserWindow`:
|
||||
|
||||
```js title='main.js'
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
@@ -1944,31 +1898,31 @@ app.whenReady().then(() => {
|
||||
#### `contents.openDevTools([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `mode` string - Opens the devtools with specified dock state, can be
|
||||
* `mode` string - Opens the DevTools with specified dock state, can be
|
||||
`left`, `right`, `bottom`, `undocked`, `detach`. Defaults to last used dock state.
|
||||
In `undocked` mode it's possible to dock back. In `detach` mode it's not.
|
||||
* `activate` boolean (optional) - Whether to bring the opened devtools window
|
||||
* `activate` boolean (optional) - Whether to bring the opened DevTools window
|
||||
to the foreground. The default is `true`.
|
||||
* `title` string (optional) - A title for the DevTools window (only in `undocked` or `detach` mode).
|
||||
|
||||
Opens the devtools.
|
||||
Opens the DevTools.
|
||||
|
||||
When `contents` is a `<webview>` tag, the `mode` would be `detach` by default,
|
||||
explicitly passing an empty `mode` can force using last used dock state.
|
||||
|
||||
On Windows, if Windows Control Overlay is enabled, Devtools will be opened with `mode: 'detach'`.
|
||||
On Windows, if Windows Control Overlay is enabled, DevTools will be opened with `mode: 'detach'`.
|
||||
|
||||
#### `contents.closeDevTools()`
|
||||
|
||||
Closes the devtools.
|
||||
Closes the DevTools view.
|
||||
|
||||
#### `contents.isDevToolsOpened()`
|
||||
|
||||
Returns `boolean` - Whether the devtools is opened.
|
||||
Returns `boolean` - Whether the DevTools view is opened.
|
||||
|
||||
#### `contents.isDevToolsFocused()`
|
||||
|
||||
Returns `boolean` - Whether the devtools view is focused .
|
||||
Returns `boolean` - Whether the DevTools view is focused .
|
||||
|
||||
#### `contents.getDevToolsTitle()`
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ dispatch errors of isolated worlds to foreign worlds.
|
||||
* `info` Object
|
||||
* `securityOrigin` string (optional) - Security origin for the isolated world.
|
||||
* `csp` string (optional) - Content Security Policy for the isolated world.
|
||||
* `name` string (optional) - Name for isolated world. Useful in devtools.
|
||||
* `name` string (optional) - Name for isolated world. Useful in DevTools.
|
||||
|
||||
Set the security origin, content security policy and name of the isolated world.
|
||||
|
||||
|
||||
@@ -6,30 +6,104 @@ Follow the guidelines below for building **Electron itself**, for the purposes o
|
||||
|
||||
## Platform prerequisites
|
||||
|
||||
Check the build prerequisites for your platform before proceeding
|
||||
Check the build prerequisites for your platform before proceeding:
|
||||
|
||||
* [macOS](build-instructions-macos.md#prerequisites)
|
||||
* [Linux](build-instructions-linux.md#prerequisites)
|
||||
* [Windows](build-instructions-windows.md#prerequisites)
|
||||
|
||||
## Build Tools
|
||||
## Setting up `@electron/build-tools` (recommended)
|
||||
|
||||
[Electron's Build Tools](https://github.com/electron/build-tools) automate much of the setup for compiling Electron from source with different configurations and build targets. If you wish to set up the environment manually, the instructions are listed below.
|
||||
[Electron Build Tools](https://github.com/electron/build-tools) automate much of the setup for
|
||||
compiling Electron from source with different configurations and build targets.
|
||||
Most of the [manual setup](#manual-setup-advanced) instructions can be replaced by simpler Build Tools commands.
|
||||
|
||||
> [!TIP]
|
||||
> Build Tools also gives you access to [remote execution and caching of build actions](./reclient.md),
|
||||
> which will dramatically improve build times.
|
||||
|
||||
Electron Build Tools can be installed globally from npm:
|
||||
|
||||
```sh
|
||||
npm install -g @electron/build-tools
|
||||
```
|
||||
|
||||
Once installed, the `e` command should be globally available in your command line. The `e init`
|
||||
command bootstraps a local checkout of Electron:
|
||||
|
||||
```sh
|
||||
# The 'Hello, World!' of build-tools: get and build `main`
|
||||
# Choose the directory where Electron's source and build files will reside.
|
||||
# You can specify any path you like; this command defaults to `$PWD/electron`.
|
||||
# If you're going to use multiple branches, you may want something like:
|
||||
# `--root=~/electron/branch` (e.g. `~/electron-gn/main`)
|
||||
e init --root=~/electron --bootstrap testing
|
||||
```
|
||||
|
||||
The `--bootstrap` flag also runs `e sync` (synchronizes source code branches from
|
||||
[`DEPS`](https://github.com/electron/electron/blob/main/DEPS) using
|
||||
[`gclient`](https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/HEAD/README.gclient.md))
|
||||
and `e build` (compiles the Electron binary into the `${root}/src/out` folder).
|
||||
|
||||
> [!IMPORTANT]
|
||||
>
|
||||
> Sometime after the initial `e sync` phase, you will be asked to run `e d rbe login` to auth into
|
||||
> remote build execution and proceed into the build. This may take about 20-30 minutes!
|
||||
|
||||
Once the build is done compiling, you can test it by running `e start` (or by loading it into
|
||||
[Electron Fiddle](http://electronjs.org/fiddle)).
|
||||
|
||||
### Navigating the project
|
||||
|
||||
Some quick tips on building once your checkout is set up:
|
||||
|
||||
* **Directory structure:** Within the project, Chromium code is synced to `${root}/src/` while Electron's code (i.e. code in
|
||||
https://github.com/electron/electron) lives in `${root}/src/electron/`. Note that both directories
|
||||
have their own git repositories.
|
||||
* **Updating your checkout:** Run git commands such as `git checkout <branch>` and `git pull` from `${root}/src/electron`.
|
||||
Whenever you update your commit `HEAD`, make sure to `e sync` before `e build` to sync dependencies
|
||||
such as Chromium and Node.js. This is especially relevant because the Chromium version in
|
||||
[`DEPS`](https://github.com/electron/electron/blob/main/DEPS) changes frequently.
|
||||
* **Rebuilding:** When making changes to code in `${root}/src/electron/` in a local branch, you only need to re-run `e build`.
|
||||
* **Adding patches:** When contributing changes in `${root}/src/` outside of `${root}/src/electron/`, you need to do so
|
||||
via Electron's [patch system](./patches.md). The `e patches` command can export all relevant patches to
|
||||
`${root}/src/electron/patches/` once your code change is ready.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Unless you're applying upstream patches, you should treat `${root}/src/` as a read-only folder and
|
||||
> spend most of your development time in `${root}/src/electron/`. You should not need to make any
|
||||
> changes or run `git` commands in `${root}/src/`.
|
||||
|
||||
> [!TIP]
|
||||
> Detailed documentation for all available `e` commands can be found in the
|
||||
> repository's [README.md](https://github.com/electron/build-tools/blob/main/README.md). You can
|
||||
> also run `e --help` to list all commands and use the `--help` flag on any command to get more
|
||||
> usage info.
|
||||
|
||||
> [!TIP]
|
||||
> For more information on project structure, see the [Source Code Directory Structure](./source-code-directory-structure.md)
|
||||
> guide.
|
||||
|
||||
<details>
|
||||
<!-- markdownlint-disable-next-line MD033 -->
|
||||
<summary><strong>Manual setup (advanced)</strong></summary>
|
||||
|
||||
## Manual setup (advanced)
|
||||
|
||||
Electron uses [GN](https://gn.googlesource.com/gn) for project generation and
|
||||
[ninja](https://ninja-build.org/) for building. Project configurations can
|
||||
be found in the `.gn` and `.gni` files.
|
||||
[siso](https://chromium.googlesource.com/build/+/refs/heads/main/siso/README.md) for building.
|
||||
Project configurations can be found in the `.gn` and `.gni` files in the `electron/electron` repo.
|
||||
|
||||
## GN Files
|
||||
### GN files
|
||||
|
||||
The following `gn` files contain the main rules for building Electron:
|
||||
|
||||
* `BUILD.gn` defines how Electron itself is built and
|
||||
includes the default configurations for linking with Chromium.
|
||||
* `build/args/{testing,release,all}.gn` contain the default build arguments for
|
||||
building Electron.
|
||||
* [`BUILD.gn`](https://github.com/electron/electron/blob/main/BUILD.gn) defines how Electron itself
|
||||
is built and includes the default configurations for linking with Chromium.
|
||||
* [`build/args/{testing,release,all}.gn`](https://github.com/electron/electron/tree/main/build/args)
|
||||
contain the default build arguments for building Electron.
|
||||
|
||||
## GN prerequisites
|
||||
### GN prerequisites
|
||||
|
||||
You'll need to install [`depot_tools`][depot-tools], the toolset
|
||||
used for fetching Chromium and its dependencies.
|
||||
@@ -56,7 +130,7 @@ $ mkdir -p "${GIT_CACHE_PATH}"
|
||||
# This will use about 16G.
|
||||
```
|
||||
|
||||
## Getting the code
|
||||
### Getting the code
|
||||
|
||||
```sh
|
||||
$ mkdir electron && cd electron
|
||||
@@ -68,7 +142,7 @@ $ gclient sync --with_branch_heads --with_tags
|
||||
> Instead of `https://github.com/electron/electron`, you can use your own fork
|
||||
> here (something like `https://github.com/<username>/electron`).
|
||||
|
||||
### A note on pulling/pushing
|
||||
#### A note on pulling/pushing
|
||||
|
||||
If you intend to `git pull` or `git push` from the official `electron`
|
||||
repository in the future, you now need to update the respective folder's
|
||||
@@ -83,12 +157,13 @@ $ git branch --set-upstream-to=origin/main
|
||||
$ cd -
|
||||
```
|
||||
|
||||
:memo: `gclient` works by checking a file called `DEPS` inside the
|
||||
`src/electron` folder for dependencies (like Chromium or Node.js).
|
||||
> [!TIP]
|
||||
> `gclient` works by checking a file called `DEPS` inside the
|
||||
`${root}/src/electron` folder for dependencies (like Chromium or Node.js).
|
||||
Running `gclient sync -f` ensures that all dependencies required
|
||||
to build Electron match that file.
|
||||
|
||||
So, in order to pull, you'd run the following commands:
|
||||
In order to pull, you'd run the following commands:
|
||||
|
||||
```sh
|
||||
$ cd src/electron
|
||||
@@ -96,7 +171,7 @@ $ git pull
|
||||
$ gclient sync -f
|
||||
```
|
||||
|
||||
## Building
|
||||
### Building
|
||||
|
||||
**Set the environment variable for chromium build tools**
|
||||
|
||||
@@ -156,7 +231,7 @@ $ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
|
||||
> This will generate a `out/Testing` or `out/Release` build directory under `${root}/src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
|
||||
|
||||
Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`.
|
||||
|
||||
@@ -189,7 +264,7 @@ $ ./out/Testing/electron.exe
|
||||
$ ./out/Testing/electron
|
||||
```
|
||||
|
||||
### Packaging
|
||||
#### Packaging
|
||||
|
||||
To package the electron build as a distributable zip file:
|
||||
|
||||
@@ -197,7 +272,7 @@ To package the electron build as a distributable zip file:
|
||||
$ ninja -C out/Release electron:electron_dist_zip
|
||||
```
|
||||
|
||||
### Cross-compiling
|
||||
#### Cross-compiling
|
||||
|
||||
To compile for a platform that isn't the same as the one you're building on,
|
||||
set the `target_cpu` and `target_os` GN arguments. For example, to compile an
|
||||
@@ -223,7 +298,7 @@ and [`target_cpu`][target_cpu values].
|
||||
[target_os values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values
|
||||
[target_cpu values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values
|
||||
|
||||
#### Windows on Arm (experimental)
|
||||
#### Windows on Arm
|
||||
|
||||
To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`.
|
||||
|
||||
@@ -241,12 +316,12 @@ gclient sync -f --with_branch_heads --with_tags
|
||||
|
||||
Next, run `gn gen` as above with `target_cpu="arm64"`.
|
||||
|
||||
## Tests
|
||||
### Tests
|
||||
|
||||
To run the tests, you'll first need to build the test modules against the
|
||||
same version of Node.js that was built as part of the build process. To
|
||||
generate build headers for the modules to compile against, run the following
|
||||
under `src/` directory.
|
||||
under `${root}/src/` directory.
|
||||
|
||||
```sh
|
||||
$ ninja -C out/Testing electron:node_headers
|
||||
@@ -262,7 +337,7 @@ $ npm run test -- \
|
||||
--enable-logging -g 'BrowserWindow module'
|
||||
```
|
||||
|
||||
## Sharing the git cache between multiple machines
|
||||
### Sharing the git cache between multiple machines
|
||||
|
||||
It is possible to share the gclient git cache with other machines by exporting it as
|
||||
SMB share on linux, but only one process/machine can be using the cache at a
|
||||
@@ -284,11 +359,14 @@ This can be set quickly in powershell (ran as administrator):
|
||||
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\Lanmanworkstation\Parameters" -Name DirectoryCacheLifetime -Value 0 -PropertyType DWORD -Force
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### gclient sync complains about rebase
|
||||
### `sync` complains about rebase
|
||||
|
||||
If `gclient sync` is interrupted the git tree may be left in a bad state, leading to a cryptic message when running `gclient sync` in the future:
|
||||
If `e sync` (or `gclient sync`) is interrupted, the git tree may be left in a bad state, leading to
|
||||
a cryptic message when running `sync` in the future:
|
||||
|
||||
```plaintext
|
||||
2> Conflict while rebasing this branch.
|
||||
@@ -296,17 +374,19 @@ If `gclient sync` is interrupted the git tree may be left in a bad state, leadin
|
||||
2> See man git-rebase for details.
|
||||
```
|
||||
|
||||
If there are no git conflicts or rebases in `src/electron`, you may need to abort a `git am` in `src`:
|
||||
If there are no git conflicts or rebases in `${root}/src/electron`, you may need to abort a `git am`
|
||||
in `${root}/src`:
|
||||
|
||||
```sh
|
||||
$ cd ../
|
||||
$ git am --abort
|
||||
$ cd electron
|
||||
$ gclient sync -f
|
||||
$ e sync -f
|
||||
```
|
||||
|
||||
This may also happen if you have checked out a branch (as opposed to having a detached head) in `electron/src/`
|
||||
or some other dependency’s repository. If that is the case, a `git checkout --detach HEAD` in the appropriate repository should do the trick.
|
||||
This may also happen if you have checked out a branch (as opposed to having a detached head) in `${root}/src/`
|
||||
or some other dependency’s repository. If that is the case, a `git checkout --detach HEAD` in the
|
||||
appropriate repository should do the trick.
|
||||
|
||||
### I'm being asked for a username/password for chromium-internal.googlesource.com
|
||||
|
||||
@@ -315,16 +395,6 @@ If you see a prompt for `Username for 'https://chrome-internal.googlesource.com'
|
||||
your locally installed version of Visual Studio (by default, `depot_tools` will
|
||||
try to download a Google-internal version that only Googlers have access to).
|
||||
|
||||
### `e` Module not found
|
||||
|
||||
If `e` is not recognized despite running `npm i -g @electron/build-tools`, ie:
|
||||
|
||||
```sh
|
||||
Error: Cannot find module '/Users/<user>/.electron_build_tools/src/e'
|
||||
```
|
||||
|
||||
We recommend installing Node through [nvm](https://github.com/nvm-sh/nvm). This allows for easier Node version management, and is often a fix for missing `e` modules.
|
||||
|
||||
### RBE authentication randomly fails with "Token not valid"
|
||||
|
||||
This could be caused by the local clock time on the machine being off by a small amount. Use [time.is](https://time.is/) to check.
|
||||
|
||||
@@ -6,7 +6,7 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* macOS >= 11.6.0
|
||||
* macOS >= 12
|
||||
* [Xcode](https://developer.apple.com/technologies/tools/). The exact version
|
||||
needed depends on what branch you are building, but the latest version of
|
||||
Xcode is generally a good bet for building `main`.
|
||||
|
||||
@@ -4,12 +4,40 @@ The source code of Electron is separated into a few parts, mostly
|
||||
following Chromium on the separation conventions.
|
||||
|
||||
You may need to become familiar with
|
||||
[Chromium's multi-process architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
|
||||
[Chromium's multi-process architecture](https://www.chromium.org/developers/design-documents/multi-process-architecture/)
|
||||
to understand the source code better.
|
||||
|
||||
## Structure of Source Code
|
||||
## Project structure
|
||||
|
||||
```diff
|
||||
Electron is a complex project containing multiple upstream dependencies, which are tracked in source
|
||||
control via the [`DEPS`](https://github.com/electron/electron/blob/main/DEPS) file. When
|
||||
[initializing a local Electron checkout](./build-instructions-gn.md), Electron's source code is just one
|
||||
of many nested folders within the project root.
|
||||
|
||||
The project contains a single `src` folder that corresponds a specific git checkout of
|
||||
[Chromium's `src` folder](https://source.chromium.org/chromium/chromium/src). In addition, Electron's
|
||||
repository code is contained in `src/electron` (with its own nested git repository), and other
|
||||
Electron-specific third-party dependencies (e.g. [nan](https://github.com/nodejs/nan) or
|
||||
[node](https://github.com/nodejs/node)) are located in `src/third_party` (along with all other
|
||||
Chromium third-party dependencies, such as WebRTC or ANGLE).
|
||||
|
||||
For all code outside of `src/electron`, Electron-specific code changes are maintained via git patches.
|
||||
See the [Patches](./patches.md) development guide for more information.
|
||||
|
||||
```plaintext
|
||||
Project Root
|
||||
└── src
|
||||
├── electron
|
||||
├── third_party
|
||||
│ ├── nan
|
||||
│ ├── electron_node
|
||||
│ └── ...other third party deps
|
||||
└── ...other folders
|
||||
```
|
||||
|
||||
## Structure of Electron source code
|
||||
|
||||
```plaintext
|
||||
Electron
|
||||
├── build/ - Build configuration files needed to build with GN.
|
||||
├── buildflags/ - Determines the set of features that can be conditionally built.
|
||||
@@ -25,24 +53,23 @@ Electron
|
||||
├── lib/ - JavaScript/TypeScript source code.
|
||||
| ├── browser/ - Main process initialization code.
|
||||
| | ├── api/ - API implementation for main process modules.
|
||||
| | └── remote/ - Code related to the remote module as it is
|
||||
| | used in the main process.
|
||||
| ├── common/ - Relating to logic needed by both main and renderer processes.
|
||||
| | └── api/ - API implementation for modules that can be used in
|
||||
| | both the main and renderer processes
|
||||
| ├── isolated_renderer/ - Handles creation of isolated renderer processes when
|
||||
| | contextIsolation is enabled.
|
||||
| ├── node/ - Initialization code for Node.js in the main process.
|
||||
│ ├── preload_realm/ - Initialization code for sandboxed renderer preload scripts.
|
||||
│ │ └── api/ - API implementation for preload scripts.
|
||||
| ├── renderer/ - Renderer process initialization code.
|
||||
| | ├── api/ - API implementation for renderer process modules.
|
||||
| | ├── extension/ - Code related to use of Chrome Extensions
|
||||
| | | in Electron's renderer process.
|
||||
| | ├── remote/ - Logic that handles use of the remote module in
|
||||
| | | the main process.
|
||||
| | └── web-view/ - Logic that handles the use of webviews in the
|
||||
| | renderer process.
|
||||
| ├── sandboxed_renderer/ - Logic that handles creation of sandboxed renderer
|
||||
| | | processes.
|
||||
| | └── api/ - API implementation for sandboxed renderer processes.
|
||||
│ ├── utility/ - Utility process initialization code.
|
||||
│ │ └── api/ - API implementation for utility process modules.
|
||||
| └── worker/ - Logic that handles proper functionality of Node.js
|
||||
| environments in Web Workers.
|
||||
├── patches/ - Patches applied on top of Electron's core dependencies
|
||||
@@ -67,27 +94,30 @@ Electron
|
||||
| | └── resources/ - Icons, platform-dependent files, etc.
|
||||
| ├── renderer/ - Code that runs in renderer process.
|
||||
| | └── api/ - The implementation of renderer process APIs.
|
||||
| └── common/ - Code that used by both the main and renderer processes,
|
||||
| | including some utility functions and code to integrate node's
|
||||
| | message loop into Chromium's message loop.
|
||||
| └── api/ - The implementation of common APIs, and foundations of
|
||||
| Electron's built-in modules.
|
||||
| ├── common/ - Code that used by both the main and renderer processes,
|
||||
| | | including some helper functions and code to integrate node's
|
||||
| | | message loop into Chromium's message loop.
|
||||
| | └── api/ - The implementation of common APIs, and foundations of
|
||||
| | Electron's built-in modules.
|
||||
│ ├── services/node/ - Provides a Node.js runtime to utility processes.
|
||||
│ └── utility - Code that runs in the utility process.
|
||||
├── spec/ - Components of Electron's test suite run in the main process.
|
||||
├── typings/ - Internal TypeScript types that aren't exported in electron.d.ts.
|
||||
└── BUILD.gn - Building rules of Electron.
|
||||
```
|
||||
|
||||
## Structure of Other Directories
|
||||
## Structure of other Electron directories
|
||||
|
||||
* **.github** - GitHub-specific config files including issues templates, CI with GitHub Actions and CODEOWNERS.
|
||||
* **dist** - Temporary directory created by `script/create-dist.py` script
|
||||
when creating a distribution.
|
||||
* **node_modules** - Third party node modules used for building.
|
||||
* **npm** - Logic for installation of Electron via npm.
|
||||
* **out** - Temporary output directory of `ninja`.
|
||||
* **out** - Temporary output directory for `siso`.
|
||||
* **script** - Scripts used for development purpose like building, packaging,
|
||||
testing, etc.
|
||||
|
||||
```diff
|
||||
```plaintext
|
||||
script/ - The set of all scripts Electron runs for a variety of purposes.
|
||||
├── codesign/ - Fakes codesigning for Electron apps; used for testing.
|
||||
├── lib/ - Miscellaneous python utility scripts.
|
||||
|
||||
@@ -143,3 +143,4 @@ chore_disable_protocol_handler_dcheck.patch
|
||||
fix_check_for_file_existence_before_setting_mtime.patch
|
||||
fix_linux_tray_id.patch
|
||||
expose_gtk_ui_platform_field.patch
|
||||
fix_os_crypt_async_cookie_encryption.patch
|
||||
|
||||
@@ -23,10 +23,10 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index ae5261813c4e0c730458ababb3e5e1d2cea6a974..5df58d4a7af133e54b499cfb27d7206740e0ad25 100644
|
||||
index e1a152201b17ad8aefbfe10d4ffa345ca1a74621..cb62bc567fbe0777e6dfe78bbf78b55e77bf4ffa 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4727,6 +4727,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4735,6 +4735,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index ae5261813c4e0c730458ababb3e5e1d2cea6a974..5df58d4a7af133e54b499cfb27d72067
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 2eb7abd0bd9185c99c492ba57382cbd0c21c6940..aac388b2b34798a574acdc8a3585166136a58fb7 100644
|
||||
index 9639e42a6ff5269dbef99cc0ee0b64f179e62998..fdbd5e66f73170cdc70009b183cd07f70db7dbd5 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
|
||||
@@ -116,10 +116,10 @@ index 932658273154ef2e022358e493a8e7c00c86e732..57bbfb5cde62c9496c351c861880a189
|
||||
// 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 468527b28ee3f9e7bdc8b992011411f8b9d0fbff..3aba685a2b94542bd22003590ecb6bc06ce5fee6 100644
|
||||
index 8cd8090807d0ae08267909c924a420119bce0a61..1ea40bbc89db58e602fee5478b48a0f7b25ff93a 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2498,6 +2498,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2532,6 +2532,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index 468527b28ee3f9e7bdc8b992011411f8b9d0fbff..3aba685a2b94542bd22003590ecb6bc0
|
||||
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 &&
|
||||
@@ -4133,10 +4137,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -4167,10 +4171,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ebd35a078ad640f1102f270cead9c48ca7fc829c..7e5d2ca71b66a520099c26be2d4f4cee39876191 100644
|
||||
index 3d660d72c029e5ae10cf32ac53c4c1a7314a5125..8ed89c56428886efe24fb1fe9399cbae507878f5 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
|
||||
@@ -151,6 +151,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -32,7 +32,7 @@ index ebd35a078ad640f1102f270cead9c48ca7fc829c..7e5d2ca71b66a520099c26be2d4f4cee
|
||||
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 9cff5c9f6bd7d24eb7b2884b3d4fd3224a48de7b..10a01ec3da9ba8c88db51e4e6a2c904fe3f7e839 100644
|
||||
index 184ebdae4f97582418494fde791b7822b496b7b1..eccb75cd1eb54ca626096d0799c446639b2476c2 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 9cff5c9f6bd7d24eb7b2884b3d4fd3224a48de7b..10a01ec3da9ba8c88db51e4e6a2c904f
|
||||
#include "build/build_config.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -464,6 +465,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -466,6 +467,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
bool should_screenshot_on_mainframe_same_doc_navigation = true;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -64,7 +64,7 @@ index 9cff5c9f6bd7d24eb7b2884b3d4fd3224a48de7b..10a01ec3da9ba8c88db51e4e6a2c904f
|
||||
// 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 d900db0706d383ec8f2069243e7d1c5c361e4088..3d035dbe5bdab7d02c7514c7d9cafa25d11eae38 100644
|
||||
index 7113bbbd4c223793cf6293a0d1723259a5cc9179..404df10825e979b4771d0ce2aef480299412c8c1 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 d900db0706d383ec8f2069243e7d1c5c361e4088..3d035dbe5bdab7d02c7514c7d9cafa25
|
||||
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 7f44cff8d6493d2ce0d70631440eeb85ae1118f7..2eb4e977cb0fa6d57f2f2edac02b80dc06176808 100644
|
||||
index 531cc01e1db5afc8f66ce1b0e849687c2392eeca..8c88dc9f8fbb9328ca235a3158029175400889fe 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
@@ -49,7 +49,7 @@ index ac5d88520a785e12b66ebd96c92c46319a08311c..5c582e4f249c28a5739da2da4e600ee2
|
||||
// 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 7f990b3a9bce34c85c87a706d56eb30c0a3a6751..56881bc15c7883efe1b826e0c81dfcab87dbcbcf 100644
|
||||
index 916f6af2c1aa178ea63fdfa3d2cd2364af3f87b9..81dc93e120d8a3855c87742e4219d7f6a1105a86 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -766,10 +766,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -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 49f3360c3d5ff66ebbc7d6164de3f7ff7244b1fe..ec9018d38520dfca461e9dbb041566b0b3400133 100644
|
||||
index b55f12d4f0eb92c515c8fc61e6ec3c15e287edde..027e8f7a943bb6cf13259520cc1992ae5852a72b 100644
|
||||
--- a/content/public/common/BUILD.gn
|
||||
+++ b/content/public/common/BUILD.gn
|
||||
@@ -362,6 +362,8 @@ mojom("interfaces") {
|
||||
@@ -361,6 +361,8 @@ mojom("interfaces") {
|
||||
"//content/common/*",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common:mojom_blink",
|
||||
|
||||
@@ -11,10 +11,10 @@ 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 d0c5f0e7a979601c2f019524581a5e1bea108f7c..a7b90878dc13c7698a1d587cf4391374fad9dff4 100644
|
||||
index a0b040719c1c08cd2115518d6877ec0f8c12c6d2..4fbec99adf1da7469ad5d58874d3ecb3bbf52d0b 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -88,7 +88,7 @@ declare_args() {
|
||||
@@ -89,7 +89,7 @@ declare_args() {
|
||||
# Chrome's clang. crbug.com/1033839
|
||||
use_thin_lto =
|
||||
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
|
||||
|
||||
@@ -33,10 +33,10 @@ index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index a8a0a32e98eb8bc01d0b7210699b20e47fef609f..8d77c2f7e66b1fe70f073be010b7f686c041d6da 100644
|
||||
index 12d8ea007e99c37cb84317495383db8082b299f0..64406ad9f27a98ce24ac6ece0add705a0eb1fe4e 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4782,7 +4782,7 @@ static_library("browser") {
|
||||
@@ -4777,7 +4777,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index a8a0a32e98eb8bc01d0b7210699b20e47fef609f..8d77c2f7e66b1fe70f073be010b7f686
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index bed761d22a97ea774d1f831a5c327b0055fea4f8..d99903ae6f07fb9280b9fa358b48e58b6332b14a 100644
|
||||
index c24fd4f697f8f45e3619812770197b59d14746bb..65ca0df82f1d91d81c3063204e204e89bd3c48c0 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7606,9 +7606,12 @@ test("unit_tests") {
|
||||
@@ -7628,9 +7628,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index bed761d22a97ea774d1f831a5c327b0055fea4f8..d99903ae6f07fb9280b9fa358b48e58b
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8567,6 +8570,10 @@ test("unit_tests") {
|
||||
@@ -8588,6 +8591,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index bed761d22a97ea774d1f831a5c327b0055fea4f8..d99903ae6f07fb9280b9fa358b48e58b
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8623,7 +8630,6 @@ test("unit_tests") {
|
||||
@@ -8644,7 +8651,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",
|
||||
|
||||
@@ -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 e9e0d76e44aa7d6acfdba01d0203bc3c9c1cb369..b74d60be535635e21cee43072d4f4c350db3bbdb 100644
|
||||
index a0053ddd1576a37312c4d8552a7be7610562100a..cfdc9df76570275735182d2b23adbd80687d0873 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9932,6 +9932,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9934,6 +9934,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 e9e0d76e44aa7d6acfdba01d0203bc3c9c1cb369..b74d60be535635e21cee43072d4f4c35
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 06bfefa850f6c30ec4832b0c402931a5acaeb9d9..f1b5dd614d123496cb2693ff84b23a66c25dd781 100644
|
||||
index 395ba8bf66a026230094ccfd0420af12071d72d7..af33820a8eca5122f67a0a026ee831fb61754533 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5353,6 +5353,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5352,6 +5352,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
create_params.initially_hidden = renderer_started_hidden;
|
||||
create_params.initial_popup_url = params.target_url;
|
||||
|
||||
@@ -35,7 +35,7 @@ index 06bfefa850f6c30ec4832b0c402931a5acaeb9d9..f1b5dd614d123496cb2693ff84b23a66
|
||||
// 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,
|
||||
@@ -5405,6 +5409,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5404,6 +5408,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// Sets the newly created WebContents WindowOpenDisposition.
|
||||
new_contents_impl->original_window_open_disposition_ = params.disposition;
|
||||
|
||||
@@ -48,7 +48,7 @@ index 06bfefa850f6c30ec4832b0c402931a5acaeb9d9..f1b5dd614d123496cb2693ff84b23a66
|
||||
// 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
|
||||
@@ -5446,12 +5456,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5445,12 +5455,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ index 87455ddef07e28b40d6b8812ff44427167063339..d5fdf66cad6188bc57951a8c72c265cf
|
||||
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 9f2180563e4326d6f17f5476196302ac130d275d..90099a32b5a22edf0fe23915e76f8b391d8036cc 100644
|
||||
index 509256e4c327806f9a24eab69c1d4e84581767ce..f8f3996cbd00c06bec2962a54488b2d8f1666530 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -35,6 +35,17 @@ namespace content {
|
||||
@@ -34,6 +34,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
@@ -170,10 +170,10 @@ index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b0
|
||||
// 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 8c29884f3ac6baaa8f41c426f8b8896d8dfb0a35..ae5261813c4e0c730458ababb3e5e1d2cea6a974 100644
|
||||
index 76fea215163d0f7d0b5339fe2bcb97efe0218df7..e1a152201b17ad8aefbfe10d4ffa345ca1a74621 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6792,6 +6792,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6800,6 +6800,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -232,10 +232,10 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..c354a79c7c8dd047264df35b873e90c1
|
||||
|
||||
} // 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 36afeefd8ddf82ed986f1867d3ee93d2c9fcebe3..d22c94a874af69699df06cd3ddb530e377e2f7e7 100644
|
||||
index 20056a5bd254f56a1f7bb6c6adf9afe63fc05358..0d9e887d5594bb852e7f19d9038d69b4a199dd1b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2336,6 +2336,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2335,6 +2335,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ index 4c61af331b8276969b7df1b81e1076f8b8e932dd..413dc63ffc065e5f52db11b548eb8d71
|
||||
/google_apis/gcm/gcm.xml
|
||||
/googleurl
|
||||
diff --git a/third_party/.gitignore b/third_party/.gitignore
|
||||
index b5761637e4b91efb38b5c1d4be9f59b271d4f0db..010c4f7bfe4ea8c82eff4924c83668c271b834fd 100644
|
||||
index 0b3cc63da588d371a6416f8158ad79014c6364c3..a33362e439d5d9cb4f3f0ff4ec77d14f3bda9387 100644
|
||||
--- a/third_party/.gitignore
|
||||
+++ b/third_party/.gitignore
|
||||
@@ -45,7 +45,9 @@
|
||||
|
||||
@@ -34,10 +34,10 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415
|
||||
virtual void DidClearWindowObject() {}
|
||||
virtual void DidChangeScrollOffset() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 5df58d4a7af133e54b499cfb27d7206740e0ad25..6588b13542d2257e41a5e6dbb1b3d5eff9c16157 100644
|
||||
index cb62bc567fbe0777e6dfe78bbf78b55e77bf4ffa..2c1f83b9ff19da0d983b2b3252f1694482f686f7 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4733,10 +4733,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
@@ -4741,10 +4741,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
observer.DidInstallConditionalFeatures(context, world_id);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ index 5df58d4a7af133e54b499cfb27d7206740e0ad25..6588b13542d2257e41a5e6dbb1b3d5ef
|
||||
|
||||
void RenderFrameImpl::DidChangeScrollOffset() {
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index aac388b2b34798a574acdc8a3585166136a58fb7..065c90bfdce2ddd02efd7605faea86d514808bd4 100644
|
||||
index fdbd5e66f73170cdc70009b183cd07f70db7dbd5..c82975148cc5afa3bfa023a43d7b69691cebf36f 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -608,7 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -89,10 +89,10 @@ index 37691ecee7a72b2ec47ff575239f628116cf136b..c67e3faf7440514e203e5b15a68fc345
|
||||
|
||||
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 d03d1d06611e10cf55a29aee9a764f575eed436d..78684d30cfb71a215004992b1916194c1a46055b 100644
|
||||
index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf9ab266bd 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.h
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.h
|
||||
@@ -164,7 +164,8 @@ class ServiceWorkerContextClient
|
||||
@@ -163,7 +163,8 @@ class ServiceWorkerContextClient
|
||||
void WorkerContextStarted(
|
||||
blink::WebServiceWorkerContextProxy* proxy,
|
||||
scoped_refptr<base::SequencedTaskRunner> worker_task_runner) override;
|
||||
@@ -103,10 +103,10 @@ index d03d1d06611e10cf55a29aee9a764f575eed436d..78684d30cfb71a215004992b1916194c
|
||||
void WillInitializeWorkerContext() override;
|
||||
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
|
||||
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
|
||||
index 4d6e7b4c3dd96c8fe0081639eb60a7d54eb03136..b0456f1f706590e1bb636737ffb07212dec8b245 100644
|
||||
index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2838cea12 100644
|
||||
--- a/extensions/renderer/dispatcher.cc
|
||||
+++ b/extensions/renderer/dispatcher.cc
|
||||
@@ -615,6 +615,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
@@ -614,6 +614,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
|
||||
void Dispatcher::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
|
||||
@@ -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 25f40c12dbb65eaa34c20b3df9ada9a7e75c6623..6dfd333e4e577c1f50939a18317bedfeead6dde9 100644
|
||||
index ee477aa775adccbee0463c2cd2434df199d00fe9..9461b798b3492d0fcd35f873214f58841097d229 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5324,7 +5324,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5323,7 +5323,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.
|
||||
|
||||
@@ -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 82c9ff13c4ec8e53f3f5ecacea2a5d0dcc1f5b51..df67b65a2c6c84a71e4a7851423815dc1ced3389 100644
|
||||
index 9e85bfc6eb98fef60e43a50c2ba9b48b2abd8152..fa27e108247a3ca98d076dfa82b21900af7e2a36 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -224,7 +224,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
|
||||
@@ -80,10 +80,10 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 6b21299c7a2393e4bf730dfb241b324855ff7a9e..6c4ad32adcd509b73708097bd3b97a564de32e1d 100644
|
||||
index 8d8c63242dc131a9d43c26292b60c09c7367555a..7624504ca5c205b62f4481261e47a9de91d1f0e6 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2387,7 +2387,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2386,7 +2386,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
const std::string& frame_name,
|
||||
@@ -93,7 +93,7 @@ index 6b21299c7a2393e4bf730dfb241b324855ff7a9e..6c4ad32adcd509b73708097bd3b97a56
|
||||
if (HasActorTask(profile(), opener)) {
|
||||
// If an ExecutionEngine is acting on the opener, prevent it from creating a
|
||||
// new WebContents. We'll instead force the navigation to happen in the same
|
||||
@@ -2400,7 +2401,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2399,7 +2400,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
return (window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
@@ -195,10 +195,10 @@ index c6d4d6aa57edf3a89ae0b1df0bb919fb183e772c..a0ae9f1dfaf4e69e14dc0af52f849e83
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
index 14f2758f2d71d4d4ba77e4fcb9be40bb878526e0..536db4f8fe9771b60f0359df5c680b298c89cad4 100644
|
||||
index 12b38ddee62e3af915083830703a4c2e8e249f00..bf4e8dcbdecd46712c48107cfee554b7bb1e0277 100644
|
||||
--- a/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
+++ b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
@@ -86,8 +86,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
|
||||
@@ -85,8 +85,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -223,10 +223,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 5ca1d538253fd5d0decbeaa572ae8cf36678ad78..a91722d82e5a323e920e47f059d8eaeaa859548e 100644
|
||||
index cce31b48b7d254347914ed30b1feef3646b26a6f..0cf6d5f9664c954d412c7da4e627b101df735dfa 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5289,8 +5289,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5288,8 +5288,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
if (delegate_ &&
|
||||
delegate_->IsWebContentsCreationOverridden(
|
||||
opener, source_site_instance, params.window_container_type,
|
||||
@@ -237,10 +237,10 @@ index 5ca1d538253fd5d0decbeaa572ae8cf36678ad78..a91722d82e5a323e920e47f059d8eaea
|
||||
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 90099a32b5a22edf0fe23915e76f8b391d8036cc..4083a3de23b451fa41cf20d8ebd5f7e9e2b5327a 100644
|
||||
index f8f3996cbd00c06bec2962a54488b2d8f1666530..fde24980f7eefd2696a9094bdb97787909955ae9 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -161,8 +161,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -9,10 +9,10 @@ Electron when a session is non persistent we do not initialize the
|
||||
ExtensionSystem, so this check is not relevant for Electron.
|
||||
|
||||
diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
|
||||
index 8331e06da9055fddd647dbe54051584b101286b0..6a9ddc0060dc272cd4511fc96f358005ad0ee043 100644
|
||||
index 748c4012338c3e53fce1ea66d1cb95e8f397e901..c4c229ff10fb72d6098070378aa92661c211e97d 100644
|
||||
--- a/extensions/browser/script_injection_tracker.cc
|
||||
+++ b/extensions/browser/script_injection_tracker.cc
|
||||
@@ -177,7 +177,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
|
||||
@@ -176,7 +176,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
|
||||
UserScriptManager* manager =
|
||||
ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
|
||||
if (!manager) {
|
||||
|
||||
@@ -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 a82a333a9740d4805d9a72223a2b569a700492bb..b12bde965e8d2d62072d64de27a08d7f6363922f 100644
|
||||
index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad4c1c4845 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
|
||||
@@ -129,7 +129,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
@@ -128,7 +128,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
const bool registered =
|
||||
platform_global_shortcut_listener_->RegisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(),
|
||||
@@ -52,7 +52,7 @@ index a82a333a9740d4805d9a72223a2b569a700492bb..b12bde965e8d2d62072d64de27a08d7f
|
||||
if (registered) {
|
||||
registered_hot_keys_.insert(accelerator);
|
||||
}
|
||||
@@ -144,14 +145,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
@@ -143,14 +144,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
|
||||
platform_global_shortcut_listener_->UnregisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
|
||||
@@ -70,7 +70,7 @@ index a82a333a9740d4805d9a72223a2b569a700492bb..b12bde965e8d2d62072d64de27a08d7f
|
||||
int modifiers = 0;
|
||||
if (is_alt_down) {
|
||||
modifiers |= ui::EF_ALT_DOWN;
|
||||
@@ -162,6 +164,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
@@ -161,6 +163,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
if (is_shift_down) {
|
||||
modifiers |= ui::EF_SHIFT_DOWN;
|
||||
}
|
||||
@@ -159,10 +159,10 @@ index a955d19eedfe56ae3a115ce4c77fea016fd66d49..ad2557495a02cae03dd2b87df8659a6f
|
||||
}
|
||||
|
||||
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
|
||||
index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e2a9a953e 100644
|
||||
index 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70abd872096 100644
|
||||
--- a/ui/base/x/x11_global_shortcut_listener.cc
|
||||
+++ b/ui/base/x/x11_global_shortcut_listener.cc
|
||||
@@ -34,11 +34,13 @@ constexpr auto kModifiersMasks = std::to_array<x11::ModMask>({
|
||||
@@ -33,11 +33,13 @@ constexpr auto kModifiersMasks = std::to_array<x11::ModMask>({
|
||||
|
||||
x11::ModMask GetNativeModifiers(bool is_alt_down,
|
||||
bool is_ctrl_down,
|
||||
@@ -178,7 +178,7 @@ index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -84,8 +86,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
|
||||
@@ -83,8 +85,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
|
||||
bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
||||
bool is_alt_down,
|
||||
bool is_ctrl_down,
|
||||
@@ -190,7 +190,7 @@ index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e
|
||||
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
|
||||
auto keycode = connection_->KeysymToKeycode(keysym);
|
||||
|
||||
@@ -110,7 +113,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
||||
@@ -109,7 +112,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
||||
}
|
||||
|
||||
registered_combinations_.insert(
|
||||
@@ -199,7 +199,7 @@ index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -118,8 +121,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
||||
@@ -117,8 +120,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
||||
void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
|
||||
bool is_alt_down,
|
||||
bool is_ctrl_down,
|
||||
@@ -211,7 +211,7 @@ index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e
|
||||
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
|
||||
auto keycode = connection_->KeysymToKeycode(keysym);
|
||||
|
||||
@@ -127,7 +131,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
|
||||
@@ -126,7 +130,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
|
||||
connection_->UngrabKey({keycode, x_root_window_, modifiers | mask});
|
||||
|
||||
registered_combinations_.erase(
|
||||
@@ -220,14 +220,13 @@ index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e
|
||||
}
|
||||
|
||||
void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
|
||||
@@ -137,14 +141,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
|
||||
@@ -136,13 +140,14 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
|
||||
const bool is_alt_down = event.flags() & EF_ALT_DOWN;
|
||||
const bool is_ctrl_down = event.flags() & EF_CONTROL_DOWN;
|
||||
const bool is_shift_down = event.flags() & EF_SHIFT_DOWN;
|
||||
+ const bool is_cmd_down = event.flags() & EF_COMMAND_DOWN;
|
||||
|
||||
if (!base::Contains(
|
||||
registered_combinations_,
|
||||
if (!registered_combinations_.contains(
|
||||
- Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down))) {
|
||||
+ Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down))) {
|
||||
return;
|
||||
|
||||
@@ -94,7 +94,7 @@ index 199b5637bc6fe387ed30b03bae39b19ab9300dd9..ecf1440a39bda59b44793a6671715484
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 20f364ab05b170485d40fa8651675e09d9f626ca..d7fedf4e8b1ff5c6168b49990d67a1ab09b1800e 100644
|
||||
index 41a25b402f330fcb84e4cca1365d3f72090e518d..4c4fb85d96e553912090f13c2ac1a48f3170a515 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -648,8 +648,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 24c0c10e9006a7a3922a0ecfda383870f97525b6..fc1ca7f44b0acd941ee0b3ed846cb78392b2b9b8 100644
|
||||
index 330793d9e5642ba327c596b142a15c7a659603ce..f658122d05a1233bf8dfc049887385dad5f9371b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -846,6 +846,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -21,10 +21,10 @@ index 24c0c10e9006a7a3922a0ecfda383870f97525b6..fc1ca7f44b0acd941ee0b3ed846cb783
|
||||
// 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 b955618bcf2b3e83add345c613d06d5c029cc747..849ce48624848a8d8b3ea22a6b75db2809f1112c 100644
|
||||
index 614390e29fa84af4c141102d86f3ebdb7293b813..0bb31ec2e957301e55c81225683ec9982ba63039 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1034,6 +1034,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -1036,6 +1036,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
return synthetic_gesture_controller_.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ index 8c32005730153251e93516340e4baa500d777178..ff444dc689542a909ec5aada39816931
|
||||
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
|
||||
#endif
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index 684297bed11392efb9e40cf1ddb7a762a54924c9..8add8acca88d44e94f74e14a2eac5ed7f92c48b7 100644
|
||||
index d3ea23dc328ae05f26a51fbe791a69d80dfbcffe..52ced989b595d472e3ac143f35cb6cecc75fdf47 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -221,6 +221,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
@@ -222,6 +222,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
}
|
||||
#endif // PA_BUILDFLAG(ENABLE_THREAD_ISOLATION)
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ This patch should be proposed upstream.
|
||||
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global"
|
||||
|
||||
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
||||
index b24e67975aa3c8b55ac703776c380c2a718b1fa9..02d41ce95352900eaabd153bf160b539fdd70229 100644
|
||||
index 71eaed03a15ba2ab5bae874daecfb0e95ac7c64d..12915abc0ba658b87b3a867e308f1b81cad61a17 100644
|
||||
--- a/extensions/renderer/script_injection.cc
|
||||
+++ b/extensions/renderer/script_injection.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "base/containers/contains.h"
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
+#include "base/functional/callback_helpers.h"
|
||||
|
||||
@@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index f9f49954ce842e0a1e022be442a507ad15c2eb1d..c71bd4df2cbe19d256a64a910c904fa5a1990104 100644
|
||||
index d1606201c87ea316e417df2ff5eb1fe769c80237..ff05425e150671a71abe74b01d9da0103698e8cf 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1884,6 +1884,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -51,10 +51,10 @@ index f9f49954ce842e0a1e022be442a507ad15c2eb1d..c71bd4df2cbe19d256a64a910c904fa5
|
||||
// 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 998436d1c0c00fa26ca8f24e4cdd544fd8a557bb..a47c27a7ca58b3456ecb48df9f5bdf26c281060f 100644
|
||||
index f89abe7cc46edbf79e800d128d5492c063d52761..2be66fc4c933e85c0f7a7d56c536a90f541f4a2a 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -322,6 +322,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -321,6 +321,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void SetNetworkConditions(
|
||||
const base::UnguessableToken& throttling_profile_id,
|
||||
std::vector<mojom::MatchedNetworkConditionsPtr> conditions) override;
|
||||
@@ -63,10 +63,10 @@ index 998436d1c0c00fa26ca8f24e4cdd544fd8a557bb..a47c27a7ca58b3456ecb48df9f5bdf26
|
||||
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 5f35d2bb79b6ed1c3dc98db6a4441d7cdde74938..89053b1e1855306f946c0aa8dc0f7860f0be72c0 100644
|
||||
index b689b7ca1998e0855ccba9da747e5c0b39a9893d..efe7273d1fff01d6f368da60ba82a429746251ef 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1281,6 +1281,9 @@ interface NetworkContext {
|
||||
@@ -1278,6 +1278,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
array<MatchedNetworkConditions> conditions);
|
||||
|
||||
|
||||
@@ -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 3aba685a2b94542bd22003590ecb6bc06ce5fee6..8e6affb62a53aff4086321a05518ad219a960c13 100644
|
||||
index 1ea40bbc89db58e602fee5478b48a0f7b25ff93a..a2ed1d740680010b147e6ec7677ec3387bd7250f 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -1886,6 +1886,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1920,6 +1920,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -104,7 +104,7 @@ index 5100bd21163f9ceadb728ed5306dcf8320e528a8..c2ee03ca6a75a2fef1ce778e663a74bd
|
||||
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 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9ab700a03 100644
|
||||
index 4beb963ecd1c42b1d236cbfdafa9daf27ac61c06..68175244b3496f7b999ae4a3a3e14b5f2b7e659d 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 @@
|
||||
@@ -113,9 +113,9 @@ index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9
|
||||
#include <utility>
|
||||
+#include <algorithm>
|
||||
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/location.h"
|
||||
@@ -30,6 +31,7 @@
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
@@ -29,6 +30,7 @@
|
||||
#include "third_party/blink/public/platform/web_url_response.h"
|
||||
#include "third_party/blink/public/web/web_associated_url_loader.h"
|
||||
#include "third_party/blink/renderer/platform/media/cache_util.h"
|
||||
@@ -123,7 +123,7 @@ index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9
|
||||
#include "third_party/blink/renderer/platform/media/resource_fetch_context.h"
|
||||
#include "third_party/blink/renderer/platform/media/url_index.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
|
||||
@@ -314,6 +316,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
@@ -313,6 +315,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
do_fail = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation
|
||||
IsValid is not exposed despite being commented as for embedders, this exposes something that works for us.
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index d7fedf4e8b1ff5c6168b49990d67a1ab09b1800e..05ba0cc17e8ea085b604827e2d0507a93a1a53e5 100644
|
||||
index 4c4fb85d96e553912090f13c2ac1a48f3170a515..697c588ecd286942657b07f2a3fac05626904786 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {
|
||||
|
||||
@@ -143,7 +143,7 @@ index a01f0d96ef33ce9460a851b072b7ceed5227dee3..f7e39b28cc0ba2251123925c01083a79
|
||||
|
||||
// JavaScript from chrome and chrome-untrusted pages. The resource URLs are
|
||||
diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc
|
||||
index fb3fdfca483ff5041ee98095af3f6ac2640adbaf..ada19d78ec1337b0c49a1597c877886f69f84f13 100644
|
||||
index 68a3095a49caf472c83b93b5cef66e5549a2d7cc..aa371ba5576f9fbaf5558e39704f7eb87ec7511e 100644
|
||||
--- a/content/browser/code_cache/generated_code_cache_browsertest.cc
|
||||
+++ b/content/browser/code_cache/generated_code_cache_browsertest.cc
|
||||
@@ -16,17 +16,22 @@
|
||||
@@ -262,7 +262,7 @@ index fb3fdfca483ff5041ee98095af3f6ac2640adbaf..ada19d78ec1337b0c49a1597c877886f
|
||||
+
|
||||
} // 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 e81fd079644b78a785879dc51d1ec55aa01b4015..774269a818bcf1aa10a26bbb04d20997f615128f 100644
|
||||
index ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..cf1d94f43238fc3166ca0488b72c929be07e3c52 100644
|
||||
--- a/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -415,7 +415,7 @@ index 33e2ff42e4d9da442d522b959a4a21c2f7032b6b..a0d81212327fc17e1f4704e78803c1d7
|
||||
std::vector<std::string> extension_schemes;
|
||||
// Registers a URL scheme with a predefined default custom handler.
|
||||
diff --git a/url/url_util.cc b/url/url_util.cc
|
||||
index 1d681820a5b19e12e2ae0332fa62fc70261a346b..dcea7cdea748c7c60266abe36c96256ffd32eb89 100644
|
||||
index 15664804ca612b77c9fe0fee58825ca9a6f25f6d..9c1fc2004ac915dfa63ff45fbc1cded2bbfad208 100644
|
||||
--- a/url/url_util.cc
|
||||
+++ b/url/url_util.cc
|
||||
@@ -131,6 +131,9 @@ struct SchemeRegistry {
|
||||
@@ -445,7 +445,7 @@ index 1d681820a5b19e12e2ae0332fa62fc70261a346b..dcea7cdea748c7c60266abe36c96256f
|
||||
std::string_view handler) {
|
||||
DoAddSchemeWithHandler(
|
||||
diff --git a/url/url_util.h b/url/url_util.h
|
||||
index 501baa71f6ec135827b505c2eca78c7e9ac0b8d3..10bf2c6e27dca530906ef7acb7ac43fa5c731d22 100644
|
||||
index 1f9304c7ea5488a1c50891e3dabfa3a61af97b7b..f965c1dbd47781748d3091209d140a128ca7192f 100644
|
||||
--- a/url/url_util.h
|
||||
+++ b/url/url_util.h
|
||||
@@ -115,6 +115,15 @@ COMPONENT_EXPORT(URL) const std::vector<std::string>& GetCSPBypassingSchemes();
|
||||
|
||||
@@ -367,10 +367,10 @@ index b10c5376caa9a832826868c72dbc44ee54705283..e9b27b53d9b34fbb0a3410eb2fcc1530
|
||||
#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 092bd4524b81734d1b428ab0b201887d411f8277..d0300a4b1a2265d1db977b9bf0ffdd6d0a9d9d37 100644
|
||||
index 68659d7caf4a1ed0d87405ebd0385fc50a5cbfe6..1cd2d6dd2d98df4fc2e06e9766774e864a3bac33 100644
|
||||
--- a/media/capture/video_capture_types.h
|
||||
+++ b/media/capture/video_capture_types.h
|
||||
@@ -365,6 +365,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
|
||||
@@ -366,6 +366,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;
|
||||
|
||||
@@ -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 a3d77612f065b14e43cd222ef8901631d352cb0c..b8eb459d80eb25c51ee06deba28164a3501040ef 100644
|
||||
index 71aa077751d7feea1eeaa0b0d80d77a6c7f1ade6..21abd7d2a5681bc96bdbc0e9d5f0ae281eafc895 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
|
||||
@@ -50,7 +50,7 @@ enum CSSSampleId {
|
||||
@@ -46,10 +46,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 2b08e0773e9d1c5801516e12cfb0007a4327d4b6..612a93dcd038ca0b7d16745d6296aed9f7b79176 100644
|
||||
index 32869254d374e164d4732aa302af8ef7432cd0d1..d707ec8272b5783b17a0dca53837780830dc5841 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_properties.json5
|
||||
+++ b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
@@ -9205,6 +9205,26 @@
|
||||
@@ -9239,6 +9239,26 @@
|
||||
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
|
||||
},
|
||||
|
||||
@@ -77,7 +77,7 @@ index 2b08e0773e9d1c5801516e12cfb0007a4327d4b6..612a93dcd038ca0b7d16745d6296aed9
|
||||
{
|
||||
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 00b752a52bbcfbe0f029eceef500ea7a746b6a5e..4a36a39d478301ce1187c6c1cc3925fa9b4be4ca 100644
|
||||
index 0423ad0d2fd6cc5408632ac9e266a60f898a9c80..639ad7fb10eb9ba5e142eee365407f8d246db88e 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
@@ -402,6 +402,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
@@ -90,17 +90,17 @@ index 00b752a52bbcfbe0f029eceef500ea7a746b6a5e..4a36a39d478301ce1187c6c1cc3925fa
|
||||
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 0d0469035fda4afa0cad5b674bded3eb853ed028..e85c8ca47eda2936aeddeab06a689e2180324794 100644
|
||||
index d0e17dc98c8eda0987df373e73a7a8d1a7a71ce6..0c0df7a7002af34094122c93c169e1f6b66b7068 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
|
||||
@@ -12700,5 +12700,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
|
||||
@@ -12632,5 +12632,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
|
||||
CSSValueID::kNone>(stream);
|
||||
}
|
||||
|
||||
+const CSSValue* ElectronCornerSmoothing::ParseSingleValue(
|
||||
+ CSSParserTokenStream& stream,
|
||||
+ const CSSParserContext& context,
|
||||
+ const CSSParserLocalContext&) const {
|
||||
+ CSSParserLocalContext&) const {
|
||||
+ // Try to parse `system-ui` keyword first.
|
||||
+ if (auto* ident =
|
||||
+ css_parsing_utils::ConsumeIdent<CSSValueID::kSystemUi>(stream)) {
|
||||
@@ -131,10 +131,10 @@ index 0d0469035fda4afa0cad5b674bded3eb853ed028..e85c8ca47eda2936aeddeab06a689e21
|
||||
} // 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 79ba55e40da39f4ed1a230829cbc679bbb909a35..8d4a728d531171a52138df8aee4cce2b93736e92 100644
|
||||
index 74edc4d160ae5afed6a053fd9e817f5f3d1e6c27..a93257fc7247bf9171193dd0d7882c8da85367e5 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
|
||||
@@ -4093,6 +4093,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
@@ -4121,6 +4121,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
return PositionTryFallback(scoped_name, tactic_list);
|
||||
}
|
||||
|
||||
@@ -151,10 +151,10 @@ index 79ba55e40da39f4ed1a230829cbc679bbb909a35..8d4a728d531171a52138df8aee4cce2b
|
||||
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 d0afe23ae2c65400b48d5dae1db71c19a59d1a2b..da158fe4b4adbf780d7a022cc75cb0c219ef6744 100644
|
||||
index 65ff46bb5aa1f33a89d16014354b4ea94411648e..34fb72857dda13fa1f2aed81d596a03619631e18 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
|
||||
@@ -450,6 +450,7 @@ class StyleBuilderConverter {
|
||||
@@ -454,6 +454,7 @@ class StyleBuilderConverter {
|
||||
StyleResolverState&,
|
||||
const CSSValue&,
|
||||
bool allow_any_keyword_in_position_area = false);
|
||||
@@ -202,10 +202,10 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f
|
||||
return result;
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
||||
index 50c13b5cfbaa137e6440e880ed97401bae4b1abd..6ade5129ce7b6f67d291877201f5344936fb64b1 100644
|
||||
index 73fa2c0dc25b9f118efc9b6273d6520589412ffa..432f3526c29beae98475c298548e56136a3be3ab 100644
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1668,6 +1668,8 @@ component("platform") {
|
||||
@@ -1666,6 +1666,8 @@ component("platform") {
|
||||
"widget/widget_base.h",
|
||||
"widget/widget_base_client.h",
|
||||
"windows_keyboard_codes.h",
|
||||
@@ -313,7 +313,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661
|
||||
|
||||
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 5e8f43967271207b719c3ab658bd9498b099722b..835be6696e1d2f304604258954e3a1f0053f17e8 100644
|
||||
index ed8d28061eaca01ad4acdd8846dd8ba3f7b8acac..9f432467f61a960c78b3d4369abd1588063efd97 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 @@
|
||||
|
||||
@@ -112,10 +112,10 @@ index 13a211107294e856616d1626fa1dc9c79eb5646c..549a36886d665c1a8100f09b7a86c8dc
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 7f2a3a6e9157a092880e844c49fde63916a17840..a87dbe3032a21984f3f19bde60bcce8f014c0098 100644
|
||||
index 5419bf1fc47d572a5a9acd6933fe21922e76bb45..94694ef8fdb3524d6fdabdee23cad1ff92139578 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -387,6 +387,9 @@ URLLoader::URLLoader(
|
||||
@@ -385,6 +385,9 @@ URLLoader::URLLoader(
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
TaskRunner(request.priority)),
|
||||
per_factory_orb_state_(context.GetMutableOrbState()),
|
||||
@@ -125,7 +125,7 @@ index 7f2a3a6e9157a092880e844c49fde63916a17840..a87dbe3032a21984f3f19bde60bcce8f
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
options_(PopulateOptions(options,
|
||||
factory_params_->is_orb_enabled,
|
||||
@@ -561,7 +564,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
|
||||
@@ -559,7 +562,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
|
||||
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ index 7f2a3a6e9157a092880e844c49fde63916a17840..a87dbe3032a21984f3f19bde60bcce8f
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1158,6 +1161,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1156,6 +1159,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
@@ -155,10 +155,10 @@ index 7f2a3a6e9157a092880e844c49fde63916a17840..a87dbe3032a21984f3f19bde60bcce8f
|
||||
|
||||
ad_auction_event_record_request_helper_.HandleResponse(
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 9bb4d214af549899cce1c70ac8c7f809a5e6c471..600842ae9893ae46b7280ac70746d39d6dccb56a 100644
|
||||
index 43db456e7fb9ca75c0547f78acec0455d33349dc..2ba7c17c3766b02b18a1a009fc0ec9bca3a09d47 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -626,6 +626,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -625,6 +625,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ index 8fded9303e74737d82ca6d54e00807ebabf6c1ac..c0b66eb9a62f8f75e3c4de43f467ddd0
|
||||
|
||||
bool ClipboardCommands::ExecuteCopy(LocalFrame& frame,
|
||||
diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
index 68dd920466d3b018c3036d556948ef5dc789cc22..d88327a36321bc9370f7f3761487c6fc31b7f109 100644
|
||||
index 91ef9f50a41150108f8cb4abfecba2b7c54f5fa4..ca46a15c03d72da4a301aff6fc18c173eaa7e6c8 100644
|
||||
--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
@@ -151,6 +151,8 @@ String PermissionNameToString(PermissionName name) {
|
||||
|
||||
@@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
||||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index 7ddb32ba04bc878f368931c14fb3ade0dd2e074d..5fb241ff924fb8662eac549640a35b94cba2dd81 100644
|
||||
index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2da71ba6b 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -116,10 +116,10 @@ index 7ddb32ba04bc878f368931c14fb3ade0dd2e074d..5fb241ff924fb8662eac549640a35b94
|
||||
extension_url_.reset();
|
||||
exclusive_access_manager()->UpdateBubble(base::NullCallback());
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
index b158facefee93d9a36baa4ad446afacb8db68af0..b064037bd43804f1e7c93be06a4d9477d4f5b63f 100644
|
||||
index e477ff115410940ed8ba96c3572f4f48ccea8a9d..7a3495c6d26667508271fe2cc77fafaae9d39204 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
@@ -261,7 +261,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
@@ -270,7 +270,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
// Set of parameters used to enter fullscreen
|
||||
std::optional<FullscreenTabParams> fullscreen_parameters_;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ The patch should be removed in favor of either:
|
||||
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 7ac76f6add6b0f4c242b29407faf728f5925c0b6..347426c5b899c8b067080618ffef3e7db3286431 100644
|
||||
index 6c78226852b836607e792d7dcb8721dc6a1de754..a90c19e2e42a576b5f5a5be9c75b28179c1759b0 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -11500,6 +11500,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
@@ -11489,6 +11489,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
target_rph_id);
|
||||
}
|
||||
|
||||
@@ -44,21 +44,18 @@ index 7ac76f6add6b0f4c242b29407faf728f5925c0b6..347426c5b899c8b067080618ffef3e7d
|
||||
// origin of |common_params.url| and/or |common_params.initiator_origin|.
|
||||
url::Origin resolved_origin = url::Origin::Resolve(
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
index 619ca30b68d4206cbf325e093507ccf4838481e3..9baa9c4ef634e120a39f8d279acbbaa26ce9760c 100644
|
||||
index 619ca30b68d4206cbf325e093507ccf4838481e3..c823f5e1edac92e6c37a8bc9a8ca0936d53480e2 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2331,6 +2331,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
@@ -2331,6 +2331,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
Document* owner_document) {
|
||||
scoped_refptr<SecurityOrigin> origin;
|
||||
+ bool is_standard = false;
|
||||
+ std::string protocol = url_.Protocol().Ascii();
|
||||
+ is_standard = url::IsStandard(
|
||||
+ protocol.data(), url::Component(0, static_cast<int>(protocol.size())));
|
||||
+ bool is_standard = url::IsStandard(url_.Protocol().Ascii().data());
|
||||
// Whether the origin is newly created within this call, instead of copied
|
||||
// from an existing document's origin or from `origin_to_commit_`. If this is
|
||||
// true, we won't try to compare the nonce of this origin (if it's opaque) to
|
||||
@@ -2367,6 +2371,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
@@ -2367,6 +2368,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
// non-renderer only origin bits will be the same, which will be asserted at
|
||||
// the end of this function.
|
||||
origin = origin_to_commit_;
|
||||
|
||||
@@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned
|
||||
by the `ui::Compositor`.
|
||||
|
||||
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
|
||||
index 2ddd010a675faa02c15a9a2339633e9ddebc727f..59298c6a7bb637886d8da49679d28044443c247f 100644
|
||||
index cde7a73e067837822c6993fcb5fe7c26cfc07528..be56b0e47917fe9e2ddcc0e90fcdba48357ad452 100644
|
||||
--- a/ui/compositor/compositor.cc
|
||||
+++ b/ui/compositor/compositor.cc
|
||||
@@ -370,7 +370,8 @@ void Compositor::SetLayerTreeFrameSink(
|
||||
@@ -369,7 +369,8 @@ void Compositor::SetLayerTreeFrameSink(
|
||||
if (display_private_) {
|
||||
disabled_swap_until_resize_ = false;
|
||||
display_private_->Resize(size());
|
||||
@@ -25,7 +25,7 @@ index 2ddd010a675faa02c15a9a2339633e9ddebc727f..59298c6a7bb637886d8da49679d28044
|
||||
display_private_->SetDisplayColorSpaces(display_color_spaces_);
|
||||
display_private_->SetDisplayColorMatrix(
|
||||
gfx::SkM44ToTransform(display_color_matrix_));
|
||||
@@ -621,7 +622,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
@@ -620,7 +621,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
// updated then. We need to call this even if the visibility hasn't changed,
|
||||
// for the same reason.
|
||||
if (display_private_)
|
||||
@@ -36,7 +36,7 @@ index 2ddd010a675faa02c15a9a2339633e9ddebc727f..59298c6a7bb637886d8da49679d28044
|
||||
|
||||
if (changed) {
|
||||
observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
|
||||
@@ -1085,6 +1088,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
@@ -1084,6 +1087,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
host_begin_frame_observer_->GetBoundRemote());
|
||||
}
|
||||
|
||||
|
||||
@@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f5caa812e038c573f4aa90b3f048f2053abd41df..25f40c12dbb65eaa34c20b3df9ada9a7e75c6623 100644
|
||||
index 8a6b52041682ac02a1447485aac7540e60bf72ca..ee477aa775adccbee0463c2cd2434df199d00fe9 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -10201,7 +10201,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -10200,7 +10200,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
790
patches/chromium/fix_os_crypt_async_cookie_encryption.patch
Normal file
790
patches/chromium/fix_os_crypt_async_cookie_encryption.patch
Normal file
@@ -0,0 +1,790 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <khammond@slack-corp.com>
|
||||
Date: Tue, 13 Jan 2026 13:26:29 -0800
|
||||
Subject: fix: revert OS_Crypt Async in Cookie Encryption
|
||||
|
||||
Electron 40/M144 uses os_crypt async by default for cookie store
|
||||
providers when using cookie encryption. We need time to properly
|
||||
implement this in Electron and make sure the async logic is
|
||||
working properly.
|
||||
|
||||
This patch reverts the port of os_crypt async and falls back to
|
||||
the old sync logic to unlock Electron 40. This patch can be removed
|
||||
when os_crypt async is added to Electron.
|
||||
|
||||
Revert "Reland "Port net::CookieCryptoDelegate to os_crypt async""
|
||||
|
||||
This reverts commit f01b115c7e21a09cc762f65bf7fd9c6ea9d9d0f8.
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 8d77c2f7e66b1fe70f073be010b7f686c041d6da..47b5709a6f6ac76055f769ba10e2b0ea40672dbf 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -742,6 +742,8 @@ static_library("browser") {
|
||||
"net/chrome_report_sender.h",
|
||||
"net/convert_explicitly_allowed_network_ports_pref.cc",
|
||||
"net/convert_explicitly_allowed_network_ports_pref.h",
|
||||
+ "net/cookie_encryption_provider_impl.cc",
|
||||
+ "net/cookie_encryption_provider_impl.h",
|
||||
"net/default_dns_over_https_config_source.cc",
|
||||
"net/default_dns_over_https_config_source.h",
|
||||
"net/dns_over_https_config_source.h",
|
||||
diff --git a/chrome/browser/extensions/chrome_extension_cookies.cc b/chrome/browser/extensions/chrome_extension_cookies.cc
|
||||
index fc13abe302557d38cfce798d46551989337abb2c..22eac75cf685039796ecf40e7d86c9f54084a08b 100644
|
||||
--- a/chrome/browser/extensions/chrome_extension_cookies.cc
|
||||
+++ b/chrome/browser/extensions/chrome_extension_cookies.cc
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
-#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_cookies_factory.h"
|
||||
@@ -49,9 +48,7 @@ ChromeExtensionCookies::ChromeExtensionCookies(Profile* profile)
|
||||
profile_->GetPath().Append(chrome::kExtensionsCookieFilename),
|
||||
profile_->ShouldRestoreOldSessionCookies(),
|
||||
profile_->ShouldPersistSessionCookies()));
|
||||
- creation_config->crypto_delegate = cookie_config::GetCookieCryptoDelegate(
|
||||
- g_browser_process->os_crypt_async(),
|
||||
- content::GetUIThreadTaskRunner({}));
|
||||
+ creation_config->crypto_delegate = cookie_config::GetCookieCryptoDelegate();
|
||||
}
|
||||
creation_config->cookieable_schemes.push_back(extensions::kExtensionScheme);
|
||||
|
||||
diff --git a/chrome/browser/net/chrome_network_service_browsertest.cc b/chrome/browser/net/chrome_network_service_browsertest.cc
|
||||
index fa37d56b3a3b1e324ca121992fd7b54a945d75f7..05d4d5eaecf119a956210539f601b8f437aaa788 100644
|
||||
--- a/chrome/browser/net/chrome_network_service_browsertest.cc
|
||||
+++ b/chrome/browser/net/chrome_network_service_browsertest.cc
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
-#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/test/bind.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
@@ -20,7 +19,6 @@
|
||||
#include "chrome/test/base/in_process_browser_test.h"
|
||||
#include "chrome/test/base/ui_test_utils.h"
|
||||
#include "components/cookie_config/cookie_store_util.h"
|
||||
-#include "components/os_crypt/async/browser/test_utils.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
#include "content/public/browser/network_service_util.h"
|
||||
@@ -139,16 +137,10 @@ class ChromeNetworkServiceBrowserTest
|
||||
IN_PROC_BROWSER_TEST_P(ChromeNetworkServiceBrowserTest,
|
||||
PRE_PRE_EncryptedCookies) {
|
||||
// These test is only valid if crypto is enabled on the platform.
|
||||
- auto os_crypt_async = os_crypt_async::GetTestOSCryptAsyncForTesting(
|
||||
- /*is_sync_for_unittests=*/true);
|
||||
- auto crypto_delegate = cookie_config::GetCookieCryptoDelegate(
|
||||
- os_crypt_async.get(), base::SequencedTaskRunner::GetCurrentDefault());
|
||||
+ auto crypto_delegate = cookie_config::GetCookieCryptoDelegate();
|
||||
if (!crypto_delegate) {
|
||||
GTEST_SKIP() << "No crypto on this platform.";
|
||||
}
|
||||
- base::RunLoop run_loop;
|
||||
- crypto_delegate->Init(run_loop.QuitClosure());
|
||||
- run_loop.Run();
|
||||
std::string ciphertext;
|
||||
crypto_delegate->EncryptString(kCookieValue, &ciphertext);
|
||||
ASSERT_NE(ciphertext, kCookieValue) << "Crypto should really encrypt.";
|
||||
diff --git a/services/network/public/cpp/cookie_encryption_provider_impl.cc b/chrome/browser/net/cookie_encryption_provider_impl.cc
|
||||
similarity index 71%
|
||||
rename from services/network/public/cpp/cookie_encryption_provider_impl.cc
|
||||
rename to chrome/browser/net/cookie_encryption_provider_impl.cc
|
||||
index 52fedf2057b963951be560a362fec28208c2a4b5..3f770666618f2df56b8cd6855766418d319481f0 100644
|
||||
--- a/services/network/public/cpp/cookie_encryption_provider_impl.cc
|
||||
+++ b/chrome/browser/net/cookie_encryption_provider_impl.cc
|
||||
@@ -1,19 +1,18 @@
|
||||
-// Copyright 2025 The Chromium Authors
|
||||
+// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
|
||||
+#include "chrome/browser/net/cookie_encryption_provider_impl.h"
|
||||
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
#include "components/os_crypt/async/browser/os_crypt_async.h"
|
||||
|
||||
-CookieEncryptionProviderImpl::CookieEncryptionProviderImpl(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async)
|
||||
- : os_crypt_async_(os_crypt_async) {}
|
||||
+CookieEncryptionProviderImpl::CookieEncryptionProviderImpl() = default;
|
||||
|
||||
CookieEncryptionProviderImpl::~CookieEncryptionProviderImpl() = default;
|
||||
|
||||
void CookieEncryptionProviderImpl::GetEncryptor(GetEncryptorCallback callback) {
|
||||
- os_crypt_async_->GetInstance(base::BindOnce(
|
||||
+ g_browser_process->os_crypt_async()->GetInstance(base::BindOnce(
|
||||
[](GetEncryptorCallback callback, os_crypt_async::Encryptor encryptor) {
|
||||
std::move(callback).Run(std::move(encryptor));
|
||||
},
|
||||
diff --git a/services/network/public/cpp/cookie_encryption_provider_impl.h b/chrome/browser/net/cookie_encryption_provider_impl.h
|
||||
similarity index 65%
|
||||
rename from services/network/public/cpp/cookie_encryption_provider_impl.h
|
||||
rename to chrome/browser/net/cookie_encryption_provider_impl.h
|
||||
index 8f80cabd7c919c682e603ff6af0c12ae4431e366..68df8a7a04e9a8455b7143432173d9e48dc1ea5e 100644
|
||||
--- a/services/network/public/cpp/cookie_encryption_provider_impl.h
|
||||
+++ b/chrome/browser/net/cookie_encryption_provider_impl.h
|
||||
@@ -1,27 +1,20 @@
|
||||
-// Copyright 2025 The Chromium Authors
|
||||
+// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-#ifndef SERVICES_NETWORK_PUBLIC_CPP_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
-#define SERVICES_NETWORK_PUBLIC_CPP_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
+#ifndef CHROME_BROWSER_NET_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
+#define CHROME_BROWSER_NET_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
|
||||
-#include "base/component_export.h"
|
||||
-#include "base/memory/raw_ptr.h"
|
||||
#include "components/os_crypt/async/common/encryptor.h"
|
||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||
#include "services/network/public/mojom/cookie_encryption_provider.mojom.h"
|
||||
|
||||
-namespace os_crypt_async {
|
||||
-class OSCryptAsync;
|
||||
-}
|
||||
-
|
||||
// Implementation of CookieEncryptionProvider interface. This is Windows only
|
||||
// for now, but will be expanded to other platforms in future.
|
||||
-class COMPONENT_EXPORT(NETWORK_CPP) CookieEncryptionProviderImpl
|
||||
+class CookieEncryptionProviderImpl
|
||||
: public network::mojom::CookieEncryptionProvider {
|
||||
public:
|
||||
- explicit CookieEncryptionProviderImpl(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async);
|
||||
+ CookieEncryptionProviderImpl();
|
||||
~CookieEncryptionProviderImpl() override;
|
||||
|
||||
CookieEncryptionProviderImpl(const CookieEncryptionProviderImpl&) = delete;
|
||||
@@ -37,7 +30,6 @@ class COMPONENT_EXPORT(NETWORK_CPP) CookieEncryptionProviderImpl
|
||||
|
||||
private:
|
||||
mojo::ReceiverSet<network::mojom::CookieEncryptionProvider> receivers_;
|
||||
- raw_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_;
|
||||
};
|
||||
|
||||
-#endif // SERVICES_NETWORK_PUBLIC_CPP_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
+#endif // CHROME_BROWSER_NET_COOKIE_ENCRYPTION_PROVIDER_IMPL_H_
|
||||
diff --git a/chrome/browser/net/cookie_encryption_provider_interactive_uitest.cc b/chrome/browser/net/cookie_encryption_provider_interactive_uitest.cc
|
||||
index b862afe7663111a6cbd342d33723942770bb0490..9dc46cedb109cea63bf71aa43fc7a2b64730ed12 100644
|
||||
--- a/chrome/browser/net/cookie_encryption_provider_interactive_uitest.cc
|
||||
+++ b/chrome/browser/net/cookie_encryption_provider_interactive_uitest.cc
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "base/test/test_future.h"
|
||||
#include "build/config/linux/dbus/buildflags.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
+#include "chrome/browser/net/cookie_encryption_provider_impl.h"
|
||||
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
@@ -25,7 +26,6 @@
|
||||
#include "content/public/test/browser_test.h"
|
||||
#include "content/public/test/test_launcher.h"
|
||||
#include "net/cookies/canonical_cookie.h"
|
||||
-#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
|
||||
#include "services/network/public/mojom/cookie_manager.mojom.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
index 96bd9009a1d49af1d5b12b3e10058ac4c48c46c6..94f096f461d92d6db56c25f36fdc642cd4ab5049 100644
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -917,13 +917,8 @@ void SystemNetworkContextManager::DisableQuic() {
|
||||
void SystemNetworkContextManager::
|
||||
AddCookieEncryptionManagerToNetworkContextParams(
|
||||
network::mojom::NetworkContextParams* network_context_params) {
|
||||
- if (!cookie_encryption_provider_) {
|
||||
- cookie_encryption_provider_ =
|
||||
- std::make_unique<CookieEncryptionProviderImpl>(
|
||||
- g_browser_process->os_crypt_async());
|
||||
- }
|
||||
network_context_params->cookie_encryption_provider =
|
||||
- cookie_encryption_provider_->BindNewRemote();
|
||||
+ cookie_encryption_provider_.BindNewRemote();
|
||||
}
|
||||
|
||||
void SystemNetworkContextManager::
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.h b/chrome/browser/net/system_network_context_manager.h
|
||||
index 9bd7bd9d4512c31b2f1b9219ed07ffa232336c3e..c1e4aae2e778fd2028f67f58d4904dbdaeb27603 100644
|
||||
--- a/chrome/browser/net/system_network_context_manager.h
|
||||
+++ b/chrome/browser/net/system_network_context_manager.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "chrome/browser/enterprise/encryption/cache_encryption_provider_impl.h"
|
||||
#include "chrome/browser/net/cert_verifier_service_time_updater.h"
|
||||
+#include "chrome/browser/net/cookie_encryption_provider_impl.h"
|
||||
#include "chrome/browser/net/proxy_config_monitor.h"
|
||||
#include "chrome/browser/net/stub_resolver_config_reader.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
@@ -24,7 +25,6 @@
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom-forward.h"
|
||||
-#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
|
||||
#include "services/network/public/mojom/host_resolver.mojom-forward.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
#include "services/network/public/mojom/network_service.mojom.h"
|
||||
@@ -308,7 +308,7 @@ class SystemNetworkContextManager {
|
||||
GssapiLibraryLoadObserver gssapi_library_loader_observer_{this};
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
- std::unique_ptr<CookieEncryptionProviderImpl> cookie_encryption_provider_;
|
||||
+ CookieEncryptionProviderImpl cookie_encryption_provider_;
|
||||
|
||||
std::unique_ptr<enterprise_encryption::CacheEncryptionProviderImpl>
|
||||
cache_encryption_provider_;
|
||||
diff --git a/components/cookie_config/BUILD.gn b/components/cookie_config/BUILD.gn
|
||||
index e348b0d1a59470c5cf153ae02e420b9dd6bd1892..a7a51003386fe7b62aaf5b7008c63acefd428942 100644
|
||||
--- a/components/cookie_config/BUILD.gn
|
||||
+++ b/components/cookie_config/BUILD.gn
|
||||
@@ -13,7 +13,7 @@ component("cookie_config") {
|
||||
public_deps = [ "//base" ]
|
||||
|
||||
deps = [
|
||||
- "//components/os_crypt/async/browser",
|
||||
+ "//components/os_crypt/sync",
|
||||
"//net:extras",
|
||||
]
|
||||
}
|
||||
diff --git a/components/cookie_config/DEPS b/components/cookie_config/DEPS
|
||||
index 2c847bf159af83cd12bb343deff0cae9957a4183..a428c0b502bee622fbc7eff7d83a2e8500c058df 100644
|
||||
--- a/components/cookie_config/DEPS
|
||||
+++ b/components/cookie_config/DEPS
|
||||
@@ -1,4 +1,4 @@
|
||||
include_rules = [
|
||||
- "+components/os_crypt/async",
|
||||
+ "+components/os_crypt/sync",
|
||||
"+net/extras/sqlite",
|
||||
]
|
||||
diff --git a/components/cookie_config/cookie_store_util.cc b/components/cookie_config/cookie_store_util.cc
|
||||
index 55742de998756cbcd686d13a77b2a695eda06884..e7efdfe3a5ecae3b5461bba469f0377b3c920b21 100644
|
||||
--- a/components/cookie_config/cookie_store_util.cc
|
||||
+++ b/components/cookie_config/cookie_store_util.cc
|
||||
@@ -5,12 +5,8 @@
|
||||
#include "components/cookie_config/cookie_store_util.h"
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
-#include "base/memory/scoped_refptr.h"
|
||||
-#include "base/memory/weak_ptr.h"
|
||||
-#include "base/task/sequenced_task_runner.h"
|
||||
#include "build/build_config.h"
|
||||
-#include "components/os_crypt/async/browser/os_crypt_async.h"
|
||||
-#include "components/os_crypt/async/common/encryptor.h"
|
||||
+#include "components/os_crypt/sync/os_crypt.h"
|
||||
#include "net/extras/sqlite/cookie_crypto_delegate.h"
|
||||
|
||||
namespace cookie_config {
|
||||
@@ -19,123 +15,40 @@ namespace cookie_config {
|
||||
BUILDFLAG(IS_CHROMEOS)
|
||||
namespace {
|
||||
|
||||
-void OnOsCryptReadyOnUi(
|
||||
- base::OnceCallback<void(os_crypt_async::Encryptor)> callback,
|
||||
- scoped_refptr<base::SequencedTaskRunner> task_runner,
|
||||
- os_crypt_async::Encryptor encryptor) {
|
||||
- task_runner->PostTask(
|
||||
- FROM_HERE, base::BindOnce(std::move(callback), std::move(encryptor)));
|
||||
-}
|
||||
-
|
||||
-void InitOnUi(base::OnceCallback<void(os_crypt_async::Encryptor)> callback,
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> task_runner) {
|
||||
- os_crypt_async->GetInstance(
|
||||
- base::BindOnce(&OnOsCryptReadyOnUi, std::move(callback),
|
||||
- std::move(task_runner)),
|
||||
- os_crypt_async::Encryptor::Option::kEncryptSyncCompat);
|
||||
-}
|
||||
-
|
||||
// Use the operating system's mechanisms to encrypt cookies before writing
|
||||
// them to persistent store. Currently this only is done with desktop OS's
|
||||
// because ChromeOS and Android already protect the entire profile contents.
|
||||
class CookieOSCryptoDelegate : public net::CookieCryptoDelegate {
|
||||
public:
|
||||
- CookieOSCryptoDelegate(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
|
||||
-
|
||||
- CookieOSCryptoDelegate(const CookieOSCryptoDelegate&) = delete;
|
||||
- CookieOSCryptoDelegate& operator=(const CookieOSCryptoDelegate&) = delete;
|
||||
-
|
||||
- ~CookieOSCryptoDelegate() override;
|
||||
-
|
||||
- // net::CookieCryptoDelegate implementation:
|
||||
void Init(base::OnceClosure callback) override;
|
||||
bool EncryptString(const std::string& plaintext,
|
||||
std::string* ciphertext) override;
|
||||
bool DecryptString(const std::string& ciphertext,
|
||||
std::string* plaintext) override;
|
||||
-
|
||||
- private:
|
||||
- void OnOsCryptReady(os_crypt_async::Encryptor encryptor);
|
||||
-
|
||||
- raw_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_;
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
|
||||
- std::optional<os_crypt_async::Encryptor> encryptor_;
|
||||
-
|
||||
- bool initializing_ = false;
|
||||
- std::vector<base::OnceClosure> init_callbacks_;
|
||||
-
|
||||
- base::WeakPtrFactory<CookieOSCryptoDelegate> weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
-CookieOSCryptoDelegate::CookieOSCryptoDelegate(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner)
|
||||
- : os_crypt_async_(os_crypt_async), ui_task_runner_(ui_task_runner) {}
|
||||
-
|
||||
-CookieOSCryptoDelegate::~CookieOSCryptoDelegate() = default;
|
||||
-
|
||||
void CookieOSCryptoDelegate::Init(base::OnceClosure callback) {
|
||||
- if (encryptor_.has_value()) {
|
||||
- std::move(callback).Run();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- init_callbacks_.emplace_back(std::move(callback));
|
||||
- if (initializing_) {
|
||||
- return;
|
||||
- }
|
||||
- initializing_ = true;
|
||||
-
|
||||
- // PostTaskAndReplyWithResult can't be used here because
|
||||
- // OSCryptAsync::GetInstance() is async.
|
||||
- ui_task_runner_->PostTask(
|
||||
- FROM_HERE,
|
||||
- base::BindOnce(&InitOnUi,
|
||||
- base::BindOnce(&CookieOSCryptoDelegate::OnOsCryptReady,
|
||||
- weak_ptr_factory_.GetWeakPtr()),
|
||||
- os_crypt_async_,
|
||||
- base::SequencedTaskRunner::GetCurrentDefault()));
|
||||
- os_crypt_async_ = nullptr;
|
||||
+ std::move(callback).Run();
|
||||
}
|
||||
|
||||
bool CookieOSCryptoDelegate::EncryptString(const std::string& plaintext,
|
||||
std::string* ciphertext) {
|
||||
- CHECK(encryptor_) << "EncryptString called before Init completed";
|
||||
- return encryptor_->EncryptString(plaintext, ciphertext);
|
||||
+ return OSCrypt::EncryptString(plaintext, ciphertext);
|
||||
}
|
||||
|
||||
bool CookieOSCryptoDelegate::DecryptString(const std::string& ciphertext,
|
||||
std::string* plaintext) {
|
||||
- CHECK(encryptor_) << "DecryptString called before Init completed";
|
||||
- return encryptor_->DecryptString(ciphertext, plaintext);
|
||||
-}
|
||||
-
|
||||
-void CookieOSCryptoDelegate::OnOsCryptReady(
|
||||
- os_crypt_async::Encryptor encryptor) {
|
||||
- encryptor_ = std::move(encryptor);
|
||||
- initializing_ = false;
|
||||
- for (auto& callback : init_callbacks_) {
|
||||
- std::move(callback).Run();
|
||||
- }
|
||||
- init_callbacks_.clear();
|
||||
+ return OSCrypt::DecryptString(ciphertext, plaintext);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
-std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner) {
|
||||
- return std::make_unique<CookieOSCryptoDelegate>(os_crypt_async,
|
||||
- ui_task_runner);
|
||||
+std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate() {
|
||||
+ return std::make_unique<CookieOSCryptoDelegate>();
|
||||
}
|
||||
#else // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
-std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner) {
|
||||
+std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate() {
|
||||
return nullptr;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
|
||||
diff --git a/components/cookie_config/cookie_store_util.h b/components/cookie_config/cookie_store_util.h
|
||||
index 9d142e9f13fb0d30d5795c2a82f2cbc5274d381c..1e1b7ebc234d7e3f981e023fe49cd0b13ed62c6e 100644
|
||||
--- a/components/cookie_config/cookie_store_util.h
|
||||
+++ b/components/cookie_config/cookie_store_util.h
|
||||
@@ -8,28 +8,17 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/component_export.h"
|
||||
-#include "base/memory/scoped_refptr.h"
|
||||
-
|
||||
-namespace base {
|
||||
-class SequencedTaskRunner;
|
||||
-}
|
||||
|
||||
namespace net {
|
||||
class CookieCryptoDelegate;
|
||||
} // namespace net
|
||||
|
||||
-namespace os_crypt_async {
|
||||
-class OSCryptAsync;
|
||||
-} // namespace os_crypt_async
|
||||
-
|
||||
namespace cookie_config {
|
||||
|
||||
// Factory method for returning a CookieCryptoDelegate if one is appropriate for
|
||||
// this platform.
|
||||
COMPONENT_EXPORT(COMPONENTS_COOKIE_CONFIG)
|
||||
-std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate(
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async,
|
||||
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
|
||||
+std::unique_ptr<net::CookieCryptoDelegate> GetCookieCryptoDelegate();
|
||||
|
||||
} // namespace cookie_config
|
||||
|
||||
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
|
||||
index bb308187837371ecfa2482affaf35ac7ed98c1f3..1e554fe95b0521a883ced83fc67f5d52a3d45759 100644
|
||||
--- a/components/os_crypt/sync/BUILD.gn
|
||||
+++ b/components/os_crypt/sync/BUILD.gn
|
||||
@@ -12,7 +12,13 @@ component("sync") {
|
||||
visibility = [
|
||||
"//electron:*",
|
||||
"//chrome/browser",
|
||||
+ "//chrome/browser/prefs:impl",
|
||||
+ "//chrome/browser/ui",
|
||||
+ "//chrome/browser/web_applications",
|
||||
"//chrome/test:test_support",
|
||||
+ "//components/autofill/content/browser",
|
||||
+ "//components/cookie_config",
|
||||
+ "//components/gcm_driver",
|
||||
"//components/os_crypt/async/browser:dpapi_key_provider",
|
||||
"//components/os_crypt/async/browser:freedesktop_secret_key_provider",
|
||||
"//components/os_crypt/async/browser:keychain_key_provider",
|
||||
@@ -22,18 +28,24 @@ component("sync") {
|
||||
"//components/os_crypt/async/common:unit_tests",
|
||||
"//components/os_crypt/sync:test_support",
|
||||
"//components/os_crypt/sync:unit_tests",
|
||||
+ "//components/password_manager/core/browser",
|
||||
+ "//components/password_manager/core/browser:hash_password_manager",
|
||||
+ "//components/password_manager/core/browser:unit_tests",
|
||||
+ "//components/password_manager/core/browser/password_store:password_store_impl",
|
||||
+ "//components/password_manager/core/browser/password_store:unit_tests",
|
||||
"//components/signin/core/browser",
|
||||
"//components/sync:unit_tests",
|
||||
"//components/sync/nigori",
|
||||
"//components/sync/service",
|
||||
+ "//components/trusted_vault",
|
||||
+ "//components/trusted_vault:unit_tests",
|
||||
+ "//content/browser",
|
||||
"//headless:headless_non_renderer",
|
||||
+ "//headless:headless_shell_lib",
|
||||
"//ios/chrome/browser/web/model:web_internal",
|
||||
"//services/network:network_service",
|
||||
"//services/test/echo:lib",
|
||||
]
|
||||
- if (is_mac) {
|
||||
- visibility += [ "//headless:headless_shell_lib" ]
|
||||
- }
|
||||
|
||||
sources = [
|
||||
"os_crypt.h",
|
||||
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
|
||||
index 3b7ac1e77fb8f1696e6fea46e5e76fd05151b6c0..fa9731f028cf2e2ba7c821e67d3fca95f3e16f36 100644
|
||||
--- a/headless/BUILD.gn
|
||||
+++ b/headless/BUILD.gn
|
||||
@@ -373,7 +373,6 @@ component("headless_non_renderer") {
|
||||
"//components/keyed_service/content",
|
||||
"//components/origin_trials:browser",
|
||||
"//components/origin_trials:common",
|
||||
- "//components/os_crypt/async/browser",
|
||||
"//components/os_crypt/sync",
|
||||
"//components/policy:generated",
|
||||
"//components/policy/content",
|
||||
diff --git a/headless/lib/browser/DEPS b/headless/lib/browser/DEPS
|
||||
index 75d0960a5964fabf518d0b8b2f67e29e9b3d6fe6..8261f1ab27597459726063cc6faa2a5ed0bfce17 100644
|
||||
--- a/headless/lib/browser/DEPS
|
||||
+++ b/headless/lib/browser/DEPS
|
||||
@@ -44,7 +44,6 @@ specific_include_rules = {
|
||||
"headless_browser_impl.*": [
|
||||
"+services/device/public/cpp/geolocation/system_geolocation_source_apple.h",
|
||||
"+services/device/public/cpp/geolocation/geolocation_system_permission_manager.h",
|
||||
- "+components/os_crypt/async",
|
||||
"+components/password_manager/core/browser/password_manager_switches.h",
|
||||
"+components/policy",
|
||||
"+components/prefs",
|
||||
@@ -53,9 +52,6 @@ specific_include_rules = {
|
||||
"+components/metrics",
|
||||
"+components/variations",
|
||||
],
|
||||
- "headless_request_context_manager.cc": [
|
||||
- "+components/os_crypt/async/browser",
|
||||
- ],
|
||||
"headless_browser_impl_unittest.cc": [
|
||||
"+third_party/blink/public/common/features.h",
|
||||
],
|
||||
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc
|
||||
index f664e9994a3c38ef2aa30773f6ca4668451dd76c..ad83a721a8bf17225af7d2c5954ecdd82cf8e1dc 100644
|
||||
--- a/headless/lib/browser/headless_browser_context_impl.cc
|
||||
+++ b/headless/lib/browser/headless_browser_context_impl.cc
|
||||
@@ -77,7 +77,7 @@ HeadlessBrowserContextImpl::HeadlessBrowserContextImpl(
|
||||
? base::FilePath()
|
||||
: path_;
|
||||
request_context_manager_ = std::make_unique<HeadlessRequestContextManager>(
|
||||
- context_options_.get(), user_data_path, browser->os_crypt_async());
|
||||
+ context_options_.get(), user_data_path);
|
||||
profile_metrics::SetBrowserProfileType(
|
||||
this, IsOffTheRecord() ? profile_metrics::BrowserProfileType::kIncognito
|
||||
: profile_metrics::BrowserProfileType::kRegular);
|
||||
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
|
||||
index f0c79ccd63e102c4ef51535f476ceddc6c5156a9..c1e9430b3f5b67338f204ca5563a02c2da87cd49 100644
|
||||
--- a/headless/lib/browser/headless_browser_impl.cc
|
||||
+++ b/headless/lib/browser/headless_browser_impl.cc
|
||||
@@ -16,8 +16,6 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "build/config/linux/dbus/buildflags.h"
|
||||
#include "components/embedder_support/user_agent_utils.h"
|
||||
-#include "components/os_crypt/async/browser/os_crypt_async.h"
|
||||
-#include "components/os_crypt/async/common/encryptor.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
@@ -212,8 +210,7 @@ void HeadlessBrowserImpl::SetDefaultBrowserContext(
|
||||
if (default_browser_context_ && !system_request_context_manager_) {
|
||||
system_request_context_manager_ =
|
||||
HeadlessRequestContextManager::CreateSystemContext(
|
||||
- HeadlessBrowserContextImpl::From(browser_context)->options(),
|
||||
- os_crypt_async());
|
||||
+ HeadlessBrowserContextImpl::From(browser_context)->options());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,8 +266,6 @@ bool HeadlessBrowserImpl::ShouldStartDevToolsServer() {
|
||||
}
|
||||
|
||||
void HeadlessBrowserImpl::PreMainMessageLoopRun() {
|
||||
- CreateOSCryptAsync();
|
||||
-
|
||||
platform_delegate_->Initialize(options_.value());
|
||||
|
||||
// We don't support the tethering domain on this agent host.
|
||||
@@ -287,7 +282,6 @@ void HeadlessBrowserImpl::WillRunMainMessageLoop(base::RunLoop& run_loop) {
|
||||
}
|
||||
|
||||
void HeadlessBrowserImpl::PostMainMessageLoopRun() {
|
||||
- os_crypt_async_.reset();
|
||||
#if defined(HEADLESS_USE_PREFS)
|
||||
if (local_state_) {
|
||||
local_state_->CommitPendingWrite();
|
||||
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h
|
||||
index 1d9ba1861de0065cb059710fab7b619c0df55216..69056c94a348566e2d080307c794e5dd28322dff 100644
|
||||
--- a/headless/lib/browser/headless_browser_impl.h
|
||||
+++ b/headless/lib/browser/headless_browser_impl.h
|
||||
@@ -31,9 +31,11 @@ class PolicyService;
|
||||
class PrefService;
|
||||
#endif
|
||||
|
||||
-namespace os_crypt_async {
|
||||
-class OSCryptAsync;
|
||||
-}
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+namespace device {
|
||||
+class GeolocationSystemPermissionManager;
|
||||
+} // namespace device
|
||||
+#endif
|
||||
|
||||
namespace ui {
|
||||
class Compositor;
|
||||
@@ -99,10 +101,6 @@ class HEADLESS_EXPORT HeadlessBrowserImpl : public HeadlessBrowser {
|
||||
|
||||
int exit_code() const { return exit_code_; }
|
||||
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async() {
|
||||
- return os_crypt_async_.get();
|
||||
- }
|
||||
-
|
||||
#if defined(HEADLESS_USE_PREFS)
|
||||
void CreatePrefService();
|
||||
PrefService* GetPrefs();
|
||||
@@ -121,8 +119,6 @@ class HEADLESS_EXPORT HeadlessBrowserImpl : public HeadlessBrowser {
|
||||
|
||||
int exit_code_ = 0;
|
||||
|
||||
- std::unique_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_;
|
||||
-
|
||||
base::flat_map<std::string, std::unique_ptr<HeadlessBrowserContextImpl>>
|
||||
browser_contexts_;
|
||||
raw_ptr<HeadlessBrowserContext, AcrossTasksDanglingUntriaged>
|
||||
diff --git a/headless/lib/browser/headless_request_context_manager.cc b/headless/lib/browser/headless_request_context_manager.cc
|
||||
index 6c4ce0a6fa6624cace08bfdb2c62b12836a744fa..fe1a11f94a709400434fb41a5bdcdb8f4d47a959 100644
|
||||
--- a/headless/lib/browser/headless_request_context_manager.cc
|
||||
+++ b/headless/lib/browser/headless_request_context_manager.cc
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/embedder_support/switches.h"
|
||||
-#include "components/os_crypt/async/browser/os_crypt_async.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
#include "headless/lib/browser/headless_browser_context_options.h"
|
||||
@@ -138,10 +137,9 @@ class HeadlessProxyConfigMonitor
|
||||
// static
|
||||
std::unique_ptr<HeadlessRequestContextManager>
|
||||
HeadlessRequestContextManager::CreateSystemContext(
|
||||
- const HeadlessBrowserContextOptions* options,
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async) {
|
||||
+ const HeadlessBrowserContextOptions* options) {
|
||||
auto manager = std::make_unique<HeadlessRequestContextManager>(
|
||||
- options, base::FilePath(), os_crypt_async);
|
||||
+ options, base::FilePath());
|
||||
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
auto auth_params = ::network::mojom::HttpAuthDynamicParams::New();
|
||||
@@ -172,8 +170,7 @@ HeadlessRequestContextManager::CreateSystemContext(
|
||||
|
||||
HeadlessRequestContextManager::HeadlessRequestContextManager(
|
||||
const HeadlessBrowserContextOptions* options,
|
||||
- base::FilePath user_data_path,
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async)
|
||||
+ base::FilePath user_data_path)
|
||||
:
|
||||
// On Windows, Cookie encryption requires access to local_state prefs.
|
||||
#if BUILDFLAG(IS_WIN) && !defined(HEADLESS_USE_PREFS)
|
||||
@@ -183,7 +180,6 @@ HeadlessRequestContextManager::HeadlessRequestContextManager(
|
||||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kDisableCookieEncryption)),
|
||||
#endif
|
||||
- os_crypt_async_(os_crypt_async),
|
||||
user_data_path_(std::move(user_data_path)),
|
||||
disk_cache_dir_(options->disk_cache_dir()),
|
||||
accept_language_(options->accept_language()),
|
||||
@@ -192,10 +188,6 @@ HeadlessRequestContextManager::HeadlessRequestContextManager(
|
||||
options->proxy_config()
|
||||
? std::make_unique<net::ProxyConfig>(*options->proxy_config())
|
||||
: nullptr) {
|
||||
- if (cookie_encryption_enabled_) {
|
||||
- cookie_encryption_provider_ =
|
||||
- std::make_unique<CookieEncryptionProviderImpl>(os_crypt_async_.get());
|
||||
- }
|
||||
if (!proxy_config_) {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(switches::kNoSystemProxyConfigService)) {
|
||||
@@ -240,10 +232,6 @@ void HeadlessRequestContextManager::ConfigureNetworkContextParamsInternal(
|
||||
|
||||
if (!user_data_path_.empty()) {
|
||||
context_params->enable_encrypted_cookies = cookie_encryption_enabled_;
|
||||
- if (cookie_encryption_enabled_) {
|
||||
- context_params->cookie_encryption_provider =
|
||||
- cookie_encryption_provider_->BindNewRemote();
|
||||
- }
|
||||
context_params->file_paths =
|
||||
::network::mojom::NetworkContextFilePaths::New();
|
||||
context_params->file_paths->data_directory =
|
||||
diff --git a/headless/lib/browser/headless_request_context_manager.h b/headless/lib/browser/headless_request_context_manager.h
|
||||
index 91d74eaadd9f4d451e809b38a2f999b298068820..e45427ce90f909e609688ab59f4581b185b6757e 100644
|
||||
--- a/headless/lib/browser/headless_request_context_manager.h
|
||||
+++ b/headless/lib/browser/headless_request_context_manager.h
|
||||
@@ -13,13 +13,8 @@
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "mojo/public/cpp/bindings/pending_remote.h"
|
||||
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom-forward.h"
|
||||
-#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
|
||||
-namespace os_crypt_async {
|
||||
-class OSCryptAsync;
|
||||
-}
|
||||
-
|
||||
namespace headless {
|
||||
|
||||
class HeadlessBrowserContextOptions;
|
||||
@@ -28,12 +23,10 @@ class HeadlessProxyConfigMonitor;
|
||||
class HeadlessRequestContextManager {
|
||||
public:
|
||||
static std::unique_ptr<HeadlessRequestContextManager> CreateSystemContext(
|
||||
- const HeadlessBrowserContextOptions* options,
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async);
|
||||
+ const HeadlessBrowserContextOptions* options);
|
||||
|
||||
HeadlessRequestContextManager(const HeadlessBrowserContextOptions* options,
|
||||
- base::FilePath user_data_path,
|
||||
- os_crypt_async::OSCryptAsync* os_crypt_async);
|
||||
+ base::FilePath user_data_path);
|
||||
|
||||
HeadlessRequestContextManager(const HeadlessRequestContextManager&) = delete;
|
||||
HeadlessRequestContextManager& operator=(
|
||||
@@ -56,15 +49,12 @@ class HeadlessRequestContextManager {
|
||||
|
||||
const bool cookie_encryption_enabled_;
|
||||
|
||||
- const raw_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_;
|
||||
-
|
||||
base::FilePath user_data_path_;
|
||||
base::FilePath disk_cache_dir_;
|
||||
std::string accept_language_;
|
||||
std::string user_agent_;
|
||||
std::unique_ptr<net::ProxyConfig> proxy_config_;
|
||||
std::unique_ptr<HeadlessProxyConfigMonitor> proxy_config_monitor_;
|
||||
- std::unique_ptr<CookieEncryptionProviderImpl> cookie_encryption_provider_;
|
||||
|
||||
mojo::PendingRemote<::network::mojom::NetworkContext> system_context_;
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index c71bd4df2cbe19d256a64a910c904fa5a1990104..343753d0fbe77c81ac2723f3cf709fa42e28c9ad 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -3269,12 +3269,7 @@ NetworkContext::MakeSessionCleanupCookieStore() const {
|
||||
crypto_delegate = std::make_unique<CookieOSCryptAsyncDelegate>(
|
||||
std::move(params_->cookie_encryption_provider));
|
||||
} else {
|
||||
-#if !BUILDFLAG(IS_ANDROID)
|
||||
- // A cookie crypto delegate should not be created on Android to
|
||||
- // match the behavior of cookie_config::GetCookieCryptoDelegate().
|
||||
- // See https://crbug.com/449652881
|
||||
- NOTREACHED();
|
||||
-#endif
|
||||
+ crypto_delegate = cookie_config::GetCookieCryptoDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn
|
||||
index b48bdf27cd97142ceebc1f0b769b502bf037ce36..3b1424b6df37aa4a3cd341e8b89524e34480d4ac 100644
|
||||
--- a/services/network/public/cpp/BUILD.gn
|
||||
+++ b/services/network/public/cpp/BUILD.gn
|
||||
@@ -69,8 +69,6 @@ component("cpp") {
|
||||
"content_decoding_interceptor.h",
|
||||
"content_language_parser.cc",
|
||||
"content_language_parser.h",
|
||||
- "cookie_encryption_provider_impl.cc",
|
||||
- "cookie_encryption_provider_impl.h",
|
||||
"cors/cors.cc",
|
||||
"cors/cors.h",
|
||||
"cors/origin_access_list.cc",
|
||||
@@ -187,8 +185,6 @@ component("cpp") {
|
||||
deps = [
|
||||
"//base",
|
||||
"//components/link_header_util",
|
||||
- "//components/os_crypt/async/browser",
|
||||
- "//components/os_crypt/async/common",
|
||||
"//components/prefs",
|
||||
"//ipc",
|
||||
"//net",
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 89053b1e1855306f946c0aa8dc0f7860f0be72c0..ab7ea3460287bb8833b40af10f61abb5d328564d 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -576,9 +576,10 @@ struct NetworkContextParams {
|
||||
bool acam_preflight_spec_conformant = true;
|
||||
|
||||
// Sets the cookie encryption provider to be used by this network context if
|
||||
- // `enable_encrypted_cookies` is enabled.
|
||||
- // The `GetEncryptor` method on the supplied `cookie_encryption_provider` is
|
||||
- // called to obtain a valid set of keys for cookie encryption.
|
||||
+ // `enable_encrypted_cookies` is also enabled.
|
||||
+ // If both are set then the `GetEncryptor` method on the supplied
|
||||
+ // `cookie_encryption_provider` is called to obtain a valid set of keys for
|
||||
+ // cookie encryption.
|
||||
pending_remote<CookieEncryptionProvider>? cookie_encryption_provider;
|
||||
|
||||
// Enables Device Bound Session Credential for this network context.
|
||||
@@ -11,7 +11,7 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
|
||||
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 91d2a6dde1521eee8fc3d38d4a9f6376bacd07c2..c7719a7bb973624f7932d7f9614ba71a98a8a0ed 100644
|
||||
index e200cfb980175e4e2fd92a99a0c550c099a22c37..4402ca1334d097932bc13d506866fc1f3236888c 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2165,9 +2165,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
|
||||
@@ -8,10 +8,10 @@ v8::Value instead of base::Value.
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
|
||||
|
||||
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
||||
index d81887f4aee7a8595820704c852972e86ae6c93d..b24e67975aa3c8b55ac703776c380c2a718b1fa9 100644
|
||||
index cf5dee0e4531dc1e57a41a6f3e8a3e9f84560545..71eaed03a15ba2ab5bae874daecfb0e95ac7c64d 100644
|
||||
--- a/extensions/renderer/script_injection.cc
|
||||
+++ b/extensions/renderer/script_injection.cc
|
||||
@@ -318,6 +318,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
@@ -317,6 +317,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
blink::mojom::LoadEventBlockingOption::kBlock,
|
||||
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
@@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 56881bc15c7883efe1b826e0c81dfcab87dbcbcf..6ceef2b48953f1abcd9ec2d471f75aedbf6e6154 100644
|
||||
index 81dc93e120d8a3855c87742e4219d7f6a1105a86..a2ab7b012aea6ca3ac8e53681da822effe13f8a6 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3218,6 +3218,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3193,6 +3193,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -70,7 +70,7 @@ index 56881bc15c7883efe1b826e0c81dfcab87dbcbcf..6ceef2b48953f1abcd9ec2d471f75aed
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -3275,7 +3276,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3250,7 +3251,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
script_state, std::move(script_sources), execute_script_policy,
|
||||
user_gesture, evaluation_timing, blocking_option, want_result_option,
|
||||
@@ -223,7 +223,7 @@ index ae4072acb1e23f77f24588ce0e03c90cbd89bb4b..decb993e467d41eacd038f38d15b2aad
|
||||
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 7d9e8c9e0ecd7b5c10ebe3362a059c703c2fb2c6..68c567ecf797de7c9214fb3e84142579d618009d 100644
|
||||
index ed7c68c19364ddc5ea3f9435a122d04ca8d1683a..2516e25e6f9ed222af886e9998e50ae5237dbc57 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -1128,14 +1128,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index a51feeba896849bb5330fa8119da580c06efe2ef..530e55176859c30dfabd047e2a4e6b25923d7eca 100644
|
||||
index 581d86c4ec4f437d7195c003d8776795f59cf696..632d2645d4ed3a8e83070f08320b2252ad3c6e18 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -4852,6 +4852,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -4851,6 +4851,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ index 3909e70dc1425c2cb02624f4b3017784a2ae6c9d..a57b92f02085d6392e6d9d0cc037df6b
|
||||
// Returns whether `Initialize` has already been invoked in the process.
|
||||
// Initialization is a one-way operation (i.e., this method cannot return
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 3dfc0c3512cce91490c778c20e2c7f8756be93d2..20f364ab05b170485d40fa8651675e09d9f626ca 100644
|
||||
index 83317535261d581edba6c8722e1013d2aa7e91d7..41a25b402f330fcb84e4cca1365d3f72090e518d 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -531,7 +531,8 @@ void SetFeatureFlags() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 05e4c8df0474b83fa5dfdca6ef70411f98fb332c..57339cf20746680b834aca498c83be3379e1ec7f 100644
|
||||
index a864d67a4b7225538d57e661c552fce920c0d5db..106b538ecbbebc52fc1652f38d415041ab11e4f6 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1633,6 +1633,11 @@
|
||||
@@ -1629,6 +1629,11 @@
|
||||
"messages": [10120],
|
||||
},
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 7c319d7e9452a1a156795f63d7ad3fcbf21308ab..0d7f8f37b8dda38b9d7b40abd9239a2d5097e69b 100644
|
||||
index 7e4f2313398ce0bf2fdec94c1f7fdf409770effa..400d9755d2a88b3ee53bafdfca03931b607aea85 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1083,6 +1083,7 @@ component("base") {
|
||||
@@ -1084,6 +1084,7 @@ component("base") {
|
||||
"//build:ios_buildflags",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//third_party/modp_b64",
|
||||
@@ -581,7 +581,7 @@ index 475314668b79e2c2670e9890f92a527d35a273c0..44df2e22b1fe8e6deeeb6f4b8568e96f
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index ba5fffc4feaee0fa6d1a15ccd3e084bc63e79b25..253d955e9d688df680ff045bc7fb97f8dc69b420 100644
|
||||
index c5dcbbc72d4a2b746d5aefe547658a51f251af37..74d57aa7708d6e7e0141e031e5fb137cf1dbb396 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -343,6 +343,7 @@ source_set("browser") {
|
||||
@@ -702,10 +702,10 @@ index 0f7ae2664dd80c7b8d6d222278d9ed85e12f9047..6cd1d4cb2a61d1ec61aa7ecb8b30e8d6
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index b6a912f16fa4af423c62186b403a6e6cb12c5d1b..cd65876fe4463d81afc8fa64ffbfd1460c896536 100644
|
||||
index 1df402ca32ab9774f9b130e9ab699557eff9aaef..b2af61152fb65b08e28642e3daab18fedff1e191 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -271,6 +271,7 @@ source_set("common") {
|
||||
@@ -270,6 +270,7 @@ source_set("common") {
|
||||
"//ui/shell_dialogs",
|
||||
"//url",
|
||||
"//url/ipc:url_ipc",
|
||||
@@ -796,7 +796,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index 61f85af05af80cdea9e9294dbadb04bf92cb3e19..fca09c791a9a6bbdf48dc9418bd85dfa1dfd7312 100644
|
||||
index e481f7a609c42d53b83eaee55aefd2ed35b3ac2d..d029bb52eb28206313d95a7550bf594c01e2fbfe 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -701,6 +701,7 @@ static_library("test_support") {
|
||||
@@ -824,7 +824,7 @@ index 61f85af05af80cdea9e9294dbadb04bf92cb3e19..fca09c791a9a6bbdf48dc9418bd85dfa
|
||||
]
|
||||
|
||||
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
|
||||
@@ -3406,6 +3410,7 @@ test("content_unittests") {
|
||||
@@ -3404,6 +3408,7 @@ test("content_unittests") {
|
||||
"//ui/shell_dialogs",
|
||||
"//ui/webui:test_support",
|
||||
"//url",
|
||||
@@ -1804,7 +1804,7 @@ index bfffd0444b0711b201cedaddfd3edaa7b5d9220a..8cdae9f250d407d0c2d34ba7c0891b84
|
||||
// Query the display's refresh rate.
|
||||
display.set_display_frequency(screen.maximumFramesPerSecond);
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index 2e19b81a109ab64982d36562fc4bf4cd19b5ea2e..2a5aa807cf363a7e27e2cc923f1743330388bfaa 100644
|
||||
index 375a97d6e51a4a7be5911d172e9f3e921c966c4c..2bec59ef84ba3f1dd1ca28440f7b6130833432a5 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -278,6 +278,8 @@ component("gfx") {
|
||||
@@ -1855,7 +1855,7 @@ index bbe355cf69f160866188216cc274d75bd35603db..06ee100d7ea2e892dbf3c0b1adc96c50
|
||||
// enough.
|
||||
return PlatformFontMac::SystemFontType::kGeneral;
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index f29c5c32b06a5af32729934f7d79b8e0463d2a5d..70ad2e70c7f3947abd98d6aee71c9d0a5fbe7190 100644
|
||||
index ece2f92106e7cd5ab875a5e13889ae94e9337ab6..e076d917f60187a2103591266d39185ef703864a 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -726,6 +726,8 @@ component("views") {
|
||||
@@ -1991,7 +1991,7 @@ index 5c0d4134c8205b018a4f71509879485a7f92bcf2..d2204fd2b737f7f3e146cb1be80c3be6
|
||||
}
|
||||
|
||||
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
|
||||
index 50bb38a38dca67f9f393c48efe123f7dd7ca2594..2062e479581d63325de3c3398844acca0601c86c 100644
|
||||
index faa860ef58afdde28e7929c99e191b06e67efad6..827372d5f2c7e72e741a1a082998e590d75935e3 100644
|
||||
--- a/ui/views/controls/webview/BUILD.gn
|
||||
+++ b/ui/views/controls/webview/BUILD.gn
|
||||
@@ -46,6 +46,12 @@ component("webview") {
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 53523724fbc83b3aa0a665bc4755a758b15f35ed..f9f49954ce842e0a1e022be442a507ad15c2eb1d 100644
|
||||
index c1901c54ef5a66afe6b429c153630a2c663ec88e..d1606201c87ea316e417df2ff5eb1fe769c80237 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -169,6 +169,11 @@
|
||||
@@ -160,10 +160,10 @@ index 53523724fbc83b3aa0a665bc4755a758b15f35ed..f9f49954ce842e0a1e022be442a507ad
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 2872aeef978e1970ca9a3742d968587c106dd707..998436d1c0c00fa26ca8f24e4cdd544fd8a557bb 100644
|
||||
index f08d4e8883b04939f43318f76ae88cda8d124f1e..f89abe7cc46edbf79e800d128d5492c063d52761 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -119,6 +119,7 @@ class SimpleUrlPatternMatcher;
|
||||
@@ -118,6 +118,7 @@ class SimpleUrlPatternMatcher;
|
||||
}
|
||||
|
||||
namespace network {
|
||||
@@ -171,7 +171,7 @@ index 2872aeef978e1970ca9a3742d968587c106dd707..998436d1c0c00fa26ca8f24e4cdd544f
|
||||
class CookieManager;
|
||||
class HostResolver;
|
||||
class MdnsResponderManager;
|
||||
@@ -248,6 +249,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -247,6 +248,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
@@ -180,7 +180,7 @@ index 2872aeef978e1970ca9a3742d968587c106dd707..998436d1c0c00fa26ca8f24e4cdd544f
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetViaObliviousHttp(
|
||||
mojom::ObliviousHttpRequestPtr request,
|
||||
@@ -961,6 +964,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -960,6 +963,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::vector<base::OnceClosure> dismount_closures_;
|
||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||
|
||||
@@ -190,7 +190,7 @@ index 2872aeef978e1970ca9a3742d968587c106dd707..998436d1c0c00fa26ca8f24e4cdd544f
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 457a8d1a2f231354aa901ac15791bf52d1c3c4ef..5f35d2bb79b6ed1c3dc98db6a4441d7cdde74938 100644
|
||||
index 501ecc1b7531779a1b7227b8374effbb6191a88a..b689b7ca1998e0855ccba9da747e5c0b39a9893d 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -310,6 +310,17 @@ struct SocketBrokerRemotes {
|
||||
@@ -211,7 +211,7 @@ index 457a8d1a2f231354aa901ac15791bf52d1c3c4ef..5f35d2bb79b6ed1c3dc98db6a4441d7c
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -961,6 +972,9 @@ interface NetworkContext {
|
||||
@@ -958,6 +969,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -133,10 +133,10 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 5fb229b699f112d4c55bc89e5a532fc968ec6368..c42299a4faf470a1f0b4b0bd3de70fa9c4e39486 100644
|
||||
index 2ad7efb8632caea74a68f7bb0aca36132376c25d..760c3a7fbab76a4c2906bf9709c01692180e6bde 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2356,7 +2356,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2362,7 +2362,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index 5fb229b699f112d4c55bc89e5a532fc968ec6368..c42299a4faf470a1f0b4b0bd3de70fa9
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2364,7 +2364,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2370,7 +2370,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -176,10 +176,10 @@ index 82db1db4175fb9f4ee7490d5a163164ef4495ecb..4f51683be14ba6ee657a290c7747969e
|
||||
const GURL& origin,
|
||||
const GURL& document_url,
|
||||
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
|
||||
index 32a0cf38389989d3e1c287ad4a3f26b6d3615370..8a788f243e913ef26246b5ea4ac4ac5c1dfc4b86 100644
|
||||
index ea62ad4af02c6e4dcc3115985ad62f7a3a141acd..e5a561bc059fb34686b1976ada599fafc50849fe 100644
|
||||
--- a/content/test/mock_platform_notification_service.cc
|
||||
+++ b/content/test/mock_platform_notification_service.cc
|
||||
@@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
|
||||
@@ -28,6 +28,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
|
||||
MockPlatformNotificationService::~MockPlatformNotificationService() = default;
|
||||
|
||||
void MockPlatformNotificationService::DisplayNotification(
|
||||
|
||||
@@ -36,7 +36,7 @@ index 732a050ca50f8c316cb4537d5f1f79df2306fc4a..e17dbd9b9109fc07f6f29f1668a86c3f
|
||||
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture;
|
||||
|
||||
diff --git a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
index ff524b63c60266327cc0404b82e5ab1338f9ea33..26251b9ad34b520bc7c52dea8dc141aafad40efb 100644
|
||||
index d6bec4cbdd3b4ca155823bc2678131f40814776d..1467e05535bf5d9ee29ccb3d0a160315f4f74673 100644
|
||||
--- a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
+++ b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
@@ -209,6 +209,23 @@ bool FrameResources::Initialize(VideoPixelFormat format,
|
||||
|
||||
@@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
||||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
|
||||
index 48a156ca2d4732cf1296e507de9f13dd3364128b..e31fa0b7e408bdad61bb9a1af7f56c4018d0d09b 100644
|
||||
index c811479d785a438230a6f16ee1949d2dd97bc7ac..59208ffdf3810239546be9682c9c7948810c84c4 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -436,6 +436,10 @@
|
||||
@@ -440,6 +440,10 @@
|
||||
E_CPONLY(kColorRadioButtonForegroundUnchecked) \
|
||||
E_CPONLY(kColorRadioButtonForegroundDisabled) \
|
||||
E_CPONLY(kColorRadioButtonForegroundChecked) \
|
||||
@@ -22,7 +22,7 @@ index 48a156ca2d4732cf1296e507de9f13dd3364128b..e31fa0b7e408bdad61bb9a1af7f56c40
|
||||
E_CPONLY(kColorSegmentedButtonBorder) \
|
||||
E_CPONLY(kColorSegmentedButtonFocus) \
|
||||
E_CPONLY(kColorSegmentedButtonForegroundChecked) \
|
||||
@@ -544,6 +548,7 @@
|
||||
@@ -548,6 +552,7 @@
|
||||
E_CPONLY(kColorTreeNodeForeground) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
|
||||
|
||||
@@ -923,10 +923,10 @@ index 2f34f45aaf89e6f4600be1d2b8444c636b0cc83f..5bfd45c5efbf300a36e016af80e18fb9
|
||||
virtual mojom::ResultCode OnError();
|
||||
|
||||
diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc
|
||||
index 590e7508503d73fd698f8d2432bc98642be8f548..77a6679eab534fa0c06d5cd5ab9acbc861501c70 100644
|
||||
index 5c555d8768e2a1d9e6ac86fc9392420a42f5193d..f547f7e6008635ff03c3b96911772c18790e89aa 100644
|
||||
--- a/printing/printing_context_linux.cc
|
||||
+++ b/printing/printing_context_linux.cc
|
||||
@@ -65,9 +65,8 @@ void PrintingContextLinux::AskUserForSettings(int max_pages,
|
||||
@@ -66,9 +66,8 @@ void PrintingContextLinux::AskUserForSettings(int max_pages,
|
||||
bool is_scripted,
|
||||
PrintSettingsCallback callback) {
|
||||
if (!print_dialog_) {
|
||||
|
||||
@@ -30,7 +30,7 @@ index 9fce41c59c6878e0a29b831d76fcb53dcf86dcd5..2cff43e9fc4374ae48d87dd048a295a0
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index fc1ca7f44b0acd941ee0b3ed846cb78392b2b9b8..91d2a6dde1521eee8fc3d38d4a9f6376bacd07c2 100644
|
||||
index f658122d05a1233bf8dfc049887385dad5f9371b..e200cfb980175e4e2fd92a99a0c550c099a22c37 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2079,6 +2079,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -44,10 +44,10 @@ index fc1ca7f44b0acd941ee0b3ed846cb78392b2b9b8..91d2a6dde1521eee8fc3d38d4a9f6376
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f1b5dd614d123496cb2693ff84b23a66c25dd781..5ca1d538253fd5d0decbeaa572ae8cf36678ad78 100644
|
||||
index af33820a8eca5122f67a0a026ee831fb61754533..cce31b48b7d254347914ed30b1feef3646b26a6f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -6162,6 +6162,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -6161,6 +6161,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
|
||||
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index 291188c502bad7fca76cbdc0c55f7bdc221b075f..2643a26f603522784ed572e5cf64ee167e03f9f0 100644
|
||||
index 0e46775a1c05252db46010985b3f59ee92622286..8732a4189bcdf55e7377248b634e70b48fae4ce6 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -734,8 +734,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local<v8::Context> context) {
|
||||
@@ -741,8 +741,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local<v8::Context> context) {
|
||||
return RuntimeEnabledFeatures::WebAssemblyCustomDescriptorsEnabled(
|
||||
execution_context);
|
||||
}
|
||||
@@ -21,7 +21,7 @@ index 291188c502bad7fca76cbdc0c55f7bdc221b075f..2643a26f603522784ed572e5cf64ee16
|
||||
v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Data> v8_host_defined_options,
|
||||
v8::Local<v8::Value> v8_referrer_resource_url,
|
||||
@@ -813,20 +814,23 @@ v8::MaybeLocal<v8::Promise> HostImportModuleWithPhaseDynamically(
|
||||
@@ -820,20 +821,23 @@ v8::MaybeLocal<v8::Promise> HostImportModuleWithPhaseDynamically(
|
||||
|
||||
return resolver->Promise().V8Promise();
|
||||
}
|
||||
@@ -47,7 +47,7 @@ index 291188c502bad7fca76cbdc0c55f7bdc221b075f..2643a26f603522784ed572e5cf64ee16
|
||||
v8::Local<v8::Module> module,
|
||||
v8::Local<v8::Object> meta) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
@@ -853,6 +857,7 @@ void HostGetImportMetaProperties(v8::Local<v8::Context> context,
|
||||
@@ -860,6 +864,7 @@ void HostGetImportMetaProperties(v8::Local<v8::Context> context,
|
||||
meta->CreateDataProperty(context, resolve_key, resolve_value).ToChecked();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ index 291188c502bad7fca76cbdc0c55f7bdc221b075f..2643a26f603522784ed572e5cf64ee16
|
||||
bool IsDOMExceptionWrapper(v8::Isolate* isolate, v8::Local<v8::Object> object) {
|
||||
return V8DOMException::HasInstance(isolate, object);
|
||||
}
|
||||
@@ -883,7 +888,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) {
|
||||
@@ -890,7 +895,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -63,7 +63,7 @@ index 291188c502bad7fca76cbdc0c55f7bdc221b075f..2643a26f603522784ed572e5cf64ee16
|
||||
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
// Set up garbage collection before setting up anything else as V8 may trigger
|
||||
// GCs during Blink setup.
|
||||
@@ -899,9 +903,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
@@ -906,9 +910,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
SharedArrayBufferConstructorEnabledCallback);
|
||||
isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically);
|
||||
isolate->SetHostImportModuleWithPhaseDynamicallyCallback(
|
||||
|
||||
@@ -204,7 +204,7 @@ index 81c4f0bdc89f972464d13f06c7907e5aabff4043..cfeb183f2c3bdf75d90f5ad19bc7254e
|
||||
bool sysex;
|
||||
};
|
||||
diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
index d88327a36321bc9370f7f3761487c6fc31b7f109..84080a87638fca1a82c9cfea7a2c53ede47a6d29 100644
|
||||
index ca46a15c03d72da4a301aff6fc18c173eaa7e6c8..7a52f09c49fbf8343b33f8c07057c5de894f6f28 100644
|
||||
--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
@@ -151,8 +151,22 @@ String PermissionNameToString(PermissionName name) {
|
||||
|
||||
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6dfd333e4e577c1f50939a18317bedfeead6dde9..9bdbb9c52fff9e9dcbeac54861c73a1b213c36de 100644
|
||||
index 9461b798b3492d0fcd35f873214f58841097d229..4b53598831c3deb05068c45f72aeb4f5dedf46be 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -10363,25 +10363,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -10362,25 +10362,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -254,10 +254,10 @@ index 17d6d7d935f93afefa9123f56ef9c138c3070f93..8dfa7501a6a2998e107bf9b51f5e5c3d
|
||||
}
|
||||
|
||||
diff --git a/content/common/features.cc b/content/common/features.cc
|
||||
index 7e980732c46ffcba5da4434ea33986c5fd6671e1..a25cfddf395bb7c7022f1fbefc444470426c316a 100644
|
||||
index 53920788528b40b024907da2391cd0aca2ff86cd..1919c3d3b6e8bbde1e307c98167c1c5f26499c4c 100644
|
||||
--- a/content/common/features.cc
|
||||
+++ b/content/common/features.cc
|
||||
@@ -343,6 +343,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
@@ -352,6 +352,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
@@ -273,10 +273,10 @@ index 7e980732c46ffcba5da4434ea33986c5fd6671e1..a25cfddf395bb7c7022f1fbefc444470
|
||||
BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
diff --git a/content/common/features.h b/content/common/features.h
|
||||
index 1bc3d8351ef88687248e22fb726d7e612805e8b6..db6000afe30850aa33e85a1e26513e596e1177f5 100644
|
||||
index 809192d586de597341bca2ea59d9e2e6f531d1c1..cfe0975a37f41b387f0992150d7b6814559a9a11 100644
|
||||
--- a/content/common/features.h
|
||||
+++ b/content/common/features.h
|
||||
@@ -133,6 +133,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
|
||||
@@ -135,6 +135,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer);
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ index 2cff43e9fc4374ae48d87dd048a295a00e5575e4..9cb5baccaa083a8030d4d0d57dc00040
|
||||
// event before sending it to the renderer. See enum for details on return
|
||||
// value.
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index c7719a7bb973624f7932d7f9614ba71a98a8a0ed..b0184201376fe4b13c9e87fa8d957a465eedf6c8 100644
|
||||
index 4402ca1334d097932bc13d506866fc1f3236888c..6a1d47a8dd8b19ffb561fb4e31a78816cba2ab63 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1593,6 +1593,10 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
|
||||
@@ -54,10 +54,10 @@ index c7719a7bb973624f7932d7f9614ba71a98a8a0ed..b0184201376fe4b13c9e87fa8d957a46
|
||||
if (mouse_event_callback.Run(mouse_event)) {
|
||||
return;
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 9bdbb9c52fff9e9dcbeac54861c73a1b213c36de..cb7dcefd02f7b26767acb1da4e0e64d466a18000 100644
|
||||
index 4b53598831c3deb05068c45f72aeb4f5dedf46be..b88d3f77183e7f057e35f9ba70c053e601e1f8d8 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4480,6 +4480,12 @@ void WebContentsImpl::RenderWidgetWasResized(
|
||||
@@ -4479,6 +4479,12 @@ void WebContentsImpl::RenderWidgetWasResized(
|
||||
width_changed);
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ index 4845fcd9286daabcf8cbf404439ab54a6c631193..383d6884871b0d2fed35891cce00a844
|
||||
const gfx::PointF& client_pt);
|
||||
void PreHandleDragExit();
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 4083a3de23b451fa41cf20d8ebd5f7e9e2b5327a..52c09b87d6f844e2bd617301162b2cd3f738dc62 100644
|
||||
index fde24980f7eefd2696a9094bdb97787909955ae9..fccd564720c8d9ba33dd99600f88fd704f618d50 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -127,6 +127,12 @@ bool WebContentsDelegate::HandleContextMenu(RenderFrameHost& render_frame_host,
|
||||
@@ -126,6 +126,12 @@ bool WebContentsDelegate::HandleContextMenu(RenderFrameHost& render_frame_host,
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't
|
||||
necessary.
|
||||
|
||||
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
|
||||
index 14c435521cd5c648de4339411e0ee50d51c8fccc..1adf43e188873679637c9de32bc52368c1797207 100644
|
||||
index d06e9d928188d7c301303f260a14f8fd22c80e95..5a9fe035813644e461b6de488c897a401fd030a5 100644
|
||||
--- a/testing/variations/fieldtrial_testing_config.json
|
||||
+++ b/testing/variations/fieldtrial_testing_config.json
|
||||
@@ -25805,6 +25805,21 @@
|
||||
@@ -25718,6 +25718,21 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 8d410e1ad809aee1144258af987bc4cc217d20b5..6d2da1292c127cbe2fbec2b513c2467f81f4ca2e 100644
|
||||
index 16057c4a0ed0f700262c1c5835ca93a1db96bf6f..7d87c92682e4f7b5e5ee5e51850ce57eaf5d0cf2 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1155,11 +1155,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1154,11 +1154,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabledOnRoot() {
|
||||
|
||||
@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index c42299a4faf470a1f0b4b0bd3de70fa9c4e39486..8bbf6800a7932b80c9690df23799e3795a3dea74 100644
|
||||
index 760c3a7fbab76a4c2906bf9709c01692180e6bde..fb74021c2f5cd57f8b6456e1010bcedc721eee40 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1934,6 +1934,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index a91722d82e5a323e920e47f059d8eaeaa859548e..5a3d9fbb0c5f79e0186a34131aced7a5043daf15 100644
|
||||
index 0cf6d5f9664c954d412c7da4e627b101df735dfa..ef430ff64b8991846ff1c7ebd6286e99dd7fa9e8 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4197,6 +4197,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -4196,6 +4196,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index a91722d82e5a323e920e47f059d8eaeaa859548e..5a3d9fbb0c5f79e0186a34131aced7a5
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -4207,6 +4214,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -4206,6 +4213,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index b74d60be535635e21cee43072d4f4c350db3bbdb..50a5c66a5055000daaf74c4aedf2b348c2caff5c 100644
|
||||
index cfdc9df76570275735182d2b23adbd80687d0873..ac451f421efa6fe110034e2b4e61c826e48bfbe3 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9038,6 +9038,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -9040,6 +9040,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ index b74d60be535635e21cee43072d4f4c350db3bbdb..50a5c66a5055000daaf74c4aedf2b348
|
||||
if (had_fullscreen_token && !GetView()->HasFocus()) {
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 5a3d9fbb0c5f79e0186a34131aced7a5043daf15..f5caa812e038c573f4aa90b3f048f2053abd41df 100644
|
||||
index ef430ff64b8991846ff1c7ebd6286e99dd7fa9e8..8a6b52041682ac02a1447485aac7540e60bf72ca 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4497,21 +4497,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
@@ -4496,21 +4496,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
@@ -80,7 +80,7 @@ index 5a3d9fbb0c5f79e0186a34131aced7a5043daf15..f5caa812e038c573f4aa90b3f048f205
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -4670,7 +4674,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -4669,7 +4673,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
chore_allow_customizing_microtask_policy_per_context.patch
|
||||
cherry-pick-978f2b8a73fd.patch
|
||||
|
||||
339
patches/v8/cherry-pick-978f2b8a73fd.patch
Normal file
339
patches/v8/cherry-pick-978f2b8a73fd.patch
Normal file
@@ -0,0 +1,339 @@
|
||||
From 978f2b8a73fdc1c6d17fa5966dee81393e2f1533 Mon Sep 17 00:00:00 2001
|
||||
From: Toon Verwaest <verwaest@chromium.org>
|
||||
Date: Tue, 25 Nov 2025 17:37:52 +0100
|
||||
Subject: [PATCH] Fix class member initializer reparsing logic
|
||||
|
||||
Intertwined static / public member initializers can mix up ids, so unmix them.
|
||||
|
||||
Bug: 458914193
|
||||
Change-Id: If0708b56750a92e03eaa5530cfbff295c2acf630
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7203465
|
||||
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
|
||||
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
|
||||
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#103958}
|
||||
---
|
||||
|
||||
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
||||
index c0438fe..b476498 100644
|
||||
--- a/src/ast/scopes.cc
|
||||
+++ b/src/ast/scopes.cc
|
||||
@@ -1448,7 +1448,7 @@
|
||||
// Functions which force eager compilation and class member initializer
|
||||
// functions are not lazily compilable.
|
||||
return !force_eager_compilation_ &&
|
||||
- !IsClassMembersInitializerFunction(function_kind());
|
||||
+ !IsClassInitializerFunction(function_kind());
|
||||
}
|
||||
|
||||
int Scope::ContextChainLength(Scope* scope) const {
|
||||
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
||||
index 4b0a708..2698b64 100644
|
||||
--- a/src/ast/scopes.h
|
||||
+++ b/src/ast/scopes.h
|
||||
@@ -996,7 +996,7 @@
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
|
||||
bool should_ban_arguments() const {
|
||||
- return IsClassMembersInitializerFunction(function_kind());
|
||||
+ return IsClassInitializerFunction(function_kind());
|
||||
}
|
||||
|
||||
void set_module_has_toplevel_await() {
|
||||
diff --git a/src/objects/call-site-info.cc b/src/objects/call-site-info.cc
|
||||
index eb9137c..f0a390c 100644
|
||||
--- a/src/objects/call-site-info.cc
|
||||
+++ b/src/objects/call-site-info.cc
|
||||
@@ -467,7 +467,7 @@
|
||||
DirectHandle<JSFunction> function(Cast<JSFunction>(info->function()),
|
||||
isolate);
|
||||
// Class members initializer function is not a method.
|
||||
- if (IsClassMembersInitializerFunction(function->shared()->kind())) {
|
||||
+ if (IsClassInitializerFunction(function->shared()->kind())) {
|
||||
return isolate->factory()->null_value();
|
||||
}
|
||||
|
||||
diff --git a/src/objects/function-kind.h b/src/objects/function-kind.h
|
||||
index 9a1a64f..148109a 100644
|
||||
--- a/src/objects/function-kind.h
|
||||
+++ b/src/objects/function-kind.h
|
||||
@@ -58,11 +58,13 @@
|
||||
kConciseMethod,
|
||||
kStaticConciseMethod,
|
||||
kClassMembersInitializerFunction,
|
||||
+ kClassMembersInitializerFunctionPrecededByStatic,
|
||||
kClassStaticInitializerFunction,
|
||||
+ kClassStaticInitializerFunctionPrecededByMember,
|
||||
// END concise methods 2
|
||||
kInvalid,
|
||||
|
||||
- kLastFunctionKind = kClassStaticInitializerFunction,
|
||||
+ kLastFunctionKind = kClassStaticInitializerFunctionPrecededByMember,
|
||||
};
|
||||
|
||||
constexpr int kFunctionKindBitSize = 5;
|
||||
@@ -105,8 +107,9 @@
|
||||
inline bool IsConciseMethod(FunctionKind kind) {
|
||||
return base::IsInRange(kind, FunctionKind::kAsyncConciseMethod,
|
||||
FunctionKind::kStaticAsyncConciseGeneratorMethod) ||
|
||||
- base::IsInRange(kind, FunctionKind::kConciseGeneratorMethod,
|
||||
- FunctionKind::kClassStaticInitializerFunction);
|
||||
+ base::IsInRange(
|
||||
+ kind, FunctionKind::kConciseGeneratorMethod,
|
||||
+ FunctionKind::kClassStaticInitializerFunctionPrecededByMember);
|
||||
}
|
||||
|
||||
inline bool IsStrictFunctionWithoutPrototype(FunctionKind kind) {
|
||||
@@ -114,8 +117,9 @@
|
||||
FunctionKind::kAsyncArrowFunction) ||
|
||||
base::IsInRange(kind, FunctionKind::kAsyncConciseMethod,
|
||||
FunctionKind::kStaticAsyncConciseGeneratorMethod) ||
|
||||
- base::IsInRange(kind, FunctionKind::kConciseGeneratorMethod,
|
||||
- FunctionKind::kClassStaticInitializerFunction);
|
||||
+ base::IsInRange(
|
||||
+ kind, FunctionKind::kConciseGeneratorMethod,
|
||||
+ FunctionKind::kClassStaticInitializerFunctionPrecededByMember);
|
||||
}
|
||||
|
||||
inline bool IsGetterFunction(FunctionKind kind) {
|
||||
@@ -153,9 +157,22 @@
|
||||
FunctionKind::kDerivedConstructor);
|
||||
}
|
||||
|
||||
-inline bool IsClassMembersInitializerFunction(FunctionKind kind) {
|
||||
- return base::IsInRange(kind, FunctionKind::kClassMembersInitializerFunction,
|
||||
- FunctionKind::kClassStaticInitializerFunction);
|
||||
+inline bool IsClassInitializerFunction(FunctionKind kind) {
|
||||
+ return base::IsInRange(
|
||||
+ kind, FunctionKind::kClassMembersInitializerFunction,
|
||||
+ FunctionKind::kClassStaticInitializerFunctionPrecededByMember);
|
||||
+}
|
||||
+
|
||||
+inline bool IsClassInstanceInitializerFunction(FunctionKind kind) {
|
||||
+ return base::IsInRange(
|
||||
+ kind, FunctionKind::kClassMembersInitializerFunction,
|
||||
+ FunctionKind::kClassMembersInitializerFunctionPrecededByStatic);
|
||||
+}
|
||||
+
|
||||
+inline bool IsClassStaticInitializerFunction(FunctionKind kind) {
|
||||
+ return base::IsInRange(
|
||||
+ kind, FunctionKind::kClassStaticInitializerFunction,
|
||||
+ FunctionKind::kClassStaticInitializerFunctionPrecededByMember);
|
||||
}
|
||||
|
||||
inline bool IsConstructable(FunctionKind kind) {
|
||||
@@ -172,6 +189,7 @@
|
||||
case FunctionKind::kStaticAsyncConciseMethod:
|
||||
case FunctionKind::kStaticAsyncConciseGeneratorMethod:
|
||||
case FunctionKind::kClassStaticInitializerFunction:
|
||||
+ case FunctionKind::kClassStaticInitializerFunctionPrecededByMember:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -217,6 +235,10 @@
|
||||
return "ClassMembersInitializerFunction";
|
||||
case FunctionKind::kClassStaticInitializerFunction:
|
||||
return "ClassStaticInitializerFunction";
|
||||
+ case FunctionKind::kClassMembersInitializerFunctionPrecededByStatic:
|
||||
+ return "ClassMembersInitializerFunctionPrecededByStatic";
|
||||
+ case FunctionKind::kClassStaticInitializerFunctionPrecededByMember:
|
||||
+ return "ClassStaticInitializerFunctionPrecededByMember";
|
||||
case FunctionKind::kDefaultBaseConstructor:
|
||||
return "DefaultBaseConstructor";
|
||||
case FunctionKind::kDefaultDerivedConstructor:
|
||||
diff --git a/src/objects/shared-function-info.cc b/src/objects/shared-function-info.cc
|
||||
index e8877a4..748cde9 100644
|
||||
--- a/src/objects/shared-function-info.cc
|
||||
+++ b/src/objects/shared-function-info.cc
|
||||
@@ -344,8 +344,8 @@
|
||||
}
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
FunctionKind function_kind = shared->kind();
|
||||
- if (IsClassMembersInitializerFunction(function_kind)) {
|
||||
- return function_kind == FunctionKind::kClassMembersInitializerFunction
|
||||
+ if (IsClassInitializerFunction(function_kind)) {
|
||||
+ return IsClassInstanceInitializerFunction(function_kind)
|
||||
? isolate->factory()->instance_members_initializer_string()
|
||||
: isolate->factory()->static_initializer_string();
|
||||
}
|
||||
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
|
||||
index dddf315..bf412c9 100644
|
||||
--- a/src/parsing/parser-base.h
|
||||
+++ b/src/parsing/parser-base.h
|
||||
@@ -310,7 +310,10 @@
|
||||
|
||||
void SkipInfos(int delta) { info_id_ += delta; }
|
||||
|
||||
- void ResetInfoId() { info_id_ = 0; }
|
||||
+ void ResetInfoId(int id = 0) {
|
||||
+ DCHECK_LE(0, id);
|
||||
+ info_id_ = id;
|
||||
+ }
|
||||
|
||||
// The Zone where the parsing outputs are stored.
|
||||
Zone* main_zone() const { return ast_value_factory()->single_parse_zone(); }
|
||||
@@ -628,8 +631,11 @@
|
||||
DeclarationScope* EnsureStaticElementsScope(ParserBase* parser, int beg_pos,
|
||||
int info_id) {
|
||||
if (!has_static_elements()) {
|
||||
- static_elements_scope = parser->NewFunctionScope(
|
||||
- FunctionKind::kClassStaticInitializerFunction);
|
||||
+ FunctionKind kind =
|
||||
+ has_instance_members()
|
||||
+ ? FunctionKind::kClassStaticInitializerFunctionPrecededByMember
|
||||
+ : FunctionKind::kClassStaticInitializerFunction;
|
||||
+ static_elements_scope = parser->NewFunctionScope(kind);
|
||||
static_elements_scope->SetLanguageMode(LanguageMode::kStrict);
|
||||
static_elements_scope->set_start_position(beg_pos);
|
||||
static_elements_function_id = info_id;
|
||||
@@ -643,8 +649,11 @@
|
||||
DeclarationScope* EnsureInstanceMembersScope(ParserBase* parser,
|
||||
int beg_pos, int info_id) {
|
||||
if (!has_instance_members()) {
|
||||
- instance_members_scope = parser->NewFunctionScope(
|
||||
- FunctionKind::kClassMembersInitializerFunction);
|
||||
+ FunctionKind kind =
|
||||
+ has_static_elements()
|
||||
+ ? FunctionKind::kClassMembersInitializerFunctionPrecededByStatic
|
||||
+ : FunctionKind::kClassMembersInitializerFunction;
|
||||
+ instance_members_scope = parser->NewFunctionScope(kind);
|
||||
instance_members_scope->SetLanguageMode(LanguageMode::kStrict);
|
||||
instance_members_scope->set_start_position(beg_pos);
|
||||
instance_members_function_id = info_id;
|
||||
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
|
||||
index 1ee48a3..d6cd244 100644
|
||||
--- a/src/parsing/parser.cc
|
||||
+++ b/src/parsing/parser.cc
|
||||
@@ -1063,7 +1063,7 @@
|
||||
|
||||
FunctionKind function_kind = flags().function_kind();
|
||||
FunctionLiteral* result;
|
||||
- if (V8_UNLIKELY(IsClassMembersInitializerFunction(function_kind))) {
|
||||
+ if (V8_UNLIKELY(IsClassInitializerFunction(function_kind))) {
|
||||
// Reparsing of class member initializer functions has to be handled
|
||||
// specially because they require reparsing of the whole class body,
|
||||
// function start/end positions correspond to the class literal body
|
||||
@@ -1118,9 +1118,7 @@
|
||||
DCHECK(ast_value_factory());
|
||||
fni_.PushEnclosingName(raw_name);
|
||||
|
||||
- ResetInfoId();
|
||||
- DCHECK_LT(0, function_literal_id);
|
||||
- SkipInfos(function_literal_id - 1);
|
||||
+ ResetInfoId(function_literal_id - 1);
|
||||
|
||||
ScopedModification<Mode> mode_scope(&mode_, PARSE_EAGERLY);
|
||||
|
||||
@@ -1256,10 +1254,6 @@
|
||||
DCHECK_NOT_NULL(nearest_decl_scope);
|
||||
FunctionState function_state(&function_state_, &scope_, nearest_decl_scope);
|
||||
|
||||
- // We will reindex the function literals later.
|
||||
- ResetInfoId();
|
||||
- SkipInfos(initializer_id - 1);
|
||||
-
|
||||
// We preparse the class members that are not fields with initializers
|
||||
// in order to collect the function literal ids.
|
||||
ScopedModification<Mode> mode_scope(&mode_, PARSE_LAZILY);
|
||||
@@ -1304,9 +1298,43 @@
|
||||
scope()->MarkReparsingForClassInitializer();
|
||||
#endif
|
||||
|
||||
+ // Class members for instance and static fields can be intertwined. For
|
||||
+ // example, in `class { a; static {}; b; static {} }` (where `a` and `b` are
|
||||
+ // instance fields, and `static {}` are static initialization blocks), the
|
||||
+ // initial parse might assign function literal IDs as follows:
|
||||
+ // - Instance members initializer (for `a` and `b`): ID 1
|
||||
+ // - Static members initializer (for `static {}` blocks): ID 2
|
||||
+ //
|
||||
+ // When we reparse a specific initializer (e.g., the static members
|
||||
+ // initializer, ID 2), we must ensure that the scope for the "other" kind of
|
||||
+ // initializer (e.g., the instance members initializer, ID 1) is
|
||||
+ // pre-allocated if it lexically precedes the current one.
|
||||
+ //
|
||||
+ // If the instance scope (ID 1) is not pre-allocated:
|
||||
+ // 1. The parser processes the first `static {}` block. It allocates the
|
||||
+ // static scope with the correct ID (ID 2), as that is the next available
|
||||
+ // ID after skipping.
|
||||
+ // 2. The parser continues and encounters `b`. Since no instance scope
|
||||
+ // exists yet, it lazily allocates one.
|
||||
+ // 3. This new instance scope takes the *next* available ID, which is ID 3.
|
||||
+ // However, ID 3 might not exist (overrunning the range) or might belong
|
||||
+ // to a subsequent function, causing a shift/mismatch.
|
||||
+ //
|
||||
+ // Pre-allocating the preceding scope (ID 1) ensures it exists before the
|
||||
+ // parser encounters `b`, preventing the incorrect allocation of a new ID.
|
||||
+
|
||||
+ if (initializer_kind ==
|
||||
+ FunctionKind::kClassMembersInitializerFunctionPrecededByStatic) {
|
||||
+ class_info.EnsureStaticElementsScope(this, kNoSourcePosition, -1);
|
||||
+ } else if (initializer_kind ==
|
||||
+ FunctionKind::kClassStaticInitializerFunctionPrecededByMember) {
|
||||
+ class_info.EnsureInstanceMembersScope(this, kNoSourcePosition, -1);
|
||||
+ }
|
||||
+ ResetInfoId(initializer_id - 1);
|
||||
+
|
||||
ParseClassLiteralBody(class_info, class_name, class_token_pos, Token::kEos);
|
||||
|
||||
- if (initializer_kind == FunctionKind::kClassMembersInitializerFunction) {
|
||||
+ if (IsClassInstanceInitializerFunction(initializer_kind)) {
|
||||
DCHECK_EQ(class_info.instance_members_function_id, initializer_id);
|
||||
initializer = CreateInstanceMembersInitializer(class_name, &class_info);
|
||||
} else {
|
||||
@@ -1318,7 +1346,7 @@
|
||||
|
||||
if (has_error()) return nullptr;
|
||||
|
||||
- DCHECK(IsClassMembersInitializerFunction(initializer_kind));
|
||||
+ DCHECK(IsClassInitializerFunction(initializer_kind));
|
||||
|
||||
no_expression_scope.ValidateExpression();
|
||||
|
||||
@@ -3348,7 +3376,7 @@
|
||||
FunctionLiteral* Parser::CreateInitializerFunction(
|
||||
const AstRawString* class_name, DeclarationScope* scope,
|
||||
int function_literal_id, Statement* initializer_stmt) {
|
||||
- DCHECK(IsClassMembersInitializerFunction(scope->function_kind()));
|
||||
+ DCHECK(IsClassInitializerFunction(scope->function_kind()));
|
||||
// function() { .. class fields initializer .. }
|
||||
ScopedPtrList<Statement> statements(pointer_buffer());
|
||||
statements.Add(initializer_stmt);
|
||||
diff --git a/src/tracing/code-data-source.cc b/src/tracing/code-data-source.cc
|
||||
index 7d4f0dd..177a8f8 100644
|
||||
--- a/src/tracing/code-data-source.cc
|
||||
+++ b/src/tracing/code-data-source.cc
|
||||
@@ -108,8 +108,10 @@
|
||||
case FunctionKind::kStaticConciseMethod:
|
||||
return InternedV8JsFunction::KIND_STATIC_CONCISE_METHOD;
|
||||
case FunctionKind::kClassMembersInitializerFunction:
|
||||
+ case FunctionKind::kClassMembersInitializerFunctionPrecededByStatic:
|
||||
return InternedV8JsFunction::KIND_CLASS_MEMBERS_INITIALIZER_FUNCTION;
|
||||
case FunctionKind::kClassStaticInitializerFunction:
|
||||
+ case FunctionKind::kClassStaticInitializerFunctionPrecededByMember:
|
||||
return InternedV8JsFunction::KIND_CLASS_STATIC_INITIALIZER_FUNCTION;
|
||||
case FunctionKind::kInvalid:
|
||||
return InternedV8JsFunction::KIND_INVALID;
|
||||
diff --git a/test/unittests/objects/object-unittest.cc b/test/unittests/objects/object-unittest.cc
|
||||
index e3c7d92..18032ea 100644
|
||||
--- a/test/unittests/objects/object-unittest.cc
|
||||
+++ b/test/unittests/objects/object-unittest.cc
|
||||
@@ -575,6 +575,9 @@
|
||||
case FunctionKind::kAsyncConciseGeneratorMethod:
|
||||
case FunctionKind::kStaticAsyncConciseGeneratorMethod:
|
||||
case FunctionKind::kClassMembersInitializerFunction:
|
||||
+ case FunctionKind::kClassMembersInitializerFunctionPrecededByStatic:
|
||||
+ case FunctionKind::kClassStaticInitializerFunction:
|
||||
+ case FunctionKind::kClassStaticInitializerFunctionPrecededByMember:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -661,6 +664,9 @@
|
||||
case FunctionKind::kConciseMethod:
|
||||
case FunctionKind::kStaticConciseMethod:
|
||||
case FunctionKind::kClassMembersInitializerFunction:
|
||||
+ case FunctionKind::kClassMembersInitializerFunctionPrecededByStatic:
|
||||
+ case FunctionKind::kClassStaticInitializerFunction:
|
||||
+ case FunctionKind::kClassStaticInitializerFunctionPrecededByMember:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
@@ -49,10 +49,10 @@ index 243919ba101c637887b2a964e45be0096798873b..c1597ee84a3a84a1c5e556eb31c4d3e1
|
||||
options, CaptureType::kAnyScreenContent);
|
||||
}
|
||||
diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc
|
||||
index 361b465dad2a53f4dac774fa2d6d6d9e3fc5fc31..ef05a35bc4f2c2352b12c0af0b09193b6cd53244 100644
|
||||
index 6cb394f9430f88c5036d19587e4655b8d0760c76..613c3fa6380828dd6537e20c87aac764bfdcd6c8 100644
|
||||
--- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc
|
||||
+++ b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc
|
||||
@@ -123,6 +123,7 @@ void BaseCapturerPipeWire::OnScreenCastRequestResult(RequestResponse result,
|
||||
@@ -126,6 +126,7 @@ void BaseCapturerPipeWire::OnScreenCastRequestResult(RequestResponse result,
|
||||
void BaseCapturerPipeWire::OnScreenCastSessionClosed() {
|
||||
if (!capturer_failed_) {
|
||||
options_.screencast_stream()->StopScreenCastStream();
|
||||
|
||||
@@ -147,7 +147,8 @@ base::flat_map<int32_t, uint32_t> MonitorAtomIdToDisplayId() {
|
||||
std::unique_ptr<ThumbnailCapturer> MakeWindowCapturer() {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
if (ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kWindow)) {
|
||||
return CreateThumbnailCapturerMac(DesktopMediaList::Type::kWindow);
|
||||
return CreateThumbnailCapturerMac(DesktopMediaList::Type::kWindow,
|
||||
/*web_contents=*/nullptr);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC)
|
||||
|
||||
@@ -162,7 +163,8 @@ std::unique_ptr<ThumbnailCapturer> MakeWindowCapturer() {
|
||||
std::unique_ptr<ThumbnailCapturer> MakeScreenCapturer() {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
if (ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kScreen)) {
|
||||
return CreateThumbnailCapturerMac(DesktopMediaList::Type::kScreen);
|
||||
return CreateThumbnailCapturerMac(DesktopMediaList::Type::kScreen,
|
||||
/*web_contents=*/nullptr);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
|
||||
#include "components/proxy_config/proxy_config_dictionary.h"
|
||||
#include "components/proxy_config/proxy_config_pref_names.h"
|
||||
#include "components/supervised_user/core/browser/device_parental_controls_noop_impl.h" // nogncheck
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
#include "content/public/browser/network_quality_observer_factory.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
@@ -251,6 +252,18 @@ BrowserProcessImpl::background_printing_manager() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
supervised_user::DeviceParentalControls&
|
||||
BrowserProcessImpl::device_parental_controls() {
|
||||
if (!device_parental_controls_)
|
||||
device_parental_controls_ =
|
||||
std::make_unique<supervised_user::DeviceParentalControlsNoOpImpl>();
|
||||
return *device_parental_controls_;
|
||||
}
|
||||
|
||||
activity_reporter::ActivityReporter* BrowserProcessImpl::activity_reporter() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
IntranetRedirectDetector* BrowserProcessImpl::intranet_redirect_detector() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,9 @@ class BrowserProcessImpl : public BrowserProcess {
|
||||
printing::PrintPreviewDialogController* print_preview_dialog_controller()
|
||||
override;
|
||||
printing::BackgroundPrintingManager* background_printing_manager() override;
|
||||
activity_reporter::ActivityReporter* activity_reporter() override;
|
||||
IntranetRedirectDetector* intranet_redirect_detector() override;
|
||||
supervised_user::DeviceParentalControls& device_parental_controls() override;
|
||||
DownloadStatusUpdater* download_status_updater() override;
|
||||
DownloadRequestLimiter* download_request_limiter() override;
|
||||
BackgroundModeManager* background_mode_manager() override;
|
||||
@@ -162,6 +164,8 @@ class BrowserProcessImpl : public BrowserProcess {
|
||||
std::unique_ptr<
|
||||
network::NetworkQualityTracker::RTTAndThroughputEstimatesObserver>
|
||||
network_quality_observer_;
|
||||
std::unique_ptr<supervised_user::DeviceParentalControls>
|
||||
device_parental_controls_;
|
||||
|
||||
std::unique_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_;
|
||||
};
|
||||
|
||||
@@ -140,31 +140,25 @@ gin_helper::internal::Event* ElectronApiIPCHandlerImpl::MakeIPCEvent(
|
||||
bool internal,
|
||||
electron::mojom::ElectronApiIPC::InvokeCallback callback) {
|
||||
if (!session) {
|
||||
if (callback) {
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::Create(isolate, std::move(callback))
|
||||
->SendError("Session does not exist");
|
||||
}
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::SendError(isolate, std::move(callback),
|
||||
"Session does not exist");
|
||||
return {};
|
||||
}
|
||||
|
||||
api::WebContents* api_web_contents = api::WebContents::From(web_contents());
|
||||
if (!api_web_contents) {
|
||||
if (callback) {
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::Create(isolate, std::move(callback))
|
||||
->SendError("WebContents does not exist");
|
||||
}
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::SendError(isolate, std::move(callback),
|
||||
"WebContents does not exist");
|
||||
return {};
|
||||
}
|
||||
|
||||
v8::Local<v8::Object> wrapper;
|
||||
if (!api_web_contents->GetWrapper(isolate).ToLocal(&wrapper)) {
|
||||
if (callback) {
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::Create(isolate, std::move(callback))
|
||||
->SendError("WebContents was destroyed");
|
||||
}
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::SendError(isolate, std::move(callback),
|
||||
"WebContents was destroyed");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -159,11 +159,9 @@ gin_helper::internal::Event* ElectronApiSWIPCHandlerImpl::MakeIPCEvent(
|
||||
bool internal,
|
||||
electron::mojom::ElectronApiIPC::InvokeCallback callback) {
|
||||
if (!session) {
|
||||
if (callback) {
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::Create(isolate, std::move(callback))
|
||||
->SendError("Session does not exist");
|
||||
}
|
||||
// We must always invoke the callback if present.
|
||||
gin_helper::internal::ReplyChannel::SendError(isolate, std::move(callback),
|
||||
"Session does not exist");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -685,9 +685,10 @@ void ElectronBrowserContext::DisplayMediaDeviceChosen(
|
||||
blink::mojom::StreamDevicesSet::New();
|
||||
v8::Local<v8::Value> result;
|
||||
if (!args->GetNext(&result) || result->IsNullOrUndefined()) {
|
||||
std::move(callback).Run(
|
||||
blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::CAPTURE_FAILURE, nullptr);
|
||||
std::move(callback).Run(blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::
|
||||
INVALID_DISPLAY_CAPTURE_CONSTRAINTS,
|
||||
nullptr);
|
||||
return;
|
||||
}
|
||||
gin_helper::Dictionary result_dict;
|
||||
@@ -695,9 +696,10 @@ void ElectronBrowserContext::DisplayMediaDeviceChosen(
|
||||
args->ThrowTypeError(
|
||||
"Display Media Request streams callback must be called with null "
|
||||
"or a valid object");
|
||||
std::move(callback).Run(
|
||||
blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::CAPTURE_FAILURE, nullptr);
|
||||
std::move(callback).Run(blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::
|
||||
INVALID_DISPLAY_CAPTURE_CONSTRAINTS,
|
||||
nullptr);
|
||||
return;
|
||||
}
|
||||
stream_devices_set->stream_devices.emplace_back(
|
||||
@@ -735,9 +737,10 @@ void ElectronBrowserContext::DisplayMediaDeviceChosen(
|
||||
} else {
|
||||
args->ThrowTypeError(
|
||||
"video must be a WebFrameMain or DesktopCapturerSource");
|
||||
std::move(callback).Run(
|
||||
blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::CAPTURE_FAILURE, nullptr);
|
||||
std::move(callback).Run(blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::
|
||||
INVALID_DISPLAY_CAPTURE_CONSTRAINTS,
|
||||
nullptr);
|
||||
return;
|
||||
}
|
||||
has_video = true;
|
||||
@@ -784,9 +787,10 @@ void ElectronBrowserContext::DisplayMediaDeviceChosen(
|
||||
args->ThrowTypeError(
|
||||
"audio must be a WebFrameMain, \"loopback\" or "
|
||||
"\"loopbackWithMute\"");
|
||||
std::move(callback).Run(
|
||||
blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::CAPTURE_FAILURE, nullptr);
|
||||
std::move(callback).Run(blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::
|
||||
INVALID_DISPLAY_CAPTURE_CONSTRAINTS,
|
||||
nullptr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -794,9 +798,10 @@ void ElectronBrowserContext::DisplayMediaDeviceChosen(
|
||||
if ((video_requested && !has_video)) {
|
||||
args->ThrowTypeError(
|
||||
"Video was requested, but no video stream was provided");
|
||||
std::move(callback).Run(
|
||||
blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::CAPTURE_FAILURE, nullptr);
|
||||
std::move(callback).Run(blink::mojom::StreamDevicesSet(),
|
||||
blink::mojom::MediaStreamRequestResult::
|
||||
INVALID_DISPLAY_CAPTURE_CONSTRAINTS,
|
||||
nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,13 @@ void InitializeFeatureList() {
|
||||
// See https://chromium-review.googlesource.com/c/chromium/src/+/6910012
|
||||
// Needed until we rework some of our logic and checks to enable this
|
||||
// properly.
|
||||
std::string(",") + network::features::kLocalNetworkAccessChecks.name;
|
||||
std::string(",") + network::features::kLocalNetworkAccessChecks.name +
|
||||
// See 4803165: Enable suppressing input event dispatch while
|
||||
// paint-holding. Needed to prevent spurious input event handling
|
||||
// failures.
|
||||
// TODO(codebytere): Figure out how to properly wait for paint-hold.
|
||||
std::string(",") +
|
||||
blink::features::kDropInputEventsWhilePaintHolding.name;
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Refs https://issues.chromium.org/issues/401996981
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/net_buildflags.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
|
||||
#include "services/network/public/cpp/cors/origin_access_list.h"
|
||||
#include "shell/browser/browser_process_impl.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
@@ -115,18 +114,6 @@ void NetworkContextService::ConfigureNetworkContextParams(
|
||||
network_context_params->enable_encrypted_cookies =
|
||||
electron::fuses::IsCookieEncryptionEnabled();
|
||||
|
||||
// If cookie encryption is enabled, we need to provide a cookie encryption
|
||||
// provider for the network service to use.
|
||||
if (network_context_params->enable_encrypted_cookies) {
|
||||
if (!cookie_encryption_provider_) {
|
||||
cookie_encryption_provider_ =
|
||||
std::make_unique<CookieEncryptionProviderImpl>(
|
||||
g_browser_process->os_crypt_async());
|
||||
}
|
||||
network_context_params->cookie_encryption_provider =
|
||||
cookie_encryption_provider_->BindNewRemote();
|
||||
}
|
||||
|
||||
network_context_params->file_paths->transport_security_persister_file_name =
|
||||
base::FilePath(chrome::kTransportSecurityPersisterFilename);
|
||||
}
|
||||
|
||||
@@ -5,16 +5,12 @@
|
||||
#ifndef ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
|
||||
#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "chrome/browser/net/proxy_config_monitor.h"
|
||||
#include "components/keyed_service/core/keyed_service.h"
|
||||
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom-forward.h"
|
||||
#include "services/network/public/mojom/network_context.mojom-forward.h"
|
||||
|
||||
class CookieEncryptionProviderImpl;
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
} // namespace base
|
||||
@@ -50,7 +46,6 @@ class NetworkContextService : public KeyedService {
|
||||
|
||||
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||
ProxyConfigMonitor proxy_config_monitor_;
|
||||
std::unique_ptr<CookieEncryptionProviderImpl> cookie_encryption_provider_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -37,30 +37,44 @@ ReplyChannel::ReplyChannel(InvokeCallback callback)
|
||||
|
||||
ReplyChannel::~ReplyChannel() {
|
||||
if (callback_)
|
||||
SendError("reply was never sent");
|
||||
SendError(electron::JavascriptEnvironment::GetIsolate(),
|
||||
std::move(callback_), "reply was never sent");
|
||||
}
|
||||
|
||||
void ReplyChannel::SendError(const std::string& msg) {
|
||||
v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
|
||||
// If there's no current context, it means we're shutting down, so we
|
||||
// don't need to send an event.
|
||||
v8::HandleScope scope(isolate);
|
||||
if (!isolate->GetCurrentContext().IsEmpty()) {
|
||||
auto message = gin::DataObjectBuilder(isolate).Set("error", msg).Build();
|
||||
SendReply(isolate, message);
|
||||
}
|
||||
// static
|
||||
void ReplyChannel::SendError(v8::Isolate* isolate,
|
||||
InvokeCallback callback,
|
||||
std::string_view const errmsg) {
|
||||
if (!callback)
|
||||
return;
|
||||
|
||||
// If there's no current context, it means we're shutting down,
|
||||
// so we don't need to send an event.
|
||||
v8::HandleScope scope{isolate};
|
||||
if (isolate->GetCurrentContext().IsEmpty())
|
||||
return;
|
||||
|
||||
SendReplyImpl(isolate, std::move(callback),
|
||||
gin::DataObjectBuilder(isolate).Set("error", errmsg).Build());
|
||||
}
|
||||
|
||||
// static
|
||||
bool ReplyChannel::SendReplyImpl(v8::Isolate* isolate,
|
||||
InvokeCallback callback,
|
||||
v8::Local<v8::Value> arg) {
|
||||
if (!callback)
|
||||
return false;
|
||||
|
||||
blink::CloneableMessage msg;
|
||||
if (!gin::ConvertFromV8(isolate, arg, &msg))
|
||||
return false;
|
||||
|
||||
std::move(callback).Run(std::move(msg));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReplyChannel::SendReply(v8::Isolate* isolate, v8::Local<v8::Value> arg) {
|
||||
if (!callback_)
|
||||
return false;
|
||||
blink::CloneableMessage message;
|
||||
if (!gin::ConvertFromV8(isolate, arg, &message)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::move(callback_).Run(std::move(message));
|
||||
return true;
|
||||
return SendReplyImpl(isolate, std::move(callback_), std::move(arg));
|
||||
}
|
||||
|
||||
gin::DeprecatedWrapperInfo ReplyChannel::kWrapperInfo = {
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_REPLY_CHANNEL_H_
|
||||
#define ELECTRON_SHELL_COMMON_GIN_HELPER_REPLY_CHANNEL_H_
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "shell/common/api/api.mojom.h"
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
|
||||
@@ -38,12 +40,19 @@ class ReplyChannel : public gin_helper::DeprecatedWrappable<ReplyChannel> {
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
void SendError(const std::string& msg);
|
||||
// Invokes `callback` (if it's non-null) with `errmsg` as an arg.
|
||||
static void SendError(v8::Isolate* isolate,
|
||||
InvokeCallback callback,
|
||||
std::string_view errmsg);
|
||||
|
||||
private:
|
||||
explicit ReplyChannel(InvokeCallback callback);
|
||||
~ReplyChannel() override;
|
||||
|
||||
static bool SendReplyImpl(v8::Isolate* isolate,
|
||||
InvokeCallback callback,
|
||||
v8::Local<v8::Value> arg);
|
||||
|
||||
bool SendReply(v8::Isolate* isolate, v8::Local<v8::Value> arg);
|
||||
|
||||
InvokeCallback callback_;
|
||||
|
||||
Reference in New Issue
Block a user