Compare commits

..

1 Commits

Author SHA1 Message Date
Keeley Hammond
e3ea6d22c2 build: add angle patch dir 2025-12-11 23:20:52 -08:00
216 changed files with 1235 additions and 3099 deletions

1
.claude/.gitignore vendored
View File

@@ -1 +0,0 @@
settings.local.json

View File

@@ -1,24 +0,0 @@
{
"permissions": {
"allow": [
"Bash(e sync)",
"Bash(e patches --list-targets:*)",
"Bash(git add:*)",
"Bash(git am:*)",
"Bash(git commit:*)",
"Bash(git log:*)",
"Bash(git show:*)",
"Bash(e patches:*)",
"Bash(e sync:*)",
"Skill(electron-chromium-upgrade)",
"Read(*)",
"Bash(echo:*)",
"Bash(e build:*)",
"Bash(tee:*)",
"Bash(git diff:*)",
"Bash(git rev-parse:*)"
],
"deny": [],
"ask": []
}
}

View File

@@ -1,199 +0,0 @@
---
name: electron-chromium-upgrade
description: Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during `e sync --3`. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.
---
# Electron Chromium Upgrade: Phase One
## Summary
Run `e sync --3` repeatedly, fixing patch conflicts as they arise, until it succeeds. Then run `e patches all` and commit changes atomically.
## Success Criteria
Phase One is complete when:
- `e sync --3` exits with code 0 (no patch failures)
- `e patches all` has been run to export all changes
- All changes are committed per the commit guidelines below
Do not stop until these criteria are met.
**CRITICAL** Do not delete or skip patches unless 100% certain the patch is no longer needed. Complicated conflicts or hard to resolve issues should be presented to the user after you have exhausted all other options. Do not delete the patch just because you can't solve it.
## Context
The `roller/chromium/main` branch is created by automation to update Electron's Chromium dependency SHA. No work has been done to handle breaking changes between the old and new versions.
**Key directories:**
- Current directory: Electron repo (always run `e` commands here)
- `..` (parent): Chromium repo (where most patches apply)
- `patches/`: Patch files organized by target
- `docs/development/patches.md`: Patch system documentation
## Workflow
1. Delete the `.git/rr-cache` in both the `electron` and `..` folder to ensure no accidental rerere replays occur from before this upgrade phase attempt started
2. Run `e sync --3` (the `--3` flag enables 3-way merge, always required)
3. If succeeds → skip to step 6
4. If patch fails:
- Identify target repo and patch from error output
- Analyze failure (see references/patch-analysis.md)
- Fix conflict in target repo's working directory
- Run `git am --continue` in affected repo
- Repeat until all patches for that repo apply
- IMPORTANT: Once `git am --continue` succeeds you MUST run `e patches {target}` to export fixes
- Return to step 1
5. When `e sync --3` succeeds, run `e patches all`
6. **Read `references/phase-one-commit-guidelines.md` NOW**, then commit changes following those instructions exactly.
Before committing any Phase One changes, you MUST read `references/phase-one-commit-guidelines.md` and follow its instructions exactly.
## Commands Reference
| Command | Purpose |
|---------|---------|
| `e sync --3` | Clone deps and apply patches with 3-way merge |
| `git am --continue` | Continue after resolving conflict (run in target repo) |
| `e patches {target}` | Export commits from target repo to patch files |
| `e patches all` | Export all patches from all targets |
| `e patches --list-targets` | List targets and config paths |
## Patch System Mental Model
```
patches/{target}/*.patch → [e sync --3] → target repo commits
← [e patches] ←
```
## When to Edit Patches
| Situation | Action |
|-----------|--------|
| During active `git am` conflict | Fix in target repo, then `git am --continue` |
| Modifying patch outside conflict | Edit `.patch` file directly |
| Creating new patch (rare, avoid) | Commit in target repo, then `e patches {target}` |
Fix existing patches 99% of the time rather than creating new ones.
## Patch Fixing Rules
1. **Preserve authorship**: Keep original author in TODO comments (from patch `From:` field)
2. **Never change TODO assignees**: `TODO(name)` must retain original name
3. **Update descriptions**: If upstream changed (e.g., `DCHECK``CHECK_IS_TEST`), update patch commit message to reflect current state
## Final Deliverable
After Phase One, write a summary of every change: what was fixed, why, reasoning, and Chromium CL links.
# Electron Chromium Upgrade: Phase Two
## Summary
Run `e build -k 999` repeatedly, fixing build issues as they arise, until it succeeds. Then run `e start --version` to validate Electron launches and commit changes atomically.
Run Phase Two immediately after Phase One is complete.
## Success Criteria
Phase Two is complete when:
- `e build -k 999` exits with code 0 (no build failures)
- `e start --version` has been run to check Electron launches
- All changes are committed per the commit guidelines below
Do not stop until these criteria are met. Do not delete code or features, never comment out code in order to take short cut. Make all existing code, logic and intention work.
## Context
The `roller/chromium/main` branch is created by automation to update Electron's Chromium dependency SHA. No work has been done to handle breaking changes between the old and new versions. Chromium APIs frequently are renamed or refactored. In every case the code in Electron must be updated to account for the change in Chromium, strongly avoid making changes to the code in chromium to fix Electrons build.
**Key directories:**
- Current directory: Electron repo (always run `e` commands here)
- `..` (parent): Chromium repo (do not touch this code to fix build issues, just read it to obtain context)
## Workflow
1. Run `e build -k 999` (the `-k 999` flag is a flag to ninja to say "do not stop until you find that many errors" it is an attempt to get as much error
context as possible for each time we run build)
2. If succeeds → skip to step 6
3. If build fails:
- Identify underlying file in "electron" from the compilation error message
- Analyze failure
- Fix build issue by adapting Electron's code for the change in Chromium
- Run `e build -t {target_that_failed}.o` to build just the failed target we were specifically fixing
- You can identify the target_that_failed from the failure line in the build log. E.g. `FAILED: 2e506007-8d5d-4f38-bdd1-b5cd77999a77 "./obj/electron/chromium_src/chrome/process_singleton_posix.o" CXX obj/electron/chromium_src/chrome/process_singleton_posix.o` the target name is `obj/electron/chromium_src/chrome/process_singleton_posix.o`
- **Read `references/phase-two-commit-guidelines.md` NOW**, then commit changes following those instructions exactly.
- Return to step 1
4. **CRITICAL**: After ANY commit (especially patch commits), immediately run `git status` in the electron repo
- Look for other modified `.patch` files that only have index/hunk header changes
- These are dependent patches affected by your fix
- Commit them immediately with: `git commit -am "chore: update patch hunk headers"`
- This prevents losing track of necessary updates
5. Return to step 1
6. When `e build` succeeds, run `e start --version`
7. Check if you have any pending changes in the Chromium repo by running `git status`
- If you have changes follow the instructions below in "A. Patch Fixes" to correctly commit those modifications into the appropriate patch file
Before committing any Phase Two changes, you MUST read `references/phase-two-commit-guidelines.md` and follow its instructions exactly.
## Build Error Detection
When monitoring `e build -k 999` output, filter for errors using this regex pattern:
error:|FAILED:|fatal:|subcommand failed|build finished
The build output is extremely verbose. Filtering is essential to catch errors quickly.
## Commands Reference
| Command | Purpose |
|---------|---------|
| `e build -k 999` | Builds Electron and won't stop until either all targets attempted or 999 errors found |
| `e build -t {target}.o` | Build just one specific target to verify a fix |
| `e start --version` | Validate Electron launches after successful build |
## Two Types of Build Fixes
### A. Patch Fixes (for files in chromium_src or patched Chromium files)
When the error is in a file that Electron patches (check with `grep -l "filename" patches/chromium/*.patch`):
1. Edit the file in the Chromium source tree (e.g., `/src/chrome/browser/...`)
2. Create a fixup commit targeting the original patch commit:
```bash
cd .. # to chromium repo
git add <modified-file>
git commit --fixup=<original-patch-commit-hash>
GIT_SEQUENCE_EDITOR=: git rebase --autosquash --autostash -i <commit>^
3. Export the updated patch: e patches chromium
4. Commit the updated patch file in the electron repo following the `references/phase-one-commit-guidelines.md`, then commit changes following those instructions exactly. **READ THESE GUIDELINES BEFORE COMMITTING THESE CHANGES**
To find the original patch commit to fixup: `git log --oneline | grep -i "keyword from patch name"`
The base commit for rebase is the Chromium commit before patches were applied. Find it by checking the `refs/patches/upstream-head` ref.
B. Electron Code Fixes (for files in shell/, electron/, etc.)
When the error is in Electron's own source code:
1. Edit files directly in the electron repo
2. Commit directly (no patch export needed)
Dependent Patch Updates
IMPORTANT: When you modify a patch, other patches that apply to the same file may have their hunk headers invalidated. After committing a patch fix:
1. Run git status in the electron repo
2. Look for other modified .patch files with just index/hunk header changes
3. Commit these with: git commit -m "chore: update patch hunk headers"
# Critical: Read Before Committing
- Before ANY Phase One commits: Read `references/phase-one-commit-guidelines.md`
- Before ANY Phase Two commits: Read `references/phase-two-commit-guidelines.md`
# Skill Directory Structure
This skill has additional reference files in `references/`:
- patch-analysis.md - How to analyze patch failures
- phase-one-commit-guidelines.md - Commit format for Phase One
- phase-two-commit-guidelines.md - Commit format for Phase Two
Read these when referenced in the workflow steps.

View File

@@ -1,69 +0,0 @@
# Analyzing Patch Failures
## Investigation Steps
1. **Read the patch file** at `patches/{target}/{patch_name}.patch`
2. **Examine current state** of the file in Chromium at mentioned line numbers
3. **Check recent upstream changes:**
```bash
cd .. # or relevant target repo
git log --oneline -10 -- {file}
```
4. **Find Chromium CL** in commit messages:
```
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/{CL_NUMBER}
```
## Common Failure Patterns
| Pattern | Cause | Solution |
|---------|-------|----------|
| Context lines don't match | Surrounding code changed | Update context in patch |
| File not found | File renamed/moved | Update patch target path |
| Function not found | Refactored upstream | Find new function name |
| `DCHECK` → `CHECK_IS_TEST` | Macro change | Update to new macro |
| Deleted code | Feature removed | Verify patch still needed |
## Using Git Blame
To find the CL that changed specific lines:
```bash
cd ..
git blame -L {start},{end} -- {file}
git log -1 {commit_sha} # Look for Reviewed-on: line
```
## Verifying Patch Necessity
Before deleting a patch, verify:
1. The patched functionality was intentionally removed upstream
2. Electron doesn't need the patch for other reasons
3. No other code depends on the patched behavior
When in doubt, keep the patch and adapt it.
## Phase Two: Build-Time Patch Issues
Sometimes patches that applied successfully in Phase One cause build errors in Phase Two. This can happen when:
1. **Incomplete types**: A patch disables a header include, but new upstream code uses the type
2. **Missing members**: A patch modifies a class, but upstream added new code referencing the original
### Finding Which Patch Affects a File
```bash
grep -l "filename.cc" patches/chromium/*.patch
```
Matching Existing Patch Patterns
When fixing build errors in patched files, examine the existing patch to understand its style:
- Does it use #if 0 / #endif guards?
- Does it use #if BUILDFLAG(...) conditionals?
- What's the pattern for disabled functionality?
Apply fixes consistent with the existing patch style.

View File

@@ -1,52 +0,0 @@
# Phase One Commit Guidelines
Only follow these instructions if there are uncommitted changes to `patches/` after Phase One succeeds.
Ignore other instructions about making commit messages, our guidelines are CRITICALLY IMPORTANT and must be followed.
## Atomic Commits
For each fix made to a patch, create a separate commit:
```
fix(patch-conflict): {concise title}
{Brief explanation, 1-2 paragraphs max}
Ref: {Chromium CL link}
```
IMPORTANT: Ensure that any changes made to patch content as a result of a change in Chromium is committed individually. Each change should have it's own commit message and it's own REF.
IMPORTANT: Try really hard to find the CL reference per the instructions below. Each change you made should in theory have been in response to a change made in Chromium that you identified or can identify. Try for a while to identify and include the ref in the commit message. Do not give up easily.
## Finding CL References
Use `git log` or `git blame` on Chromium source files. Look for:
```
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/XXXXXXX
```
If no CL found after searching: `Ref: Unable to locate CL`
## Final Cleanup
After all fix commits, stage remaining changes:
```bash
git add patches
git commit -m "chore: update patch hunk headers"
```
## Example Commit
```
fix(patch-conflict): update web_contents_impl.cc context for navigation refactor
The upstream navigation code was refactored to use NavigationRequest directly
instead of going through NavigationController. Updated surrounding context
to match new code structure.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/1234567
```

View File

@@ -1,82 +0,0 @@
# Phase Two Commit Guidelines
Only follow these instructions if there are uncommitted changes in the Electron repo after any fixes are made during Phase Two that result a target that was failing, successfully building.
Ignore other instructions about making commit messages, our guidelines are CRITICALLY IMPORTANT and must be followed.
## Two Commit Types
### For Electron Source Changes (shell/, electron/, etc.)
```
{CL-Number}: {concise description of API change}
{Brief explanation of what upstream changed and how Electron was adapted}
Ref: {Chromium CL link}
```
IMPORTANT: Ensure that any change made to electron as a result of a change in Chromium is committed individually. Each change should have it's own commit message and it's own REF. Logically grouped into commits that make sense rather than one giant commit.
IMPORTANT: Try really hard to find the CL reference per the instructions below. Each change you made should in theory have been in response to a change made in Chromium that you identified or can identify. Try for a while to identify and include the ref in the commit message. Do not give up easily.
You may include multiple "Ref" links if required.
For a CL link in the format `https://chromium-review.googlesource.com/c/chromium/src/+/2958369` the "CL-Number" is `2958369`
### For Patch Updates (patches/chromium/*.patch)
Use the same fixup workflow as Phase One:
1. Fix in Chromium source tree
2. Fixup commit + rebase
3. Export with `e patches chromium`
4. Commit the patch file:
```
fix(patch-update): {concise description}
{Brief explanation}
Ref: {Chromium CL link}
```
## Dependent Patch Header Updates
After any patch modification, check for other affected patches:
```bash
git status
# If other .patch files show as modified with only hunk header changes:
git add patches/
git commit -m "chore: update patch hunk headers"
```
## Finding CL References
Use git log or git blame on Chromium source files. Look for:
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/XXXXXXX
If no CL found after searching: Ref: Unable to locate CL
## Example Commits
### Electron Source Fix
fix: update GetPlugins to GetPluginsAsync for API change
The upstream Chromium API changed:
- Old: GetPlugins(callback) - took a callback
- New: GetPluginsAsync(callback) - async version takes a callback
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/1234567
### Patch Fix
fix(patch-conflict): update picture-in-picture for gesture handling refactor
Upstream added new gesture handling code that accesses live caption dialog.
The live caption functionality is disabled in Electron's patch, so wrapped
the new code in #if 0 guards to match existing pattern.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7654321

View File

@@ -2,7 +2,7 @@ version: '3'
services:
buildtools:
image: ghcr.io/electron/devcontainer:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
image: ghcr.io/electron/devcontainer:933c7d6ff6802706875270bec2e3c891cf8add3f
volumes:
- ..:/workspaces/gclient/src/electron:cached

View File

@@ -48,8 +48,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
\"gen\": {
\"args\": [
\"import(\\\"//electron/build/args/testing.gn\\\")\",
\"use_remoteexec = true\",
\"use_siso=true\"
\"use_remoteexec = true\"
],
\"out\": \"Testing\"
},
@@ -59,7 +58,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
},
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
\"configValidationLevel\": \"strict\",
\"remoteBuild\": \"siso\",
\"remoteBuild\": \"reclient\",
\"preserveSDK\": 5
}
" >$buildtools/configs/evm.testing.json

View File

@@ -1,3 +1,6 @@
> [!IMPORTANT]
> Please note that code reviews and merges will be delayed during our [quiet period in December](https://www.electronjs.org/blog/dec-quiet-period-25) and might not happen until January.
#### Description of Change
<!--
@@ -10,7 +13,7 @@ Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.
#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
- [ ] PR description included
- [ ] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [ ] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)

View File

@@ -143,12 +143,11 @@ runs:
echo "No changes to patches detected"
fi
fi
- name: Remove patch conflict problem matchers
- name: Remove patch conflict problem matcher
shell: bash
run: |
echo "::remove-matcher owner=merge-conflict::"
echo "::remove-matcher owner=patch-conflict::"
echo "::remove-matcher owner=patch-needs-update::"
- name: Upload patches stats
if: ${{ inputs.target-platform == 'linux' && github.ref == 'refs/heads/main' }}
shell: bash

View File

@@ -37,22 +37,6 @@ 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

View File

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

View File

@@ -19,16 +19,6 @@
"line": 3
}
]
},
{
"owner": "patch-needs-update",
"pattern": [
{
"regexp": "^((patches\/.*): needs update)$",
"message": 1,
"file": 2
}
]
}
]
}

View File

@@ -19,7 +19,7 @@ jobs:
- name: Setup Node.js/npm
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
with:
node-version: 24.12.x
node-version: 22.21.x
- name: Setting Up Dig Site
run: |
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
@@ -45,7 +45,7 @@ jobs:
sha-file: .dig-old
filename: electron.old.d.ts
- name: Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 #v5.0.0
with:
name: artifacts
path: electron/artifacts

View File

@@ -14,7 +14,7 @@ jobs:
permissions:
contents: read
container:
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
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:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
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:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
options: --user root
volumes:
- /mnt/cross-instance-cache:/mnt/cross-instance-cache

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
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=a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb" >> "$GITHUB_OUTPUT"
echo "build-image-sha=933c7d6ff6802706875270bec2e3c891cf8add3f" >> "$GITHUB_OUTPUT"
else
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
fi

View File

@@ -75,7 +75,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Create comment
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3.7.5
uses: actions-cool/issues-helper@3809910bc12872edc9b8132f122069ac16cd16ee # v3.7.3
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -146,7 +146,7 @@ jobs:
}
- name: Create unsupported major comment
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3.7.5
uses: actions-cool/issues-helper@3809910bc12872edc9b8132f122069ac16cd16ee # v3.7.3
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
upload-to-storage:
description: 'Uploads to Azure storage'
required: false

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
required: true
upload-to-storage:
description: 'Uploads to Azure storage'

View File

@@ -168,12 +168,12 @@ jobs:
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
echo "IS_ASAN=true" >> $GITHUB_ENV
- name: Download Generated Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Download Src Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: src_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
@@ -266,7 +266,7 @@ jobs:
if: always() && !cancelled()
- name: Upload Test Artifacts
if: always() && !cancelled()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
path: src/electron/spec/artifacts

View File

@@ -65,12 +65,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
@@ -121,12 +121,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}

View File

@@ -42,7 +42,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: SARIF file
path: results.sarif
@@ -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@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.29.5
uses: github/codeql-action/upload-sarif@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
required: true
upload-to-storage:
description: 'Uploads to Azure storage'

226
CLAUDE.md
View File

@@ -1,226 +0,0 @@
# Electron Development Guide
## Project Overview
Electron is a framework for building cross-platform desktop applications using web technologies. It embeds Chromium for rendering and Node.js for backend functionality.
## Directory Structure
```text
electron/ # This repo (run `e` commands here)
├── shell/ # Core C++ application code
│ ├── browser/ # Main process implementation (107+ API modules)
│ ├── renderer/ # Renderer process code
│ ├── common/ # Shared code between processes
│ ├── app/ # Application entry points
│ └── services/ # Node.js service integration
├── lib/ # TypeScript/JavaScript library code
│ ├── browser/ # Main process JS (47 API implementations)
│ ├── renderer/ # Renderer process JS
│ └── common/ # Shared JS modules
├── patches/ # Patches for upstream dependencies
│ ├── chromium/ # ~159 patches to Chromium
│ ├── node/ # ~48 patches to Node.js
│ └── ... # Other targets (v8, boringssl, etc.)
├── spec/ # Test suite (1189+ TypeScript test files)
├── docs/ # API documentation and guides
├── build/ # Build configuration
├── script/ # Build and automation scripts
└── chromium_src/ # Chromium source overrides
../ # Parent directory is Chromium source
```
## Build Tools Setup
Electron uses `@electron/build-tools` for development. The `e` command is the primary CLI.
**Installation:**
```bash
npm i -g @electron/build-tools
```
**Configuration location:** `~/.electron_build_tools/configs/`
## Essential Commands
### Configuration Management
| Command | Purpose |
|---------|---------|
| `e init <name> --root=<path> --bootstrap testing` | Create new build config and sync |
| `e use <name>` | Switch to a different build configuration |
| `e show current` | Display active configuration name |
| `e show configs` | List all available configurations |
### Build & Development Loop
| Command | Purpose |
|---------|---------|
| `e sync` | Fetch/update all source code and apply patches |
| `e sync --3` | Sync with 3-way merge (required for Chromium upgrades) |
| `e build` | Build Electron (runs GN + Ninja) |
| `e build -k 999` | Build and continue on errors (up to 999) |
| `e build -t <target>` | Build specific target (e.g., `electron:node_headers`) |
| `e start` | Run the built Electron executable |
| `e start --version` | Verify Electron launches and print version |
| `e test` | Run the test suite |
| `e debug` | Run Electron in debugger (lldb on macOS, gdb on Linux) |
### Patch Management
| Command | Purpose |
|---------|---------|
| `e patches <target>` | Export patches for a target (chromium, node, v8, etc.) |
| `e patches all` | Export all patches from all targets |
| `e patches --list-targets` | List available patch targets |
## Typical Development Workflow
```bash
# 1. Ensure you're on the right config
e show current
# 2. Sync to get latest code
e sync
# 3. Make your changes in shell/ or lib/ or ../
# 4. Build
e build
# 5. Test your changes (Leave the user to do this, don't run these commands unless asked)
e start
e test
# 6. If you modified patched files in Chromium:
cd .. # Go to Chromium repo
git add <files>
git commit -m "description of change"
cd electron
e patches chromium # Export the patch
```
## Patches System
Electron patches upstream dependencies (Chromium, Node.js, V8, etc.) to add features or modify behavior.
**How patches work:**
```text
patches/{target}/*.patch → [e sync --3] → target repo commits
← [e patches] ←
```
**Patch configuration:** `patches/config.json` maps patch directories to target repos.
**Key rules:**
- Fix existing patches 99% of the time rather than creating new ones
- Preserve original authorship in TODO comments
- Never change TODO assignees (`TODO(name)` must retain original name)
- Each patch file includes commit message explaining its purpose
**Creating/modifying patches:**
1. Make changes in the target repo (e.g., `../` for Chromium)
2. Create a git commit
3. Run `e patches <target>` to export
## Testing
**Test location:** `spec/` directory
**Running tests:**
```bash
e test # Run full test suite
```
**Test frameworks:** Mocha, Chai, Sinon
## Build Configuration
**GN build arguments:** Located in `build/args/`:
- `testing.gn` - Debug/testing builds
- `release.gn` - Release builds
- `all.gn` - Common arguments for all builds
**Main build file:** `BUILD.gn`
**Feature flags:** `buildflags/buildflags.gni`
## Chromium Upgrade Workflow
When working on the `roller/chromium/main` branch to upgrade Chromium activate the "Electron Chromium Upgrade" skill.
## Code Style
**C++:** Follows Chromium style, enforced by clang-format
**TypeScript/JavaScript:** ESLint configuration in `.eslintrc.json`
**Linting:**
```bash
npm run lint # Run all linters
npm run lint:clang-format # C++ formatting
```
## Key Files
| File | Purpose |
|------|---------|
| `BUILD.gn` | Main GN build configuration |
| `DEPS` | Dependency versions and checkout paths |
| `patches/config.json` | Patch target configuration |
| `filenames.gni` | Source file lists by platform |
| `package.json` | Node.js dependencies and scripts |
## Environment Variables
| Variable | Purpose |
|----------|---------|
| `GN_EXTRA_ARGS` | Additional GN arguments (useful in CI) |
| `ELECTRON_RUN_AS_NODE=1` | Run Electron as Node.js |
## Useful Git Commands for Chromium
```bash
# Find CL that changed a file
cd ..
git log --oneline -10 -- {file}
git blame -L {start},{end} -- {file}
# Look for Chromium CL reference in commit
git log -1 {commit_sha} # Find "Reviewed-on:" line
# Find which patch affects a file
grep -l "filename.cc" patches/chromium/*.patch
```
## CI/CD
GitHub Actions workflows in `.github/workflows/`:
- `build.yml` - Main build workflow
- `pipeline-electron-lint.yml` - Linting
- `pipeline-segment-electron-test.yml` - Testing
## Common Issues
**Patch conflict during sync:**
- Use `e sync --3` for 3-way merge
- Check if file was renamed/moved upstream
- Verify patch is still needed
**Build error in patched file:**
- Find the patch: `grep -l "filename" patches/chromium/*.patch`
- Match existing patch style (#if 0 guards, BUILDFLAG conditionals, etc.)
**Remote build issues:**
- Try `e build --no-remote` to build locally
- Check reclient/siso configuration in your build config

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'146.0.7633.0',
'145.0.7568.0',
'node_version':
'v24.11.1',
'nan_version':

View File

@@ -2,7 +2,7 @@ is_electron_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
node_module_version = 145
node_module_version = 143
v8_promise_internal_field_count = 1
v8_embedder_string = "-electron.0"

View File

@@ -110,9 +110,11 @@ async function loadApplicationPackage (packagePath: string) {
} else if (packageJson.name) {
app.name = packageJson.name;
}
app.setDesktopName(packageJson.desktopName || `${app.name}.desktop`);
if (packageJson.desktopName) {
app.setDesktopName(packageJson.desktopName);
} else {
app.setDesktopName(`${app.name}.desktop`);
}
// Set v8 flags, deliberately lazy load so that apps that do not use this
// feature do not pay the price
if (packageJson.v8Flags) {
@@ -253,7 +255,7 @@ async function startRepl () {
if (option.file && !option.webdriver) {
const file = option.file;
// eslint-disable-next-line n/no-deprecated-api
const protocol = URL.canParse(file) ? new URL(file).protocol : null;
const protocol = url.parse(file).protocol;
const extension = path.extname(file);
if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:' || protocol === 'chrome:') {
await loadApplicationByURL(file);

View File

@@ -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`

View File

@@ -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`

View File

@@ -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'

View File

@@ -186,14 +186,3 @@ the one downloaded by `npm install`. Usage:
```sh
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Testing
```
### `ELECTRON_SKIP_BINARY_DOWNLOAD`
If you want to install your project's dependencies but don't need to use Electron functionality,
you can set the `ELECTRON_SKIP_BINARY_DOWNLOAD` environment variable to prevent the binary from being
downloaded. For instance, this feature can be useful in continuous integration environments when
running unit tests that mock out the `electron` module.
```sh
ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm install
```

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -102,9 +102,9 @@
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
Set a custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) _macOS_ _Windows_ - Whether frameless window
should have rounded corners. Default is `true`. On Windows versions older than
Windows 11 Build 22000 this property has no effect, and frameless windows will
not have rounded corners.
should have rounded corners. Default is `true`. Setting this property
to `false` will prevent the window from being fullscreenable on macOS.
On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
* `thickFrame` boolean (optional) _Windows_ - Use `WS_THICKFRAME` style for
frameless windows on Windows, which adds the standard window frame. Setting it
to `false` will remove window shadow and window animations, and disable window

View File

@@ -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,20 +1865,66 @@ 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, such as [`BrowserWindow`](./browser-window.md) or [`WebContentsView`](./web-contents-view.md).
the devtools in it, including `BrowserWindow`, `BrowserView` and `<webview>`
tag.
Note that closing the DevTools does not destroy the `devToolsWebContents`, it
is the caller's responsibility to destroy `devToolsWebContents` manually.
Note that closing the devtools does not destroy the `devToolsWebContents`, it
is caller's responsibility to destroy `devToolsWebContents`.
An example of showing DevTools in a `BrowserWindow`:
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`:
```js title='main.js'
const { app, BrowserWindow } = require('electron')
@@ -1898,31 +1944,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 view.
Closes the devtools.
#### `contents.isDevToolsOpened()`
Returns `boolean` - Whether the DevTools view is opened.
Returns `boolean` - Whether the devtools is opened.
#### `contents.isDevToolsFocused()`
Returns `boolean` - Whether the DevTools view is focused .
Returns `boolean` - Whether the devtools view is focused .
#### `contents.getDevToolsTitle()`

View File

@@ -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.

View File

@@ -12,14 +12,6 @@ This document uses the following convention to categorize breaking changes:
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
## Planned Breaking API Changes (41.0)
### Behavior Changed: PDFs no longer create a separate WebContents
Previously, PDF resources created a separate guest [WebContents](https://www.electronjs.org/docs/latest/api/web-contents) for rendering. Now, PDFs are rendered within the same WebContents instead. If you have code to detect PDF resources, use the [frame tree](https://www.electronjs.org/docs/latest/api/web-frame-main) instead of WebContents.
Under the hood, Chromium [enabled](https://chromium-review.googlesource.com/c/chromium/src/+/7239572) a feature that changes PDFs to use out-of-process iframes (OOPIFs) instead of the `MimeHandlerViewGuest` extension.
## Planned Breaking API Changes (40.0)
### Deprecated: `clipboard` API access from renderer processes

View File

@@ -6,104 +6,30 @@ 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)
## Setting up `@electron/build-tools` (recommended)
## Build Tools
[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'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 uses [GN](https://gn.googlesource.com/gn) for project generation and
[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.
[ninja](https://ninja-build.org/) for building. Project configurations can
be found in the `.gn` and `.gni` files.
### GN files
## GN Files
The following `gn` files contain the main rules 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.
* `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.
### GN prerequisites
## GN prerequisites
You'll need to install [`depot_tools`][depot-tools], the toolset
used for fetching Chromium and its dependencies.
@@ -130,7 +56,7 @@ $ mkdir -p "${GIT_CACHE_PATH}"
# This will use about 16G.
```
### Getting the code
## Getting the code
```sh
$ mkdir electron && cd electron
@@ -142,7 +68,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
@@ -157,13 +83,12 @@ $ git branch --set-upstream-to=origin/main
$ cd -
```
> [!TIP]
> `gclient` works by checking a file called `DEPS` inside the
`${root}/src/electron` folder for dependencies (like Chromium or Node.js).
:memo: `gclient` works by checking a file called `DEPS` inside the
`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.
In order to pull, you'd run the following commands:
So, in order to pull, you'd run the following commands:
```sh
$ cd src/electron
@@ -171,7 +96,7 @@ $ git pull
$ gclient sync -f
```
### Building
## Building
**Set the environment variable for chromium build tools**
@@ -231,7 +156,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 `${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`.
> 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`.
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`.
@@ -264,7 +189,7 @@ $ ./out/Testing/electron.exe
$ ./out/Testing/electron
```
#### Packaging
### Packaging
To package the electron build as a distributable zip file:
@@ -272,7 +197,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
@@ -298,7 +223,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
#### Windows on Arm (experimental)
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`.
@@ -316,12 +241,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 `${root}/src/` directory.
under `src/` directory.
```sh
$ ninja -C out/Testing electron:node_headers
@@ -337,7 +262,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
@@ -359,14 +284,11 @@ 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
### `sync` complains about rebase
### gclient sync complains about rebase
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:
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:
```plaintext
2> Conflict while rebasing this branch.
@@ -374,19 +296,17 @@ a cryptic message when running `sync` in the future:
2> See man git-rebase for details.
```
If there are no git conflicts or rebases in `${root}/src/electron`, you may need to abort a `git am`
in `${root}/src`:
If there are no git conflicts or rebases in `src/electron`, you may need to abort a `git am` in `src`:
```sh
$ cd ../
$ git am --abort
$ cd electron
$ e sync -f
$ gclient sync -f
```
This may also happen if you have checked out a branch (as opposed to having a detached head) in `${root}/src/`
or some other dependencys 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 `electron/src/`
or some other dependencys 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
@@ -395,6 +315,16 @@ 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.

View File

@@ -6,7 +6,7 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p
## Prerequisites
* macOS >= 12
* macOS >= 11.6.0
* [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`.

View File

@@ -4,40 +4,12 @@ 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://www.chromium.org/developers/design-documents/multi-process-architecture/)
[Chromium's multi-process architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
to understand the source code better.
## Project structure
## Structure of Source Code
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
```diff
Electron
├── build/ - Build configuration files needed to build with GN.
├── buildflags/ - Determines the set of features that can be conditionally built.
@@ -53,23 +25,24 @@ 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
@@ -94,30 +67,27 @@ 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 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.
| ── 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.
├── 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 Electron directories
## Structure of Other 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 for `siso`.
* **out** - Temporary output directory of `ninja`.
* **script** - Scripts used for development purpose like building, packaging,
testing, etc.
```plaintext
```diff
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.

View File

@@ -309,7 +309,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__concepts/class_or_enum.h",
"//third_party/libc++/src/include/__concepts/common_reference_with.h",
"//third_party/libc++/src/include/__concepts/common_with.h",
"//third_party/libc++/src/include/__concepts/comparison_common_type.h",
"//third_party/libc++/src/include/__concepts/constructible.h",
"//third_party/libc++/src/include/__concepts/convertible_to.h",
"//third_party/libc++/src/include/__concepts/copyable.h",
@@ -1104,14 +1103,12 @@ libcxx_headers = [
"//third_party/libc++/src/include/__locale_dir/num.h",
"//third_party/libc++/src/include/__locale_dir/pad_and_output.h",
"//third_party/libc++/src/include/__locale_dir/scan_keyword.h",
"//third_party/libc++/src/include/__locale_dir/support/aix.h",
"//third_party/libc++/src/include/__locale_dir/support/apple.h",
"//third_party/libc++/src/include/__locale_dir/support/bsd_like.h",
"//third_party/libc++/src/include/__locale_dir/support/freebsd.h",
"//third_party/libc++/src/include/__locale_dir/support/fuchsia.h",
"//third_party/libc++/src/include/__locale_dir/support/linux.h",
"//third_party/libc++/src/include/__locale_dir/support/netbsd.h",
"//third_party/libc++/src/include/__locale_dir/support/newlib.h",
"//third_party/libc++/src/include/__locale_dir/support/no_locale/characters.h",
"//third_party/libc++/src/include/__locale_dir/support/no_locale/strtonum.h",
"//third_party/libc++/src/include/__locale_dir/support/windows.h",
@@ -1278,8 +1275,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__random/uniform_real_distribution.h",
"//third_party/libc++/src/include/__random/weibull_distribution.h",
"//third_party/libc++/src/include/__ranges/access.h",
"//third_party/libc++/src/include/__ranges/adjacent_transform_view.h",
"//third_party/libc++/src/include/__ranges/adjacent_view.h",
"//third_party/libc++/src/include/__ranges/all.h",
"//third_party/libc++/src/include/__ranges/as_rvalue_view.h",
"//third_party/libc++/src/include/__ranges/chunk_by_view.h",
@@ -1291,7 +1286,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__ranges/data.h",
"//third_party/libc++/src/include/__ranges/drop_view.h",
"//third_party/libc++/src/include/__ranges/drop_while_view.h",
"//third_party/libc++/src/include/__ranges/elements_of.h",
"//third_party/libc++/src/include/__ranges/elements_view.h",
"//third_party/libc++/src/include/__ranges/empty.h",
"//third_party/libc++/src/include/__ranges/empty_view.h",
@@ -1369,7 +1363,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__tuple/tuple_like.h",
"//third_party/libc++/src/include/__tuple/tuple_like_no_subrange.h",
"//third_party/libc++/src/include/__tuple/tuple_size.h",
"//third_party/libc++/src/include/__tuple/tuple_transform.h",
"//third_party/libc++/src/include/__type_traits/add_cv_quals.h",
"//third_party/libc++/src/include/__type_traits/add_pointer.h",
"//third_party/libc++/src/include/__type_traits/add_reference.h",

View File

@@ -126,7 +126,11 @@ if (packageJson.productName != null) {
}
// Set application's desktop name.
app.setDesktopName(packageJson.desktopName || `${app.name}.desktop`);
if (packageJson.desktopName != null) {
app.setDesktopName(packageJson.desktopName);
} else {
app.setDesktopName(`${app.name}.desktop`);
}
// Set v8 flags, deliberately lazy load so that apps that do not use this
// feature do not pay the price

View File

@@ -227,7 +227,8 @@ function validateHeader (name: any, value: any): void {
}
function parseOptions (optionsIn: ClientRequestConstructorOptions | string): NodeJS.CreateURLLoaderOptions & ExtraURLLoaderOptions {
const options: any = typeof optionsIn === 'string' ? new URL(optionsIn) : { ...optionsIn };
// eslint-disable-next-line n/no-deprecated-api
const options: any = typeof optionsIn === 'string' ? url.parse(optionsIn) : { ...optionsIn };
let urlStr: string = options.url;
@@ -259,8 +260,8 @@ function parseOptions (optionsIn: ClientRequestConstructorOptions | string): Nod
// an invalid request.
throw new TypeError('Request path contains unescaped characters');
}
const pathObj = new URL(options.path || '/');
// eslint-disable-next-line n/no-deprecated-api
const pathObj = url.parse(options.path || '/');
urlObj.pathname = pathObj.pathname;
urlObj.search = pathObj.search;
urlObj.hash = pathObj.hash;

View File

@@ -25,6 +25,7 @@
"buffer": "^6.0.3",
"chalk": "^4.1.0",
"check-for-leaks": "^1.2.1",
"dugite": "^2.7.1",
"eslint": "^8.57.1",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.32.0",
@@ -148,6 +149,9 @@
"dependenciesMeta": {
"abstract-socket": {
"built": true
},
"dugite": {
"built": true
}
}
}

0
patches/angle/.patches Normal file
View File

View File

@@ -10,7 +10,7 @@ this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
index 17961ba6bd9de78b5b1b1008eb1f73babd49d0e7..6a870dce37df8f49106c24b183308a2c7a03fd7d 100644
index ea1709ae6b50faedc786c0eaeb5f9002fd0db7d8..5b0ed4dc6aaf3fafad034e9ecc62cd47b9e3034f 100644
--- a/crypto/digest/digest_extra.cc
+++ b/crypto/digest/digest_extra.cc
@@ -47,6 +47,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
@@ -22,7 +22,7 @@ index 17961ba6bd9de78b5b1b1008eb1f73babd49d0e7..6a870dce37df8f49106c24b183308a2c
// hash function when given a signature OID. To avoid unintended lax parsing
// of hash OIDs, this is no longer supported for lookup by OID or NID.
diff --git a/crypto/fipsmodule/digest/digests.cc.inc b/crypto/fipsmodule/digest/digests.cc.inc
index a246a51103701e0ac8a0722324350a462f95bcc9..ddf0a90337d4e40de09bc345cf959dffdb161ecb 100644
index 3a3bfd3f0560fcd7b5fdbdf4cc29a56e0346b90a..a7335ca03b5b3b918c4321d890b45649679d772b 100644
--- a/crypto/fipsmodule/digest/digests.cc.inc
+++ b/crypto/fipsmodule/digest/digests.cc.inc
@@ -18,6 +18,7 @@
@@ -33,7 +33,7 @@ index a246a51103701e0ac8a0722324350a462f95bcc9..ddf0a90337d4e40de09bc345cf959dff
#include "../../internal.h"
#include "../bcm_interface.h"
@@ -181,4 +182,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
@@ -179,4 +180,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
out->ctx_size = sizeof(SHA512_CTX);
}

View File

@@ -28,11 +28,11 @@ RC2 Ciphers: rc2-40-cbc
It's unclear whether this would be accepted upstream. We should try regardless.
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
index dabc54aa13745600a62e57ecbb427e48a4565282..ce213e00573102ce9405a794d3c140d9ef499ec1 100644
index 6513df01c4b3e4d33fc6b521d9aae78ec5499e73..52eb7fea420e3d81d274fd5c1e21e4da0229687f 100644
--- a/crypto/cipher/get_cipher.cc
+++ b/crypto/cipher/get_cipher.cc
@@ -31,6 +31,7 @@ static const struct {
const EVP_CIPHER *(*func)();
const EVP_CIPHER *(*func)(void);
} kCiphers[] = {
{NID_aes_128_cbc, "aes-128-cbc", EVP_aes_128_cbc},
+ {NID_aes_128_cfb128, "aes-128-cfb", EVP_aes_128_cfb128},

View File

@@ -142,5 +142,3 @@ expose_referrerscriptinfo_hostdefinedoptionsindex.patch
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

View File

@@ -9,17 +9,17 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
2. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 46b49a484fc7d42facf494733ca21e451fc54e25..eb4c80a0b788ac046bcfdb54ae85eaaef90cd76b 100644
index 5ad9332dd27ceda7d67cd3f571b12218a4415a40..ffe083836c39fb60b4bff1f9fbdd6cebb7fa9d1d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -13,6 +13,7 @@
@@ -12,6 +12,7 @@
#include "base/i18n/rtl.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/types/cxx23_to_underlying.h"
#include "build/build_config.h"
#include "ui/base/l10n/l10n_util.h"
@@ -164,6 +165,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
#endif

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9f4b1f796 100644
index 5196f155cdc641b66c4faa77d8b00097145a1290..bbfac47a74f989482343c222b78f187b70297e4e 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -141,6 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver {
@@ -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 e1a152201b17ad8aefbfe10d4ffa345ca1a74621..cb62bc567fbe0777e6dfe78bbf78b55e77bf4ffa 100644
index e85e02e0f266836b23c5b2742414e6b15f581d1e..609c83fb3e7c9b5e4e5d06071d46b5be835b5ecd 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4735,6 +4735,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4661,6 +4661,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index e1a152201b17ad8aefbfe10d4ffa345ca1a74621..cb62bc567fbe0777e6dfe78bbf78b55e
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 9639e42a6ff5269dbef99cc0ee0b64f179e62998..fdbd5e66f73170cdc70009b183cd07f70db7dbd5 100644
index 7e63cd4ff9ca7ac9a15ba5bcb277700e0c8a125d..e4baa8ca63312e9f792108b6170cbd2a170c9a95 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 9639e42a6ff5269dbef99cc0ee0b64f179e62998..fdbd5e66f73170cdc70009b183cd07f7
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 675791f9db1320ee9b3c915f4595eef2183802d5..1ce4e9a1e7b5d5cfbb6201c000eada80b3b3d174 100644
index 2ed54a31be77700c2bed2bd28db1d6b70effc0aa..91e234e7fa29e50545fdaed64adcf68498f14c2d 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -673,6 +673,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -668,6 +668,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -79,10 +79,10 @@ index 851e792c6c6f26b6074ffe8b0ba39a5813fabacc..8bd06f4c155cc0ed8afaf89347f9fc97
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10fcbf5892a 100644
index 1ed3806f12ad4f70cb8e31d76be023d508e1e388..cdf5e974a2b155a3988f94e599e65ccaa5763db6 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -303,6 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10f
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a8ee9152d 100644
index 23d6c6a864ad7e27477c34d2497a3eec1a9e707c..359b11ea39db7bb5fe2f9dad26b0a3a8bc8d6c28 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -300,6 +300,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c60fc1853c 100644
index 7f2bff4cc2c35c0ed34a0c436df4f1a2aacbfe0a..cbc59f17897d3c6c98886a7ef7d6db81b0e1117b 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,7 +123,7 @@ index c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c6
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 8b348b886bf912838903efcc007a560b6d3c20c1..1235c9d51d09b715296d8ae8072d3c99622e1bfd 100644
index 554f4444f1ed8535864cccf6e938dc0a26f9f8e9..628d4a805dce6a780d53759fcf9229bd2f7e7029 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -426,6 +426,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View File

@@ -51,10 +51,10 @@ index c8d6592a2d73bb132c7bdaa6532086da10a4512a..99479aed4911e134914db226094933c3
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 4df91cea76224362565bb968852d05c1a4f865f9..b9b7426d6234ab4b269c154feedadf16943212f8 100644
index b4f1a82dc4294313c4439cb132ae05ea8cd19a99..6a6ede73a913615fdefd5d21c2c7dd46f296010a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -646,8 +646,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -633,8 +633,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
// which updates `visibility_`, unless the host is hidden. Make sure no update
// is needed.
@@ -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 8cd8090807d0ae08267909c924a420119bce0a61..1ea40bbc89db58e602fee5478b48a0f7b25ff93a 100644
index 5bd8542ff4cee8ec717b9cad68bc74a1833b017b..a6c5b130bd102fb7121c83cad162d7bafe79430d 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2532,6 +2532,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2507,6 +2507,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 8cd8090807d0ae08267909c924a420119bce0a61..1ea40bbc89db58e602fee5478b48a0f7
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 &&
@@ -4167,10 +4171,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -4096,10 +4100,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,7 +155,7 @@ index 8cd8090807d0ae08267909c924a420119bce0a61..1ea40bbc89db58e602fee5478b48a0f7
// Do not throttle if the page should be painting.
bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950a080353a 100644
index e6cb751e2b6656ad249501c60468c8299708bfd8..bfceed497bd90b3697ea05886b78d51ba4984d16 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -166,7 +166,7 @@ index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -953,6 +954,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -942,6 +943,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -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 3d660d72c029e5ae10cf32ac53c4c1a7314a5125..8ed89c56428886efe24fb1fe9399cbae507878f5 100644
index ebd35a078ad640f1102f270cead9c48ca7fc829c..7e5d2ca71b66a520099c26be2d4f4cee39876191 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 3d660d72c029e5ae10cf32ac53c4c1a7314a5125..8ed89c56428886efe24fb1fe9399cbae
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 184ebdae4f97582418494fde791b7822b496b7b1..eccb75cd1eb54ca626096d0799c446639b2476c2 100644
index 9cff5c9f6bd7d24eb7b2884b3d4fd3224a48de7b..10a01ec3da9ba8c88db51e4e6a2c904fe3f7e839 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 184ebdae4f97582418494fde791b7822b496b7b1..eccb75cd1eb54ca626096d0799c44663
#include "build/build_config.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -466,6 +467,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -464,6 +465,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
bool should_screenshot_on_mainframe_same_doc_navigation = true;
#endif // BUILDFLAG(IS_ANDROID)
@@ -64,7 +64,7 @@ index 184ebdae4f97582418494fde791b7822b496b7b1..eccb75cd1eb54ca626096d0799c44663
// 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 7113bbbd4c223793cf6293a0d1723259a5cc9179..404df10825e979b4771d0ce2aef480299412c8c1 100644
index d900db0706d383ec8f2069243e7d1c5c361e4088..3d035dbe5bdab7d02c7514c7d9cafa25d11eae38 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 7113bbbd4c223793cf6293a0d1723259a5cc9179..404df10825e979b4771d0ce2aef48029
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 531cc01e1db5afc8f66ce1b0e849687c2392eeca..8c88dc9f8fbb9328ca235a3158029175400889fe 100644
index 7f44cff8d6493d2ce0d70631440eeb85ae1118f7..2eb4e977cb0fa6d57f2f2edac02b80dc06176808 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 @@

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index ac5d88520a785e12b66ebd96c92c46319a08311c..5c582e4f249c28a5739da2da4e600ee2ed7e19ea 100644
index 5d875911b47c31b141c03a89a6aec8b9dee8cea6..25971105a530ae14d3c89719bb0ad17a43409020 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ 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 e13a70decf608f5a60d100fa108163d377e10c11..d27f583eb43f63da88e2ebfd67f5f0cd660c193c 100644
index 6a8b2cab1203d89d9c5bca38f71c8c327815de78..63c906e460c8d38ff1dbafbfefcf8b082d2f77f9 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -767,10 +767,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -752,10 +752,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index e13a70decf608f5a60d100fa108163d377e10c11..d27f583eb43f63da88e2ebfd67f5f0cd
if (!Client())
return false;
@@ -824,6 +820,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -809,6 +805,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 8649b24d17fc9d8acf988f44422134ecc3ed0203..7835ffc1fbcd2b416e199dd73c11e750cd9a0e99 100644
index af3c4d233ca2e2bfe2cd5f0a1f1eebeb31de07a9..2d99b7b0c501fe5bcd08223726937c6dd02eedda 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -131,6 +131,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(

View File

@@ -10,10 +10,10 @@ Needed for:
2) //electron/shell/common:web_contents_utility
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index b55f12d4f0eb92c515c8fc61e6ec3c15e287edde..027e8f7a943bb6cf13259520cc1992ae5852a72b 100644
index 49f3360c3d5ff66ebbc7d6164de3f7ff7244b1fe..ec9018d38520dfca461e9dbb041566b0b3400133 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -361,6 +361,8 @@ mojom("interfaces") {
@@ -362,6 +362,8 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

View File

@@ -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 a0b040719c1c08cd2115518d6877ec0f8c12c6d2..4fbec99adf1da7469ad5d58874d3ecb3bbf52d0b 100644
index d0c5f0e7a979601c2f019524581a5e1bea108f7c..a7b90878dc13c7698a1d587cf4391374fad9dff4 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -89,7 +89,7 @@ declare_args() {
@@ -88,7 +88,7 @@ declare_args() {
# Chrome's clang. crbug.com/1033839
use_thin_lto =
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&

View File

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405afb5b389 100644
index 02876ca62dc50566fb15a1bd0e3b8415f0b1dd10..5a3b7c8d62acf8af2c043812cfd4ac2d1a6ce055 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index c9752a7a10bf6db7f2b59dd72156f4c6ab33628c..fa394598ff37984d9cfd88571a5e889b841f87fd 100644
index c1056f4cbf58b51dcd3143e53c68faed2bdb0153..d5e1576be11279f35cef709925dc22cd57a39100 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4778,7 +4778,7 @@ static_library("browser") {
@@ -4799,7 +4799,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index c9752a7a10bf6db7f2b59dd72156f4c6ab33628c..fa394598ff37984d9cfd88571a5e889b
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 918d8811e58be12d45e1ae3fe24be2bd3a71e6fd..89ba243a3590506444902618ea52ec26f47e3084 100644
index bcdd9c685988065ffb0122936074ec4f2ca2b8a3..0d3a31b92b3f5ae9e8bf78043ce0fc49e527f392 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7635,9 +7635,12 @@ test("unit_tests") {
@@ -7599,9 +7599,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 918d8811e58be12d45e1ae3fe24be2bd3a71e6fd..89ba243a3590506444902618ea52ec26
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8595,6 +8598,10 @@ test("unit_tests") {
@@ -8548,6 +8551,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index 918d8811e58be12d45e1ae3fe24be2bd3a71e6fd..89ba243a3590506444902618ea52ec26
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8652,7 +8659,6 @@ test("unit_tests") {
@@ -8604,7 +8611,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index 49bd8af6f4e5762c6059c2f8d2663683f350e386..f386b473b73ba83b383adbb90acb98709f5a3bf1 100644
index f1ac049db7df5637c94893009287b53c6127158f..ebf028bdb2934ca2f9f2ab7b7c3e6d3daa544d37 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -480,6 +480,7 @@ target(libcxx_target_type, "libc++") {
@@ -481,6 +481,7 @@ target(libcxx_target_type, "libc++") {
# need to explicitly depend on libc++.
visibility = [
"//build/config:common_deps",

View File

@@ -11,7 +11,7 @@ solution is put in place.
This reverts commit 8c004781dde7d42d9a3fed8cafcaa4929943dd69.
diff --git a/components/remote_cocoa/app_shim/bridged_content_view.mm b/components/remote_cocoa/app_shim/bridged_content_view.mm
index 8f4ba0a9644bff955b91e373a9b81778ee079e5a..eac83e955aeb82dc10312363ac54bc9d1677cc90 100644
index 8f572c0822f95176bb35c25c7c8971bf4fe6139b..4b657e55f3782e951706b5edbe0dcf6974d236ab 100644
--- a/components/remote_cocoa/app_shim/bridged_content_view.mm
+++ b/components/remote_cocoa/app_shim/bridged_content_view.mm
@@ -305,14 +305,6 @@ - (NSView*)hitTest:(NSPoint)point {

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index c2b120971d6652c60289f13a1ef7344bc14760f2..e96ede02cb19aab1aa43bbbc9f48e201842312dd 100644
index 957bb5977fdc7488d8d5b7467fbeb1288fc842e9..eadf92465fcda1dcd490c7ba33a42400e42b1de2 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9924,6 +9924,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9845,6 +9845,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 c2b120971d6652c60289f13a1ef7344bc14760f2..e96ede02cb19aab1aa43bbbc9f48e201
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 97bd7047458f3ba5aefdf2a257332e620e744807..2ba679ac7064a53935fb90bf94a2d83c407c1ac2 100644
index dc9e636c1a64efc1fbcea34caf793f649e0c0182..ec8c9c382d1689d8ac698482df4909cb03cde6c2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5351,6 +5351,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5326,6 +5326,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.initially_hidden = renderer_started_hidden;
create_params.initial_popup_url = params.target_url;
@@ -35,7 +35,7 @@ index 97bd7047458f3ba5aefdf2a257332e620e744807..2ba679ac7064a53935fb90bf94a2d83c
// 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,
@@ -5403,6 +5407,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5378,6 +5382,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// Sets the newly created WebContents WindowOpenDisposition.
new_contents_impl->original_window_open_disposition_ = params.disposition;
@@ -48,7 +48,7 @@ index 97bd7047458f3ba5aefdf2a257332e620e744807..2ba679ac7064a53935fb90bf94a2d83c
// 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
@@ -5444,12 +5454,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5419,12 +5429,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -77,10 +77,10 @@ index 4c55f0abf8df5a3408f3f90d444ceff3c23ee1bc..72bdb5b5a4c2c21a7192b34bb293bd23
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 7f6715e7add2535500ea650bcc39d601ab358093..0f7481ebb83eed5bbe40f7933883f0f57b9f464a 100644
index 32398673f892e441645197e160fcd7199855810c..f84873ede89fd06a951e17d588f8f692893b7157 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -872,6 +872,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -873,6 +873,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -90,10 +90,10 @@ index 7f6715e7add2535500ea650bcc39d601ab358093..0f7481ebb83eed5bbe40f7933883f0f5
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 130dfcfa81f5dff35b2a368cc10d155b2dc0206f..4ad0e28385dd11d2b0987cbd597caf246cbbe9b7 100644
index 9876271141182d6d0836449fde5010788298a4f0..8e8ee6284ad2ab6453b4c0137e61aea2765583c6 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -204,6 +204,7 @@ class NetworkService;
@@ -203,6 +203,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -111,10 +111,10 @@ index 130dfcfa81f5dff35b2a368cc10d155b2dc0206f..4ad0e28385dd11d2b0987cbd597caf24
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 509256e4c327806f9a24eab69c1d4e84581767ce..f8f3996cbd00c06bec2962a54488b2d8f1666530 100644
index 7544c393932b0dea1f14b722d559cc78f294f20b..badec4ea2cc0ecf1920839cf6cf731a6c81d6940 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -34,6 +34,17 @@ namespace content {
@@ -35,6 +35,17 @@ namespace content {
WebContentsDelegate::WebContentsDelegate() = default;
@@ -133,7 +133,7 @@ index 509256e4c327806f9a24eab69c1d4e84581767ce..f8f3996cbd00c06bec2962a54488b2d8
WebContents* source,
const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b080e40be3 100644
index 0e2ce90fd9c4a4c4aba0caacf026aa7a42c82f3a..d1f16f9c48bb2c60094f4644a9c41526a73a45a0 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,6 +18,7 @@
@@ -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 76fea215163d0f7d0b5339fe2bcb97efe0218df7..e1a152201b17ad8aefbfe10d4ffa345ca1a74621 100644
index 5924b040292f3542ae3dd5bc60561024423d02c3..e85e02e0f266836b23c5b2742414e6b15f581d1e 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6800,6 +6800,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6726,6 +6726,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 9253fb513782b7a3c785bfd5e50bc4fca382b201..8437ce75ff70a69ca381d422ef4e04d840568b8f 100644
index 96587060ba012823b8e2f61f22ebf3ee1efd3538..50ae67ac9153324b2e59dae324fc138a29cd9b63 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2335,6 +2335,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2349,6 +2349,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index 1e90af1c4a66df7f3acce570fbfb0d3b15d66195..21d4dabc8275aacf7a6252dd5861127a0bb661e0 100644
index e3b01b0a2b878681a861f76cb10f5b40bbc29a3d..277b05e37dadfd32fbcbbe1e596508aafd4313ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -227,6 +227,7 @@ vs-chromium-project.txt
@@ -228,6 +228,7 @@ vs-chromium-project.txt
/data
/delegate_execute
/device/serial/device_serial_mojo.xml
@@ -18,7 +18,7 @@ index 1e90af1c4a66df7f3acce570fbfb0d3b15d66195..21d4dabc8275aacf7a6252dd5861127a
/google_apis/gcm/gcm.xml
/googleurl
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 0b3cc63da588d371a6416f8158ad79014c6364c3..a33362e439d5d9cb4f3f0ff4ec77d14f3bda9387 100644
index b5761637e4b91efb38b5c1d4be9f59b271d4f0db..010c4f7bfe4ea8c82eff4924c83668c271b834fd 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -45,7 +45,9 @@

View File

@@ -8,10 +8,10 @@ electron objects that extend gin::Wrappable and gets
allocated on the cpp heap
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
index 573bcb2e56068a2ade6d8ab28964b077487874fd..42add73062b723b03fc15ddcce905e4d5061c384 100644
index 573bcb2e56068a2ade6d8ab28964b077487874fd..0321ca6d3c7e1ed541cc1beffb20b1db3d03a0c8 100644
--- a/gin/public/wrappable_pointer_tags.h
+++ b/gin/public/wrappable_pointer_tags.h
@@ -74,7 +74,15 @@ enum WrappablePointerTag : uint16_t {
@@ -74,7 +74,14 @@ enum WrappablePointerTag : uint16_t {
kTextInputControllerBindings, // content::TextInputControllerBindings
kWebAXObjectProxy, // content::WebAXObjectProxy
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
@@ -21,7 +21,6 @@ index 573bcb2e56068a2ade6d8ab28964b077487874fd..42add73062b723b03fc15ddcce905e4d
+ kElectronEvent, // gin_helper::internal::Event
+ kElectronMenu, // electron::api::Menu
+ kElectronNetLog, // electron::api::NetLog
+ kElectronReplyChannel, // gin_helper::internal::ReplyChannel
+ kElectronSession, // electron::api::Session
+ kElectronWebRequest, // electron::api::WebRequest
+ kLastPointerTag = kElectronWebRequest,

View File

@@ -9,7 +9,7 @@ devices is available. This should no longer be necessary if/when
https://crbug.com/1096743 is completed.
diff --git a/services/device/usb/usb_service_impl.cc b/services/device/usb/usb_service_impl.cc
index 15594a158d01e15e63185bf5779e2ef6fda82d72..c2aef55d5c77c645434be15117296c6d7180bd1c 100644
index 50166c1f0f6b3fe4dcb2e5b09443cf1960227a0e..0d612f064af6a09fae5aba5b2772675d4d6549ce 100644
--- a/services/device/usb/usb_service_impl.cc
+++ b/services/device/usb/usb_service_impl.cc
@@ -199,7 +199,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) {

View File

@@ -20,7 +20,7 @@ index a0a6c6815c553ca6a50c49f52ad45055a94fc221..53b8af297ff32de254b51cd534e08d59
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b34158cf0b72b 100644
index bbfac47a74f989482343c222b78f187b70297e4e..3677ca3345fbc775d139684a12fe36241827a729 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -143,7 +143,8 @@ class CONTENT_EXPORT RenderFrameObserver {
@@ -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 cb62bc567fbe0777e6dfe78bbf78b55e77bf4ffa..2c1f83b9ff19da0d983b2b3252f1694482f686f7 100644
index 609c83fb3e7c9b5e4e5d06071d46b5be835b5ecd..bc293d31e9c13089238a0efa8421e76bf2d42ed4 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4741,10 +4741,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
@@ -4667,10 +4667,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
observer.DidInstallConditionalFeatures(context, world_id);
}
@@ -52,10 +52,10 @@ index cb62bc567fbe0777e6dfe78bbf78b55e77bf4ffa..2c1f83b9ff19da0d983b2b3252f16944
void RenderFrameImpl::DidChangeScrollOffset() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index fdbd5e66f73170cdc70009b183cd07f70db7dbd5..c82975148cc5afa3bfa023a43d7b69691cebf36f 100644
index e4baa8ca63312e9f792108b6170cbd2a170c9a95..c64ef8c072d2e74b072223f57c4d3722cd44cdb5 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -608,7 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -605,7 +605,8 @@ class CONTENT_EXPORT RenderFrameImpl
int world_id) override;
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
int world_id) override;
@@ -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 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf9ab266bd 100644
index d03d1d06611e10cf55a29aee9a764f575eed436d..78684d30cfb71a215004992b1916194c1a46055b 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -163,7 +163,8 @@ class ServiceWorkerContextClient
@@ -164,7 +164,8 @@ class ServiceWorkerContextClient
void WorkerContextStarted(
blink::WebServiceWorkerContextProxy* proxy,
scoped_refptr<base::SequencedTaskRunner> worker_task_runner) override;
@@ -103,10 +103,10 @@ index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf
void WillInitializeWorkerContext() override;
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2838cea12 100644
index 7b5398b4199ce6df9e1c9624771a5444d7f07eb3..77f896aa6a53bf7d277b963fba54d623eed8068b 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -614,6 +614,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
@@ -615,6 +615,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
void Dispatcher::WillEvaluateServiceWorkerOnWorkerThread(
blink::WebServiceWorkerContextProxy* context_proxy,
@@ -167,10 +167,10 @@ index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd
// Called when initial script evaluation finished for the main script.
// |success| is true if the evaluation completed with no uncaught exception.
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 1ce4e9a1e7b5d5cfbb6201c000eada80b3b3d174..c3557fdc4916cd199a61ab087f0866ce4297ba7e 100644
index 91e234e7fa29e50545fdaed64adcf68498f14c2d..15d5685d726d0ddb9ac964475b89971450823db2 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -677,7 +677,8 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -672,7 +672,8 @@ class BLINK_EXPORT WebLocalFrameClient {
int32_t world_id) {}
// WebKit is about to release its reference to a v8 context for a frame.
@@ -200,10 +200,10 @@ index 8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41..85ae42670cc038e18e4a0ea05e3de25c
->ContextWillBeDestroyed(script_state_);
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c78f4c2ebc 100644
index cdf5e974a2b155a3988f94e599e65ccaa5763db6..b83bbdce1b924c8e25efb1a043ad91ae6e635b20 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -310,7 +310,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -305,7 +305,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
int32_t world_id) = 0;
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -214,7 +214,7 @@ index 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c7
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b01359d00f638 100644
index 359b11ea39db7bb5fe2f9dad26b0a3a8bc8d6c28..8f78cef8dd506f20517538ff65b4fb874f352b9f 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -308,10 +308,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
@@ -231,7 +231,7 @@ index e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b0135
}
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c312fd55183 100644
index cbc59f17897d3c6c98886a7ef7d6db81b0e1117b..08ba59e55dfc1080d3b9ec73f72d1bc284d5190a 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -82,7 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -245,7 +245,7 @@ index ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c31
// Returns true if we should allow register V8 extensions to be added.
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 1235c9d51d09b715296d8ae8072d3c99622e1bfd..915de939cb4e8a5d42c17a39861b4de35b4c58b1 100644
index 628d4a805dce6a780d53759fcf9229bd2f7e7029..3fa3a6405ad6db4274068ac3bb91e14ea19c65b6 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -428,7 +428,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View File

@@ -10,7 +10,7 @@ Subject: chore: "grandfather in" Electron Views and Delegates
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
diff --git a/ui/views/view.h b/ui/views/view.h
index b9f2a484669f128c27d37a31a58accfd88dfe2ae..5e326f20dbb2bb506dc2cbaa03a230d8376fcf3d 100644
index 73ec09054efdd600b8e630b4bbe7870d7f4b87f1..7934ffa8aa25b6cb39c6af114afd38d84d8288ba 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -77,6 +77,19 @@ class ArcNotificationContentView;
@@ -49,7 +49,7 @@ index b9f2a484669f128c27d37a31a58accfd88dfe2ae..5e326f20dbb2bb506dc2cbaa03a230d8
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index 0315a1fac360ecea54cf8c5c065e777508193169..49df61c710fad846a29f074a91ceba2d8d239d5a 100644
index 7695f926b19cc81dfce9995a4ebac9dd50782ec0..c73616912049615c269be47ef733a6b15546c8c6 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -168,6 +168,12 @@ namespace crostini {
@@ -65,7 +65,7 @@ index 0315a1fac360ecea54cf8c5c065e777508193169..49df61c710fad846a29f074a91ceba2d
namespace exo {
class ShellSurfaceBase;
}
@@ -368,6 +374,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -372,6 +378,7 @@ class VIEWS_EXPORT WidgetDelegate {
class OwnedByWidgetPassKey {
private:
@@ -73,7 +73,7 @@ index 0315a1fac360ecea54cf8c5c065e777508193169..49df61c710fad846a29f074a91ceba2d
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
@@ -461,6 +468,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -465,6 +472,7 @@ class VIEWS_EXPORT WidgetDelegate {
};
class RegisterDeleteCallbackPassKey {
private:
@@ -81,7 +81,7 @@ index 0315a1fac360ecea54cf8c5c065e777508193169..49df61c710fad846a29f074a91ceba2d
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
@@ -916,6 +924,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
@@ -921,6 +929,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
View* GetContentsView() override;
private:

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3bd153a542 100644
index bac4f91c67608480e9756ce8c453bd7622ca3f79..38d2b364e70d7204d65c63afa5dd1995dc35c80d 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -133,6 +133,7 @@ class KeyStorageLinux;
@@ -28,7 +28,7 @@ index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3b
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -580,6 +584,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -579,6 +583,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3b
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
#if BUILDFLAG(IS_WIN)
@@ -625,6 +630,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -624,6 +629,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class cronet::CronetPrefsManager;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;

View File

@@ -34,10 +34,10 @@ index cc3f9bc9383f8272a5cd95b1f2ac56529d86e493..5ca29b84cdaf42ef516ef819ae32b230
class ScrollEvent;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index b2f7bbc51484d8db4c69de05d36398866b170721..b37df4100eac1263f874dc5bff9e29eea64c1c0a 100644
index 3b2fbefaeec2bac725d46bcfeea488122c873d76..fd23b8036c7f2d8bf3ed1bba126f8ee813f688a8 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1378,6 +1378,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
@@ -1375,6 +1375,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
return background_paint_brush_;
}
@@ -61,10 +61,10 @@ index b65ced55f997d5064b9d9338190567f8c264fce8..e8acd2828ed05deefa335ce2bb461f0c
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93199c3716 100644
index a71630354ee345224371980675d09dc16fdcff16..a834cc49a3a02acdcd127f3f0fb084fa806435e5 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3271,15 +3271,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3250,15 +3250,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
}
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.
@@ -86,7 +86,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93
return 0;
}
}
@@ -3302,6 +3306,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3281,6 +3285,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
// handle alt-space, or in the frame itself.
is_right_mouse_pressed_on_caption_ = false;
ReleaseCapture();
@@ -94,7 +94,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
// expect screen coordinates.
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
@@ -3309,7 +3314,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3288,7 +3293,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
w_param = static_cast<WPARAM>(SendMessage(
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
if (w_param == HTCAPTION || w_param == HTSYSMENU) {

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 594b881495e840efb25abff04d1ac0e6516ec2d1..fd4226d84464cd8353b64ec984c97d26f0a98c96 100644
index 6c83415f1022ec0b14bdabfbff9614ca620d5d4f..442df34ab1f8f80afafbe249bc0359162b90e124 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5322,7 +5322,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5297,7 +5297,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above.

View File

@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 7fff40908c71615cdacec33f4238e31c4b2ee6a4..241f1f0eedeedd2d6dc1675e8b69e007c2122b81 100644
index 82c9ff13c4ec8e53f3f5ecacea2a5d0dcc1f5b51..df67b65a2c6c84a71e4a7851423815dc1ced3389 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -224,7 +224,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

View File

@@ -43,7 +43,7 @@ index 21d5ab99800c0830cc31ec4ebb24e3f05cd904d8..3f8f514519d6e4a0abe3690f5df35de8
// When the enterprise policy is not set, use finch/feature flag choice.
return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfXfaSupport);
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
index d7150c5f576f141cac2755c32dfb8e763675ff7b..ace4033f0257e3da62e7ebaf1a98b177c9e1e49b 100644
index 328abdd79d287225d0e6ec6becc455e169d6e5d0..10e5e702a43dbb70e13d00b48000e0b4cc974e7a 100644
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -248,10 +248,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
@@ -100,7 +100,7 @@ index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd
ProfileSelection ProfileSelections::GetProfileSelection(
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index b020b6c3c0bd9c481e8b8385df2aa3259fd15b45..619b63b0a0d604485b4bd88b90ff2f71710fb24b 100644
index f8a36ced14288698849cd5730309e29d47d3d1d4..97b8fc0f38650e816bcae00e074543766f71e0d0 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -21,8 +21,10 @@
@@ -114,7 +114,7 @@ index b020b6c3c0bd9c481e8b8385df2aa3259fd15b45..619b63b0a0d604485b4bd88b90ff2f71
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
#include "components/language/core/browser/pref_names.h"
@@ -68,7 +70,10 @@ SpellcheckService::SpellCheckerBinder& GetSpellCheckerBinderOverride() {
@@ -67,7 +69,10 @@ SpellcheckService::SpellCheckerBinder& GetSpellCheckerBinderOverride() {
// Only record spelling-configuration metrics for profiles in which the user
// can configure spelling.
bool RecordSpellingConfigurationMetrics(content::BrowserContext* context) {

View File

@@ -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 8d8c63242dc131a9d43c26292b60c09c7367555a..7624504ca5c205b62f4481261e47a9de91d1f0e6 100644
index 56d1cbcdc5a9044b6cbffa07c81f6d04a70878ca..f5572c4d415138007412360efb77c487b352ce83 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2386,7 +2386,8 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2388,7 +2388,8 @@ bool Browser::IsWebContentsCreationOverridden(
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
const std::string& frame_name,
@@ -93,7 +93,7 @@ index 8d8c63242dc131a9d43c26292b60c09c7367555a..7624504ca5c205b62f4481261e47a9de
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
@@ -2399,7 +2400,7 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2401,7 +2402,7 @@ bool Browser::IsWebContentsCreationOverridden(
return (window_container_type ==
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url,
@@ -103,10 +103,10 @@ index 8d8c63242dc131a9d43c26292b60c09c7367555a..7624504ca5c205b62f4481261e47a9de
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 18e99c6f7e73d69204b0da11f33cb06b482eb01f..216cf7f3bec72a25c8ceba34488b0e939b125be7 100644
index 84aa1286e865cf32a2bed9444c2ef6b2b650ed5c..7d262aa7236656af0b1b9507e4251757d3727e68 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -941,8 +941,7 @@ class Browser : public TabStripModelObserver,
@@ -942,8 +942,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -159,10 +159,10 @@ index 3bbd4e568ba99245622a96f0801d2b6cd203025f..1e0b7d16b33daed980961dd49c667a3b
}
content::WebContents* CreateCustomWebContents(
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index 885dce608c8b6a387fe54c00fc804538a033082d..3111d414360b9e75fe9eaa6b06a41126871ff591 100644
index 717730dd4e29dfd0d0bea33f83ae48ff11197953..454d4d1e40989d84de2f9bb3f2e01bc31cc5e3ac 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -207,15 +207,14 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -215,15 +215,14 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -181,7 +181,7 @@ index 885dce608c8b6a387fe54c00fc804538a033082d..3111d414360b9e75fe9eaa6b06a41126
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index c6d4d6aa57edf3a89ae0b1df0bb919fb183e772c..a0ae9f1dfaf4e69e14dc0af52f849e83d3927708 100644
index 1676a7d1e1734d196aeb3d2e27997de1743f034c..9be7c579c08af7b9b0de947a9d9af39b4d510b3c 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -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 12b38ddee62e3af915083830703a4c2e8e249f00..bf4e8dcbdecd46712c48107cfee554b7bb1e0277 100644
index 14f2758f2d71d4d4ba77e4fcb9be40bb878526e0..536db4f8fe9771b60f0359df5c680b298c89cad4 100644
--- a/components/offline_pages/content/background_loader/background_loader_contents.cc
+++ b/components/offline_pages/content/background_loader/background_loader_contents.cc
@@ -85,8 +85,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
@@ -86,8 +86,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 00a2dd44a8eaf655b21b5fc98d701f150b4ac3e6..43ef8b669fd4bca119a4181ef99d8f8cb79947d0 100644
index f791952d5c33ba617d93600b84a42e2b6dc2b7c5..ec2814dc6d2e86d1508d3bd9889491c362c2130b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5287,8 +5287,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5262,8 +5262,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ &&
delegate_->IsWebContentsCreationOverridden(
opener, source_site_instance, params.window_container_type,
@@ -237,10 +237,10 @@ index 00a2dd44a8eaf655b21b5fc98d701f150b4ac3e6..43ef8b669fd4bca119a4181ef99d8f8c
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 f8f3996cbd00c06bec2962a54488b2d8f1666530..fde24980f7eefd2696a9094bdb97787909955ae9 100644
index badec4ea2cc0ecf1920839cf6cf731a6c81d6940..6c3ac2cf54bd7c20165b552f8c26da14cab94242 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -161,8 +161,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
SiteInstance* source_site_instance,
mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -251,7 +251,7 @@ index f8f3996cbd00c06bec2962a54488b2d8f1666530..fde24980f7eefd2696a9094bdb977879
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index a6f0447b6ede476162f555d951f346b080e40be3..58f34bc33426136d2040f241f2cb5928dc19fb2d 100644
index d1f16f9c48bb2c60094f4644a9c41526a73a45a0..320a7288dd87f6e9c100fcff046ddfa7f0f6e179 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -380,8 +380,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -357,7 +357,7 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 8f212198f6542ce3d1c4843e2029b3c21bb3b368..a54b9a842badf38db25d0c79659ff7ff03cef3d2 100644
index 44fdb7377fc4d09137d0718de0f960b0d190c99f..46bde9f83510116f8723d400d5947f9cc6ba3ab5 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -585,8 +585,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -385,7 +385,7 @@ index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d1
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index b598e3b8aeac0abf8efaa36be91b37f6f1c1e052..807fcb52e723bfcc190d76dd3c819af89887d830 100644
index 3af22f9e041996cedebc1d9ffd402e9fcccceaea..e488b8d4d8f81ad2a0b8a6a1cc13fb886fd26e62 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -208,8 +208,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {

View File

@@ -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 748c4012338c3e53fce1ea66d1cb95e8f397e901..c4c229ff10fb72d6098070378aa92661c211e97d 100644
index 8331e06da9055fddd647dbe54051584b101286b0..6a9ddc0060dc272cd4511fc96f358005ad0ee043 100644
--- a/extensions/browser/script_injection_tracker.cc
+++ b/extensions/browser/script_injection_tracker.cc
@@ -176,7 +176,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
@@ -177,7 +177,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
UserScriptManager* manager =
ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
if (!manager) {

View File

@@ -21,7 +21,7 @@ index c80020b2bda2af39b38295dad3c6208cb8294b88..873015289db9709c00c32080e5387d9c
private:
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 7c640559dc7a09730f0053be8798d10bc8ac1a1c..24127c579e149345cc9b937b17dbfe630b0d3c35 100644
index 1943413560f23c212d98fa1b368204c6e062bab2..bf0053833c782c9bc0187bb093a7ffd81ca9d754 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -225,6 +225,7 @@ void IsolateHolder::WillCreateMicrotasksRunner() {

View File

@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
NOTREACHED();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad4c1c4845 100644
index a82a333a9740d4805d9a72223a2b569a700492bb..b12bde965e8d2d62072d64de27a08d7f6363922f 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
@@ -128,7 +128,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
@@ -129,7 +129,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
const bool registered =
platform_global_shortcut_listener_->RegisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(),
@@ -52,7 +52,7 @@ index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad
if (registered) {
registered_hot_keys_.insert(accelerator);
}
@@ -143,14 +144,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
@@ -144,14 +145,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
platform_global_shortcut_listener_->UnregisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
@@ -70,7 +70,7 @@ index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad
int modifiers = 0;
if (is_alt_down) {
modifiers |= ui::EF_ALT_DOWN;
@@ -161,6 +163,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
@@ -162,6 +164,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 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70abd872096 100644
index 838b89cd8d2c1884ce253a42325faabe73ee3985..b47019cd02202b8f1ea29d45e6b1741e2a9a953e 100644
--- a/ui/base/x/x11_global_shortcut_listener.cc
+++ b/ui/base/x/x11_global_shortcut_listener.cc
@@ -33,11 +33,13 @@ constexpr auto kModifiersMasks = std::to_array<x11::ModMask>({
@@ -34,11 +34,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 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70a
}
} // namespace
@@ -83,8 +85,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
@@ -84,8 +86,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 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70a
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
auto keycode = connection_->KeysymToKeycode(keysym);
@@ -109,7 +112,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
@@ -110,7 +113,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
}
registered_combinations_.insert(
@@ -199,7 +199,7 @@ index 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70a
return true;
}
@@ -117,8 +120,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
@@ -118,8 +121,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 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70a
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
auto keycode = connection_->KeysymToKeycode(keysym);
@@ -126,7 +130,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
@@ -127,7 +131,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
connection_->UngrabKey({keycode, x_root_window_, modifiers | mask});
registered_combinations_.erase(
@@ -220,13 +220,14 @@ index 8c9a137d5e50bb8de7b61986963d9e93d9d8f02a..b371d11c2339829979b498c58925e70a
}
void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
@@ -136,13 +140,14 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
@@ -137,14 +141,15 @@ 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 (!registered_combinations_.contains(
if (!base::Contains(
registered_combinations_,
- 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;

View File

@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 3aeea292145cd5aaa445a29840156a47379d9d2c..ff5aa0c0dc924ca80800f7cd40d7b1565a8bbe8e 100644
index fbf9ecd9eae54b688bbf2af54a3ba8ed751e2911..602bf04c390e1e53540ec9a9193fdf19ac275943 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -276,8 +276,13 @@ void AsanProcessInfoCB(const char* reason,
@@ -40,7 +40,7 @@ index 3aeea292145cd5aaa445a29840156a47379d9d2c..ff5aa0c0dc924ca80800f7cd40d7b156
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -958,7 +964,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -954,7 +960,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -50,7 +50,7 @@ index 3aeea292145cd5aaa445a29840156a47379d9d2c..ff5aa0c0dc924ca80800f7cd40d7b156
blink::TrialTokenValidator::SetOriginTrialPolicyGetter(
base::BindRepeating([]() -> blink::OriginTrialPolicy* {
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index 3c763519c5fd23967b8f03093e8dce2f7c2b9c49..68e31ed29e25300c5948dd9adb6408cbe68c0672 100644
index fee2fab8ab33a3829f055b0408e9e763443016cc..678c636c9ca08f8113dc67aafaf9761f33a7f0e5 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -5,6 +5,7 @@
@@ -73,7 +73,7 @@ index 3c763519c5fd23967b8f03093e8dce2f7c2b9c49..68e31ed29e25300c5948dd9adb6408cb
return new ContentClient();
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index 199b5637bc6fe387ed30b03bae39b19ab9300dd9..ecf1440a39bda59b44793a6671715484f1e15967 100644
index 8151396412bf6981f3424526386ad6257b8c895d..ac5041c1666ac968251768f604f92434d92e374d 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -9,6 +9,7 @@
@@ -84,9 +84,9 @@ index 199b5637bc6fe387ed30b03bae39b19ab9300dd9..ecf1440a39bda59b44793a6671715484
#include <vector>
#include "base/notreached.h"
@@ -185,6 +186,8 @@ class CONTENT_EXPORT ContentMainDelegate {
// This is an experimental feature and its tracking bug is crbug.com/423925400
virtual bool IsInitFeatureListEarly();
@@ -181,6 +182,8 @@ class CONTENT_EXPORT ContentMainDelegate {
virtual bool ShouldInitializePerfetto(InvokedIn invoked_in);
#endif
+ virtual std::string_view GetBrowserV8SnapshotFilename();
+
@@ -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 41a25b402f330fcb84e4cca1365d3f72090e518d..4c4fb85d96e553912090f13c2ac1a48f3170a515 100644
index 20f364ab05b170485d40fa8651675e09d9f626ca..d7fedf4e8b1ff5c6168b49990d67a1ab09b1800e 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -648,8 +648,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,

View File

@@ -8,7 +8,7 @@ Subject: desktop_media_list.patch
* Ensure "OnRefreshComplete()" even if there are no items in the list
diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h
index 9a4e06d24b829ba51bf5c925e7a7290da6fad4f0..09895ccfa99999e6e0ea24a3190d3f429ee40344 100644
index 8b0a4f2f8adbb622ef16c315f5c73c51712d7e62..fcfe5845be6afd98b5472faf45d9f6f784b90b1b 100644
--- a/chrome/browser/media/webrtc/desktop_media_list.h
+++ b/chrome/browser/media/webrtc/desktop_media_list.h
@@ -108,7 +108,8 @@ class DesktopMediaList {
@@ -22,7 +22,7 @@ index 9a4e06d24b829ba51bf5c925e7a7290da6fad4f0..09895ccfa99999e6e0ea24a3190d3f42
virtual int GetSourceCount() const = 0;
virtual const Source& GetSource(int index) const = 0;
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
index 1f25e8321301b0a5cd8703b8a4e9ec840fc0331b..f95b2230135dbcd6b19a31215d4f10be3481148c 100644
index 627b7a435b64fcfad916ebc2c8b11facad061c68..0ba7d5f4a33fc19802b744ea7f2147fa2d78bcb6 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -70,12 +70,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) {
@@ -41,7 +41,7 @@ index 1f25e8321301b0a5cd8703b8a4e9ec840fc0331b..f95b2230135dbcd6b19a31215d4f10be
int DesktopMediaListBase::GetSourceCount() const {
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index de56c9b94f92e9abf69b1d4894e5d386cad6d3cd..f8955ef7cc43b1854b29841ed65260a1966a4b19 100644
index 8c6d8036bfee537b365b233ae91640fbe9748200..2ddca1e19004b988c1a9a1b6d0159784d5261543 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {
@@ -54,10 +54,10 @@ index de56c9b94f92e9abf69b1d4894e5d386cad6d3cd..f8955ef7cc43b1854b29841ed65260a1
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
index cea6af048e682e33b5d93e4a3bfb4072840ca4fe..1c98d2275fa73a9e105bbd8928e05b48a4a05c14 100644
index 5f03c8c729fc02fe35da3fb6f05b002667a06a43..069c0366300afdec87318ac2e18d14ac53ed992e 100644
--- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
@@ -79,7 +79,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) {
@@ -89,7 +89,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) {
thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
}
@@ -68,10 +68,10 @@ index cea6af048e682e33b5d93e4a3bfb4072840ca4fe..1c98d2275fa73a9e105bbd8928e05b48
}
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.h b/chrome/browser/media/webrtc/fake_desktop_media_list.h
index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2c8818d27 100644
index 9e6829aed1927b5e74929836fb1f0a0cc253e04c..27b97cd6fbf498e3e50c5d6948be3b3184218b0e 100644
--- a/chrome/browser/media/webrtc/fake_desktop_media_list.h
+++ b/chrome/browser/media/webrtc/fake_desktop_media_list.h
@@ -40,7 +40,8 @@ class FakeDesktopMediaList : public DesktopMediaList {
@@ -41,7 +41,8 @@ class FakeDesktopMediaList : public DesktopMediaList {
void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
void StartUpdating(DesktopMediaListObserver* observer) override;
@@ -82,7 +82,7 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 3be638f1032815d39634b5725031d7f3124e1ad2..fce3e30bc736ac72a42d24956d4abf9f49c8fc41 100644
index 50efe8dd0b715090bb2cef2b682ecead4b300ce3..eb7a094c3108f01a570b4bcb704ed075af377153 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
@@ -121,7 +121,7 @@ index 3be638f1032815d39634b5725031d7f3124e1ad2..fce3e30bc736ac72a42d24956d4abf9f
}
void NativeDesktopMediaList::Worker::OnCaptureResult(
@@ -1009,6 +1019,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
@@ -1010,6 +1020,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
base::Unretained(worker_.get()),
std::move(native_ids), thumbnail_size_));

View File

@@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 6cd1d4cb2a61d1ec61aa7ecb8b30e8d6ceec954d..17bb259e6322c522f582113b739cd7307d20d6c0 100644
index 6d0ad4ed5e8a48a19dbea3d729d7d54a1c7c0133..f16da50b848db9af6f8701b04b0170eaab12c5ae 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -559,7 +559,11 @@
@@ -19,6 +19,6 @@ index 6cd1d4cb2a61d1ec61aa7ecb8b30e8d6ceec954d..17bb259e6322c522f582113b739cd730
+ // prevent unnecessary compositor recycling.
+ const bool unattached = ![GetInProcessNSView() window];
+ browser_compositor_->SetRenderWidgetHostIsHidden(unattached);
}
// Headless mode forces focus change propagation inside Focus(), since there
// is no NSWindow to deliver the normal focus change notifications. As a
void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 2f31c60914b1964a55ef5eb5bf031c12cccf0d0c..a20632fe0a1c64652a299f8848511840b9267cd6 100644
index 3f70e5c18349575414aae38e2c1c9caf4a494594..081e2ceb505e4bb8104912df139f1f1deefe13d7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -845,6 +845,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -841,6 +841,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -21,10 +21,10 @@ index 2f31c60914b1964a55ef5eb5bf031c12cccf0d0c..a20632fe0a1c64652a299f8848511840
// 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 614390e29fa84af4c141102d86f3ebdb7293b813..0bb31ec2e957301e55c81225683ec9982ba63039 100644
index 848a6661dabb64c4eed3bf1d23e1de730918e05f..437e1aadf8d2583050a622b28c391715c131d32a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1036,6 +1036,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -1032,6 +1032,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
return synthetic_gesture_controller_.get();
}
@@ -34,10 +34,10 @@ index 614390e29fa84af4c141102d86f3ebdb7293b813..0bb31ec2e957301e55c81225683ec998
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 3c1f05313dc444f4e303e1d789db781953b824a4..4df91cea76224362565bb968852d05c1a4f865f9 100644
index 63a7dc99a9596f22379436c32325936ebd8d14e6..b4f1a82dc4294313c4439cb132ae05ea8cd19a99 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -710,7 +710,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -697,7 +697,7 @@ void RenderWidgetHostViewAura::HideImpl() {
CHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d36398866b170721 100644
index cb704a865eb1b748163a7c25b0a571585c2497b4..3b2fbefaeec2bac725d46bcfeea488122c873d76 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -617,7 +617,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -614,7 +614,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) {
@@ -19,10 +19,10 @@ index 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d3639886
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index b4d4bf43a45bc08970c9c2857da9adafd28da410..88010fe24109d006ff2e1a37f39c0db8e2be1c4f 100644
index e9197d95aa22f92007045537b004ea2e38a5d4f5..80683ec77cdc77d624254c19708f12acd47316a1 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1062,8 +1062,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -1057,8 +1057,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

View File

@@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
of the default V8 allocator. This probably can't be usptreamed.
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
index 8c32005730153251e93516340e4baa500d777178..ff444dc689542a909ec5aada39816931b3320921 100644
index 9dac402705385087ced2df2db757a07246984a94..cb49b4f085026658e920699ed285d524119d6aad 100644
--- a/gin/public/v8_platform.h
+++ b/gin/public/v8_platform.h
@@ -32,6 +32,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
@@ -21,10 +21,10 @@ index 8c32005730153251e93516340e4baa500d777178..ff444dc689542a909ec5aada39816931
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
#endif
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index 6a5d1eddb0d720cd8fbecfb2c4f9eb1bccb44de1..b3486e41b25e7b89b4b43d1ed0e56c019c4eab5d 100644
index 6ae7a3a0da35221cd00e02255cd63db8f7961d07..43c3ca4f367e0e63e24a37372f83f780e180667d 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -222,6 +222,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
@@ -204,6 +204,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
}
#endif // PA_BUILDFLAG(ENABLE_THREAD_ISOLATION)

View File

@@ -1,36 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: clavin <clavin@electronjs.org>
Date: Sat, 13 Dec 2025 15:30:46 -0800
Subject: expose GTK UI platform field
Chromium used to expose this as a public static method, backed by global storage. In 7237910, these conveniences were removed.
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 71eaed03a15ba2ab5bae874daecfb0e95ac7c64d..12915abc0ba658b87b3a867e308f1b81cad61a17 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -9,6 +9,7 @@
#include "base/feature_list.h"
#include "base/functional/bind.h"
+#include "base/functional/callback_helpers.h"
#include "base/lazy_instance.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_macros.h"
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
index 40caafa5ce58104da7d5e96eb1efad1c99a77664..b388fc462e0c320170e5b35550e48b6b19079f40 100644
--- a/ui/gtk/gtk_ui.h
+++ b/ui/gtk/gtk_ui.h
@@ -53,6 +53,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
~GtkUi() override;
+ GtkUiPlatform* GetPlatform() const { return platform_.get(); }
+
// Setters used by SettingsProvider:
void SetWindowButtonOrdering(
const std::vector<views::FrameButton>& leading_buttons,

View File

@@ -33,11 +33,11 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb27113285 100644
index 6026a9f59d584824b7f6f1a019ddee400cb8b402..0a501a140f965db3540b92c0de2741b1abce1d94 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1875,6 +1875,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
@@ -1907,6 +1907,13 @@ void NetworkContext::EnableDurableMessageCollector(
it->second->AddReceiver(std::move(receiver));
}
+void NetworkContext::SetUserAgent(const std::string& new_user_agent) {
@@ -51,24 +51,24 @@ index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb
// 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 4395ddd300e876bf5fdb02d23cd401276c29e07d..ab9bb1d559e7761165b98f7c08e29a5b0d1a4aa6 100644
index e58341cbf9d32093df048ec0ad90a83a74da7440..757f3224685bbe100ed6f4b479eee5b671846cfc 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -321,6 +321,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void SetNetworkConditions(
@@ -327,6 +327,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
const base::UnguessableToken& throttling_profile_id,
std::vector<mojom::MatchedNetworkConditionsPtr> conditions) override;
mojo::PendingReceiver<network::mojom::DurableMessageCollector> receiver)
override;
+ void SetUserAgent(const std::string& new_user_agent) override;
void SetAcceptLanguage(const std::string& new_accept_language) override;
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a3d10568f 100644
index 2d3eedd603de261aff0b27c4cfceaa007c105296..3fd579e67d9a2cc61028158a7fd0ad8c6159f084 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1268,6 +1268,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
array<MatchedNetworkConditions> conditions);
@@ -1302,6 +1302,9 @@ interface NetworkContext {
mojo_base.mojom.UnguessableToken throttling_profile_id,
pending_receiver<DurableMessageCollector> receiver);
+ // Updates the user agent to be used for requests.
+ SetUserAgent(string new_user_agent);
@@ -77,10 +77,10 @@ index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 195b237d37a8cf6739d83d87c79a67eb9f0a6bac..6381265ccba02b96b5d153585d576b7ed62b75af 100644
index f5cd53318d3c0d89b02764657b7409c9f35d5627..c3a2736b5846cdb5ec7d87d60a49c295d1fcc6f5 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -156,6 +156,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext {
void SetNetworkConditions(
const base::UnguessableToken& throttling_profile_id,
std::vector<mojom::MatchedNetworkConditionsPtr>) override {}

View File

@@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 1ea40bbc89db58e602fee5478b48a0f7b25ff93a..a2ed1d740680010b147e6ec7677ec3387bd7250f 100644
index a6c5b130bd102fb7121c83cad162d7bafe79430d..8a3ecf89cee9f2469068efebc1f7657cd62955e6 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -1920,6 +1920,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1895,6 +1895,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View File

@@ -16,7 +16,7 @@ remove this patch once gin::Wrappable can be managed by V8 Oilpan
via https://github.com/electron/electron/issues/47922
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 64edf6fe78d2478cb9e12e8767a09e2b6c7c6ad2..7c640559dc7a09730f0053be8798d10bc8ac1a1c 100644
index 05c899258143a958471f361b87324f7500d594c9..1943413560f23c212d98fa1b368204c6e062bab2 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -35,6 +35,8 @@ v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;

View File

@@ -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 4beb963ecd1c42b1d236cbfdafa9daf27ac61c06..68175244b3496f7b999ae4a3a3e14b5f2b7e659d 100644
index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9ab700a03 100644
--- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
+++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
@@ -8,6 +8,7 @@
@@ -113,9 +113,9 @@ index 4beb963ecd1c42b1d236cbfdafa9daf27ac61c06..68175244b3496f7b999ae4a3a3e14b5f
#include <utility>
+#include <algorithm>
#include "base/containers/contains.h"
#include "base/location.h"
#include "base/metrics/histogram_functions.h"
@@ -29,6 +30,7 @@
@@ -30,6 +31,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 4beb963ecd1c42b1d236cbfdafa9daf27ac61c06..68175244b3496f7b999ae4a3a3e14b5f
#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"
@@ -313,6 +315,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
@@ -314,6 +316,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
do_fail = true;
}
} else {

View File

@@ -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 4c4fb85d96e553912090f13c2ac1a48f3170a515..697c588ecd286942657b07f2a3fac05626904786 100644
index d7fedf4e8b1ff5c6168b49990d67a1ab09b1800e..05ba0cc17e8ea085b604827e2d0507a93a1a53e5 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {

View File

@@ -16,10 +16,10 @@ It also:
This may be partially upstreamed to Chromium in the future.
diff --git a/ui/gtk/select_file_dialog_linux_gtk.cc b/ui/gtk/select_file_dialog_linux_gtk.cc
index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181b230f085 100644
index bf903ea436f5d0c8599f7a122828fc163a192247..e1c5c8e9241d29668d0c7dae12a46a5ded900fac 100644
--- a/ui/gtk/select_file_dialog_linux_gtk.cc
+++ b/ui/gtk/select_file_dialog_linux_gtk.cc
@@ -271,8 +271,12 @@ void SelectFileDialogLinuxGtk::SelectFileImpl(
@@ -262,8 +262,12 @@ void SelectFileDialogLinuxGtk::SelectFileImpl(
case SELECT_EXISTING_FOLDER:
dialog = CreateSelectFolderDialog(type, title_string, default_path,
owning_window);
@@ -34,7 +34,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
break;
case SELECT_OPEN_FILE:
dialog = CreateFileOpenDialog(title_string, default_path, owning_window);
@@ -419,9 +423,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper(
@@ -410,9 +414,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper(
const std::string& title,
const base::FilePath& default_path,
gfx::NativeWindow parent) {
@@ -42,12 +42,12 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
+ button_label().empty() ? GetOpenLabel() : button_label().c_str();
GtkWidget* dialog = GtkFileChooserDialogNew(
title.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, GetCancelLabel(),
- GTK_RESPONSE_CANCEL, GetOpenLabel(), kResponseTypeAccept);
+ GTK_RESPONSE_CANCEL, accept_button_label, kResponseTypeAccept);
SetGtkTransientForAura(dialog, parent, platform_);
- GTK_RESPONSE_CANCEL, GetOpenLabel(), GTK_RESPONSE_ACCEPT);
+ GTK_RESPONSE_CANCEL, accept_button_label, GTK_RESPONSE_ACCEPT);
SetGtkTransientForAura(dialog, parent);
AddFilters(GTK_FILE_CHOOSER(dialog));
@@ -437,6 +443,7 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper(
@@ -428,6 +434,7 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper(
GtkFileChooserSetCurrentFolder(GTK_FILE_CHOOSER(dialog),
*last_opened_path());
}
@@ -55,7 +55,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
return dialog;
}
@@ -452,11 +459,15 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog(
@@ -443,11 +450,15 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog(
? l10n_util::GetStringUTF8(IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE)
: l10n_util::GetStringUTF8(IDS_SELECT_FOLDER_DIALOG_TITLE);
}
@@ -76,7 +76,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
GtkWidget* dialog = GtkFileChooserDialogNew(
title_string.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
@@ -478,7 +489,8 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog(
@@ -469,7 +480,8 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog(
gtk_file_filter_add_mime_type(only_folders, "inode/directory");
gtk_file_filter_add_mime_type(only_folders, "text/directory");
gtk_file_chooser_add_filter(chooser, only_folders);
@@ -86,7 +86,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
return dialog;
}
@@ -515,10 +527,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog(
@@ -506,10 +518,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog(
std::string title_string =
!title.empty() ? title
: l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE);
@@ -97,10 +97,10 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
title_string.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_SAVE,
- GetCancelLabel(), GTK_RESPONSE_CANCEL, GetSaveLabel(),
+ GetCancelLabel(), GTK_RESPONSE_CANCEL, accept_button_label,
kResponseTypeAccept);
SetGtkTransientForAura(dialog, parent, platform_);
GTK_RESPONSE_ACCEPT);
SetGtkTransientForAura(dialog, parent);
@@ -544,9 +557,10 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog(
@@ -535,9 +548,10 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog(
gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), FALSE);
// Overwrite confirmation is always enabled in GTK4.
if (!GtkCheckVersion(4)) {
@@ -113,7 +113,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
return dialog;
}
@@ -602,15 +616,29 @@ void SelectFileDialogLinuxGtk::OnSelectSingleFolderDialogResponse(
@@ -592,15 +606,29 @@ void SelectFileDialogLinuxGtk::OnSelectSingleFolderDialogResponse(
void SelectFileDialogLinuxGtk::OnSelectMultiFileDialogResponse(
GtkWidget* dialog,
int response_id) {
@@ -146,7 +146,7 @@ index 3894f32763f6de0dd8523ccb75516b6d7ef2d788..6674bd0e8aeabf1d2c356239ce874181
FileNotSelected(dialog);
return;
diff --git a/ui/gtk/select_file_dialog_linux_gtk.h b/ui/gtk/select_file_dialog_linux_gtk.h
index 454854b6571d7b000e1acaf94e529d5fde962c6f..8f7e1a633e9223b5dd3fb94787bf22185ea1c656 100644
index 213eaa5ec6d657a659726cb38103e8bd671fe907..f497447c598198bf690758b1d1c5c6fe4112627f 100644
--- a/ui/gtk/select_file_dialog_linux_gtk.h
+++ b/ui/gtk/select_file_dialog_linux_gtk.h
@@ -108,6 +108,12 @@ class SelectFileDialogLinuxGtk : public ui::SelectFileDialogLinux,
@@ -262,12 +262,12 @@ index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443
} // namespace ui
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index c66b8da5d3ce640c1a1bdfdaec66bba3b4878d3e..bf57b000175b93908ed44b31726dc1941d9bf5a9 100644
index 6430ef980736b18133a0a7834c2cbe431a41fd12..f866fb717e6770c4eb6139fea835accdf571d551 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -22,9 +22,11 @@
@@ -21,9 +21,11 @@
#include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "components/dbus/xdg/portal.h"
#include "components/dbus/xdg/portal_constants.h"
#include "components/dbus/xdg/request.h"
+#include "components/dbus/xdg/systemd.h"
#include "dbus/message.h"
@@ -277,13 +277,58 @@ index c66b8da5d3ce640c1a1bdfdaec66bba3b4878d3e..bf57b000175b93908ed44b31726dc194
#include "ui/aura/window_tree_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_ui_types.h"
@@ -349,11 +351,14 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -95,7 +97,7 @@ void OnGetPropertyReply(dbus::Response* response) {
: ServiceAvailability::kNotAvailable;
}
-void OnServiceStarted(bool service_started) {
+[[maybe_unused]] void OnServiceStarted(bool service_started) {
if (!service_started) {
g_service_availability = ServiceAvailability::kNotAvailable;
return;
@@ -113,6 +115,11 @@ void OnServiceStarted(bool service_started) {
base::BindOnce(&OnGetPropertyReply));
}
+void OnSystemdUnitStarted(dbus_xdg::internal::SystemdUnitStatus) {
+ file_dialog::StartPortalAvailabilityTestInBackground();
+}
+
+
std::vector<uint8_t> PathToByteArray(const base::FilePath& path) {
std::vector<uint8_t> bytes(path.value().begin(), path.value().end());
// Null-terminate the array.
@@ -163,18 +170,21 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
GetMainTaskRunner() = base::SequencedTaskRunner::GetCurrentDefault();
- dbus_xdg::RequestXdgDesktopPortal(
+ dbus_xdg::internal::SetSystemdScopeUnitNameForXdgPortal(
dbus_thread_linux::GetSharedSessionBus().get(),
- base::BindOnce(&OnServiceStarted));
+ base::BindOnce(&OnSystemdUnitStarted));
}
// static
bool SelectFileDialogLinuxPortal::IsPortalAvailable() {
+#if 0
if (g_service_availability == ServiceAvailability::kInProgress) {
LOG(WARNING) << "Portal availability checked before test was complete";
}
return g_service_availability == ServiceAvailability::kAvailable;
+#endif
+ return file_dialog::IsPortalAvailable();
}
void SelectFileDialogLinuxPortal::ListenerDestroyed() {
@@ -378,11 +388,14 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
const PortalFilterSet& filter_set) {
dbus_xdg::Dictionary dict;
+ std::string accept_label = button_label().empty() ? "" : button_label();
+
switch (type()) {
switch (type_) {
case SelectFileDialog::SELECT_UPLOAD_FOLDER:
- dict[kFileChooserOptionAcceptLabel] =
- dbus_utils::Variant::Wrap<"s">(l10n_util::GetStringUTF8(
@@ -295,7 +340,7 @@ index c66b8da5d3ce640c1a1bdfdaec66bba3b4878d3e..bf57b000175b93908ed44b31726dc194
[[fallthrough]];
case SelectFileDialog::SELECT_FOLDER:
case SelectFileDialog::Type::SELECT_EXISTING_FOLDER:
@@ -366,6 +371,11 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -395,6 +408,11 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
break;
}

View File

@@ -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 68a3095a49caf472c83b93b5cef66e5549a2d7cc..aa371ba5576f9fbaf5558e39704f7eb87ec7511e 100644
index fb3fdfca483ff5041ee98095af3f6ac2640adbaf..ada19d78ec1337b0c49a1597c877886f69f84f13 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 68a3095a49caf472c83b93b5cef66e5549a2d7cc..aa371ba5576f9fbaf5558e39704f7eb8
+
} // 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 ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..cf1d94f43238fc3166ca0488b72c929be07e3c52 100644
index 63be7d4b9c4ffd1a830896dea9b7f9c58d868b03..1db331bdfff07de61240df894fd8fddd25b2a453 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 @@
@@ -273,15 +273,15 @@ index ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..cf1d94f43238fc3166ca0488b72c929b
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
@@ -42,6 +43,7 @@
#include "third_party/perfetto/include/perfetto/tracing/track_event_args.h"
@@ -40,6 +41,7 @@
#include "third_party/blink/public/mojom/loader/code_cache.mojom-data-view.h"
#include "url/gurl.h"
#include "url/origin.h"
+#include "url/url_util.h"
using blink::mojom::CacheStorageError;
@@ -56,6 +58,11 @@ enum class Operation {
@@ -54,6 +56,11 @@ enum class Operation {
kWrite,
};
@@ -293,7 +293,7 @@ index ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..cf1d94f43238fc3166ca0488b72c929b
bool CheckSecurityForAccessingCodeCacheData(const GURL& resource_url,
int render_process_id,
Operation operation) {
@@ -67,42 +74,56 @@ bool CheckSecurityForAccessingCodeCacheData(const GURL& resource_url,
@@ -65,42 +72,56 @@ bool CheckSecurityForAccessingCodeCacheData(const GURL& resource_url,
ChildProcessSecurityPolicyImpl::GetInstance()->GetProcessLock(
render_process_id);
@@ -373,7 +373,7 @@ index ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..cf1d94f43238fc3166ca0488b72c929b
}
if (operation == Operation::kWrite) {
@@ -180,6 +201,7 @@ std::optional<GURL> GetOriginLock(int render_process_id) {
@@ -178,6 +199,7 @@ std::optional<GURL> GetOriginLock(int render_process_id) {
process_lock.MatchesScheme(url::kHttpsScheme) ||
process_lock.MatchesScheme(content::kChromeUIScheme) ||
process_lock.MatchesScheme(content::kChromeUIUntrustedScheme) ||
@@ -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 bbf9aa18ffb03a45cef59855fc4ca9ab36d00739..1d26a531fd89be680a704bdc8155908f537da5fa 100644
index 0aca7cc1565e2d6faf47bc1d001362a3629d39aa..50b15e06956c47e94ccd801fb3ee91aeb77ae15c 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -131,6 +131,9 @@ struct SchemeRegistry {
@@ -445,7 +445,7 @@ index bbf9aa18ffb03a45cef59855fc4ca9ab36d00739..1d26a531fd89be680a704bdc8155908f
std::string_view handler) {
DoAddSchemeWithHandler(
diff --git a/url/url_util.h b/url/url_util.h
index 1f9304c7ea5488a1c50891e3dabfa3a61af97b7b..f965c1dbd47781748d3091209d140a128ca7192f 100644
index 501baa71f6ec135827b505c2eca78c7e9ac0b8d3..10bf2c6e27dca530906ef7acb7ac43fa5c731d22 100644
--- a/url/url_util.h
+++ b/url/url_util.h
@@ -115,6 +115,15 @@ COMPONENT_EXPORT(URL) const std::vector<std::string>& GetCSPBypassingSchemes();

View File

@@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
This patch is used by Electron to implement spellchecker events.
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index b2741f7b47647f11741745b62b32272dcdbff557..b020b6c3c0bd9c481e8b8385df2aa3259fd15b45 100644
index 592ef6e731e0539471408ad0ce5f089bfe2549be..f8a36ced14288698849cd5730309e29d47d3d1d4 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -480,6 +480,8 @@ void SpellcheckService::LoadDictionaries() {
@@ -477,6 +477,8 @@ void SpellcheckService::LoadDictionaries() {
std::make_unique<SpellcheckHunspellDictionary>(
dictionary, platform_spellcheck_language, context_, this));
hunspell_dictionaries_.back()->AddObserver(this);
@@ -19,7 +19,7 @@ index b2741f7b47647f11741745b62b32272dcdbff557..b020b6c3c0bd9c481e8b8385df2aa325
hunspell_dictionaries_.back()->Load();
}
@@ -530,6 +532,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
@@ -527,6 +529,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
}

View File

@@ -10,10 +10,10 @@ Electron needs this constructor, namely for gin_helper::Constructible
objects.
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 196749df48a41595da226a4baec72051446fc442..256e6634d9689ebcc53dfc8849587a73ad311463 100644
index 90966dc917099ae749118f3e740b76ff477cf92d..b84f5fd336bc4b61b2cd0b2fc92382b00e928701 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -145,6 +145,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
@@ -144,6 +144,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
template_->SetInternalFieldCount(kNumberOfInternalFields);
}

View File

@@ -46,7 +46,7 @@ index e2771b7b281274cdcb601a5bc78a948ad592087b..48d116823a28213e50775f378e6ce04c
// OnStop is called by StopAndDeAllocate.
virtual void OnStop() = 0;
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d313f401cd1 100644
index 5e7f34178a549dc1e894262d0091b5b98c9ba48b..8d1de709cfa881df8a2a67bb6180aa78e9dfd6cf 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -28,6 +28,61 @@
@@ -111,7 +111,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
namespace {
API_AVAILABLE(macos(12.3))
@@ -151,18 +206,22 @@ @interface ScreenCaptureKitDeviceHelper
@@ -148,18 +203,22 @@ @interface ScreenCaptureKitDeviceHelper
: NSObject <SCStreamDelegate, SCStreamOutput>
- (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback
@@ -134,7 +134,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
_errorCallback = errorCallback;
}
return self;
@@ -254,12 +313,11 @@ class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
@@ -251,12 +310,11 @@ class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
explicit ScreenCaptureKitDeviceMac(
const DesktopMediaID& source,
@@ -148,7 +148,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
stream_created_callback_(std::move(stream_created_callback)),
device_task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()),
pip_screen_capture_coordinator_proxy_(
@@ -268,21 +326,43 @@ explicit ScreenCaptureKitDeviceMac(
@@ -265,21 +323,43 @@ explicit ScreenCaptureKitDeviceMac(
device_task_runner_,
base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamSample,
weak_factory_.GetWeakPtr()));
@@ -192,7 +192,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
if (pip_screen_capture_coordinator_proxy_) {
pip_screen_capture_coordinator_proxy_->RemoveObserver(this);
@@ -373,7 +453,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -358,7 +438,7 @@ void CreateStream(SCContentFilter* filter) {
return;
}
@@ -201,7 +201,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
// Update the content size. This step is neccessary when used together
// with SCContentSharingPicker. If the Chrome picker is used, it will
// change to retina resolution if applicable.
@@ -382,6 +462,9 @@ void CreateStream(SCContentFilter* filter) {
@@ -367,6 +447,9 @@ void CreateStream(SCContentFilter* filter) {
filter.contentRect.size.height * filter.pointPixelScale);
}
@@ -211,7 +211,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
gfx::RectF dest_rect_in_frame;
actual_capture_format_ = capture_params().requested_format;
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
@@ -395,6 +478,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -380,6 +463,7 @@ void CreateStream(SCContentFilter* filter) {
stream_ = [[SCStream alloc] initWithFilter:filter
configuration:config
delegate:helper_];
@@ -219,7 +219,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
{
NSError* error = nil;
bool add_stream_output_result =
@@ -554,7 +638,7 @@ void OnStreamError() {
@@ -539,7 +623,7 @@ void OnStreamError() {
if (fullscreen_module_) {
fullscreen_module_->Reset();
}
@@ -228,8 +228,8 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
} else {
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
FROM_HERE, "Stream delegate called didStopWithError");
@@ -640,23 +724,41 @@ void OnStateChanged(
}
@@ -625,23 +709,41 @@ void OnCapturesChanged(
captures) override {}
// IOSurfaceCaptureDeviceBase:
- void OnStart() override {
@@ -285,7 +285,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
}
void OnStop() override {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -715,7 +817,7 @@ void ResetStreamTo(SCWindow* window) override {
@@ -700,7 +802,7 @@ void ResetStreamTo(SCWindow* window) override {
private:
const DesktopMediaID source_;
@@ -294,7 +294,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
StreamCallback stream_created_callback_;
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
@@ -732,6 +834,10 @@ void ResetStreamTo(SCWindow* window) override {
@@ -717,6 +819,10 @@ void ResetStreamTo(SCWindow* window) override {
// Helper class that acts as output and delegate for `stream_`.
ScreenCaptureKitDeviceHelper* __strong helper_;
@@ -305,7 +305,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31
// This is used to detect when a captured presentation enters fullscreen mode.
// If this happens, the module will call the ResetStreamTo function.
std::unique_ptr<ScreenCaptureKitFullscreenModule> fullscreen_module_;
@@ -746,6 +852,8 @@ void ResetStreamTo(SCWindow* window) override {
@@ -731,6 +837,8 @@ void ResetStreamTo(SCWindow* window) override {
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
};
@@ -367,7 +367,7 @@ 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 f422e0ec81ee354512a10dafdd1bd8659a7e3d67..8095a5cb0060ed20a4b82e98b4921a8919077d7e 100644
index 092bd4524b81734d1b428ab0b201887d411f8277..d0300a4b1a2265d1db977b9bf0ffdd6d0a9d9d37 100644
--- a/media/capture/video_capture_types.h
+++ b/media/capture/video_capture_types.h
@@ -365,6 +365,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {

View File

@@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
parent process to read from the pipe.
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
index 1b42600b2d240c1215c1b7223ac2aaa7c90794fc..65ffcb9491176722bb573be78ed15e81a9047c29 100644
index 0a47fb58e86d57d6cec3784d3b163c59592b585e..d2877fdd3bcff75248bad6a0462233cde82a104c 100644
--- a/content/browser/child_process_launcher.h
+++ b/content/browser/child_process_launcher.h
@@ -33,6 +33,7 @@
@@ -30,7 +30,7 @@ index 1b42600b2d240c1215c1b7223ac2aaa7c90794fc..65ffcb9491176722bb573be78ed15e81
#endif
#if BUILDFLAG(IS_POSIX)
@@ -199,7 +200,10 @@ struct ChildProcessLauncherFileData {
@@ -194,7 +195,10 @@ struct ChildProcessLauncherFileData {
delete;
~ChildProcessLauncherFileData();
@@ -42,7 +42,7 @@ index 1b42600b2d240c1215c1b7223ac2aaa7c90794fc..65ffcb9491176722bb573be78ed15e81
// Files opened by the browser and passed as corresponding file descriptors
// in the child process. If a FilePath is provided, the file will be opened
// and the descriptor cached for future process launches. If a ScopedFD is
@@ -214,6 +218,15 @@ struct ChildProcessLauncherFileData {
@@ -209,6 +213,15 @@ struct ChildProcessLauncherFileData {
std::map<std::string, std::variant<base::FilePath, base::ScopedFD>>
files_to_preload;
#endif
@@ -707,7 +707,7 @@ index c5fee4ad8b246bc1113a383794c6101bade24df3..61f0a0f62795b30105c42da363205284
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
index 2b23d76459e5f714ac33868ea247ebbb9d51bb2a..edb3838b8b30dd0767c1aaeabed29f73ce8249dc 100644
index dac5e25ceccf1a7f51c983cde387840e671513ae..e47117ec646378ecdb8d06dcb10cd9addacff571 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -605,11 +605,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@@ -783,10 +783,10 @@ index 2b23d76459e5f714ac33868ea247ebbb9d51bb2a..edb3838b8b30dd0767c1aaeabed29f73
DWORD last_error = GetLastError();
std::move(result_callback).Run(base::Process(), last_error, result);
diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h
index e057913cb3c7e51c6c48ecd5dca684525e580392..b92227497f07ab277ee8157187ce8ed34ea0a3eb 100644
index 8fb74a2eefba49f95e4947ef9fd081ab8decebd4..3eed3d348132d5992c27bd8082a267fb42d4e431 100644
--- a/sandbox/policy/win/sandbox_win.h
+++ b/sandbox/policy/win/sandbox_win.h
@@ -93,7 +93,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
@@ -92,7 +92,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
// any other error.
static ResultCode StartSandboxedProcess(
const base::CommandLine& cmd_line,
@@ -795,7 +795,7 @@ index e057913cb3c7e51c6c48ecd5dca684525e580392..b92227497f07ab277ee8157187ce8ed3
SandboxDelegate* delegate,
StartSandboxedProcessCallback result_callback);
@@ -106,7 +106,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
@@ -105,7 +105,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
// of sandbox::ResultCode for any other error while constructing the policy.
static ResultCode GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,

View File

@@ -20,18 +20,17 @@ 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 82fd11ba5dd4987f50a413b7f0600e71ddc195f9..0b16b81ddeee1e35bb1da1752a9952e8a8650473 100644
index dcb557b9e56182381111c3949abd91906f4442bd..4fb1fe0e2a81cd75f9645cb86218a441ba0c7949 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 {
@@ -48,6 +48,7 @@ enum CSSSampleId {
kInternalForcedVisitedColor = 0,
kInternalOverflowBlock = 0,
kInternalOverflowInline = 0,
kInternalOverscrollArea = 0,
kInternalOverscrollPosition = 0,
-
+ kElectronCornerSmoothing = 0,
// This CSSSampleId represents page load for CSS histograms. It is recorded once
// per page visit for each CSS histogram being logged on the blink side and the
// browser side.
diff --git a/third_party/blink/renderer/build/scripts/core/css/css_properties.py b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97cae13447aa 100755
--- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py
@@ -46,10 +45,10 @@ index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97ca
'internal-forced-visited-'):
internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index d98fecdf3bfd4085789c6076c61f1e6c15cc00bb..2818fad9bade98d41d0370318aca4785d159b4c8 100644
index 95b22057b76a68093dd23b58f8703fe839d21fe6..05cee080f45317cbc598723f98fabc7e7d338e45 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -9222,6 +9222,26 @@
@@ -9136,6 +9136,26 @@
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
},
@@ -77,7 +76,7 @@ index d98fecdf3bfd4085789c6076c61f1e6c15cc00bb..2818fad9bade98d41d0370318aca4785
{
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 358ab7ffc4af7f55a1ee0e0dba0b68296efe3836..d93152fef81184db7e560154a7f140c3c7bc5e30 100644
index 3b4550faf6842f4e3c8d63827247305b1ca59b07..a7a63766245b8c44a4437e32ef3a3a7b4c3da82b 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 +89,17 @@ index 358ab7ffc4af7f55a1ee0e0dba0b68296efe3836..d93152fef81184db7e560154a7f140c3
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 c64a0bd87335675e1757b14232477db82d42c08b..364b53d64bf3baa77abaa2baa59b1be84dc8147c 100644
index 3788ca0c5421222015229f23e89241441f38a704..5e18e6a6d14321941f3b58cba2eb746c6a9b4cae 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
@@ -12590,5 +12590,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
@@ -12682,5 +12682,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
CSSValueID::kNone>(stream);
}
+const CSSValue* ElectronCornerSmoothing::ParseSingleValue(
+ CSSParserTokenStream& stream,
+ const CSSParserContext& context,
+ CSSParserLocalContext&) const {
+ const CSSParserLocalContext&) const {
+ // Try to parse `system-ui` keyword first.
+ if (auto* ident =
+ css_parsing_utils::ConsumeIdent<CSSValueID::kSystemUi>(stream)) {
@@ -131,10 +130,10 @@ index c64a0bd87335675e1757b14232477db82d42c08b..364b53d64bf3baa77abaa2baa59b1be8
} // 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 d1ec024d45aee048a363c1cef2bd42ba44f3fda5..f89f4e6b703a4e817d555519b2682ffc4d4aef53 100644
index 79ba55e40da39f4ed1a230829cbc679bbb909a35..8d4a728d531171a52138df8aee4cce2b93736e92 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
@@ -4167,6 +4167,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
@@ -4093,6 +4093,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
return PositionTryFallback(scoped_name, tactic_list);
}
@@ -151,10 +150,10 @@ index d1ec024d45aee048a363c1cef2bd42ba44f3fda5..f89f4e6b703a4e817d555519b2682ffc
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 4a2738ca16223f4b790cac564b733ee732913a96..76c183682ad5b7974644f18afb0e418e2a614082 100644
index d0afe23ae2c65400b48d5dae1db71c19a59d1a2b..da158fe4b4adbf780d7a022cc75cb0c219ef6744 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
@@ -456,6 +456,7 @@ class StyleBuilderConverter {
@@ -450,6 +450,7 @@ class StyleBuilderConverter {
StyleResolverState&,
const CSSValue&,
bool allow_any_keyword_in_position_area = false);
@@ -202,7 +201,7 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f
return result;
}
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index d0a36746a94ee1839b696f7d0bb25effdea69dc9..9995b67c88ed79d6f359870e0c423e19b8341c04 100644
index 8da54e9ff7fd7d4b0e732b556eed440ac33189d9..0ed3bc36ad14d96b6be0b7597f1660de07d92e3b 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1666,6 +1666,8 @@ component("platform") {
@@ -313,7 +312,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 875b7c1b2724cbf3841fa50d751798751191d9b7..c5497a3a257e7fc8c3e8d2d638bf9c82209a7ebf 100644
index aa489c0cd258772d05aae66b34d2b3a919483700..09eabb02b13a0500f8d81be14e360297b358fb06 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 @@

View File

@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index b3499d99f684b0463c07656633447b7c7dcdd7bb..802d43a0459409749545d61449593dfecca9e7d1 100644
index 9af007dfc14e442d34ebe82fc678ea9f32782cdf..850f8627170b4de652b2975f47d7bc48458d8ed7 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -176,6 +176,8 @@ viz_component("service") {
@@ -521,7 +521,7 @@ index b5154321105f08335b67ad2d552afa61337a4976..cb28230d9a8da6bd2259ef0c89801329
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 6608224b2901e8785b6bb88b8d220d3a1d35c389..5de8ef248144439296be1f5da046ffbc7652059c 100644
index d8f845998240032f668324665d61b2efd60c0e1c..9eb5ab874ceecb4902b9272ce574d81302cf2802 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -131,7 +131,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -563,10 +563,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1
gpu::SyncPointManager* GetSyncPointManager() override;
gpu::Scheduler* GetGpuScheduler() override;
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index 8eb6ce27082c858283f56cc67f4f3012d4a624c2..6228b6935102002fdbaff31dccf5a1a8257d395b 100644
index 43d29976d8bd42d3ee6857db7d61f31c26795848..1d5852b1e4f1e628bd9b24b381ff3b17a4dd9165 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -406,8 +406,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@@ -596,7 +596,7 @@ index 78a96bff9ba9e24dababf758ba38f9b430b39a14..7b46e68f52e3c13f731ce48670600442
// Sends the created child window to the browser process so that it can be
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index 454c1872d6c247687a73391c57007f8ca74725ea..20e57d92fbcfaddbc0826de8820efb7cd96db56e 100644
index a00590c765ea1813b7f69a1848fd54e9ac3ba4d1..087047d92d20a16a8f3fc4eec9aeb0a6c4413fb2 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -40,6 +40,7 @@ struct RootCompositorFrameSinkParams {

View File

@@ -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 3d3df95fd2b6eb8c5eb978d3c28880d0237c186c..9a59fbca69d790931558fea040a93cb94a209cde 100644
index c71abe34bb2c2d7cc30e7f8df81b8d71ebfd076e..8b03d8379ee81fa45d7e127d153717b1abb1475e 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -370,6 +370,9 @@ URLLoader::URLLoader(
@@ -386,6 +386,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
TaskRunner(request.priority)),
per_factory_orb_state_(context.GetMutableOrbState()),
@@ -125,7 +125,7 @@ index 3d3df95fd2b6eb8c5eb978d3c28880d0237c186c..9a59fbca69d790931558fea040a93cb9
devtools_request_id_(request.devtools_request_id),
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -543,7 +546,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
@@ -554,7 +557,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@@ -134,7 +134,7 @@ index 3d3df95fd2b6eb8c5eb978d3c28880d0237c186c..9a59fbca69d790931558fea040a93cb9
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1132,6 +1135,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1151,6 +1154,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@@ -155,10 +155,10 @@ index 3d3df95fd2b6eb8c5eb978d3c28880d0237c186c..9a59fbca69d790931558fea040a93cb9
ad_auction_event_record_request_helper_.HandleResponse(
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index a2bd92673272f1d356d76fbd1ac9f8195d0e40ee..a83c98f8a6fdf86c563bc99829543d9ffde8c5f6 100644
index f437df6e20b7d4e28f5e57e2134c5c7fa9da2bdc..661fef04f6b76abef852ba8eef63b1f78b01652c 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -625,6 +625,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -624,6 +624,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View File

@@ -7,38 +7,29 @@ Subject: feat: filter out non-shareable windows in the current application in
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 34343b8a8270a25f2528efff70d5ab05d4de3242..d864b712d47452d1941aeae870da91ec2dfc8691 100644
index db54df43b6126a9ddabee8cabed7a3a2c22f77ca..5e7f34178a549dc1e894262d0091b5b98c9ba48b 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -310,6 +310,31 @@ void OnShareableContentCreated(SCShareableContent* content) {
@@ -307,8 +307,21 @@ void OnShareableContentCreated(SCShareableContent* content) {
source_.id == webrtc::kFullDesktopScreenId) {
NSArray<SCWindow*>* excluded_windows = GetWindowsToExclude(
content, pip_screen_capture_coordinator_proxy_.get(), source_);
+ NSArray<NSWindow*>* non_sharing_nswindows = [[[NSApplication
+ sharedApplication] windows]
+ filteredArrayUsingPredicate:[NSPredicate
+ predicateWithBlock:^BOOL(
+ NSWindow* win,
+ NSDictionary* bindings) {
+ return [win sharingType] ==
+ NSWindowSharingNone;
+ }]];
+ NSArray<SCWindow*>* non_sharing_scwindows = [[content windows]
+ filteredArrayUsingPredicate:
+ [NSPredicate predicateWithBlock:^BOOL(
+ SCWindow* win, NSDictionary* bindings) {
+ for (NSWindow* excluded : non_sharing_nswindows) {
+ if ((CGWindowID)[excluded windowNumber] ==
+ [win windowID]) {
+ return true;
+ }
+ }
+ return false;
+ }]];
NSArray<SCWindow*>* excluded_windows = GetExcludedWindows(
content, pip_screen_capture_coordinator_proxy_.get());
+ NSArray<NSWindow*>* exclude_ns_windows = [[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) {
+ return [win sharingType] == NSWindowSharingNone;
+ }]];
+ NSArray<SCWindow*>* exclude_windows = [[content windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SCWindow* win, NSDictionary *bindings) {
+ for (NSWindow* excluded : exclude_ns_windows) {
+ if ((CGWindowID)[excluded windowNumber] == [win windowID]) return true;
+ }
+ return false;
+ }]];
+ // Combine excluded windows from PiP and non-shareable windows.
+ excluded_windows = [excluded_windows
+ arrayByAddingObjectsFromArray:non_sharing_scwindows];
+ NSMutableArray<SCWindow*>* combined_excluded_windows = [excluded_windows mutableCopy];
+ [combined_excluded_windows addObjectsFromArray:exclude_windows];
+
filter = [[SCContentFilter alloc] initWithDisplay:display
excludingWindows:excluded_windows];
- excludingWindows:excluded_windows];
+ excludingWindows:combined_excluded_windows];
stream_config_content_size_ =
gfx::Size(display.width, display.height);
break;

View File

@@ -20,68 +20,57 @@ This patch will be removed when the deprecated sync api support is
removed.
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
index cdba817db9814c59a39ec058d05a842fa6b55f69..d6bab225f22d0c32ce4361a1a879c62faf9cee81 100644
index 766ad28c66348f79164d8690faffb936bf659884..7b1131679ef84ca575629f46ad98483eeb4d8d9e 100644
--- a/components/permissions/permission_util.cc
+++ b/components/permissions/permission_util.cc
@@ -553,7 +553,8 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
return ContentSettingsType::LOCAL_NETWORK;
case PermissionType::LOOPBACK_NETWORK:
return ContentSettingsType::LOOPBACK_NETWORK;
- case PermissionType::NUM:
+ case PermissionType::GEOLOCATION_APPROXIMATE:
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: case PermissionType::NUM:
@@ -538,6 +538,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
return ContentSettingsType::WEB_APP_INSTALLATION;
case PermissionType::LOCAL_NETWORK_ACCESS:
return ContentSettingsType::LOCAL_NETWORK_ACCESS;
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
case PermissionType::NUM:
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index b47be001075cfd1ef963cac3e877704c64bc62f4..1b99c0e3bd89fb909bc18537dc70c0e04f4149c7 100644
index 40cb6f6c4f6fe68d1351a19c4da03538d3dfd3d1..b2a8eea4c802b7fbe2a098c8fae8d640e2d0b169 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -97,7 +97,8 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
@@ -94,6 +94,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
case PermissionType::AUTOMATIC_FULLSCREEN:
case PermissionType::WEB_APP_INSTALLATION:
case PermissionType::LOCAL_NETWORK_ACCESS:
case PermissionType::LOCAL_NETWORK:
case PermissionType::LOOPBACK_NETWORK:
- return std::nullopt;
+ case PermissionType::GEOLOCATION_APPROXIMATE:
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: return std::nullopt;
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
return std::nullopt;
}
}
diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc
index 17ff5e9376c44ef0dba7d2f95c50e1af5230b140..260951e60f5d805a044afe94cad6fca86bb7e365 100644
index 6c36ada80f6f225b84a8f3832405128f8ba83224..714d582d1060873765b24770b18eddcbbdcf5506 100644
--- a/content/browser/permissions/permission_descriptor_util.cc
+++ b/content/browser/permissions/permission_descriptor_util.cc
@@ -180,7 +180,12 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType(
case blink::PermissionType::LOOPBACK_NETWORK:
@@ -171,6 +171,9 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType(
case blink::PermissionType::LOCAL_NETWORK_ACCESS:
return CreatePermissionDescriptor(
blink::mojom::PermissionName::LOOPBACK_NETWORK);
- case blink::PermissionType::NUM:
+ case blink::PermissionType::GEOLOCATION_APPROXIMATE:
+ return CreatePermissionDescriptor(
+ blink::mojom::PermissionName::GEOLOCATION_APPROXIMATE);
blink::mojom::PermissionName::LOCAL_NETWORK_ACCESS);
+ case blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
+ return CreatePermissionDescriptor(
+ blink::mojom::PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ); case blink::PermissionType::NUM:
+ blink::mojom::PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ);
case blink::PermissionType::NUM:
NOTREACHED();
}
NOTREACHED();
diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc
index 47e020ed0e706dee01fbee90a2af2fe6c521cd9b..9297e5667ef794fad52d76d878d2d50aefad3d11 100644
index 4dd8b8d4498cbe00b5739f620037ebe6915b6033..2d7d9e96522208835a867e0be12df4da56141ab1 100644
--- a/third_party/blink/common/permissions/permission_utils.cc
+++ b/third_party/blink/common/permissions/permission_utils.cc
@@ -108,7 +108,10 @@ std::string GetPermissionString(PermissionType permission) {
return "LocalNetwork";
case PermissionType::LOOPBACK_NETWORK:
return "LoopbackNetwork";
- case PermissionType::NUM:
+ case PermissionType::GEOLOCATION_APPROXIMATE:
+ return "GeolocationApproximate";
@@ -102,6 +102,8 @@ std::string GetPermissionString(PermissionType permission) {
return "WebAppInstallation";
case PermissionType::LOCAL_NETWORK_ACCESS:
return "LocalNetworkAccess";
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
+ return "DeprecatedSyncClipboardRead"; case PermissionType::NUM:
+ return "DeprecatedSyncClipboardRead";
case PermissionType::NUM:
NOTREACHED();
}
NOTREACHED();
@@ -189,6 +192,7 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
@@ -176,6 +178,7 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
case PermissionType::NOTIFICATIONS:
case PermissionType::KEYBOARD_LOCK:
case PermissionType::POINTER_LOCK:
@@ -90,31 +79,31 @@ index 47e020ed0e706dee01fbee90a2af2fe6c521cd9b..9297e5667ef794fad52d76d878d2d50a
case PermissionType::NUM:
diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h
index 638d0ee4fb368d28465322d34dbfca645ecd162d..38c20e7f0c597815ce5ee3333f12183ac1e18c62 100644
index 5c82a641538802bc459782ea422a1186045b054a..c286d87043ec4cb2e51ec9d82d08e4c84f5a270c 100644
--- a/third_party/blink/public/common/permissions/permission_utils.h
+++ b/third_party/blink/public/common/permissions/permission_utils.h
@@ -69,7 +69,7 @@ enum class PermissionType {
LOCAL_NETWORK = 44,
LOOPBACK_NETWORK = 45,
GEOLOCATION_APPROXIMATE = 46,
-
+ DEPRECATED_SYNC_CLIPBOARD_READ = 47,
@@ -65,6 +65,7 @@ enum class PermissionType {
HAND_TRACKING = 41,
WEB_APP_INSTALLATION = 42,
LOCAL_NETWORK_ACCESS = 43,
+ DEPRECATED_SYNC_CLIPBOARD_READ = 44,
// Always keep this at the end.
NUM,
MIN_VALUE = MIDI_SYSEX,
diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom
index f3e787a35976d86cc4e7307745822634df659941..81c4f0bdc89f972464d13f06c7907e5aabff4043 100644
index da2bcae965ddc183b5794bc8c44aec4f1754f1d2..2b24e692042a352e931278ead6a06e057f73eda6 100644
--- a/third_party/blink/public/mojom/permissions/permission.mojom
+++ b/third_party/blink/public/mojom/permissions/permission.mojom
@@ -47,7 +47,7 @@ enum PermissionName {
@@ -43,7 +43,8 @@ enum PermissionName {
AR,
HAND_TRACKING,
WEB_PRINTING,
SMART_CARD,
GEOLOCATION_APPROXIMATE,
-};
+ DEPRECATED_SYNC_CLIPBOARD_READ};
- SMART_CARD
+ SMART_CARD,
+ DEPRECATED_SYNC_CLIPBOARD_READ
};
struct MidiPermissionDescriptor {
bool sysex;
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
index 36410ff29d9c82e59f93fbb82968064bd330dfde..6c3f994e0b184f78bd9442002bb4dfae66e50518 100644
--- a/third_party/blink/public/platform/web_content_settings_client.h
@@ -130,10 +119,10 @@ index 36410ff29d9c82e59f93fbb82968064bd330dfde..6c3f994e0b184f78bd9442002bb4dfae
virtual void PassiveInsecureContentFound(const WebURL&) {}
diff --git a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc
index 8fded9303e74737d82ca6d54e00807ebabf6c1ac..c0b66eb9a62f8f75e3c4de43f467ddd09d8dc2d6 100644
index f2fb09422d49c66c6ef7991277cfd6479896c035..fe2fc66b2d203dd0c832e5bf6cc4c950c33cdfec 100644
--- a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc
+++ b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc
@@ -123,7 +123,7 @@ bool ClipboardCommands::CanReadClipboard(LocalFrame& frame,
@@ -116,7 +116,7 @@ bool ClipboardCommands::CanReadClipboard(LocalFrame& frame,
return true;
}
return frame.GetContentSettingsClient() &&
@@ -142,7 +131,7 @@ index 8fded9303e74737d82ca6d54e00807ebabf6c1ac..c0b66eb9a62f8f75e3c4de43f467ddd0
}
bool ClipboardCommands::CanWriteClipboard(LocalFrame& frame,
@@ -312,7 +312,7 @@ bool ClipboardCommands::PasteSupported(LocalFrame* frame) {
@@ -305,7 +305,7 @@ bool ClipboardCommands::PasteSupported(LocalFrame* frame) {
return true;
}
return frame->GetContentSettingsClient() &&
@@ -152,10 +141,10 @@ 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 91ef9f50a41150108f8cb4abfecba2b7c54f5fa4..ca46a15c03d72da4a301aff6fc18c173eaa7e6c8 100644
index 691726eb23434005adc559534fc0aeede937cc92..a980ed6afb84eceef9c9b594b325e8e3783821ec 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) {
@@ -145,6 +145,8 @@ String PermissionNameToString(PermissionName name) {
return "web-printing";
case PermissionName::SMART_CARD:
return "smart-card";

View File

@@ -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 a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2da71ba6b 100644
index 6a9d90fdc5e6df4726810143c27f683bbbbc183f..71e8c539d5d633277237141b4e42460ae1dca8da 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -47,7 +47,7 @@
@@ -62,7 +62,20 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2
if (!IsTabFullscreen()) {
// Activate any popup windows created while content fullscreen, after exit.
popunder_preventer_.reset();
@@ -564,9 +565,12 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -555,20 +556,19 @@ void FullscreenController::EnterFullscreenModeInternal(
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
// from manually entering fullscreen mode and also disables kiosk mode on
// desktop platforms.
- if (!exclusive_access_manager()
- ->context()
- ->GetProfile()
- ->GetPrefs()
- ->GetBoolean(prefs::kFullscreenAllowed)) {
+ auto* profile = exclusive_access_manager()->context()->GetProfile();
+ if (!profile || !profile->GetPrefs()->GetBoolean(prefs::kFullscreenAllowed))
return;
- }
#endif
fullscreen_parameters_ = fullscreen_tab_params;
started_fullscreen_transition_ = true;
toggled_into_fullscreen_ = true;
@@ -75,7 +88,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2
if (option == FullscreenInternalOption::kTab) {
origin = GetRequestingOrigin();
tab_fullscreen_ = true;
@@ -604,6 +608,7 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -606,6 +606,7 @@ void FullscreenController::EnterFullscreenModeInternal(
origin = url::Origin::Create(extension_url_.value());
}
}
@@ -83,7 +96,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2
fullscreen_start_time_ = base::TimeTicks::Now();
if (option == FullscreenInternalOption::kBrowser) {
@@ -625,6 +630,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
@@ -627,6 +628,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
return;
}
@@ -91,7 +104,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
if (fullscreen_start_time_ && exclusive_access_tab()) {
ukm::SourceId source_id =
@@ -636,19 +642,20 @@ void FullscreenController::ExitFullscreenModeInternal() {
@@ -638,19 +640,20 @@ void FullscreenController::ExitFullscreenModeInternal() {
.Record(ukm::UkmRecorder::Get());
fullscreen_start_time_.reset();
}
@@ -116,10 +129,10 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2
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 e477ff115410940ed8ba96c3572f4f48ccea8a9d..7a3495c6d26667508271fe2cc77fafaae9d39204 100644
index b158facefee93d9a36baa4ad446afacb8db68af0..b064037bd43804f1e7c93be06a4d9477d4f5b63f 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
@@ -270,7 +270,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
@@ -261,7 +261,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
// Set of parameters used to enter fullscreen
std::optional<FullscreenTabParams> fullscreen_parameters_;

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