mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
133 Commits
robo/fix_u
...
v36.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70fd706ea4 | ||
|
|
8b3c52f242 | ||
|
|
33fafd508c | ||
|
|
28eb0e6f3d | ||
|
|
b234733555 | ||
|
|
ffb4f0f812 | ||
|
|
33964528e1 | ||
|
|
4f54c91ee2 | ||
|
|
3fdcd38b8b | ||
|
|
feaa9ec5b9 | ||
|
|
de933233e6 | ||
|
|
1046842f73 | ||
|
|
2dd4b77ae0 | ||
|
|
5942ac580b | ||
|
|
ec34d8ee49 | ||
|
|
64c9afcf77 | ||
|
|
4392cb9434 | ||
|
|
c3b5e5527f | ||
|
|
31e3c84843 | ||
|
|
42514326ca | ||
|
|
7be433c0b7 | ||
|
|
c92412761d | ||
|
|
4e3baa4d8e | ||
|
|
10fb533bc3 | ||
|
|
3d8df7684b | ||
|
|
5a6ed32592 | ||
|
|
99c3728a93 | ||
|
|
e0a24f08a1 | ||
|
|
0cb42911ea | ||
|
|
8fec7adfa6 | ||
|
|
30ccda8ba0 | ||
|
|
3acd5774da | ||
|
|
a0ac690881 | ||
|
|
7299dd1501 | ||
|
|
92b03cb91f | ||
|
|
01ce103ae1 | ||
|
|
58b2c2e651 | ||
|
|
4db5a2a2b2 | ||
|
|
6126cc2bfe | ||
|
|
33eff16e9a | ||
|
|
e2b9cedf0f | ||
|
|
75e44e5f05 | ||
|
|
71e53c925e | ||
|
|
17487df08d | ||
|
|
6b1d1bf893 | ||
|
|
8327ed0eea | ||
|
|
7e80e8f610 | ||
|
|
33df588e8e | ||
|
|
45c78deff8 | ||
|
|
b647c8935d | ||
|
|
11c35626da | ||
|
|
f78a66d988 | ||
|
|
200550da3c | ||
|
|
cb7335b4f0 | ||
|
|
b4fc140f1a | ||
|
|
c89bebdee1 | ||
|
|
4df1063e30 | ||
|
|
8b05b6e59b | ||
|
|
71f17fcf5b | ||
|
|
bf87315ae8 | ||
|
|
dde045db9c | ||
|
|
3ff5c4ea5f | ||
|
|
32c352bff5 | ||
|
|
3e2aa2f443 | ||
|
|
12d11c09a1 | ||
|
|
06ad763412 | ||
|
|
5b9f71602d | ||
|
|
bb882b4f3d | ||
|
|
9efacb6147 | ||
|
|
5cddcdf190 | ||
|
|
25e5055065 | ||
|
|
6f3c9fcf99 | ||
|
|
7ee88bbdcb | ||
|
|
96197d9597 | ||
|
|
7d2c27c83e | ||
|
|
32a341288c | ||
|
|
2466232460 | ||
|
|
a5579fb71f | ||
|
|
76fa5b7af1 | ||
|
|
e1b2b8ef0c | ||
|
|
243016b31e | ||
|
|
5f0be2e153 | ||
|
|
6d2c7c2ab3 | ||
|
|
c4e0cae3ee | ||
|
|
7e0d84f19c | ||
|
|
dea35330c0 | ||
|
|
7f85c85b71 | ||
|
|
4b0d49898f | ||
|
|
6927f649ee | ||
|
|
33bde96d73 | ||
|
|
3772e267c3 | ||
|
|
b7a28f31d8 | ||
|
|
1ba56c8696 | ||
|
|
cee2c2ceeb | ||
|
|
b3526da28e | ||
|
|
d23aaadcd5 | ||
|
|
ef22986d1d | ||
|
|
b0d207e384 | ||
|
|
1424da9131 | ||
|
|
29ead1bc25 | ||
|
|
859cff24ec | ||
|
|
0ba2441963 | ||
|
|
7ea2daf456 | ||
|
|
bc9389df9a | ||
|
|
9716b6623e | ||
|
|
56fced3d0d | ||
|
|
3faedae91c | ||
|
|
463e0d0ab7 | ||
|
|
c5310fff80 | ||
|
|
4b72738b41 | ||
|
|
585075d776 | ||
|
|
c87fd357fc | ||
|
|
a1ec212049 | ||
|
|
a3af41674f | ||
|
|
5c73799f52 | ||
|
|
8275f7e402 | ||
|
|
0ea8decb0a | ||
|
|
515f5847e1 | ||
|
|
1fc3a60655 | ||
|
|
3e5cabde39 | ||
|
|
98adbbb593 | ||
|
|
c62db7d49d | ||
|
|
313aee6cbb | ||
|
|
9f0fb54918 | ||
|
|
c39683b2cb | ||
|
|
0e8300399d | ||
|
|
ca91235c51 | ||
|
|
f90de88c63 | ||
|
|
d41ed8a118 | ||
|
|
daa37826f8 | ||
|
|
e74e1ab4c5 | ||
|
|
7d0f24420f | ||
|
|
d1663a5ac6 |
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
buildtools:
|
||||
image: ghcr.io/electron/devcontainer:77262e58c37631ab082482f42c33cdf68c6c394b
|
||||
image: ghcr.io/electron/devcontainer:9f11982e806f439d0a0a8ebbbf566cd5e0d9e952
|
||||
|
||||
volumes:
|
||||
- ..:/workspaces/gclient/src/electron:cached
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -13,7 +13,7 @@ Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.
|
||||
- [ ] 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 documentation, tutorials, templates and examples are changed or added
|
||||
- [ ] 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)
|
||||
- [ ] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).
|
||||
|
||||
#### Release Notes
|
||||
|
||||
56
.github/actions/checkout/action.yml
vendored
56
.github/actions/checkout/action.yml
vendored
@@ -9,6 +9,8 @@ inputs:
|
||||
description: 'Whether to persist the cache to the shared drive'
|
||||
required: false
|
||||
default: 'true'
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -18,40 +20,34 @@ runs:
|
||||
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Get Depot Tools
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -d depot_tools ]]; then
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
fi
|
||||
- name: Add Depot Tools to PATH
|
||||
shell: bash
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Generate DEPS Hash
|
||||
shell: bash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
echo "DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
DEPSHASH="v1-src-cache-$(cat src/electron/.depshash)"
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_FILE=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
echo "CACHE_DRIVE=/mnt/win-cache" >> $GITHUB_ENV
|
||||
else
|
||||
echo "CACHE_DRIVE=/mnt/cross-instance-cache" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Generate SAS Key
|
||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$DEPSHASH.tar" > sas-token
|
||||
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$CACHE_FILE?platform=${{ inputs.target-platform }}" > sas-token
|
||||
- name: Save SAS Key
|
||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf
|
||||
with:
|
||||
path: |
|
||||
sas-token
|
||||
key: sas-key-${{ github.run_number }}-${{ github.run_attempt }}
|
||||
path: sas-token
|
||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-${{ github.run_attempt }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Check If Cache Exists
|
||||
id: check-cache
|
||||
shell: bash
|
||||
@@ -60,7 +56,7 @@ runs:
|
||||
echo "Not using cache this time..."
|
||||
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
cache_path=$CACHE_DRIVE/$CACHE_FILE
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking for cache in: $cache_path"
|
||||
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
|
||||
@@ -76,8 +72,8 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
# if there is less than 35 GB free space then creating the cache might fail so exit early
|
||||
freespace=`df -m /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
|
||||
freespace_human=`df -h /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
|
||||
freespace=`df -m $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
||||
freespace_human=`df -h $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
||||
if [ $freespace -le 35000 ]; then
|
||||
echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
|
||||
exit 1
|
||||
@@ -99,7 +95,7 @@ runs:
|
||||
fi
|
||||
|
||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
|
||||
if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; then
|
||||
if [[ "${{ inputs.is-release }}" != "true" ]]; then
|
||||
# Re-export all the patches to check if there were changes.
|
||||
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
|
||||
cd src/electron
|
||||
@@ -128,6 +124,8 @@ runs:
|
||||
cat ../../patches/update-patches.patch
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "No changes to patches detected"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -165,14 +163,14 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
||||
tar -cf $DEPSHASH.tar src
|
||||
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||
tar -cf $CACHE_FILE src
|
||||
echo "Compressed src to $(du -sh $CACHE_FILE | cut -f1 -d' ')"
|
||||
cp ./$CACHE_FILE $CACHE_DRIVE/
|
||||
- name: Persist Src Cache
|
||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
final_cache_path=$CACHE_DRIVE/$CACHE_FILE
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking path: $final_cache_path"
|
||||
if [ ! -f "$final_cache_path" ]; then
|
||||
|
||||
40
.github/actions/cipd-install/action.yml
vendored
Normal file
40
.github/actions/cipd-install/action.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: 'CIPD install'
|
||||
description: 'Installs the specified CIPD package'
|
||||
inputs:
|
||||
cipd-root-prefix-path:
|
||||
description: 'Path to prepend to installation directory'
|
||||
default: ''
|
||||
dependency:
|
||||
description: 'Name of dependency to install'
|
||||
deps-file:
|
||||
description: 'Location of DEPS file that defines the dependency'
|
||||
installation-dir:
|
||||
description: 'Location to install dependency'
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
package:
|
||||
description: 'Package to install'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Delete wrong ${{ inputs.dependency }}
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
|
||||
- name: Create ensure file for ${{ inputs.dependency }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo '${{ inputs.package }}' `e d gclient getdep --deps-file=${{ inputs.deps-file }} -r '${{ inputs.installation-dir }}:${{ inputs.package }}'` > ${{ inputs.dependency }}_ensure_file
|
||||
cat ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }} on macOS"
|
||||
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }} on Windows"
|
||||
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
|
||||
61
.github/actions/fix-sync-macos/action.yml
vendored
61
.github/actions/fix-sync-macos/action.yml
vendored
@@ -1,61 +0,0 @@
|
||||
name: 'Fix Sync macOS'
|
||||
description: 'Checks out Electron and stores it in the AKS Cache'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fix Sync
|
||||
shell: bash
|
||||
# This step is required to correct for differences between "gclient sync"
|
||||
# on Linux and the expected state on macOS. This requires:
|
||||
# 1. Fixing Clang Install (wrong binary)
|
||||
# 2. Fixing esbuild (wrong binary)
|
||||
# 3. Fixing rustc (wrong binary)
|
||||
# 4. Fixing gn (wrong binary)
|
||||
# 5. Fix reclient (wrong binary)
|
||||
# 6. Fixing dsymutil (wrong binary)
|
||||
# 7. Ensuring we are using the correct ninja and adding it to PATH
|
||||
# 8. Fixing angle (wrong remote)
|
||||
run : |
|
||||
SEDOPTION="-i ''"
|
||||
rm -rf src/third_party/llvm-build
|
||||
python3 src/tools/clang/scripts/update.py
|
||||
|
||||
echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file
|
||||
# Remove extra output from calling gclient getdep which always calls update_depot_tools
|
||||
sed -i '' "s/Updating depot_tools... //g" esbuild_ensure_file
|
||||
cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file
|
||||
|
||||
rm -rf src/third_party/rust-toolchain
|
||||
python3 src/tools/rust/update_rust.py
|
||||
|
||||
# Prevent calling gclient getdep which always calls update_depot_tools
|
||||
echo 'gn/gn/mac-${arch}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/mac:gn/gn/mac-${arch}'` > gn_ensure_file
|
||||
sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
|
||||
cipd ensure --root src/buildtools/mac -ensure-file gn_ensure_file
|
||||
|
||||
# Prevent calling gclient getdep which always calls update_depot_tools
|
||||
echo 'infra/rbe/client/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/reclient:infra/rbe/client/${platform}'` > gn_ensure_file
|
||||
sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
|
||||
cipd ensure --root src/buildtools/reclient -ensure-file gn_ensure_file
|
||||
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
||||
|
||||
if [ "${{ env.TARGET_ARCH }}" == "arm64" ]; then
|
||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
||||
else
|
||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
|
||||
fi
|
||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||
|
||||
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||
sed $SEDOPTION "s/Updating depot_tools... //g" ninja_ensure_file
|
||||
cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
|
||||
|
||||
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
||||
|
||||
cd src/third_party/angle
|
||||
rm -f .git/objects/info/alternates
|
||||
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
||||
cp .git/config .git/config.backup
|
||||
git remote remove origin
|
||||
mv .git/config.backup .git/config
|
||||
git fetch
|
||||
120
.github/actions/fix-sync/action.yml
vendored
Normal file
120
.github/actions/fix-sync/action.yml
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
name: 'Fix Sync'
|
||||
description: 'Ensures proper binaries are in place'
|
||||
# This action is required to correct for differences between "gclient sync"
|
||||
# on Linux and the expected state on macOS/windows. This requires:
|
||||
# 1. Fixing Clang Install (wrong binary)
|
||||
# 2. Fixing esbuild (wrong binary)
|
||||
# 3. Fixing rustc (wrong binary)
|
||||
# 4. Fixing gn (wrong binary)
|
||||
# 5. Fix reclient (wrong binary)
|
||||
# 6. Fixing dsymutil (wrong binary)
|
||||
# 7. Ensuring we are using the correct ninja and adding it to PATH
|
||||
# 8. Fixing angle (wrong remote)
|
||||
# 9. Install windows toolchain on Windows
|
||||
# 10. Fix node binary on Windows
|
||||
# 11. Fix rc binary on Windows
|
||||
inputs:
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fix clang
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/llvm-build
|
||||
python3 src/tools/clang/scripts/update.py
|
||||
- name: Fix esbuild
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
|
||||
dependency: esbuild
|
||||
deps-file: src/third_party/devtools-frontend/src/DEPS
|
||||
installation-dir: third_party/esbuild
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/esbuild/${platform}
|
||||
- name: Fix rustc
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/rust-toolchain
|
||||
python3 src/tools/rust/update_rust.py
|
||||
- name: Fix gn (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: gn
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/buildtools/mac
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: gn/gn/mac-${arch}
|
||||
- name: Fix gn (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: gn
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/buildtools/win
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: gn/gn/windows-amd64
|
||||
- name: Fix reclient
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: reclient
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/buildtools/reclient
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/rbe/client/${platform}
|
||||
- name: Configure reclient configs
|
||||
shell: bash
|
||||
run : |
|
||||
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
||||
- name: Fix dsymutil (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
shell: bash
|
||||
run : |
|
||||
# Fix dsymutil
|
||||
if [ "${{ inputs.target-platform }}" = "macos" ]; then
|
||||
if [ "${{ env.TARGET_ARCH }}" == "arm64" ]; then
|
||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
||||
else
|
||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
|
||||
fi
|
||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||
fi
|
||||
- name: Fix ninja
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: ninja
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/third_party/ninja
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/ninja/${platform}
|
||||
- name: Set ninja in path
|
||||
shell: bash
|
||||
run : |
|
||||
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
||||
- name: Fixup angle git
|
||||
shell: bash
|
||||
run : |
|
||||
cd src/third_party/angle
|
||||
rm -f .git/objects/info/alternates
|
||||
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
||||
cp .git/config .git/config.backup
|
||||
git remote remove origin
|
||||
mv .git/config.backup .git/config
|
||||
git fetch
|
||||
- name: Get Windows toolchain
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: e d vpython3 src\build\vs_toolchain.py update --force
|
||||
- name: Download nodejs
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
$nodedeps = e d gclient getdep --deps-file=src/DEPS -r src/third_party/node/win | ConvertFrom-JSON
|
||||
python3 src\third_party\depot_tools\download_from_google_storage.py --no_resume --no_auth --bucket chromium-nodejs -o src\third_party\node\win\node.exe $nodedeps.object_name
|
||||
- name: Install rc
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: bash
|
||||
run: |
|
||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang/rc -s src/build/toolchain/win/rc/win/rc.exe.sha1
|
||||
@@ -14,7 +14,10 @@ runs:
|
||||
export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
|
||||
npm i -g @electron/build-tools
|
||||
e auto-update disable
|
||||
e d auto-update disable
|
||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||
e d cipd.bat --version
|
||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
||||
fi
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools/python-bin" >> $GITHUB_PATH
|
||||
|
||||
10
.github/actions/restore-cache-aks/action.yml
vendored
10
.github/actions/restore-cache-aks/action.yml
vendored
@@ -1,12 +1,20 @@
|
||||
name: 'Restore Cache AKS'
|
||||
description: 'Restores Electron src cache via AKS'
|
||||
inputs:
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Restore and Ensure Src Cache
|
||||
shell: bash
|
||||
run: |
|
||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
cache_path=/mnt/win-cache/$DEPSHASH.tar
|
||||
else
|
||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
fi
|
||||
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking for cache in: $cache_path"
|
||||
if [ ! -f "$cache_path" ]; then
|
||||
|
||||
75
.github/actions/restore-cache-azcopy/action.yml
vendored
75
.github/actions/restore-cache-azcopy/action.yml
vendored
@@ -1,22 +1,25 @@
|
||||
name: 'Restore Cache AZCopy'
|
||||
description: 'Restores Electron src cache via AZCopy'
|
||||
inputs:
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Obtain SAS Key
|
||||
continue-on-error: true
|
||||
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf
|
||||
with:
|
||||
path: |
|
||||
sas-token
|
||||
key: sas-key-${{ github.run_number }}-1
|
||||
path: sas-token
|
||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-1
|
||||
enableCrossOsArchive: true
|
||||
- name: Obtain SAS Key
|
||||
continue-on-error: true
|
||||
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf
|
||||
with:
|
||||
path: |
|
||||
sas-token
|
||||
key: sas-key-${{ github.run_number }}-${{ github.run_attempt }}
|
||||
path: sas-token
|
||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-${{ github.run_attempt }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Download Src Cache from AKS
|
||||
# The cache will always exist here as a result of the checkout job
|
||||
# Either it was uploaded to Azure in the checkout job for this commit
|
||||
@@ -26,21 +29,30 @@ runs:
|
||||
timeout_minutes: 30
|
||||
max_attempts: 3
|
||||
retry_on: error
|
||||
shell: bash
|
||||
command: |
|
||||
sas_token=$(cat sas-token)
|
||||
if [ -z $sas-token ]; then
|
||||
echo "SAS Token not found; exiting src cache download early..."
|
||||
exit 1
|
||||
else
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
azcopy copy --log-level=ERROR \
|
||||
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_WIN_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
||||
else
|
||||
azcopy copy --log-level=ERROR \
|
||||
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
||||
fi
|
||||
fi
|
||||
azcopy copy --log-level=ERROR \
|
||||
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
||||
env:
|
||||
AZURE_AKS_CACHE_STORAGE_ACCOUNT: f723719aa87a34622b5f7f3
|
||||
AZURE_AKS_CACHE_SHARE_NAME: pvc-f6a4089f-b082-4bee-a3f9-c3e1c0c02d8f
|
||||
AZURE_AKS_WIN_CACHE_SHARE_NAME: pvc-71dec4f2-0d44-4fd1-a2c3-add049d70bdf
|
||||
- name: Clean SAS Key
|
||||
shell: bash
|
||||
run: rm -f sas-token
|
||||
- name: Unzip and Ensure Src Cache
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Downloaded cache is $(du -sh $DEPSHASH.tar | cut -f1)"
|
||||
@@ -68,4 +80,45 @@ runs:
|
||||
fi
|
||||
|
||||
echo "Wiping Electron Directory"
|
||||
rm -rf src/electron
|
||||
rm -rf src/electron
|
||||
|
||||
- name: Unzip and Ensure Src Cache (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
$src_cache = "$env:DEPSHASH.tar"
|
||||
$cache_size = $(Get-Item $src_cache).length
|
||||
Write-Host "Downloaded cache is $cache_size"
|
||||
if ($cache_size -eq 0) {
|
||||
Write-Host "Cache is empty - exiting"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
||||
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
||||
C:\ProgramData\Chocolatey\bin\7z.exe -y x $src_cache -o"$TEMP_DIR_PATH"
|
||||
|
||||
- name: Move Src Cache (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
|
||||
with:
|
||||
timeout_minutes: 30
|
||||
max_attempts: 3
|
||||
retry_on: error
|
||||
shell: powershell
|
||||
command: |
|
||||
if (Test-Path "temp-cache\src") {
|
||||
Write-Host "Relocating Cache"
|
||||
Remove-Item -Recurse -Force src
|
||||
Move-Item temp-cache\src src
|
||||
|
||||
Write-Host "Deleting zip file"
|
||||
Remove-Item -Force $src_cache
|
||||
}
|
||||
if (-Not (Test-Path "src\third_party\blink")) {
|
||||
Write-Host "Cache was not correctly restored - exiting"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Wiping Electron Directory"
|
||||
Remove-Item -Recurse -Force src\electron
|
||||
|
||||
36
.github/actions/set-chromium-cookie/action.yml
vendored
36
.github/actions/set-chromium-cookie/action.yml
vendored
@@ -4,9 +4,14 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set the git cookie from chromium.googlesource.com (Unix)
|
||||
if: ${{ runner.os != 'Windows' && env.CHROMIUM_GIT_COOKIE }}
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -z "${{ env.CHROMIUM_GIT_COOKIE }}" ]]; then
|
||||
echo "CHROMIUM_GIT_COOKIE is not set - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
touch ~/.gitcookies
|
||||
chmod 0600 ~/.gitcookies
|
||||
@@ -17,10 +22,37 @@ runs:
|
||||
${{ env.CHROMIUM_GIT_COOKIE }}
|
||||
__END__
|
||||
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
|
||||
RESPONSE=$(curl -s -b ~/.gitcookies https://chromium-review.googlesource.com/a/accounts/self)
|
||||
if [[ $RESPONSE == ")]}'"* ]]; then
|
||||
# Extract account email for verification
|
||||
EMAIL=$(echo "$RESPONSE" | tail -c +5 | jq -r '.email // "No email found"')
|
||||
echo "Cookie authentication successful - authenticated as: $EMAIL"
|
||||
else
|
||||
echo "Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE is set correctly"
|
||||
echo $RESPONSE
|
||||
fi
|
||||
- name: Set the git cookie from chromium.googlesource.com (Windows)
|
||||
if: ${{ runner.os == 'Windows' && env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
if "%CHROMIUM_GIT_COOKIE_WINDOWS_STRING%"=="" (
|
||||
echo CHROMIUM_GIT_COOKIE_WINDOWS_STRING is not set - cannot authenticate.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
|
||||
powershell -noprofile -nologo -command Write-Output "${{ env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}" >>"%USERPROFILE%\.gitcookies"
|
||||
|
||||
curl -s -b "%USERPROFILE%\.gitcookies" https://chromium-review.googlesource.com/a/accounts/self > response.txt
|
||||
|
||||
findstr /B /C:")]}'" response.txt > nul
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo Cookie authentication successful
|
||||
powershell -NoProfile -Command "& {$content = Get-Content -Raw response.txt; $content = $content.Substring(4); try { $json = ConvertFrom-Json $content; if($json.email) { Write-Host 'Authenticated as:' $json.email } else { Write-Host 'No email found in response' } } catch { Write-Host 'Error parsing JSON:' $_ }}"
|
||||
) else (
|
||||
echo Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE_WINDOWS_STRING is set correctly
|
||||
type response.txt
|
||||
)
|
||||
|
||||
del response.txt
|
||||
|
||||
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||
default: '9f11982e806f439d0a0a8ebbbf566cd5e0d9e952'
|
||||
required: true
|
||||
skip-macos:
|
||||
type: boolean
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
id: set-output
|
||||
run: |
|
||||
if [ -z "${{ inputs.build-image-sha }}" ]; then
|
||||
echo "build-image-sha=bc2f48b2415a670de18d13605b1cf0eb5fdbaae1" >> "$GITHUB_OUTPUT"
|
||||
echo "build-image-sha=9f11982e806f439d0a0a8ebbbf566cd5e0d9e952" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
@@ -115,6 +115,7 @@ jobs:
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
generate-sas-token: 'true'
|
||||
target-platform: macos
|
||||
|
||||
checkout-linux:
|
||||
needs: setup
|
||||
@@ -150,7 +151,8 @@ jobs:
|
||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
@@ -168,6 +170,9 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Checkout & Sync & Save
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
generate-sas-token: 'true'
|
||||
target-platform: win
|
||||
|
||||
# GN Check Jobs
|
||||
macos-gn-check:
|
||||
@@ -198,7 +203,7 @@ jobs:
|
||||
target-platform: win
|
||||
target-archs: x64 x86 arm64
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/win-cache:/mnt/win-cache"]}'
|
||||
gn-build-type: testing
|
||||
secrets: inherit
|
||||
|
||||
@@ -326,7 +331,7 @@ jobs:
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
needs: checkout-windows
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
@@ -345,7 +350,7 @@ jobs:
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
needs: checkout-windows
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
@@ -364,7 +369,7 @@ jobs:
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
needs: checkout-windows
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
|
||||
4
.github/workflows/clean-src-cache.yml
vendored
4
.github/workflows/clean-src-cache.yml
vendored
@@ -16,6 +16,7 @@ jobs:
|
||||
options: --user root
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
steps:
|
||||
- name: Cleanup Source Cache
|
||||
shell: bash
|
||||
@@ -23,3 +24,6 @@ jobs:
|
||||
df -h /mnt/cross-instance-cache
|
||||
find /mnt/cross-instance-cache -type f -mtime +15 -delete
|
||||
df -h /mnt/cross-instance-cache
|
||||
df -h /mnt/win-cache
|
||||
find /mnt/win-cache -type f -mtime +15 -delete
|
||||
df -h /mnt/win-cache
|
||||
|
||||
3
.github/workflows/linux-publish.yml
vendored
3
.github/workflows/linux-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||
default: '9f11982e806f439d0a0a8ebbbf566cd5e0d9e952'
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
required: false
|
||||
@@ -27,6 +27,7 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
|
||||
4
.github/workflows/macos-publish.yml
vendored
4
.github/workflows/macos-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||
default: '9f11982e806f439d0a0a8ebbbf566cd5e0d9e952'
|
||||
required: true
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
@@ -28,6 +28,7 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
@@ -39,6 +40,7 @@ jobs:
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
generate-sas-token: 'true'
|
||||
target-platform: macos
|
||||
|
||||
publish-x64-darwin:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||
|
||||
@@ -129,24 +129,8 @@ jobs:
|
||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
SEDOPTION="-i ''"
|
||||
fi
|
||||
|
||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||
sed $SEDOPTION '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Generate DEPS Hash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
@@ -154,24 +138,26 @@ jobs:
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
- name: Restore src cache via AZCopy
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
- name: Restore src cache via AKS
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
- name: Checkout src via gclient sync
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
use-cache: 'false'
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Fix Sync
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/fix-sync
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
env:
|
||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG: true
|
||||
- name: Init Build Tools
|
||||
run: |
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||
@@ -184,9 +170,6 @@ jobs:
|
||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Fix Sync (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/fix-sync-macos
|
||||
- name: Setup Number of Ninja Processes
|
||||
run: |
|
||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||
|
||||
@@ -65,7 +65,9 @@ jobs:
|
||||
sudo rm -rf $TMPDIR/del-target
|
||||
- name: Check disk space after freeing up space
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: df -h
|
||||
run: df -h
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Enable windows toolchain
|
||||
@@ -81,9 +83,13 @@ jobs:
|
||||
- name: Restore src cache via AZCopy
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
- name: Restore src cache via AKS
|
||||
if: ${{ inputs.target-platform == 'linux' || inputs.target-platform == 'win' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
- name: Run Electron Only Hooks
|
||||
run: |
|
||||
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" > tmpgclient
|
||||
|
||||
@@ -51,6 +51,8 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
@@ -58,17 +60,6 @@ jobs:
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Download Generated Artifacts
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
|
||||
with:
|
||||
@@ -114,6 +105,8 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
@@ -121,17 +114,6 @@ jobs:
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Download Generated Artifacts
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
|
||||
with:
|
||||
|
||||
9
.github/workflows/windows-publish.yml
vendored
9
.github/workflows/windows-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
build-image-sha:
|
||||
type: string
|
||||
description: 'SHA for electron/build image'
|
||||
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||
default: '9f11982e806f439d0a0a8ebbbf566cd5e0d9e952'
|
||||
required: true
|
||||
upload-to-storage:
|
||||
description: 'Uploads to Azure storage'
|
||||
@@ -25,8 +25,10 @@ jobs:
|
||||
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||
TARGET_OS: 'win'
|
||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||
@@ -40,6 +42,9 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- name: Checkout & Sync & Save
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
generate-sas-token: 'true'
|
||||
target-platform: win
|
||||
|
||||
publish-x64-win:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||
|
||||
2
BUILD.gn
2
BUILD.gn
@@ -1246,7 +1246,7 @@ if (is_mac) {
|
||||
"//components/crash/core/app:run_as_crashpad_handler",
|
||||
]
|
||||
|
||||
ldflags = []
|
||||
ldflags = [ "/DELAYLOAD:ffmpeg.dll" ]
|
||||
|
||||
libs = [
|
||||
"comctl32.lib",
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'135.0.7049.5',
|
||||
'136.0.7103.17',
|
||||
'node_version':
|
||||
'v22.14.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -96,8 +96,9 @@ These individual tutorials expand on topics discussed in the guide above.
|
||||
* [Chrome Extensions Support](api/extensions.md)
|
||||
* [Breaking API Changes](breaking-changes.md)
|
||||
|
||||
### Custom DOM Elements:
|
||||
### Custom Web Features:
|
||||
|
||||
* [`-electron-corner-smoothing` CSS Rule](api/corner-smoothing-css.md)
|
||||
* [`<webview>` Tag](api/webview-tag.md)
|
||||
* [`window.open` Function](api/window-open.md)
|
||||
|
||||
|
||||
@@ -1110,6 +1110,11 @@ indicates success while any other value indicates failure according to Chromium
|
||||
resolver will attempt to use the system's DNS settings to do DNS lookups
|
||||
itself. Enabled by default on macOS, disabled by default on Windows and
|
||||
Linux.
|
||||
* `enableHappyEyeballs` boolean (optional) - Whether the
|
||||
[Happy Eyeballs V3][happy-eyeballs-v3] algorithm should be used in creating
|
||||
network connections. When enabled, hostnames resolving to multiple IP
|
||||
addresses will be attempted in parallel to have a chance at establishing a
|
||||
connection more quickly.
|
||||
* `secureDnsMode` string (optional) - Can be 'off', 'automatic' or 'secure'.
|
||||
Configures the DNS-over-HTTP mode. When 'off', no DoH lookups will be
|
||||
performed. When 'automatic', DoH lookups will be performed first if DoH is
|
||||
@@ -1559,8 +1564,8 @@ command line arguments that Chromium uses.
|
||||
|
||||
### `app.dock` _macOS_ _Readonly_
|
||||
|
||||
A [`Dock`](./dock.md) `| undefined` object that allows you to perform actions on your app icon in the user's
|
||||
dock on macOS.
|
||||
A `Dock | undefined` property ([`Dock`](./dock.md) on macOS, `undefined` on all other
|
||||
platforms) that allows you to perform actions on your app icon in the user's dock.
|
||||
|
||||
### `app.isPackaged` _Readonly_
|
||||
|
||||
@@ -1579,6 +1584,7 @@ A `boolean` property that returns `true` if the app is packaged, `false` otherw
|
||||
[Squirrel-Windows]: https://github.com/Squirrel/Squirrel.Windows
|
||||
[JumpListBeginListMSDN]: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-icustomdestinationlist-beginlist
|
||||
[about-panel-options]: https://developer.apple.com/reference/appkit/nsapplication/1428479-orderfrontstandardaboutpanelwith?language=objc
|
||||
[happy-eyeballs-v3]: https://datatracker.ietf.org/doc/draft-pauly-happy-happyeyeballs-v3/
|
||||
|
||||
### `app.name`
|
||||
|
||||
|
||||
@@ -342,12 +342,12 @@ Emitted when the window has closed a sheet.
|
||||
|
||||
Emitted when the native new tab button is clicked.
|
||||
|
||||
#### Event: 'system-context-menu' _Windows_
|
||||
#### Event: 'system-context-menu' _Windows_ _Linux_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `point` [Point](structures/point.md) - The screen coordinates the context menu was triggered at
|
||||
* `point` [Point](structures/point.md) - The screen coordinates where the context menu was triggered.
|
||||
|
||||
Emitted when the system context menu is triggered on the window, this is
|
||||
normally only triggered when the user right clicks on the non-client area
|
||||
@@ -356,6 +356,8 @@ as `-webkit-app-region: drag` in a frameless window.
|
||||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
|
||||
### Static Methods
|
||||
|
||||
The `BaseWindow` class has the following static methods:
|
||||
@@ -511,6 +513,10 @@ A `string` property that defines an alternative title provided only to
|
||||
accessibility tools such as screen readers. This string is not directly
|
||||
visible to users.
|
||||
|
||||
#### `win.snapped` _Windows_ _Readonly_
|
||||
|
||||
A `boolean` property that indicates whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
### Instance Methods
|
||||
|
||||
Objects created with `new BaseWindow` have the following instance methods:
|
||||
@@ -1264,6 +1270,13 @@ Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
||||
|
||||
Returns `boolean` - Whether the menu bar is visible.
|
||||
|
||||
#### `win.isSnapped()` _Windows_
|
||||
|
||||
Returns `boolean` - whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
The window is snapped via buttons shown when the mouse is hovered over window
|
||||
maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_
|
||||
|
||||
* `visible` boolean
|
||||
|
||||
@@ -421,12 +421,12 @@ Emitted when the window has closed a sheet.
|
||||
|
||||
Emitted when the native new tab button is clicked.
|
||||
|
||||
#### Event: 'system-context-menu' _Windows_
|
||||
#### Event: 'system-context-menu' _Windows_ _Linux_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `point` [Point](structures/point.md) - The screen coordinates the context menu was triggered at
|
||||
* `point` [Point](structures/point.md) - The screen coordinates where the context menu was triggered.
|
||||
|
||||
Emitted when the system context menu is triggered on the window, this is
|
||||
normally only triggered when the user right clicks on the non-client area
|
||||
@@ -435,6 +435,8 @@ as `-webkit-app-region: drag` in a frameless window.
|
||||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
|
||||
### Static Methods
|
||||
|
||||
The `BrowserWindow` class has the following static methods:
|
||||
@@ -611,6 +613,10 @@ A `string` property that defines an alternative title provided only to
|
||||
accessibility tools such as screen readers. This string is not directly
|
||||
visible to users.
|
||||
|
||||
#### `win.snapped` _Windows_ _Readonly_
|
||||
|
||||
A `boolean` property that indicates whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
### Instance Methods
|
||||
|
||||
Objects created with `new BrowserWindow` have the following instance methods:
|
||||
@@ -1445,6 +1451,13 @@ Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
||||
|
||||
Returns `boolean` - Whether the menu bar is visible.
|
||||
|
||||
#### `win.isSnapped()` _Windows_
|
||||
|
||||
Returns `boolean` - whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
The window is snapped via buttons shown when the mouse is hovered over window
|
||||
maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_
|
||||
|
||||
* `visible` boolean
|
||||
|
||||
@@ -20,45 +20,87 @@ document.
|
||||
|
||||
#### `commandLine.appendSwitch(switch[, value])`
|
||||
|
||||
* `switch` string - A command-line switch, without the leading `--`
|
||||
* `value` string (optional) - A value for the given switch
|
||||
* `switch` string - A command-line switch, without the leading `--`.
|
||||
* `value` string (optional) - A value for the given switch.
|
||||
|
||||
Append a switch (with optional `value`) to Chromium's command line.
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('remote-debugging-port', '8315')
|
||||
```
|
||||
|
||||
#### `commandLine.appendArgument(value)`
|
||||
|
||||
* `value` string - The argument to append to the command line
|
||||
* `value` string - The argument to append to the command line.
|
||||
|
||||
Append an argument to Chromium's command line. The argument will be quoted
|
||||
correctly. Switches will precede arguments regardless of appending order.
|
||||
|
||||
If you're appending an argument like `--switch=value`, consider using `appendSwitch('switch', 'value')` instead.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendArgument('--enable-experimental-web-platform-features')
|
||||
```
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
#### `commandLine.hasSwitch(switch)`
|
||||
|
||||
* `switch` string - A command-line switch
|
||||
* `switch` string - A command-line switch.
|
||||
|
||||
Returns `boolean` - Whether the command-line switch is present.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('remote-debugging-port', '8315')
|
||||
const hasPort = app.commandLine.hasSwitch('remote-debugging-port')
|
||||
console.log(hasPort) // true
|
||||
```
|
||||
|
||||
#### `commandLine.getSwitchValue(switch)`
|
||||
|
||||
* `switch` string - A command-line switch
|
||||
* `switch` string - A command-line switch.
|
||||
|
||||
Returns `string` - The command-line switch value.
|
||||
|
||||
This function is meant to obtain Chromium command line switches. It is not
|
||||
meant to be used for application-specific command line arguments. For the
|
||||
latter, please use `process.argv`.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('remote-debugging-port', '8315')
|
||||
const portValue = app.commandLine.getSwitchValue('remote-debugging-port')
|
||||
console.log(portValue) // '8315'
|
||||
```
|
||||
|
||||
**Note:** When the switch is not present or has no value, it returns empty string.
|
||||
|
||||
#### `commandLine.removeSwitch(switch)`
|
||||
|
||||
* `switch` string - A command-line switch
|
||||
* `switch` string - A command-line switch.
|
||||
|
||||
Removes the specified switch from Chromium's command line.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('remote-debugging-port', '8315')
|
||||
console.log(app.commandLine.hasSwitch('remote-debugging-port')) // true
|
||||
|
||||
app.commandLine.removeSwitch('remote-debugging-port')
|
||||
console.log(app.commandLine.hasSwitch('remote-debugging-port')) // false
|
||||
```
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
78
docs/api/corner-smoothing-css.md
Normal file
78
docs/api/corner-smoothing-css.md
Normal file
@@ -0,0 +1,78 @@
|
||||
## CSS Rule: `-electron-corner-smoothing`
|
||||
|
||||
> Smoothes out the corner rounding of the `border-radius` CSS rule.
|
||||
|
||||
The rounded corners of elements with [the `border-radius` CSS rule](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) can be smoothed out using the `-electron-corner-smoothing` CSS rule. This smoothness is very similar to Apple's "continuous" rounded corners in SwiftUI and Figma's "corner smoothing" control on design elements.
|
||||
|
||||

|
||||
|
||||
Integrating with the operating system and its design language is important to many desktop applications. The shape of a rounded corner can be a subtle detail to many users. However, aligning closely to the system's design language that users are familiar with makes the application's design feel familiar too. Beyond matching the design language of macOS, designers may decide to use smoother round corners for many other reasons.
|
||||
|
||||
`-electron-corner-smoothing` affects the shape of borders, outlines, and shadows on the target element. Mirroring the behavior of `border-radius`, smoothing will gradually back off if an element's size is too small for the chosen value.
|
||||
|
||||
The `-electron-corner-smoothing` CSS rule is **only implemented for Electron** and has no effect in browsers. Avoid using this rule outside of Electron. This CSS rule is considered experimental and may require migration in the future if replaced by a CSS standard.
|
||||
|
||||
### Example
|
||||
|
||||
The following example shows the effect of corner smoothing at different percents.
|
||||
|
||||
```css
|
||||
.box {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
background-color: cornflowerblue;
|
||||
border-radius: 24px;
|
||||
-electron-corner-smoothing: var(--percent); /* Column header in table below. */
|
||||
}
|
||||
```
|
||||
|
||||
| 0% | 30% | 60% | 100% |
|
||||
| --- | --- | --- | --- |
|
||||
|  |  |  |  |
|
||||
|
||||
### Matching the system UI
|
||||
|
||||
Use the `system-ui` keyword to match the smoothness to the OS design language.
|
||||
|
||||
```css
|
||||
.box {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
background-color: cornflowerblue;
|
||||
border-radius: 24px;
|
||||
-electron-corner-smoothing: system-ui; /* Match the system UI design. */
|
||||
}
|
||||
```
|
||||
|
||||
| OS: | macOS | Windows, Linux |
|
||||
| --- | --- | --- |
|
||||
| Value: | `60%` | `0%` |
|
||||
| Example: |  |  |
|
||||
|
||||
### Controlling availibility
|
||||
|
||||
This CSS rule can be disabled by setting [the `cornerSmoothingCSS` web preference](./structures/web-preferences.md) to `false`.
|
||||
|
||||
```js
|
||||
const myWindow = new BrowserWindow({
|
||||
// [...]
|
||||
webPreferences: {
|
||||
enableCornerSmoothingCSS: false // Disables the `-electron-corner-smoothing` CSS rule
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
The CSS rule will still parse, but will have no visual effect.
|
||||
|
||||
### Formal reference
|
||||
|
||||
* **Initial value**: `0%`
|
||||
* **Inherited**: No
|
||||
* **Animatable**: No
|
||||
* **Computed value**: As specified
|
||||
|
||||
```css
|
||||
-electron-corner-smoothing =
|
||||
<percentage [0,100]> |
|
||||
system-ui
|
||||
```
|
||||
@@ -9,7 +9,7 @@ The following example shows how to bounce your icon on the dock.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
app.dock.bounce()
|
||||
app.dock?.bounce()
|
||||
```
|
||||
|
||||
### Instance Methods
|
||||
|
||||
@@ -73,6 +73,8 @@ The `menu` object has the following instance methods:
|
||||
|
||||
* `options` Object (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional) - Default is the focused window.
|
||||
* `frame` [WebFrameMain](web-frame-main.md) (optional) - Provide the relevant frame
|
||||
if you want certain OS-level features such as Writing Tools on macOS to function correctly. Typically, this should be `params.frame` from the [`context-menu` event](web-contents.md#event-context-menu) on a WebContents.
|
||||
* `x` number (optional) - Default is the current mouse cursor position.
|
||||
Must be declared if `y` is declared.
|
||||
* `y` number (optional) - Default is the current mouse cursor position.
|
||||
|
||||
@@ -46,4 +46,7 @@ See: https://developer.apple.com/documentation/appkit/nsapplication/1428476-regi
|
||||
### `pushNotifications.unregisterForAPNSNotifications()` _macOS_
|
||||
|
||||
Unregisters the app from notifications received from APNS.
|
||||
|
||||
Apps unregistered through this method can always reregister.
|
||||
|
||||
See: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc
|
||||
|
||||
@@ -651,7 +651,7 @@ Clears the session’s HTTP cache.
|
||||
`shadercache`, `websql`, `serviceworkers`, `cachestorage`. If not
|
||||
specified, clear all storage types.
|
||||
* `quotas` string[] (optional) - The types of quotas to clear, can be
|
||||
`temporary`, `syncable`. If not specified, clear all quotas.
|
||||
`temporary`. If not specified, clear all quotas.
|
||||
|
||||
Returns `Promise<void>` - resolves when the storage data has been cleared.
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
**Note:** This option is currently experimental.
|
||||
* `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
|
||||
* `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `symbolColor` String (optional) _Windows_ _Linux_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
|
||||
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
|
||||
Set a custom position for the traffic light buttons in frameless windows.
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
`pointerDown`, `pointerUp`, `pointerMove`, `pointerRawUpdate`,
|
||||
`pointerCancel` or `pointerCausedUaAction`.
|
||||
* `modifiers` string[] (optional) - An array of modifiers of the event, can
|
||||
be `shift`, `control`, `ctrl`, `alt`, `meta`, `command`, `cmd`, `isKeypad`,
|
||||
`isAutoRepeat`, `leftButtonDown`, `middleButtonDown`, `rightButtonDown`,
|
||||
`capsLock`, `numLock`, `left`, `right`.
|
||||
be `shift`, `control`, `ctrl`, `alt`, `meta`, `command`, `cmd`, `iskeypad`,
|
||||
`isautorepeat`, `leftbuttondown`, `middlebuttondown`, `rightbuttondown`,
|
||||
`capslock`, `numlock`, `left`, `right`.
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
`WebContents` when the preferred size changes. Default is `false`.
|
||||
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
|
||||
* `enableDeprecatedPaste` boolean (optional) _Deprecated_ - Whether to enable the `paste` [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand). Default is `false`.
|
||||
* `enableCornerSmoothingCSS` boolean (optional) _Experimental_ - Whether the [`-electron-corner-smoothing` CSS rule](../corner-smoothing-css.md) is enabled. Default is `true`.
|
||||
|
||||
[chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment
|
||||
[runtime-enabled-features]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
|
||||
@@ -238,7 +238,7 @@ Sets the `image` associated with this tray icon when pressed on macOS.
|
||||
|
||||
* `toolTip` string
|
||||
|
||||
Sets the hover text for this tray icon.
|
||||
Sets the hover text for this tray icon. Setting the text to an empty string will remove the tooltip.
|
||||
|
||||
#### `tray.setTitle(title[, options])` _macOS_
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ Process: [Main](../glossary.md#main-process)<br />
|
||||
|
||||
Returns [`UtilityProcess`](utility-process.md#class-utilityprocess)
|
||||
|
||||
**Note:** `utilityProcess.fork` can only be called after the `ready` event has been emitted on `App`.
|
||||
|
||||
## Class: UtilityProcess
|
||||
|
||||
> Instances of the `UtilityProcess` represent the Chromium spawned child process
|
||||
|
||||
@@ -16,7 +16,7 @@ Returns `string` - The file system path that this `File` object points to. In th
|
||||
|
||||
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
|
||||
|
||||
```js
|
||||
```js @ts-nocheck
|
||||
// Before
|
||||
const oldPath = document.querySelector('input').files[0].path
|
||||
|
||||
|
||||
@@ -12,6 +12,21 @@ 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 (37.0)
|
||||
|
||||
### Behavior Changed: `BrowserWindow.IsVisibleOnAllWorkspaces()` on Linux
|
||||
|
||||
`BrowserWindow.IsVisibleOnAllWorkspaces()` will now return false on Linux if the
|
||||
window is not currently visible.
|
||||
|
||||
### Behavior Changes: `app.commandLine`
|
||||
|
||||
`app.commandLine` will convert upper-cases switches and arguments to lowercase.
|
||||
|
||||
`app.commandLine` was only meant to handle chromium switches (which aren't case-sensitive) and switches passed via `app.commandLine` will not be passed down to any of the child processes.
|
||||
|
||||
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
|
||||
|
||||
## Planned Breaking API Changes (36.0)
|
||||
|
||||
### Removed:`isDefault` and `status` properties on `PrinterInfo`
|
||||
@@ -19,6 +34,29 @@ This document uses the following convention to categorize breaking changes:
|
||||
These properties have been removed from the PrinterInfo Object
|
||||
because they have been removed from upstream Chromium.
|
||||
|
||||
### Removed: `quota` type `syncable` in `Session.clearStorageData(options)`
|
||||
|
||||
When calling `Session.clearStorageData(options)`, the `options.quota` type
|
||||
`syncable` is no longer supported because it has been
|
||||
[removed](https://chromium-review.googlesource.com/c/chromium/src/+/6309405)
|
||||
from upstream Chromium.
|
||||
|
||||
### Deprecated: `quota` property in `Session.clearStorageData(options)`
|
||||
|
||||
When calling `Session.clearStorageData(options)`, the `options.quota`
|
||||
property is deprecated. Since the `syncable` type was removed, there
|
||||
is only type left -- `'temporary'` -- so specifying it is unnecessary.
|
||||
|
||||
### Deprecated: `null` value for `session` property in `ProtocolResponse`
|
||||
|
||||
Previously, setting the ProtocolResponse.session property to `null`
|
||||
Would create a random independent session. This is no longer supported.
|
||||
|
||||
Using single-purpose sessions here is discouraged due to overhead costs;
|
||||
however, old code that needs to preserve this behavior can emulate it by
|
||||
creating a random session with `session.fromPartition(some_random_string)`
|
||||
and then using it in `ProtocolResponse.session`.
|
||||
|
||||
### Deprecated: Extension methods and events on `session`
|
||||
|
||||
`session.loadExtension`, `session.removeExtension`, `session.getExtension`,
|
||||
|
||||
@@ -65,7 +65,7 @@ Verify that the Pull Request is correct and make a corresponding entry in the
|
||||
API History:
|
||||
|
||||
> [!NOTE]
|
||||
> Refer to the [API History section of `styleguide.md`](../styleguide.md#api-history)
|
||||
> Refer to the [API History section of `style-guide.md`](./style-guide.md#api-history)
|
||||
for information on how to create API History blocks.
|
||||
|
||||
`````markdown
|
||||
|
||||
@@ -195,7 +195,7 @@ required[, optional]
|
||||
More detailed information on each of the arguments is noted in an unordered list
|
||||
below the method. The type of argument is notated by either JavaScript primitives
|
||||
(e.g. `string`, `Promise`, or `Object`), a custom API structure like Electron's
|
||||
[`Cookie`](api/structures/cookie.md), or the wildcard `any`.
|
||||
[`Cookie`](../api/structures/cookie.md), or the wildcard `any`.
|
||||
|
||||
If the argument is of type `Array`, use `[]` shorthand with the type of value
|
||||
inside the array (for example,`any[]` or `string[]`).
|
||||
@@ -290,7 +290,7 @@ The purpose of the API History block is to describe when/where/how/why an API wa
|
||||
Each API change listed in the block should include a link to the
|
||||
PR where that change was made along with an optional short description of the
|
||||
change. If applicable, include the [heading id](https://gist.github.com/asabaylus/3071099)
|
||||
for that change from the [breaking changes documentation](./breaking-changes.md).
|
||||
for that change from the [breaking changes documentation](../breaking-changes.md).
|
||||
|
||||
The [API History linting script][api-history-linting-script] (`lint:api-history`)
|
||||
validates API History blocks in the Electron documentation against the schema and
|
||||
@@ -24,9 +24,7 @@ const dockMenu = Menu.buildFromTemplate([
|
||||
])
|
||||
|
||||
app.whenReady().then(() => {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.setMenu(dockMenu)
|
||||
}
|
||||
app.dock?.setMenu(dockMenu)
|
||||
}).then(createWindow)
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
|
||||
3
docs/images/corner-smoothing-example-0.svg
Normal file
3
docs/images/corner-smoothing-example-0.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 48C0 21.4903 21.4903 0 48 0H144C170.51 0 192 21.4903 192 48V144C192 170.51 170.51 192 144 192H48C21.4903 192 0 170.51 0 144V48Z" fill="#6495ED"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 265 B |
3
docs/images/corner-smoothing-example-100.svg
Normal file
3
docs/images/corner-smoothing-example-100.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 96C0 50.7452 0 28.1177 14.0589 14.0589C28.1177 0 50.7452 0 96 0C141.255 0 163.882 0 177.941 14.0589C192 28.1177 192 50.7452 192 96C192 141.255 192 163.882 177.941 177.941C163.882 192 141.255 192 96 192C50.7452 192 28.1177 192 14.0589 177.941C0 163.882 0 141.255 0 96Z" fill="#6495ED"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 405 B |
3
docs/images/corner-smoothing-example-30.svg
Normal file
3
docs/images/corner-smoothing-example-30.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 62.4C0 49.0126 0 42.3188 1.32624 36.7946C5.5399 19.2435 19.2435 5.5399 36.7946 1.32624C42.3188 0 49.0126 0 62.4 0H129.6C142.987 0 149.681 0 155.205 1.32624C172.757 5.5399 186.46 19.2435 190.674 36.7946C192 42.3188 192 49.0126 192 62.4V129.6C192 142.987 192 149.681 190.674 155.205C186.46 172.757 172.757 186.46 155.205 190.674C149.681 192 142.987 192 129.6 192H62.4C49.0126 192 42.3188 192 36.7946 190.674C19.2435 186.46 5.5399 172.757 1.32624 155.205C0 149.681 0 142.987 0 129.6V62.4Z" fill="#6495ED"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 623 B |
3
docs/images/corner-smoothing-example-60.svg
Normal file
3
docs/images/corner-smoothing-example-60.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 76.8C0 49.9175 0 36.4762 5.23169 26.2085C9.83361 17.1767 17.1767 9.83361 26.2085 5.23169C36.4762 0 49.9175 0 76.8 0H115.2C142.083 0 155.524 0 165.792 5.23169C174.823 9.83361 182.166 17.1767 186.768 26.2085C192 36.4762 192 49.9175 192 76.8V115.2C192 142.083 192 155.524 186.768 165.792C182.166 174.823 174.823 182.166 165.792 186.768C155.524 192 142.083 192 115.2 192H76.8C49.9175 192 36.4762 192 26.2085 186.768C17.1767 182.166 9.83361 174.823 5.23169 165.792C0 155.524 0 142.083 0 115.2V76.8Z" fill="#6495ED"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 631 B |
15
docs/images/corner-smoothing-summary.svg
Normal file
15
docs/images/corner-smoothing-summary.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg width="1024" height="512" viewBox="0 0 1024 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="1024" height="512" fill="#EEEEEE"/>
|
||||
<rect x="32" y="128" width="256" height="256" fill="white"/>
|
||||
<rect x="64" y="160" width="192" height="192" rx="48" stroke="#444444" stroke-width="4"/>
|
||||
<rect x="320" y="64" width="384" height="384" fill="white"/>
|
||||
<mask id="mask0_1_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="320" y="64" width="384" height="384">
|
||||
<rect x="320" y="64" width="384" height="384" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_1_2)">
|
||||
<rect x="85" y="171" width="512" height="512" rx="128" stroke="#444444" stroke-width="8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M340.677 167H341.323C401.39 167 446.862 167 481.984 171.722C517.284 176.468 542.726 186.05 562.338 205.662C581.95 225.274 591.532 250.716 596.278 286.016C601 321.138 601 366.61 601 426.677V427.323C601 487.39 601 532.862 596.278 567.984C591.532 603.284 581.95 628.726 562.338 648.338C542.726 667.95 517.284 677.532 481.984 682.278C446.862 687 401.39 687 341.323 687H340.677C280.61 687 235.138 687 200.016 682.278C164.716 677.532 139.274 667.95 119.662 648.338C100.05 628.726 90.4679 603.284 85.722 567.984C81 532.862 81 487.39 81 427.323V426.677C81 366.61 81 321.138 85.722 286.016C90.4679 250.716 100.05 225.274 119.662 205.662C139.274 186.05 164.716 176.468 200.016 171.722C235.138 167 280.61 167 340.677 167ZM201.082 179.651C166.67 184.277 143.197 193.441 125.319 211.319C107.441 229.197 98.2773 252.67 93.6506 287.082C89.0085 321.61 89 366.547 89 427C89 487.453 89.0085 532.39 93.6506 566.918C98.2773 601.33 107.441 624.803 125.319 642.681C143.197 660.559 166.67 669.723 201.082 674.349C235.61 678.992 280.547 679 341 679C401.453 679 446.39 678.992 480.918 674.349C515.33 669.723 538.803 660.559 556.681 642.681C574.559 624.803 583.723 601.33 588.349 566.918C592.992 532.39 593 487.453 593 427C593 366.547 592.992 321.61 588.349 287.082C583.723 252.67 574.559 229.197 556.681 211.319C538.803 193.441 515.33 184.277 480.918 179.651C446.39 175.008 401.453 175 341 175C280.547 175 235.61 175.008 201.082 179.651Z" fill="#2A90D9"/>
|
||||
</g>
|
||||
<rect x="731" y="128" width="256" height="256" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M863.839 158H864.161C886.652 158 903.732 158 916.936 159.775C930.228 161.562 939.892 165.182 947.355 172.645C954.818 180.108 958.438 189.772 960.225 203.064C962 216.268 962 233.348 962 255.839V256.161C962 278.652 962 295.732 960.225 308.936C958.438 322.228 954.818 331.892 947.355 339.355C939.892 346.818 930.228 350.438 916.936 352.225C903.732 354 886.652 354 864.161 354H863.839C841.348 354 824.268 354 811.064 352.225C797.772 350.438 788.108 346.818 780.645 339.355C773.182 331.892 769.562 322.228 767.775 308.936C766 295.732 766 278.652 766 256.161V255.839C766 233.348 766 216.268 767.775 203.064C769.562 189.772 773.182 180.108 780.645 172.645C788.108 165.182 797.772 161.562 811.064 159.775C824.268 158 841.348 158 863.839 158ZM811.597 163.74C798.748 165.467 790.069 168.877 783.473 175.473C776.877 182.069 773.467 190.748 771.74 203.597C770.004 216.504 770 233.316 770 256C770 278.684 770.004 295.496 771.74 308.403C773.467 321.252 776.877 329.931 783.473 336.527C790.069 343.123 798.748 346.533 811.597 348.26C824.504 349.996 841.316 350 864 350C886.684 350 903.496 349.996 916.403 348.26C929.252 346.533 937.931 343.123 944.527 336.527C951.123 329.931 954.533 321.252 956.26 308.403C957.996 295.496 958 278.684 958 256C958 233.316 957.996 216.504 956.26 203.597C954.533 190.748 951.123 182.069 944.527 175.473C937.931 168.877 929.252 165.467 916.403 163.74C903.496 162.004 886.684 162 864 162C841.316 162 824.504 162.004 811.597 163.74Z" fill="#2A90D9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -50,9 +50,7 @@ const dockMenu = Menu.buildFromTemplate([
|
||||
])
|
||||
|
||||
app.whenReady().then(() => {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.setMenu(dockMenu)
|
||||
}
|
||||
app.dock?.setMenu(dockMenu)
|
||||
}).then(createWindow)
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
|
||||
1346
docs/tutorial/native-code-and-electron-cpp-win32.md
Normal file
1346
docs/tutorial/native-code-and-electron-cpp-win32.md
Normal file
File diff suppressed because it is too large
Load Diff
380
docs/tutorial/native-code-and-electron.md
Normal file
380
docs/tutorial/native-code-and-electron.md
Normal file
@@ -0,0 +1,380 @@
|
||||
# Native Code and Electron
|
||||
|
||||
One of Electron's most powerful features is the ability to combine web technologies with native code - both for compute-intensive logic as well as for the occasional native user interface, where desired.
|
||||
|
||||
Electron does so by building on top of "Native Node.js Addons". You've probably already come across a few of them - packages like the famous [sqlite](https://www.npmjs.com/package/sqlite3) use native code to combine JavaScript and native technologies. You can use this feature to extend your Electron application with anything a fully native application can do:
|
||||
|
||||
* Access native platform APIs not available in JavaScript. Any macOS, Windows, or Linux operating system API is available to you.
|
||||
* Create UI components that interact with native desktop frameworks.
|
||||
* Integrate with existing native libraries.
|
||||
* Implement performance-critical code that runs faster than JavaScript.
|
||||
|
||||
Native Node.js addons are dynamically-linked shared objects (on Unix-like systems) or DLL files (on Windows) that can be loaded into Node.js or Electron using the `require()` or `import` functions. They behave just like regular JavaScript modules but provide an interface to code written in C++, Rust, or other languages that can compile to native code.
|
||||
|
||||
# Tutorial: Creating a Native Node.js Addon for Electron
|
||||
|
||||
This tutorial will walk you through building a basic Node.js native addon that can be used in Electron applications. We'll focus on concepts common to all platforms, using C++ as the implementation language. Once you complete this tutorial common to all native Node.js addons, you can move on to one of our platform-specific tutorials.
|
||||
|
||||
## Requirements
|
||||
|
||||
This tutorial assumes you have Node.js and npm installed, as well as the basic tools necessary for compiling code on your platform (like Visual Studio on Windows, Xcode on macOS, or GCC/Clang on Linux). You can find detailed instructions in the [`node-gyp` readme](https://github.com/nodejs/node-gyp?tab=readme-ov-file).
|
||||
|
||||
### Requirements: macOS
|
||||
|
||||
To build native Node.js addons on macOS, you'll need the Xcode Command Line Tools. These provide the necessary compilers and build tools (namely, `clang`, `clang++`, and `make`). The following command will prompt you to install the Command Line Tools if they aren't already installed.
|
||||
|
||||
```sh
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
### Requirements: Windows
|
||||
|
||||
The official Node.js installer offers the optional installation of "Tools for Native Modules", which installs everything required for the basic compilation of C++ modules - specifically, Python 3 and the "Visual Studio Desktop development with C++" workload. Alternatively, you can use `chocolatey`, `winget`, or the Windows Store.
|
||||
|
||||
### Requirements: Linux
|
||||
|
||||
* [A supported version of Python](https://devguide.python.org/versions/)
|
||||
* `make`
|
||||
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
|
||||
|
||||
## 1) Creating a package
|
||||
|
||||
First, create a new Node.js package that will contain your native addon:
|
||||
|
||||
```sh
|
||||
mkdir my-native-addon
|
||||
cd my-native-addon
|
||||
npm init -y
|
||||
```
|
||||
|
||||
This creates a basic `package.json` file. Next, we'll install the necessary dependencies:
|
||||
|
||||
```sh
|
||||
npm install node-addon-api bindings
|
||||
```
|
||||
|
||||
* `node-addon-api`: This is a C++ wrapper for the low-level Node.js API that makes it easier to build addons. It provides a C++ object-oriented API that's more convenient and safer to use than the raw C-style API.
|
||||
* `bindings`: A helper module that simplifies the process of loading your compiled native addon. It handles finding your compiled `.node` file automatically.
|
||||
|
||||
Now, let's update our `package.json` to include the appropriate build scripts. We will explain what these specifically do further below.
|
||||
|
||||
```json title='package.json'
|
||||
{
|
||||
"name": "my-native-addon",
|
||||
"version": "1.0.0",
|
||||
"description": "A native addon for Electron",
|
||||
"main": "js/index.js",
|
||||
"scripts": {
|
||||
"clean": "node -e \"require('fs').rmSync('build', { recursive: true, force: true })\"",
|
||||
"build": "node-gyp configure && node-gyp build"
|
||||
},
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^8.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-gyp": "^11.1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
These scripts will:
|
||||
|
||||
* `clean`: Remove the build directory, allowing for a fresh build
|
||||
* `build`: Run the standard node-gyp build process to compile your addon
|
||||
|
||||
## 2) Setting up the build system
|
||||
|
||||
Node.js addons use a build system called `node-gyp`, which is a cross-platform command-line tool written in Node.js. It compiles native addon modules for Node.js using platform-specific build tools behind the scenes:
|
||||
|
||||
* On Windows: Visual Studio
|
||||
* On macOS: Xcode or command-line tools
|
||||
* On Linux: GCC or similar compilers
|
||||
|
||||
### Configuring `node-gyp`
|
||||
|
||||
The `binding.gyp` file is a JSON-like configuration file that tells node-gyp how to build your native addon. It's similar to a make file or a project file but in a platform-independent format. Let's create a basic `binding.gyp` file:
|
||||
|
||||
```json title='binding.gyp'
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"target_name": "my_addon",
|
||||
"sources": [
|
||||
"src/my_addon.cc",
|
||||
"src/cpp_code.cc"
|
||||
],
|
||||
"include_dirs": [
|
||||
"<!@(node -p \"require('node-addon-api').include\")",
|
||||
"include"
|
||||
],
|
||||
"dependencies": [
|
||||
"<!(node -p \"require('node-addon-api').gyp\")"
|
||||
],
|
||||
"defines": [
|
||||
"NODE_ADDON_API_CPP_EXCEPTIONS"
|
||||
],
|
||||
"cflags!": ["-fno-exceptions"],
|
||||
"cflags_cc!": ["-fno-exceptions"],
|
||||
"xcode_settings": {
|
||||
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
||||
"CLANG_CXX_LIBRARY": "libc++",
|
||||
"MACOSX_DEPLOYMENT_TARGET": "10.14"
|
||||
},
|
||||
"msvs_settings": {
|
||||
"VCCLCompilerTool": {
|
||||
"ExceptionHandling": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Let's break down this configuration:
|
||||
|
||||
* `target_name`: The name of your addon. This determines the filename of the compiled module (my_addon.node).
|
||||
* `sources`: List of source files to compile. We'll have two files: the main addon file and our actual C++ implementation.
|
||||
* `include_dirs`: Directories to search for header files. The cryptic-looking line `<!@(node -p \"require('node-addon-api').include\")` runs a Node.js command to get the path to the node-addon-api include directory.
|
||||
* `dependencies`: The `node-addon-api` dependency. Similar to the include dirs, this executes a Node.js command to get the proper configuration.
|
||||
* `defines`: Preprocessor definitions. Here we're enabling C++ exceptions for node-addon-api.
|
||||
Platform-specific settings:
|
||||
* `cflags`! and cflags_cc!: Compiler flags for Unix-like systems
|
||||
* `xcode_settings`: Settings specific to macOS/Xcode compiler
|
||||
* `msvs_settings`: Settings specific to Microsoft Visual Studio on Windows
|
||||
|
||||
Now, create the directory structure for our project:
|
||||
|
||||
```sh
|
||||
mkdir src
|
||||
mkdir include
|
||||
mkdir js
|
||||
```
|
||||
|
||||
This creates:
|
||||
|
||||
* `src/`: Where our source files will go
|
||||
* `include/`: For header files
|
||||
* `js/`: For our JavaScript wrapper
|
||||
|
||||
## 3) "Hello World" from C++
|
||||
|
||||
Let's start by defining our C++ interface in a header file. Create `include/cpp_code.h`:
|
||||
|
||||
```cpp
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace cpp_code {
|
||||
// A simple function that takes a string input and returns a string
|
||||
std::string hello_world(const std::string& input);
|
||||
} // namespace cpp_code
|
||||
```
|
||||
|
||||
The `#pragma once` directive is a header guard that prevents the file from being included multiple times in the same compilation unit. The actual function declaration is inside a namespace to avoid potential name conflicts.
|
||||
|
||||
Next, let's implement the function in `src/cpp_code.cc`:
|
||||
|
||||
```cpp title='src/cpp_code.cc'
|
||||
#include <string>
|
||||
#include "../include/cpp_code.h"
|
||||
|
||||
namespace cpp_code {
|
||||
std::string hello_world(const std::string& input) {
|
||||
// Simply concatenate strings and return
|
||||
return "Hello from C++! You said: " + input;
|
||||
}
|
||||
} // namespace cpp_code
|
||||
```
|
||||
|
||||
This is a simple implementation that just adds some text to the input string and returns it.
|
||||
|
||||
Now, let's create the addon code that bridges our C++ code with the Node.js/JavaScript world. Create `src/my_addon.cc`:
|
||||
|
||||
```cpp title='src/my_addon.cc'
|
||||
#include <napi.h>
|
||||
#include <string>
|
||||
#include "../include/cpp_code.h"
|
||||
|
||||
// Create a class that will be exposed to JavaScript
|
||||
class MyAddon : public Napi::ObjectWrap<MyAddon> {
|
||||
public:
|
||||
// This static method defines the class for JavaScript
|
||||
static Napi::Object Init(Napi::Env env, Napi::Object exports) {
|
||||
// Define the JavaScript class with method(s)
|
||||
Napi::Function func = DefineClass(env, "MyAddon", {
|
||||
InstanceMethod("helloWorld", &MyAddon::HelloWorld)
|
||||
});
|
||||
|
||||
// Create a persistent reference to the constructor
|
||||
Napi::FunctionReference* constructor = new Napi::FunctionReference();
|
||||
*constructor = Napi::Persistent(func);
|
||||
env.SetInstanceData(constructor);
|
||||
|
||||
// Set the constructor on the exports object
|
||||
exports.Set("MyAddon", func);
|
||||
return exports;
|
||||
}
|
||||
|
||||
// Constructor
|
||||
MyAddon(const Napi::CallbackInfo& info)
|
||||
: Napi::ObjectWrap<MyAddon>(info) {}
|
||||
|
||||
private:
|
||||
// Method that will be exposed to JavaScript
|
||||
Napi::Value HelloWorld(const Napi::CallbackInfo& info) {
|
||||
Napi::Env env = info.Env();
|
||||
|
||||
// Validate arguments (expecting one string)
|
||||
if (info.Length() < 1 || !info[0].IsString()) {
|
||||
Napi::TypeError::New(env, "Expected string argument").ThrowAsJavaScriptException();
|
||||
return env.Null();
|
||||
}
|
||||
|
||||
// Convert JavaScript string to C++ string
|
||||
std::string input = info[0].As<Napi::String>();
|
||||
|
||||
// Call our C++ function
|
||||
std::string result = cpp_code::hello_world(input);
|
||||
|
||||
// Convert C++ string back to JavaScript string and return
|
||||
return Napi::String::New(env, result);
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize the addon
|
||||
Napi::Object Init(Napi::Env env, Napi::Object exports) {
|
||||
return MyAddon::Init(env, exports);
|
||||
}
|
||||
|
||||
// Register the initialization function
|
||||
NODE_API_MODULE(my_addon, Init)
|
||||
```
|
||||
|
||||
Let's break down this code:
|
||||
|
||||
1. We define a `MyAddon` class that inherits from `Napi::ObjectWrap<MyAddon>`, which handles wrapping our C++ class for JavaScript.
|
||||
2. The `Init` static method:
|
||||
2.1 Defines a JavaScript class with a method called `helloWorld`
|
||||
2.2 Creates a persistent reference to the constructor (to prevent garbage collection)
|
||||
2.3 Exports the class constructor
|
||||
3. The constructor simply passes its arguments to the parent class.
|
||||
4. The `HelloWorld` method:
|
||||
4.1 Gets the Napi environment
|
||||
4.2 Validates input arguments (expecting a string)
|
||||
4.3 Converts the JavaScript string to a C++ string
|
||||
4.4 Calls our C++ function
|
||||
4.5 Converts the result back to a JavaScript string and returns it
|
||||
5. We define an initialization function and register it with NODE_API_MODULE macro, which makes our module loadable by Node.js.
|
||||
|
||||
Now, let's create a JavaScript wrapper to make the addon easier to use. Create `js/index.js`:
|
||||
|
||||
```js title='js/index.js' @ts-expect-error=[5]
|
||||
const EventEmitter = require('events')
|
||||
|
||||
// Load the native addon using the 'bindings' module
|
||||
// This will look for the compiled .node file in various places
|
||||
const bindings = require('bindings')
|
||||
const native = bindings('my_addon')
|
||||
|
||||
// Create a nice JavaScript wrapper
|
||||
class MyNativeAddon extends EventEmitter {
|
||||
constructor () {
|
||||
super()
|
||||
|
||||
// Create an instance of our C++ class
|
||||
this.addon = new native.MyAddon()
|
||||
}
|
||||
|
||||
// Wrap the C++ method with a nicer JavaScript API
|
||||
helloWorld (input = '') {
|
||||
if (typeof input !== 'string') {
|
||||
throw new TypeError('Input must be a string')
|
||||
}
|
||||
return this.addon.helloWorld(input)
|
||||
}
|
||||
}
|
||||
|
||||
// Export a singleton instance
|
||||
if (process.platform === 'win32' || process.platform === 'darwin' || process.platform === 'linux') {
|
||||
module.exports = new MyNativeAddon()
|
||||
} else {
|
||||
// Provide a fallback for unsupported platforms
|
||||
console.warn('Native addon not supported on this platform')
|
||||
|
||||
module.exports = {
|
||||
helloWorld: (input) => `Hello from JS! You said: ${input}`
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This JavaScript wrapper:
|
||||
|
||||
1. Uses `bindings` to load our compiled native addon
|
||||
1. Creates a class that extends EventEmitter (useful for future extensions that might emit events)
|
||||
1. Instantiates our C++ class and provides a simpler API
|
||||
1. Adds some input validation on the JavaScript side
|
||||
1. Exports a singleton instance of our wrapper
|
||||
1. Handles unsupported platforms gracefully
|
||||
|
||||
### Building and testing the addon
|
||||
|
||||
Now we can build our native addon:
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
This will run `node-gyp configure` and `node-gyp build` to compile our C++ code into a `.node` file.
|
||||
Let's create a simple test script to verify everything works. Create `test.js` in the project root:
|
||||
|
||||
```js title='test.js' @ts-expect-error=[2]
|
||||
// Load our addon
|
||||
const myAddon = require('./js')
|
||||
|
||||
// Try the helloWorld function
|
||||
const result = myAddon.helloWorld('This is a test')
|
||||
|
||||
// Should print: "Hello from C++! You said: This is a test"
|
||||
console.log(result)
|
||||
```
|
||||
|
||||
Run the test:
|
||||
|
||||
```sh
|
||||
node test.js
|
||||
```
|
||||
|
||||
If everything works correctly, you should see:
|
||||
|
||||
```txt
|
||||
Hello from C++! You said: This is a test
|
||||
```
|
||||
|
||||
### Using the addon in Electron
|
||||
|
||||
To use this addon in an Electron application, you would:
|
||||
|
||||
1. Include it as a dependency in your Electron project
|
||||
1. Build it targeting your specific Electron version. `electron-forge` handles this step automatically for you - for more details, see [Native Node Modules](./using-native-node-modules.md).
|
||||
1. Import and use it just like any other module in a process that has Node.js enabled.
|
||||
|
||||
```js @ts-expect-error=[2]
|
||||
// In your main process
|
||||
const myAddon = require('my-native-addon')
|
||||
console.log(myAddon.helloWorld('Electron'))
|
||||
```
|
||||
|
||||
## References and further learning
|
||||
|
||||
Native addon development can be written in several languages beyond C++. Rust can be used with crates like [`napi-rs`](https://github.com/napi-rs/napi-rs), [`neon`](https://neon-rs.dev/), or [`node-bindgen`](https://github.com/infinyon/node-bindgen). Objective-C/Swift can be used through Objective-C++ on macOS.
|
||||
|
||||
The specific implementation details differ significantly by platform, especially when accessing platform-specific APIs or UI frameworks, like Windows' Win32 API, COM components, UWP/WinRT - or macOS's Cocoa, AppKit, or ObjectiveC runtime.
|
||||
|
||||
This means that you'll likely use two groups of references for your native code: First, on the Node.js side, use the [N-API documentation](https://nodejs.org/api/n-api.html) to learn about creating and exposing complex structures to JavaScript - like asynchronous thread-safe function calls or creating JavaScript-native objects (`error`, `promise`, etc). Secondly, on the side of the technology you're working with, you'll likely be looking at their lower-level documentation:
|
||||
|
||||
* [Microsoft C++, C, and Assembler documentation](https://learn.microsoft.com/en-us/cpp/?view=msvc-170)
|
||||
* [C++/WinRT](https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/)
|
||||
* [MSVC-170 C++ Documentation](https://learn.microsoft.com/en-us/cpp/cpp/?view=msvc-170)
|
||||
* [Apple Developer Documentation](https://developer.apple.com/documentation)
|
||||
* [Programming with Objective-C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011210)
|
||||
@@ -21,6 +21,7 @@
|
||||
-base/
|
||||
-chrome/
|
||||
-components/
|
||||
-content/browser/indexed_db
|
||||
-device/
|
||||
-extensions/
|
||||
-google_apis/
|
||||
|
||||
@@ -14,6 +14,7 @@ auto_filenames = {
|
||||
"docs/api/content-tracing.md",
|
||||
"docs/api/context-bridge.md",
|
||||
"docs/api/cookies.md",
|
||||
"docs/api/corner-smoothing-css.md",
|
||||
"docs/api/crash-reporter.md",
|
||||
"docs/api/debugger.md",
|
||||
"docs/api/desktop-capturer.md",
|
||||
|
||||
@@ -453,8 +453,6 @@ filenames = {
|
||||
"shell/browser/net/system_network_context_manager.h",
|
||||
"shell/browser/net/url_loader_network_observer.cc",
|
||||
"shell/browser/net/url_loader_network_observer.h",
|
||||
"shell/browser/net/url_pipe_loader.cc",
|
||||
"shell/browser/net/url_pipe_loader.h",
|
||||
"shell/browser/net/web_request_api_interface.h",
|
||||
"shell/browser/network_hints_handler_impl.cc",
|
||||
"shell/browser/network_hints_handler_impl.h",
|
||||
@@ -720,6 +718,8 @@ filenames = {
|
||||
"shell/renderer/electron_renderer_client.h",
|
||||
"shell/renderer/electron_sandboxed_renderer_client.cc",
|
||||
"shell/renderer/electron_sandboxed_renderer_client.h",
|
||||
"shell/renderer/electron_smooth_round_rect.cc",
|
||||
"shell/renderer/electron_smooth_round_rect.h",
|
||||
"shell/renderer/preload_realm_context.cc",
|
||||
"shell/renderer/preload_realm_context.h",
|
||||
"shell/renderer/preload_utils.cc",
|
||||
|
||||
@@ -1390,6 +1390,8 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__flat_map/sorted_equivalent.h",
|
||||
"//third_party/libc++/src/include/__flat_map/sorted_unique.h",
|
||||
"//third_party/libc++/src/include/__flat_map/utils.h",
|
||||
"//third_party/libc++/src/include/__flat_set/flat_set.h",
|
||||
"//third_party/libc++/src/include/__flat_set/ra_iterator.h",
|
||||
"//third_party/libc++/src/include/__format/buffer.h",
|
||||
"//third_party/libc++/src/include/__format/concepts.h",
|
||||
"//third_party/libc++/src/include/__format/container_adaptor.h",
|
||||
@@ -1460,12 +1462,14 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__fwd/get.h",
|
||||
"//third_party/libc++/src/include/__fwd/ios.h",
|
||||
"//third_party/libc++/src/include/__fwd/istream.h",
|
||||
"//third_party/libc++/src/include/__fwd/map.h",
|
||||
"//third_party/libc++/src/include/__fwd/mdspan.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory_resource.h",
|
||||
"//third_party/libc++/src/include/__fwd/ostream.h",
|
||||
"//third_party/libc++/src/include/__fwd/pair.h",
|
||||
"//third_party/libc++/src/include/__fwd/queue.h",
|
||||
"//third_party/libc++/src/include/__fwd/set.h",
|
||||
"//third_party/libc++/src/include/__fwd/span.h",
|
||||
"//third_party/libc++/src/include/__fwd/sstream.h",
|
||||
"//third_party/libc++/src/include/__fwd/stack.h",
|
||||
@@ -1888,6 +1892,8 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/negation.h",
|
||||
"//third_party/libc++/src/include/__type_traits/promote.h",
|
||||
"//third_party/libc++/src/include/__type_traits/rank.h",
|
||||
"//third_party/libc++/src/include/__type_traits/reference_constructs_from_temporary.h",
|
||||
"//third_party/libc++/src/include/__type_traits/reference_converts_from_temporary.h",
|
||||
"//third_party/libc++/src/include/__type_traits/remove_all_extents.h",
|
||||
"//third_party/libc++/src/include/__type_traits/remove_const.h",
|
||||
"//third_party/libc++/src/include/__type_traits/remove_const_ref.h",
|
||||
@@ -2012,6 +2018,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/fenv.h",
|
||||
"//third_party/libc++/src/include/filesystem",
|
||||
"//third_party/libc++/src/include/flat_map",
|
||||
"//third_party/libc++/src/include/flat_set",
|
||||
"//third_party/libc++/src/include/float.h",
|
||||
"//third_party/libc++/src/include/format",
|
||||
"//third_party/libc++/src/include/forward_list",
|
||||
|
||||
@@ -93,7 +93,7 @@ Menu.prototype.popup = function (options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
this.popupAt(window as unknown as BaseWindow, x, y, positioningItem, sourceType, callback);
|
||||
this.popupAt(window as unknown as BaseWindow, options.frame, x, y, positioningItem, sourceType, callback);
|
||||
return { browserWindow: window, x, y, position: positioningItem };
|
||||
};
|
||||
|
||||
|
||||
@@ -218,7 +218,6 @@ if (packagePath) {
|
||||
} else {
|
||||
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
|
||||
appCodeLoaded!();
|
||||
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
|
||||
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -667,10 +667,10 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
return p(pathArgument, options);
|
||||
};
|
||||
|
||||
const { readFileSync } = fs;
|
||||
fs.readFileSync = function (pathArgument: string, options: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return readFileSync.apply(this, arguments);
|
||||
function readFileFromArchiveSync (
|
||||
pathInfo: { asarPath: string; filePath: string },
|
||||
options: any
|
||||
): ReturnType<typeof readFileSync> {
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
@@ -704,6 +704,14 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
fs.readSync(fd, buffer, 0, info.size, info.offset);
|
||||
validateBufferIntegrity(buffer, info.integrity);
|
||||
return (encoding) ? buffer.toString(encoding) : buffer;
|
||||
}
|
||||
|
||||
const { readFileSync } = fs;
|
||||
fs.readFileSync = function (pathArgument: string, options: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return readFileSync.apply(this, arguments);
|
||||
|
||||
return readFileFromArchiveSync(pathInfo, options);
|
||||
};
|
||||
|
||||
type ReaddirOptions = { encoding: BufferEncoding | null; withFileTypes?: false, recursive?: false } | undefined | null;
|
||||
@@ -980,25 +988,19 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
};
|
||||
|
||||
const modBinding = internalBinding('modules');
|
||||
const { readPackageJSON } = modBinding;
|
||||
internalBinding('modules').readPackageJSON = (
|
||||
jsonPath: string,
|
||||
isESM: boolean,
|
||||
base: undefined | string,
|
||||
specifier: undefined | string
|
||||
) => {
|
||||
modBinding.overrideReadFileSync((jsonPath: string): Buffer | false | undefined => {
|
||||
const pathInfo = splitPath(jsonPath);
|
||||
if (!pathInfo.isAsar) return readPackageJSON(jsonPath, isESM, base, specifier);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) return undefined;
|
||||
// Fallback to Node.js internal implementation
|
||||
if (!pathInfo.isAsar) return undefined;
|
||||
|
||||
const realPath = archive.copyFileOut(filePath);
|
||||
if (!realPath) return undefined;
|
||||
|
||||
return readPackageJSON(realPath, isESM, base, specifier);
|
||||
};
|
||||
try {
|
||||
return readFileFromArchiveSync(pathInfo, undefined);
|
||||
} catch {
|
||||
// Not found
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
const { internalModuleStat } = binding;
|
||||
internalBinding('fs').internalModuleStat = (receiver: unknown, pathArgument: string) => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"@electron/fiddle-core": "^1.3.4",
|
||||
"@electron/github-app-auth": "^2.2.1",
|
||||
"@electron/lint-roller": "^2.4.0",
|
||||
"@electron/typescript-definitions": "^9.0.0",
|
||||
"@electron/typescript-definitions": "^9.1.2",
|
||||
"@octokit/rest": "^20.0.2",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
"@types/minimist": "^1.2.5",
|
||||
|
||||
@@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b
|
||||
|
||||
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
|
||||
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
|
||||
index 5ddc2d3b4cfb8a87eb22fb707230f56dcb7ccb3e..dea3c5b3adf49e1b4aab197e822744c80964afac 100644
|
||||
index b36c5885a31ff3242ac3104e6d875a008c7c39e4..8fe32508a00263295313e77992e2c208459ca42c 100644
|
||||
--- a/include/openssl/digest.h
|
||||
+++ b/include/openssl/digest.h
|
||||
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
|
||||
|
||||
@@ -118,7 +118,7 @@ index 8fdf1c624794f568bfc77b7b6b0c510b23905a4d..2e40c031e8c681fe921331b26dbf63f4
|
||||
callback(EVP_des_ede3_cbc(), "des-ede3-cbc", NULL, arg);
|
||||
callback(EVP_rc2_cbc(), "rc2-cbc", NULL, arg);
|
||||
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
|
||||
index 6bb135801326bc1cbe2b93f02e561e38c90abeca..06bcba4451456c72b168266859482343af76a931 100644
|
||||
index 13e68ad20ac08a462bb577d7f99e2c6f167579fa..4960d0eeb8f31bec4347ed2a1b63beba530de700 100644
|
||||
--- a/include/openssl/cipher.h
|
||||
+++ b/include/openssl/cipher.h
|
||||
@@ -448,6 +448,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index c859ea612ce2e6be80c6351d85fae230ca5bc2dd..5f4ffedb3b19dee4eef62e2033b0000847167111 100644
|
||||
index d228b1c3b517e21fb8022c1927b0bc522f46bf78..4a94410d0ea4daabde1397c78c5e5de113398ddf 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1196,7 +1196,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1205,7 +1205,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index c859ea612ce2e6be80c6351d85fae230ca5bc2dd..5f4ffedb3b19dee4eef62e2033b00008
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2563,13 +2563,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2572,13 +2572,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
|
||||
disable_freezing_flags_after_init_in_node.patch
|
||||
short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
|
||||
chore_add_electron_deps_to_gitignores.patch
|
||||
chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
|
||||
chore_modify_chromium_handling_of_mouse_events.patch
|
||||
add_electron_deps_to_license_credits_file.patch
|
||||
fix_crash_loading_non-standard_schemes_in_iframes.patch
|
||||
create_browser_v8_snapshot_file_name_fuse.patch
|
||||
@@ -134,10 +134,14 @@ fix_software_compositing_infinite_loop.patch
|
||||
fix_add_method_which_disables_headless_mode_on_native_widget.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
build_disable_thin_lto_mac.patch
|
||||
feat_corner_smoothing_css_rule_and_blink_painting.patch
|
||||
build_add_public_config_simdutf_config.patch
|
||||
fix_multiple_scopedpumpmessagesinprivatemodes_instances.patch
|
||||
revert_code_health_clean_up_stale_macwebcontentsocclusion.patch
|
||||
ignore_parse_errors_for_pkey_appusermodel_toastactivatorclsid.patch
|
||||
ignore_parse_errors_for_resolveshortcutproperties.patch
|
||||
feat_add_signals_when_embedder_cleanup_callbacks_run_for.patch
|
||||
feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
|
||||
fix_win32_synchronous_spellcheck.patch
|
||||
chore_remove_conflicting_allow_unsafe_libc_calls.patch
|
||||
fix_linter_error.patch
|
||||
revert_enable_crel_for_arm32_targets.patch
|
||||
|
||||
@@ -23,10 +23,10 @@ index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index e995c76b1ecc50502c47862607408d0663e91738..9d675b45688572d3b38d29e7d2074e0fb4b737ac 100644
|
||||
index 4185aa3e07df8f2a3061d18e87f39cd5d79baead..81261373a194210d97c723ed525cb75a2bbeafad 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4787,6 +4787,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4802,6 +4802,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index e995c76b1ecc50502c47862607408d0663e91738..9d675b45688572d3b38d29e7d2074e0f
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 398676cc0642115ff825beb1a593c3d14d4a5531..cc7cd3c73d72e933807b8d6f4e9e4ac43cbea00d 100644
|
||||
index a072319de5d16d8004cb33792b2275320627fe6a..f52aa0470ca53c9997961c398d2c79d25967562e 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -654,6 +654,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -653,6 +653,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 398676cc0642115ff825beb1a593c3d14d4a5531..cc7cd3c73d72e933807b8d6f4e9e4ac4
|
||||
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 d0d0ccafdd25cbac7fa7daa8e615b8ca1018a68b..6bf6b6b8a2847d4677383b9ee4574ebe6894c287 100644
|
||||
index fade7618e12889da5a1c3cbe465dec0869634407..53aaf91fe5e68465c9ec8b181e33b5ee95a5a5aa 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -665,6 +665,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -664,6 +664,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -92,10 +92,10 @@ index 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a00
|
||||
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 cfcabe9a443adae146c816419e0845cb6fc18404..717587c2cfe0b0228ae40adce04139cb54a34d0e 100644
|
||||
index 66cc44003157657c68e90d295f877789395eca8d..19cd8460711d5d5b1b76c9e4cb82ed7fc71b410c 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
|
||||
@@ -296,6 +296,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -123,10 +123,10 @@ index 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb
|
||||
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 6b967bd0b430732732ef30fb404e615a55c7c364..6bba885bca8f65744bcd03efcb98725649687856 100644
|
||||
index 286d95397da7b90ba28b4c4faaae26d6ab71a496..23fd67571152897b3bc93fde8e98e1d554cce275 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -415,6 +415,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -417,6 +417,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index 1368fae3346175c0fdd652d74f882eca26dd7aa2..7f2ca2366ea188bfb0a6e846a519b9cf790ec56a 100755
|
||||
index 7b948007755d306babea73498c17031c437ae6dc..adcfad8931c314f86d26347ccda438af452b8167 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -336,6 +336,31 @@ SPECIAL_CASES = {
|
||||
@@ -337,6 +337,31 @@ SPECIAL_CASES = {
|
||||
"License": "Apache 2.0",
|
||||
"License File": ["//third_party/dawn/third_party/khronos/LICENSE"],
|
||||
},
|
||||
|
||||
@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
|
||||
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index fd162a607424bd4d0b324ccc7270522eb3b6a991..df1d5564a52ef67b447bbc222ceb1f864eb3dd81 100644
|
||||
index 8064a2c27d747d4862503526496a65987df7dc35..c92596713c6d3884be3f63bf78d9117b7ad3ec90 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -230,6 +230,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
|
||||
@@ -237,6 +237,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ index fd162a607424bd4d0b324ccc7270522eb3b6a991..df1d5564a52ef67b447bbc222ceb1f86
|
||||
objects_.clear();
|
||||
raw_objects_.clear();
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
index d8fd611e88c22f2c1319da769dcd14cc218f9c90..f17304e1e9fd202dc4e1b7724031dc4c333a4baf 100644
|
||||
index 939a99b2a086d5373f82fe96da73dabe02f6f9d8..fccc200b1b11076c8fcffde071a53598ffba9a12 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
|
||||
@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
|
||||
WindowList.
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
index ff25e6eb48deb339ab92152eb09ad856068fd589..4a1f81429f0857e129e31103b026079de13fd826 100644
|
||||
index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f175743848e0cc2e 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -38,7 +38,7 @@ index ff25e6eb48deb339ab92152eb09ad856068fd589..4a1f81429f0857e129e31103b026079d
|
||||
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(current_context)->prefs();
|
||||
ui::AXMode mode =
|
||||
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
|
||||
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
|
||||
bool is_a11y_allowed = content::BrowserAccessibilityState::GetInstance()
|
||||
@@ -221,7 +222,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPDFPrinting, pdf_printing ? kOn : kOff);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a
|
||||
return receiver_.BindNewEndpointAndPassDedicatedRemote();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index a387789fe4270739408a9beb32a5ad1a8e51e5f6..43c108bd6b51d293e0f8b1b5393c76c5d167ccef 100644
|
||||
index 6c1e46e58d975137eee6c0fd7b01d2ae970a2e10..5ca29616369e76e298eb03188e18ca545c76a162 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -765,6 +765,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -39,7 +39,7 @@ index a387789fe4270739408a9beb32a5ad1a8e51e5f6..43c108bd6b51d293e0f8b1b5393c76c5
|
||||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index 5fb8a3dc69dc5fc5bfa08e01d8f03707a23c9274..41774b60b8cb7e0a22cedc597dc07ad15c96988c 100644
|
||||
index 56e52f079d1ad7c7a22764b976f0c8b2cc48dff2..1231fe522ad103e94d3c30ad7d5e5d23df9b3554 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -51,7 +51,7 @@ index 5fb8a3dc69dc5fc5bfa08e01d8f03707a23c9274..41774b60b8cb7e0a22cedc597dc07ad1
|
||||
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 92085aca6bd0c95a73b98e4173c0128d596b77f4..9503beefcbcfe7d99674582ece10a7e551fae96d 100644
|
||||
index d719b546b8c3c59003698b26dead065da7d76341..95a52f1cc2024e4a9cd694429d5304a5860a1c1e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -116,10 +116,10 @@ index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b
|
||||
// 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 c6a4f97c483667eaae354d8b99a01a6a3e765700..e4ab513573c7e327627b1ebd5b263f389098727a 100644
|
||||
index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56aaeebc1f 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2468,6 +2468,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2466,6 +2466,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index c6a4f97c483667eaae354d8b99a01a6a3e765700..e4ab513573c7e327627b1ebd5b263f38
|
||||
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 &&
|
||||
@@ -3994,10 +3998,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3989,10 +3993,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ 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 f17c7ae24086ab0112bd1245291f6f512a74e223..a1a23d263e4842996c0f8dde4dca8d8b35802fda 100644
|
||||
index 2612e54a2b0d3c71bd8efe9340bc58c795500140..e590387effc958ba7215e75ea1e2a8173f624d02 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
|
||||
@@ -147,6 +147,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
|
||||
@@ -32,7 +32,7 @@ index f17c7ae24086ab0112bd1245291f6f512a74e223..a1a23d263e4842996c0f8dde4dca8d8b
|
||||
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 95e6b4c64bca410586378c88df288ef2bb0c6992..783c44be399a3bcf251b52c47340c26d6d962747 100644
|
||||
index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86d4e16f6e 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,9 +43,9 @@ index 95e6b4c64bca410586378c88df288ef2bb0c6992..783c44be399a3bcf251b52c47340c26d
|
||||
#include "build/build_config.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -442,6 +443,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// when feature DynamicSafeAreaInsets is enabled.
|
||||
bool dynamic_safe_area_insets_enabled = false;
|
||||
@@ -451,6 +452,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// WebView and by `kWebPayments` feature flag everywhere.
|
||||
bool payment_request_enabled = false;
|
||||
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ bool context_isolation = false;
|
||||
@@ -65,18 +65,18 @@ index 95e6b4c64bca410586378c88df288ef2bb0c6992..783c44be399a3bcf251b52c47340c26d
|
||||
// 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 68f936bc7103accc4521da0a12e5e0fad05cc86c..24f209d5694cdf7128a8fb58af4957f0905058a0 100644
|
||||
index 9b7bc55a0e61de85688b2370012e14f8b47c43ab..63b035046ac3d565e5ee1f3a3c559da88d81f059 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
|
||||
@@ -6,6 +6,7 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_WEB_PREFERENCES_WEB_PREFERENCES_MOJOM_TRAITS_H_
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include "build/build_config.h"
|
||||
+#include "mojo/public/cpp/base/file_path_mojom_traits.h"
|
||||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -434,6 +435,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -437,6 +438,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.stylus_handwriting_enabled;
|
||||
}
|
||||
|
||||
@@ -130,18 +130,22 @@ index 68f936bc7103accc4521da0a12e5e0fad05cc86c..24f209d5694cdf7128a8fb58af4957f0
|
||||
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 f3f00b8430d131627191e0e689ab54256600e852..c88a348b9b991081609d5085890a0c2538555569 100644
|
||||
index e7c3bc263844c0ddeb9011440e2c0fd8f848ca27..142dae3834fe96f120727ef9ffe1250607bcadec 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
@@ -8,9 +8,11 @@ import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";
|
||||
import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
import "third_party/blink/public/mojom/v8_cache_options.mojom";
|
||||
import "url/mojom/url.mojom";
|
||||
import "mojo/public/mojom/base/string16.mojom";
|
||||
+import "mojo/public/mojom/base/file_path.mojom";
|
||||
import "mojo/public/mojom/base/string16.mojom";
|
||||
import "skia/public/mojom/skcolor.mojom";
|
||||
|
||||
+
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
@@ -217,6 +218,19 @@ struct WebPreferences {
|
||||
kPointerFirstType = kPointerNone,
|
||||
@@ -218,6 +220,19 @@ struct WebPreferences {
|
||||
// If true, stylus handwriting recognition to text input will be available in
|
||||
// editable input fields which are non-password type.
|
||||
bool stylus_handwriting_enabled;
|
||||
|
||||
@@ -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 fb943cbe362b560d36f31076cf28c56eeb32c9d1..d29a28b96a5ed7152512382ed7001fc9e348aea8 100644
|
||||
index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d0482bf20664 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index fb943cbe362b560d36f31076cf28c56eeb32c9d1..d29a28b96a5ed7152512382ed7001fc9
|
||||
// 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 401679f818e7bba02be454f9aa3424e84d36c4af..4da759d7ab6d6fb6b6d4d1648da0e62d7629ad5c 100644
|
||||
index 84ce7a810816d8229f15b23a2f8bf36c00989378..f721051f30f517c863a935765d5dcd4760ab461e 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -746,10 +746,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -750,10 +750,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index 401679f818e7bba02be454f9aa3424e84d36c4af..4da759d7ab6d6fb6b6d4d1648da0e62d
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -803,6 +799,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -807,6 +803,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
|
||||
Build BoringSSL with some extra functions that nodejs needs.
|
||||
|
||||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
|
||||
index 12b2fb63dd3ff8c3d29d915a7d0f84a9d26c6e0a..c9fd2c069473b1c21ca8610afb246337c412e0be 100644
|
||||
index b962901a7db8e6e50155dabbb1371124b12f9b26..b01e197ae2e411a376ffa28b9058d62a16abf23b 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -48,6 +48,21 @@ all_sources = bcm_internal_headers + bcm_sources + crypto_internal_headers +
|
||||
|
||||
@@ -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 c428a5f8d79e826077ab05fb6c56ae8e0e4ff609..c5fd8782fc1343f04f9e2c2c0414245d20696193 100644
|
||||
index 19e3f2fc7b3e08f690eb8c3b56c5b5222f645691..b0b7af16b6719a08ab7908ab4d96a5d2c3ea0340 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
|
||||
@@ -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 dee8a4413f62ac5535f4bce504ff0dc934db743a..064a62b40679f05feac3c81f9d6e6c2c90972727 100644
|
||||
index 55921115094f7437ce10db1cac1debe9adc10ea9..7040d83af340f052f5cab4437433e3dd0a688390 100644
|
||||
--- a/content/public/common/BUILD.gn
|
||||
+++ b/content/public/common/BUILD.gn
|
||||
@@ -380,6 +380,8 @@ mojom("interfaces") {
|
||||
@@ -379,6 +379,8 @@ mojom("interfaces") {
|
||||
"//content/common/*",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common:mojom_blink",
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
|
||||
This is similar to the //build usecase so we're OK adding ourselves here
|
||||
|
||||
diff --git a/.gn b/.gn
|
||||
index 3f6571828197301361ebde2e19e8e3138597c276..9effa81a564c3d2afae3eb2bb7438635e45f124a 100644
|
||||
index 54d2631ec203207f44038a36439613709fec1669..c8b8f604f9e9d960e8144a93d958ab125aae96c5 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -172,4 +172,26 @@ exec_script_allowlist =
|
||||
@@ -173,4 +173,26 @@ exec_script_allowlist =
|
||||
|
||||
"//tools/grit/grit_rule.gni",
|
||||
"//tools/gritsettings/BUILD.gn",
|
||||
|
||||
@@ -11,10 +11,10 @@ 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 bdf6d5865fb0069f4df368613167069d2fb50c86..93a126365406badf911d938dde2dcd8b140b7f6f 100644
|
||||
index 95c73dcb082999d0a85d82f1fe330d27c88055ca..64cd976eba849435779b280b2941f9150b5d1d36 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
@@ -33,10 +33,10 @@ index bdf6d5865fb0069f4df368613167069d2fb50c86..93a126365406badf911d938dde2dcd8b
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 0c9c08fe6c1303bc624464582857eb05b422f14c..adb35ecb5ba8fa69b2f20a6b4fd6a154a792bee3 100644
|
||||
index 2af2794b353d89f01d84b6ba28201f025ae124c7..b656ba6241b6a61d772219d1e80fb6b601aba224 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4565,7 +4565,7 @@ static_library("browser") {
|
||||
@@ -4593,7 +4593,7 @@ static_library("browser") {
|
||||
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index 0c9c08fe6c1303bc624464582857eb05b422f14c..adb35ecb5ba8fa69b2f20a6b4fd6a154
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 77056dcfa38390f5e047a9a9fea2e86357c33237..9c9f2c4bd3de71928e63ee8ea8f33a51c3404302 100644
|
||||
index 5de0d083bbbeddd5f394ac0154789566789099fb..692e44b75ac164a6f88398a4177913c47f49959e 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7052,9 +7052,12 @@ test("unit_tests") {
|
||||
@@ -7092,9 +7092,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index 77056dcfa38390f5e047a9a9fea2e86357c33237..9c9f2c4bd3de71928e63ee8ea8f33a51
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8015,6 +8018,10 @@ test("unit_tests") {
|
||||
@@ -8063,6 +8066,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index 77056dcfa38390f5e047a9a9fea2e86357c33237..9c9f2c4bd3de71928e63ee8ea8f33a51
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8070,7 +8077,6 @@ test("unit_tests") {
|
||||
@@ -8118,7 +8125,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
|
||||
everywhere, without having to import("//electron/.../flags.gni").
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index b5c5cb75e5fe2c58b1ee9051a9fe8cc082b88efa..8bf8d75205e984878219dcc5016b8665b9f65577 100644
|
||||
index a9d2caeb1c92e102daa9a8bd5bdc5a55af418cf4..efb5bf91722d4b18ae704ebf7355a13f253bef20 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -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 3f437d2b9c193285bdc200c2781b13de75ba993d..d9493066ddc7d7198acc76f345c726be021d8fce 100644
|
||||
index 29e8bbcb5e7ee2fb310ce00b0c20913424adc9c8..649330dde1e2b717e0af5a15834bf96ae4e19245 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -204,7 +204,11 @@ libcxx_modules("std_wctype_h") {
|
||||
@@ -269,7 +269,11 @@ libcxx_modules("std_wctype_h") {
|
||||
if (libcxx_is_shared) {
|
||||
_libcxx_target_type = "shared_library"
|
||||
} else {
|
||||
@@ -23,7 +23,7 @@ index 3f437d2b9c193285bdc200c2781b13de75ba993d..d9493066ddc7d7198acc76f345c726be
|
||||
}
|
||||
|
||||
target(_libcxx_target_type, "libc++") {
|
||||
@@ -213,6 +217,7 @@ target(_libcxx_target_type, "libc++") {
|
||||
@@ -278,6 +282,7 @@ target(_libcxx_target_type, "libc++") {
|
||||
# need to explicitly depend on libc++.
|
||||
visibility = [
|
||||
"//build/config:common_deps",
|
||||
|
||||
@@ -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 d7f1dc68e780f08af438c6ce67a3c856ef31daef..09752e9cda20f0020976015d58f73f320031d11e 100644
|
||||
index 7d8baae182adb7664912c930463aa8b461ccbdc8..71fbe83a33fa247f82d7315767ff9a4aee9d3fca 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9612,6 +9612,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9644,6 +9644,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 d7f1dc68e780f08af438c6ce67a3c856ef31daef..09752e9cda20f0020976015d58f73f32
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index c3e88374849c6062195fb78072123f05e1929fe8..79bc1f7a5c44a0dd255b5ca676d95c9fa9c31496 100644
|
||||
index f80d8ecc385df65610608ee78d6b09f2824a53fb..17009e944d6f3d23c721be521bf7843dbce1320e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5032,6 +5032,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5095,6 +5095,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
|
||||
opener);
|
||||
|
||||
@@ -37,7 +37,7 @@ index c3e88374849c6062195fb78072123f05e1929fe8..79bc1f7a5c44a0dd255b5ca676d95c9f
|
||||
// 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
|
||||
@@ -5073,12 +5079,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5136,12 +5142,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -51,13 +51,13 @@ index c3e88374849c6062195fb78072123f05e1929fe8..79bc1f7a5c44a0dd255b5ca676d95c9f
|
||||
new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(), params.disposition,
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index 91dcf6c9c4a2d840fb50cb329fe3ef1bba9103c3..cbc887a3034605a93468e73a310e9ca6838b32d8 100644
|
||||
index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2de7c4e0fc 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -621,6 +621,10 @@ struct CreateNewWindowParams {
|
||||
// The navigation initiator's user activation and ad status.
|
||||
blink.mojom.NavigationInitiatorActivationAndAdStatus
|
||||
initiator_activation_and_ad_status;
|
||||
@@ -646,6 +646,10 @@ struct CreateNewWindowParams {
|
||||
pending_associated_remote<blink.mojom.Widget> widget;
|
||||
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
|
||||
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
|
||||
+
|
||||
+ // Extra fields added by Electron.
|
||||
+ string raw_features;
|
||||
@@ -66,10 +66,10 @@ index 91dcf6c9c4a2d840fb50cb329fe3ef1bba9103c3..cbc887a3034605a93468e73a310e9ca6
|
||||
|
||||
// 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 eacc673508fded48288c90920f424e93f99f96cd..7eb3bb261a66b3bf8e5eaaea82962838376f3765 100644
|
||||
index e2382e9769cb79d676715187a2b8b00392e5445c..22400e44369b8ffb4b3fd886c981afea7a90da02 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -805,6 +805,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -820,6 +820,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,7 +79,7 @@ index eacc673508fded48288c90920f424e93f99f96cd..7eb3bb261a66b3bf8e5eaaea82962838
|
||||
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 cafc62e4b6da45e63cb77d27de9794d4b34cb408..da93d31b658577bd4817b2dcfe366d444dbc2e92 100644
|
||||
index 9b75a6c3c222a93319e0f26f351aed3dbe6ead28..8a7ea32eb4ea4a78662b96a2eef5a0de4229d214 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -199,6 +199,7 @@ class NetworkService;
|
||||
@@ -90,7 +90,7 @@ index cafc62e4b6da45e63cb77d27de9794d4b34cb408..da93d31b658577bd4817b2dcfe366d44
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1357,6 +1358,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1376,6 +1377,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -100,7 +100,7 @@ index cafc62e4b6da45e63cb77d27de9794d4b34cb408..da93d31b658577bd4817b2dcfe366d44
|
||||
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 ac4deeb6acebf79987591756320e2406d74d7a1e..f688e6d1e6c11f0dd80f498e6361fa822e8c2eb8 100644
|
||||
index b390356721fa226c348923f33601c4a1a2d9702d..97a3ea6f292563a41fd41f812ac72526a96d8471 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -32,6 +32,17 @@ namespace content {
|
||||
@@ -122,7 +122,7 @@ index ac4deeb6acebf79987591756320e2406d74d7a1e..f688e6d1e6c11f0dd80f498e6361fa82
|
||||
WebContents* source,
|
||||
const OpenURLParams& params,
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index ac2e7cdceb13ce07966a908fab3ff8feff969484..96cb58b1a88499cf8f78d748dc5a1cc1c6b6a128 100644
|
||||
index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f7727570c4ba 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -133,7 +133,7 @@ index ac2e7cdceb13ce07966a908fab3ff8feff969484..96cb58b1a88499cf8f78d748dc5a1cc1
|
||||
#include "content/public/browser/eye_dropper.h"
|
||||
#include "content/public/browser/fullscreen_types.h"
|
||||
#include "content/public/browser/invalidate_type.h"
|
||||
@@ -375,6 +376,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -376,6 +377,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const StoragePartitionConfig& partition_config,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
@@ -148,10 +148,10 @@ index ac2e7cdceb13ce07966a908fab3ff8feff969484..96cb58b1a88499cf8f78d748dc5a1cc1
|
||||
// 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 d7f25fd51ce82e20146d2df0978644deb6297fbb..e995c76b1ecc50502c47862607408d0663e91738 100644
|
||||
index 0755a49ee7558ee0c5e76f602c514bb8a7c3a019..4185aa3e07df8f2a3061d18e87f39cd5d79baead 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6908,6 +6908,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6927,6 +6927,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -210,10 +210,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index b44f0db98f89befc33430bcf275bffcfae9e7171..66f92d1e975a74720af12662447ea214ac210248 100644
|
||||
index f4a1ed78679c5efaea6494a4aa8b22fff31cba1b..afa637807b0a5bdef126031f219115ecee8d478d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2270,6 +2270,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2272,6 +2272,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 375db3d02ce2837ba69e3e93c38cde7153ba079f..fc3f4f71c43facf695d326f0bc64e0ad920aa9ac 100644
|
||||
index 0a0f0118d5c1a5a2f3ad28b068bebb849eba7246..5ca6d03b709ef119ccd6482b2f305f8a3aeb7438 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -217,6 +217,7 @@ vs-chromium-project.txt
|
||||
|
||||
@@ -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 56ddbc2d4fa336bcdbe9aaacd4bf8bbaa3573239..7859ce547dc00c2842fe1aa3699cf20e0f597937 100644
|
||||
index d97240a7b0dcf63737808850b6ef83852155b794..4a58b1f3e8c2bee32084be82977239e911598077 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -132,6 +132,7 @@ class KeyStorageLinux;
|
||||
@@ -18,7 +18,7 @@ index 56ddbc2d4fa336bcdbe9aaacd4bf8bbaa3573239..7859ce547dc00c2842fe1aa3699cf20e
|
||||
class Profile;
|
||||
class ProfileImpl;
|
||||
class ScopedAllowBlockingForProfile;
|
||||
@@ -278,6 +279,9 @@ class BackendImpl;
|
||||
@@ -277,6 +278,9 @@ class BackendImpl;
|
||||
class InFlightIO;
|
||||
bool CleanupDirectorySync(const base::FilePath&);
|
||||
} // namespace disk_cache
|
||||
@@ -36,7 +36,7 @@ index 56ddbc2d4fa336bcdbe9aaacd4bf8bbaa3573239..7859ce547dc00c2842fe1aa3699cf20e
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -614,6 +619,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
friend class extensions::DesktopAndroidExtensionSystem;
|
||||
|
||||
@@ -1,16 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 29 Jul 2022 00:29:35 +0900
|
||||
Subject: chore: allow chromium to handle synthetic mouse events for touch
|
||||
Subject: chore: modify chromium handling of mouse events
|
||||
|
||||
With WCO, allow chromium to handle synthetic mouse events generated for touch
|
||||
This patch does the following:
|
||||
|
||||
1. When Windows Control Overlay is enabled, it allows chromium to handle synthetic mouse events generated for touch
|
||||
actions in the non-client caption area.
|
||||
2. It calls HandleMouseEvent on the delegate earlier in HandleMouseEventInternal, so that Electron can selectively disable
|
||||
draggable regions to allow events to propagate to the underlying renderer.
|
||||
|
||||
diff --git a/ui/events/event.h b/ui/events/event.h
|
||||
index 39b5a8fdd165efd74b00256552b51b5413107958..bfc4ef4f50efff4a77f2aef64335bb7e34c69f34 100644
|
||||
--- a/ui/events/event.h
|
||||
+++ b/ui/events/event.h
|
||||
@@ -587,6 +587,9 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent {
|
||||
|
||||
const PointerDetails& pointer_details() const { return pointer_details_; }
|
||||
|
||||
+ bool is_system_menu() const { return is_system_menu_; }
|
||||
+ void set_is_system_menu(bool is_menu) { is_system_menu_ = is_menu; }
|
||||
+
|
||||
// Event:
|
||||
std::string ToString() const override;
|
||||
std::unique_ptr<Event> Clone() const override;
|
||||
@@ -619,6 +622,8 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent {
|
||||
|
||||
// Structure for holding pointer details for implementing PointerEvents API.
|
||||
PointerDetails pointer_details_;
|
||||
+
|
||||
+ bool is_system_menu_ = false;
|
||||
};
|
||||
|
||||
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 2d05856687cd9669f72553d33c8033fd9083b4f8..645b7dd2cc20ce64ffa541c74930f541f083f931 100644
|
||||
index 1d298f66a2c2a0f02668af797b3a421fe5578d56..4780229a4453ad5ca2c89b786459f64c58bf2272 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
|
||||
@@ -1357,6 +1357,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
@@ -1386,6 +1386,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
|
||||
}
|
||||
|
||||
@@ -22,10 +49,10 @@ index 2d05856687cd9669f72553d33c8033fd9083b4f8..645b7dd2cc20ce64ffa541c74930f541
|
||||
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
|
||||
return new DesktopNativeCursorManagerWin();
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
index 932351e288f37fd09ae1a43f44e8b51fb0caa4b8..4a0616bc210d234e51e564daabdd2ebd5ac9fc16 100644
|
||||
index 2ee5e4b4673f4f18880dddecc48118c89823fd3f..37109b8d3d439073b5c9e2ea3597c36f32de5704 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -267,6 +267,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin : public DesktopWindowTreeHost,
|
||||
@@ -268,6 +268,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin : public DesktopWindowTreeHost,
|
||||
void HandleWindowSizeUnchanged() override;
|
||||
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
|
||||
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
|
||||
@@ -34,10 +61,10 @@ index 932351e288f37fd09ae1a43f44e8b51fb0caa4b8..4a0616bc210d234e51e564daabdd2ebd
|
||||
// Overridden from WidgetObserver.
|
||||
void OnWidgetThemeChanged(Widget* widget) override;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 2bd015be3178ab8dea012d6b1f71d13dd0548c14..759f00dd4e674d1dfca690b82e6e1820900ebf0c 100644
|
||||
index 701f89b053674be1bad0a1a3612340a65c1ccfe7..ac7e189f26da75f6f8b40e69cf4bfee94acddd38 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3144,15 +3144,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3186,15 +3186,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
}
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
@@ -59,8 +86,35 @@ index 2bd015be3178ab8dea012d6b1f71d13dd0548c14..759f00dd4e674d1dfca690b82e6e1820
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -3217,6 +3221,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
// handle alt-space, or in the frame itself.
|
||||
is_right_mouse_pressed_on_caption_ = false;
|
||||
ReleaseCapture();
|
||||
+
|
||||
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
|
||||
// expect screen coordinates.
|
||||
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
|
||||
@@ -3224,7 +3229,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) {
|
||||
- ShowSystemMenuAtScreenPixelLocation(hwnd(), gfx::Point(screen_point));
|
||||
+ LONG message_time = GetMessageTime();
|
||||
+ CHROME_MSG msg = {hwnd(),
|
||||
+ message,
|
||||
+ w_param,
|
||||
+ l_param,
|
||||
+ static_cast<DWORD>(message_time),
|
||||
+ {CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param)}};
|
||||
+ ui::MouseEvent event(msg);
|
||||
+ event.set_is_system_menu(true);
|
||||
+ if (!delegate_->HandleMouseEvent(&event))
|
||||
+ ShowSystemMenuAtScreenPixelLocation(hwnd(), gfx::Point(screen_point));
|
||||
return 0;
|
||||
}
|
||||
} else if (message == WM_NCLBUTTONDOWN &&
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index 04dea68d74ea4f559db60f716c919e555db9ec80..2f8bd1a3c156bb6c04663c74b7279bb59926fc3d 100644
|
||||
index 83c26bf2b4bc11c0e3d839093eea56eed1bf581b..075e456e851bbde2b0174ca0cc34428cc32b6966 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -255,6 +255,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
@@ -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 86a1a0244a3744d0571c046d3e6fc9413c9fbbf0..1396f371c8ae82a1ce52096c176a135cf02b2d65 100644
|
||||
index 3b43dcfef507b98f8af6f0c14c4fa9af0a7b9593..9c301542a54c3aeb5ec7ce408e312b48b33d22e3 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4951,7 +4951,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5014,7 +5014,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
: IsGuest();
|
||||
// While some guest types do not have a guest SiteInstance, the ones that
|
||||
// don't all override WebContents creation above.
|
||||
|
||||
@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index d4dd73e7fa1e550d0d13b4c09da0ce6899894494..679a59db98261eca3fbbd7ddb20516ab4f618cfb 100644
|
||||
index adaa1cd426c138972b088d0d0093b0e1653af231..be4684c94ba2214255c5dbe9cdcf1ea316c60c06 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -229,7 +229,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
|
||||
@@ -9,7 +9,7 @@ Electron does not support Profiles, so this Profile::FromBrowserContext()
|
||||
call is not needed and will not link. This change patches it out.
|
||||
|
||||
diff --git a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
index 9774ed3e55c0d78f21bb0cb0b2607cc07eaf78e0..f58c3946130fa469f2775d8bae773e5bbfc71a96 100644
|
||||
index e3b9f14a4cf2167064ce6716053e663adffa1542..65f13a4607c8145858fd47d81cb9960c44272d79 100644
|
||||
--- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
+++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
@@ -45,6 +45,7 @@ namespace {
|
||||
|
||||
@@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index fafd84d08e33622aee01f1792c043180a13dd48d..4490915e0b5c8e93255c6d526d5f37eb6f6b362d 100644
|
||||
index d45f8f1713c875f2d430f9155f0cbe626a5f233f..00c7db5afa636d5d1da4e5d2cb01ebcbec70304b 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2222,12 +2222,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2289,12 +2289,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -99,10 +99,10 @@ index fafd84d08e33622aee01f1792c043180a13dd48d..4490915e0b5c8e93255c6d526d5f37eb
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 8fda0dfbe8e10a3830bd03a994e7d39817584d36..baf24bbeb9f57fe2609a1af51a6ee4f5abd86ce2 100644
|
||||
index ce1e404e45a60e43de9580fe8d60fa72ec90b8f4..9267e93fdd03fad3848a45a1c6d090566cac317c 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -980,8 +980,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1005,8 +1005,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -141,10 +141,10 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c
|
||||
// The profile used for the presentation.
|
||||
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
|
||||
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
index 83a0a538fef0da1d3674293d20dac7b8a252273f..155c8a0af46e20f68f8b028c056092b404062861 100644
|
||||
index 1085003ab18d471d5c018ac68041924d458fcec7..4aac70febec9f0abadd1ecb96d9066e6c270efca 100644
|
||||
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
@@ -99,8 +99,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
@@ -100,8 +100,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -155,10 +155,10 @@ index 83a0a538fef0da1d3674293d20dac7b8a252273f..155c8a0af46e20f68f8b028c056092b4
|
||||
}
|
||||
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 fb08ed752db063c5a295c479bc5ad990826104cd..659e642cb660263a1cba9bb485ed3f67c2939c0f 100644
|
||||
index e0264aff5b60bb5e76ac7687222403dfba516e66..915abd2475f6be95d973f827522f7ef12052a81c 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -188,14 +188,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -189,14 +189,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -176,7 +176,7 @@ index fb08ed752db063c5a295c479bc5ad990826104cd..659e642cb660263a1cba9bb485ed3f67
|
||||
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 45d0fc1b9dbeb1c1b5a28a07fb8cf26d3388bfd9..d311ea8dc016659ee8355bc4e7742b4e3ebc413c 100644
|
||||
index 67a01b48ae88c7e25aeb5c5103b26afa037f4f97..0ceb539c9c3051b5521236cf866ccb107727c8a9 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
|
||||
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 9f18308873306e841bbc15d9ba36c93ba5603a15..9d6ad368980202f74d36785623d27354beef3f03 100644
|
||||
index 09c1b87b58fb2bf99c2a3b81b300e0cc1b9a0115..a1ba9ea494a6b2da2b3fdfeb02491d37b3da9074 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4914,8 +4914,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4977,8 +4977,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -232,7 +232,7 @@ index 9f18308873306e841bbc15d9ba36c93ba5603a15..9d6ad368980202f74d36785623d27354
|
||||
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 f688e6d1e6c11f0dd80f498e6361fa822e8c2eb8..dc47ebfd61f16901b7f8e0e4c30c79eaf5d0710e 100644
|
||||
index 97a3ea6f292563a41fd41f812ac72526a96d8471..b299dd5659100d317a3574e902bf2c29c5defd2c 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -159,8 +159,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -246,10 +246,10 @@ index f688e6d1e6c11f0dd80f498e6361fa822e8c2eb8..dc47ebfd61f16901b7f8e0e4c30c79ea
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 96cb58b1a88499cf8f78d748dc5a1cc1c6b6a128..8ff56b56da764c8af14c40babc529ee4cb089c7e 100644
|
||||
index 8a18958035cc1dd26be558349f64f7727570c4ba..7d9c9b06bcc57ef5eb0a2ca74ee20632a1393f9e 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -354,8 +354,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -355,8 +355,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -324,7 +324,7 @@ index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 16babdc7affdaef1af24850cf35494b8b4fe1479..1e77b091d94457c892788f7a441a83e7a96a49cc 100644
|
||||
index 60de0d74ee40fedcbae96e5049e21dc238bf33bf..c568d4d08f772e1d381820bed826a0b64a631449 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -452,8 +452,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -380,7 +380,7 @@ index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f
|
||||
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 62be493c74423875af45a92c98b2ffceb928189f..ec82d8e47bf0a33f832b8ca242f395fe59a1bbee 100644
|
||||
index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028db8406742 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -206,8 +206,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
|
||||
@@ -32,7 +32,7 @@ index 7d5d0106a3675b3fa21b0e00a755f5c0ed11c87b..d26c645d70b54b31815c8140954ee6d0
|
||||
// (netwerk/cookie/src/nsCookieService.cpp)
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
|
||||
index 813f2f7f274bf02b6679b9321ae83948ab634697..2c61297669ba7d513f8493dfb6f478245f5c7c58 100644
|
||||
index 11572f927d97da20627dec498b92e445b5db4589..9b02d35a19d8610ade71b96c11551a1050847b49 100644
|
||||
--- a/net/http/http_response_headers.cc
|
||||
+++ b/net/http/http_response_headers.cc
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
|
||||
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 054f38d683280638c7ac618d2ff8f7aef1a0def0..6e9d8d9a043cf8b67e26f70b3a904abcfc3c1a61 100644
|
||||
index 7550d3eb796059aeb108f25071c8028bddebb100..db59a147bd6b4fb596170d9b86c5e71a20b62abc 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -271,8 +271,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
}
|
||||
#endif // defined(ADDRESS_SANITIZER)
|
||||
|
||||
@@ -25,7 +25,7 @@ index 054f38d683280638c7ac618d2ff8f7aef1a0def0..6e9d8d9a043cf8b67e26f70b3a904abc
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
base::FileDescriptorStore& file_descriptor_store =
|
||||
base::FileDescriptorStore::GetInstance();
|
||||
@@ -301,11 +306,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
|
||||
@@ -40,7 +40,7 @@ index 054f38d683280638c7ac618d2ff8f7aef1a0def0..6e9d8d9a043cf8b67e26f70b3a904abc
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
}
|
||||
|
||||
@@ -978,7 +984,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
@@ -980,7 +986,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
return TerminateForFatalInitializationError();
|
||||
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
@@ -50,19 +50,18 @@ index 054f38d683280638c7ac618d2ff8f7aef1a0def0..6e9d8d9a043cf8b67e26f70b3a904abc
|
||||
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 8194fc8b036482eedb162ff92bb82165cdf3c8d0..f038620516d7783170bc82b3b14dde4e01f3975d 100644
|
||||
index 8b02f553e2fc29da88c3e14c05a7ee82210eab51..14f2e66d5ecda6e860724a3ab946eaaffba33d6d 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "content/public/app/content_main_delegate.h"
|
||||
|
||||
#include <variant>
|
||||
+#include <string_view>
|
||||
+
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -72,6 +74,10 @@ std::optional<int> ContentMainDelegate::PostEarlyInitialization(
|
||||
@@ -74,6 +75,10 @@ std::optional<int> ContentMainDelegate::PostEarlyInitialization(
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -74,13 +73,13 @@ index 8194fc8b036482eedb162ff92bb82165cdf3c8d0..f038620516d7783170bc82b3b14dde4e
|
||||
return new ContentClient();
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c22910a67464 100644
|
||||
index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c08af8c7fb 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
+#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
@@ -95,10 +94,10 @@ index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c229
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index e72331d0821a14507e3c973f07889adcf45d3bdf..3acfc0d49787579d0250703eed3d6e31b79c567a 100644
|
||||
index 11cafc3e1588cce52b76cc2f09f66b3e451fb087..e07bdaeccecc8015462e35d5cf4606335e2e962c 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -657,8 +657,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -660,8 +660,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -108,7 +107,7 @@ index e72331d0821a14507e3c973f07889adcf45d3bdf..3acfc0d49787579d0250703eed3d6e31
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -667,10 +666,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -670,10 +669,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 943e3b8875c68178e84ae79c241c7a31e9305c6c..6055992c0f61348a95823b64c73574ca6b24904b 100644
|
||||
index 1a726fb4a9e8173dc7da6901eb1632c7f326358e..ae8a4117db2f6bac1d62981e7c0e35cf1eee68da 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -560,7 +560,11 @@
|
||||
@@ -561,7 +561,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 79a679ac59c3ebe4dc1180389cf7073560e843e6..8aa812aa9bb3de4c7bc58192baf45c90402d6ff4 100644
|
||||
index 573269ba54150d5350e5c3589217c5e7f41d560d..20fcda4eb20459b69247003c51c2a3ed37c7b1e8 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -832,6 +832,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -21,10 +21,10 @@ index 79a679ac59c3ebe4dc1180389cf7073560e843e6..8aa812aa9bb3de4c7bc58192baf45c90
|
||||
// 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 068b8036ad91357a5bb274f377ffb44f939d87be..c636170388f81f5afdcd3e86f85ec9f2ec944bb0 100644
|
||||
index c201cff9e5c3b286389a5eb74e1a9ebd86edfef9..949f6a7867758e35c24897add9a4d47a641357b2 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1018,6 +1018,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -1012,6 +1012,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// Requests a commit and forced redraw in the renderer compositor.
|
||||
void ForceRedrawForTesting();
|
||||
|
||||
@@ -35,7 +35,7 @@ index 068b8036ad91357a5bb274f377ffb44f939d87be..c636170388f81f5afdcd3e86f85ec9f2
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// 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 1d08f25b91496dbafc3a164e7fb3e66d1a48557b..92085aca6bd0c95a73b98e4173c0128d596b77f4 100644
|
||||
index 5867fc3e77326991f30d835d08d3cfafe2b6687c..d719b546b8c3c59003698b26dead065da7d76341 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -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 88d8d9985c6b4c7051f00cba9dfa51b3fcfa524b..2d05856687cd9669f72553d33c8033fd9083b4f8 100644
|
||||
index 82e6f7c91bac6e8a973947dace1a33de8078a86b..1d298f66a2c2a0f02668af797b3a421fe5578d56 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
|
||||
@@ -637,7 +637,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -636,7 +636,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(
|
||||
const gfx::SizeF& aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
@@ -19,10 +19,10 @@ index 88d8d9985c6b4c7051f00cba9dfa51b3fcfa524b..2d05856687cd9669f72553d33c8033fd
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index b3dc46c34f2aff45b3bd8ea041f2e55ba61d50f9..a802f4b710b6f8fa154d11846c061720a91e15e4 100644
|
||||
index a183cfe07b357e0b17e3781e85b79f7c371cbea8..ea67a60d78f4adec960bb4954486420bce423c14 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -988,8 +988,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
@@ -1010,8 +1010,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
|
||||
@@ -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 c34f34146d0aab681318b64ac33081bdc21ce7d6..11cdf6c34d8f79fcf293f59785e586dc8363b983 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 c34f34146d0aab681318b64ac33081bdc21ce7d6..11cdf6c34d8f79fcf293f59785e586dc
|
||||
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
|
||||
#endif
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index fa799a4cc32950ce03c154bc7791341d96a17f67..b8ec81b79b6129a7e26a2ffecf535fdedea8ed6c 100644
|
||||
index 698b29e9c31a2695cac30bf85c97a216ff8a6257..dbc38d0d87803496ce122da62e639f2a0334e0f6 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -204,6 +204,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
@@ -205,6 +205,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
}
|
||||
#endif // PA_BUILDFLAG(ENABLE_THREAD_ISOLATION)
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index e346cfb127a1fa8656bfbc1eba829907e19bc22f..e18583e520b4ab66110605b67c703a1c48b770a4 100644
|
||||
index ee56aab6831be256390b88e65a2a949c591bbd31..60c6977d2ffd0da0286e25e5645c11c19d6ab376 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1810,6 +1810,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1814,6 +1814,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index e346cfb127a1fa8656bfbc1eba829907e19bc22f..e18583e520b4ab66110605b67c703a1c
|
||||
// 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 fe04f634b32e503f6e93ae6f20c8c7f7c85d02be..990df479da79b513cf8797aa2fcacba10c4fbbd9 100644
|
||||
index 930e0bd987c48d111b2c8d71147c09e4418bda6c..9373a53c5cac879c689fcea77f1dbbb32cf35b9e 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -323,6 +323,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -63,10 +63,10 @@ index fe04f634b32e503f6e93ae6f20c8c7f7c85d02be..990df479da79b513cf8797aa2fcacba1
|
||||
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 e928d012d77ccffe16263fd0ee7c2769adfe4bac..1be1b691fa240fa3c5e2c572821977a968841211 100644
|
||||
index 6d79f4a4cb1a40be907ef52e35f0e5a0acab31fb..95ff46a7ca2654166d18027b986f6ec6c2a3d361 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1253,6 +1253,9 @@ interface NetworkContext {
|
||||
@@ -1275,6 +1275,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
@@ -77,10 +77,10 @@ index e928d012d77ccffe16263fd0ee7c2769adfe4bac..1be1b691fa240fa3c5e2c572821977a9
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index 97e8f9f145cecad9b0cd8b43a2de4af29cec7778..b9539a731d2252c8301d51ccb7a1bd7b1a23ca53 100644
|
||||
index da8551db16849cf82a6e3a7eaeb451cae0707f2d..6e20b8dd4f134ea7a8808223cd59064d89f5ce09 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 CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
||||
@@ -12,10 +12,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 e4ab513573c7e327627b1ebd5b263f389098727a..4d5b74aa60a40e49bd0c9131e06eb399d1af4f22 100644
|
||||
index f470ada1bf84938427fb89f4508e5f56aaeebc1f..524928729e34cc6b2ae427181e2ac4f8c1128688 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -169,6 +169,7 @@
|
||||
@@ -171,6 +171,7 @@
|
||||
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
|
||||
@@ -23,7 +23,7 @@ index e4ab513573c7e327627b1ebd5b263f389098727a..4d5b74aa60a40e49bd0c9131e06eb399
|
||||
#include "third_party/blink/renderer/platform/graphics/image.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
|
||||
@@ -1866,6 +1867,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1861,6 +1862,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 95876b4040844b598ea7219732a044b4423f8d97..4e02620b7887d1b70b2a9b9e21b819d99efdca18 100644
|
||||
index 3f8801c6042ef2b20635838e4d4c572d89b94601..055b15ff72844cd54c60cc92042a5465ce2870ad 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -210,6 +210,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
@@ -26,10 +26,10 @@ index 95876b4040844b598ea7219732a044b4423f8d97..4e02620b7887d1b70b2a9b9e21b819d9
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 4e825d649919c88aad26e4c3b2fd80575ca57db0..de1d8fea0113b55065e5229b07f95d691ccb393e 100644
|
||||
index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a2680fabc45d 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -458,6 +458,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -458,6 +458,23 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
|
||||
bool use_custom_frame = true) const;
|
||||
|
||||
@@ -53,7 +53,7 @@ index 4e825d649919c88aad26e4c3b2fd80575ca57db0..de1d8fea0113b55065e5229b07f95d69
|
||||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -713,6 +730,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -713,6 +730,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
std::optional<base::TimeDelta> caret_blink_interval_;
|
||||
bool use_overlay_scrollbars_ = false;
|
||||
@@ -62,10 +62,10 @@ index 4e825d649919c88aad26e4c3b2fd80575ca57db0..de1d8fea0113b55065e5229b07f95d69
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 2b2a12cd9d1ac17a245f049cf0775b46c0596531..350586d35b29fb8d772ea70615768d0e62dc5474 100644
|
||||
index dcf2d14d92f8b5a5dd7bf22f8ce00f030824c989..04d0f5d9416eaba569f49a25e7e8c1a89e50ecfe 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -688,6 +688,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -696,6 +696,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9,18 +9,18 @@ embedders to make custom schemes allow V8 code cache.
|
||||
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
|
||||
|
||||
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
|
||||
index bba85bb47e489b73c2341bbeb9aa04099d712889..4bd69c3c5511a4f492f78f203284c8e546c9f067 100644
|
||||
index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458810ceb99 100644
|
||||
--- a/content/browser/code_cache/generated_code_cache.cc
|
||||
+++ b/content/browser/code_cache/generated_code_cache.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <iostream>
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <string_view>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
+#include "base/containers/contains.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
@@ -36,6 +37,7 @@
|
||||
@@ -32,6 +33,7 @@
|
||||
#include "net/http/http_cache.h"
|
||||
#include "third_party/blink/public/common/scheme_registry.h"
|
||||
#include "url/gurl.h"
|
||||
@@ -28,7 +28,7 @@ index bba85bb47e489b73c2341bbeb9aa04099d712889..4bd69c3c5511a4f492f78f203284c8e5
|
||||
|
||||
using storage::BigIOBuffer;
|
||||
|
||||
@@ -48,7 +50,7 @@ constexpr char kSeparator[] = " \n";
|
||||
@@ -44,7 +46,7 @@ constexpr char kSeparator[] = " \n";
|
||||
|
||||
// We always expect to receive valid URLs that can be used as keys to the code
|
||||
// cache. The relevant checks (for ex: resource_url is valid, origin_lock is
|
||||
@@ -37,7 +37,7 @@ index bba85bb47e489b73c2341bbeb9aa04099d712889..4bd69c3c5511a4f492f78f203284c8e5
|
||||
//
|
||||
// This function doesn't enforce anything in the production code. It is here
|
||||
// to make the assumptions explicit and to catch any errors when DCHECKs are
|
||||
@@ -58,33 +60,55 @@ void CheckValidKeys(const GURL& resource_url,
|
||||
@@ -54,33 +56,55 @@ void CheckValidKeys(const GURL& resource_url,
|
||||
GeneratedCodeCache::CodeCacheType cache_type) {
|
||||
// If the resource url is invalid don't cache the code.
|
||||
DCHECK(resource_url.is_valid());
|
||||
|
||||
@@ -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 5140efab98b7d8d357ea0d97ee25814ea2e1ed8f..979630ba7ffe84d78804a02b832ce7787aecf2d9 100644
|
||||
index c2dd0fdc774a939dfe489180e019718ba4b192f1..910534aac947890b16b176b10ac8eae9857bd2d7 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -478,6 +478,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 5140efab98b7d8d357ea0d97ee25814ea2e1ed8f..979630ba7ffe84d78804a02b832ce778
|
||||
hunspell_dictionaries_.back()->Load();
|
||||
}
|
||||
|
||||
@@ -532,6 +534,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
@@ -531,6 +533,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ index afb657b7c9e1ede1273532b16428d37cc5d75c59..16707cf516cd34682c84ea2ccebddaa0
|
||||
requested_format_.pixel_format = media::PIXEL_FORMAT_NV12;
|
||||
DCHECK_GT(requested_format_.frame_size.GetArea(), 0);
|
||||
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.cc b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
index e59ed011a70358a4ff61342e4db3e0ce4cad8ab0..e3fa18fbade4c11f5317705bc89a1e2456c924bc 100644
|
||||
index 4ec4c895423151d2c907d97de1461cbde8c8a639..0e59797833b81c07299b8c342f591e192183c6f1 100644
|
||||
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
@@ -20,7 +20,7 @@ void IOSurfaceCaptureDeviceBase::AllocateAndStart(
|
||||
@@ -33,7 +33,7 @@ index e59ed011a70358a4ff61342e4db3e0ce4cad8ab0..e3fa18fbade4c11f5317705bc89a1e24
|
||||
|
||||
void IOSurfaceCaptureDeviceBase::StopAndDeAllocate() {
|
||||
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.h b/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
index 8ac12480f663a74dfbdcf7128a582a81b4474d25..db6802a2603e1d3c3039e49737438124bf2ee1f1 100644
|
||||
index e2771b7b281274cdcb601a5bc78a948ad592087b..48d116823a28213e50775f378e6ce04ce3af5072 100644
|
||||
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
@@ -25,7 +25,7 @@ class CONTENT_EXPORT IOSurfaceCaptureDeviceBase
|
||||
@@ -46,11 +46,11 @@ index 8ac12480f663a74dfbdcf7128a582a81b4474d25..db6802a2603e1d3c3039e49737438124
|
||||
// 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 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378719b14fe 100644
|
||||
index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b4049610fd49da 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -26,6 +26,61 @@
|
||||
std::optional<gfx::Rect>,
|
||||
@@ -27,6 +27,61 @@
|
||||
std::optional<float>,
|
||||
bool)>;
|
||||
using ErrorCallback = base::RepeatingClosure;
|
||||
+using CancelCallback = base::RepeatingClosure;
|
||||
@@ -111,7 +111,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
|
||||
namespace {
|
||||
API_AVAILABLE(macos(12.3))
|
||||
@@ -120,18 +175,22 @@ @interface ScreenCaptureKitDeviceHelper
|
||||
@@ -123,18 +178,22 @@ @interface ScreenCaptureKitDeviceHelper
|
||||
: NSObject <SCStreamDelegate, SCStreamOutput>
|
||||
|
||||
- (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback
|
||||
@@ -134,7 +134,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
_errorCallback = errorCallback;
|
||||
}
|
||||
return self;
|
||||
@@ -207,29 +266,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
|
||||
@@ -211,29 +270,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
|
||||
|
||||
class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
|
||||
: public IOSurfaceCaptureDeviceBase,
|
||||
@@ -192,7 +192,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
|
||||
void OnShareableContentCreated(SCShareableContent* content) {
|
||||
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -297,7 +380,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -301,7 +384,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
// 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.
|
||||
@@ -306,6 +389,9 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -310,6 +393,9 @@ void CreateStream(SCContentFilter* filter) {
|
||||
filter.contentRect.size.height * filter.pointPixelScale);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
gfx::RectF dest_rect_in_frame;
|
||||
actual_capture_format_ = capture_params().requested_format;
|
||||
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
|
||||
@@ -319,6 +405,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -323,6 +409,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
stream_ = [[SCStream alloc] initWithFilter:filter
|
||||
configuration:config
|
||||
delegate:helper_];
|
||||
@@ -219,7 +219,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
{
|
||||
NSError* error = nil;
|
||||
bool add_stream_output_result =
|
||||
@@ -472,7 +559,7 @@ void OnStreamError() {
|
||||
@@ -480,7 +567,7 @@ void OnStreamError() {
|
||||
if (fullscreen_module_) {
|
||||
fullscreen_module_->Reset();
|
||||
}
|
||||
@@ -228,7 +228,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
} else {
|
||||
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
|
||||
FROM_HERE, "Stream delegate called didStopWithError");
|
||||
@@ -495,23 +582,41 @@ void OnUpdateConfigurationError() {
|
||||
@@ -503,23 +590,41 @@ void OnUpdateConfigurationError() {
|
||||
}
|
||||
|
||||
// IOSurfaceCaptureDeviceBase:
|
||||
@@ -285,7 +285,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
}
|
||||
void OnStop() override {
|
||||
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -569,8 +674,9 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -577,8 +682,9 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -296,7 +296,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
|
||||
|
||||
// The actual format of the video frames that are sent to `client`.
|
||||
@@ -586,6 +692,10 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -594,6 +700,10 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
// Helper class that acts as output and delegate for `stream_`.
|
||||
ScreenCaptureKitDeviceHelper* __strong helper_;
|
||||
|
||||
@@ -307,7 +307,7 @@ index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378
|
||||
// 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_;
|
||||
@@ -598,6 +708,8 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -606,6 +716,8 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
|
||||
};
|
||||
|
||||
|
||||
@@ -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 6a3645f020d7348f758ebcc93c49ddcbee709937..55994606517a4f52475610db2da26b5560865fab 100644
|
||||
index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36a26f5ad7 100644
|
||||
--- a/content/browser/child_process_launcher.h
|
||||
+++ b/content/browser/child_process_launcher.h
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -30,7 +30,7 @@ index 6a3645f020d7348f758ebcc93c49ddcbee709937..55994606517a4f52475610db2da26b55
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_POSIX)
|
||||
@@ -196,7 +197,10 @@ struct ChildProcessLauncherFileData {
|
||||
@@ -188,7 +189,10 @@ struct ChildProcessLauncherFileData {
|
||||
delete;
|
||||
~ChildProcessLauncherFileData();
|
||||
|
||||
@@ -42,8 +42,8 @@ index 6a3645f020d7348f758ebcc93c49ddcbee709937..55994606517a4f52475610db2da26b55
|
||||
// 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
|
||||
@@ -211,6 +215,15 @@ struct ChildProcessLauncherFileData {
|
||||
std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>>
|
||||
@@ -203,6 +207,15 @@ struct ChildProcessLauncherFileData {
|
||||
std::map<std::string, std::variant<base::FilePath, base::ScopedFD>>
|
||||
files_to_preload;
|
||||
#endif
|
||||
+
|
||||
@@ -187,10 +187,10 @@ index 96c9563aac5847e742de5d9c9236f78bcb6cfd9c..73c9d585579ad5bdc407687b8becd0b7
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
|
||||
index 26966d77a2ca88ce62afa16fd0f33cd5815b8c95..b7dfacb25a09b105e982c013119271b8f137e7b9 100644
|
||||
index 8bb497717298886bc6db04ebcba9be1f3b29ab73..60c4a301c32a46cdc332cccd1cd4ae78802ee8b9 100644
|
||||
--- a/content/browser/service_host/utility_process_host.cc
|
||||
+++ b/content/browser/service_host/utility_process_host.cc
|
||||
@@ -189,11 +189,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
@@ -190,11 +190,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
return process_->GetData();
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ index 26966d77a2ca88ce62afa16fd0f33cd5815b8c95..b7dfacb25a09b105e982c013119271b8
|
||||
|
||||
bool UtilityProcessHost::Start() {
|
||||
return StartProcess();
|
||||
@@ -240,6 +242,30 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
@@ -241,6 +243,30 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
}
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
@@ -237,7 +237,7 @@ index 26966d77a2ca88ce62afa16fd0f33cd5815b8c95..b7dfacb25a09b105e982c013119271b8
|
||||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -454,9 +480,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -455,9 +481,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -266,7 +266,7 @@ index 26966d77a2ca88ce62afa16fd0f33cd5815b8c95..b7dfacb25a09b105e982c013119271b8
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (!preload_libraries_.empty()) {
|
||||
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
|
||||
index 066939fcbb7bc05e27a6bb4ed122750732629454..ab6b64737245a840a3e2b06d2ab501ef4aaed7a2 100644
|
||||
index d13e6db4857242480591bff040709532d16f513d..1164da12ee71a8575c17bf1b84a505e8a32b96b3 100644
|
||||
--- a/content/browser/service_host/utility_process_host.h
|
||||
+++ b/content/browser/service_host/utility_process_host.h
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Watford <watfordcalvin@gmail.com>
|
||||
Date: Mon, 9 Dec 2024 16:58:15 -0700
|
||||
Subject: feat: Corner Smoothing CSS rule and Blink painting
|
||||
|
||||
This patch implements the `-electron-corner-smoothing` CSS rule by
|
||||
making three primary changes to Blink:
|
||||
|
||||
1. Adds the `-electron-corner-smoothing` CSS rule:
|
||||
* Metadata in `blink/renderer/core/css/css_properties.json5`
|
||||
* Parsing in `blink/renderer/core/css/properties/longhands/longhands_custom.cc`
|
||||
* Other required definitions for all CSS rules (`css_property_id.mojom`, `css_property_equality.cc`)
|
||||
|
||||
2. Modifies how Blink paints rounded rectangles:
|
||||
* Augments `blink::ContouredRect` to add smoothness.
|
||||
* Modifies graphics to handle smooth `ContouredRect`s, delegating to
|
||||
`//electron/shell/renderer/electron_smooth_round_rect`.
|
||||
|
||||
3. Adds a renderer preference / web setting:
|
||||
* Controls whether the CSS rule is available.
|
||||
* Mostly simple "plumbing" for the setting through blink.
|
||||
|
||||
diff --git a/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc b/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
|
||||
index 5e233d63c09088d73cd1a54a58b235018c193ac3..4f2dcb339ad79f31ba5e4c347cb91d5639d27ce6 100644
|
||||
--- a/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
|
||||
@@ -128,6 +128,8 @@ bool StructTraits<blink::mojom::RendererPreferencesDataView,
|
||||
return false;
|
||||
}
|
||||
|
||||
+ out->electron_corner_smoothing_css = data.electron_corner_smoothing_css();
|
||||
+
|
||||
out->canvas_noise_token = data.canvas_noise_token();
|
||||
|
||||
return true;
|
||||
diff --git a/third_party/blink/public/common/renderer_preferences/renderer_preferences.h b/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
|
||||
index ff84a20511448d4211d0e25dfc12e7eabc34a9e0..886e9d819c3bde7f33eec3497d1cadb76de4237f 100644
|
||||
--- a/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
|
||||
+++ b/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
|
||||
@@ -91,6 +91,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences {
|
||||
bool caret_browsing_enabled{false};
|
||||
bool uses_platform_autofill{false};
|
||||
std::vector<uint16_t> explicitly_allowed_network_ports;
|
||||
+ bool electron_corner_smoothing_css{true};
|
||||
uint64_t canvas_noise_token{0};
|
||||
|
||||
RendererPreferences();
|
||||
diff --git a/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h b/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
|
||||
index c88ddaf7fd5fc27889bcacac9366330e4013eba3..e4f492a11637886c60ece665371d117f3a34ec8d 100644
|
||||
--- a/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
|
||||
@@ -275,6 +275,11 @@ struct BLINK_COMMON_EXPORT
|
||||
return data.explicitly_allowed_network_ports;
|
||||
}
|
||||
|
||||
+ static const bool& electron_corner_smoothing_css(
|
||||
+ const ::blink::RendererPreferences& data) {
|
||||
+ return data.electron_corner_smoothing_css;
|
||||
+ }
|
||||
+
|
||||
static const uint64_t& canvas_noise_token(
|
||||
const ::blink::RendererPreferences& data) {
|
||||
return data.canvas_noise_token;
|
||||
diff --git a/third_party/blink/public/mojom/renderer_preferences.mojom b/third_party/blink/public/mojom/renderer_preferences.mojom
|
||||
index 65766b955e81bfc332bc2c4e0b9da48389c1bd68..a475e1bfee46f0a77d1cfbdea47e9de6516d1194 100644
|
||||
--- a/third_party/blink/public/mojom/renderer_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/renderer_preferences.mojom
|
||||
@@ -202,6 +202,8 @@ struct RendererPreferences {
|
||||
|
||||
array<uint16> explicitly_allowed_network_ports;
|
||||
|
||||
+ bool electron_corner_smoothing_css;
|
||||
+
|
||||
// A randomized 64 bit token that is generated per browser session,
|
||||
// used for canvas noising.
|
||||
uint64 canvas_noise_token = 0;
|
||||
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 a4c78d85e525224823ce4b2434519cc0a39922ef..8071b283b48ab89226313bb199c0cece67ca5039 100644
|
||||
--- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
|
||||
+++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
|
||||
@@ -48,6 +48,7 @@ enum CSSSampleId {
|
||||
kInternalForcedVisitedColor = 0,
|
||||
kInternalOverflowBlock = 0,
|
||||
kInternalOverflowInline = 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
|
||||
diff --git a/third_party/blink/public/web/web_settings.h b/third_party/blink/public/web/web_settings.h
|
||||
index a53b4901dde0dc83dce6c9b56616eef0d02d94a5..b419672af985f673f375fbb63b4d2b2c419e3e03 100644
|
||||
--- a/third_party/blink/public/web/web_settings.h
|
||||
+++ b/third_party/blink/public/web/web_settings.h
|
||||
@@ -285,6 +285,7 @@ class WebSettings {
|
||||
virtual void SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
|
||||
bool) = 0;
|
||||
virtual void SetRootScrollbarThemeColor(std::optional<SkColor>) = 0;
|
||||
+ virtual void SetCornerSmoothingCSS(bool) = 0;
|
||||
|
||||
protected:
|
||||
~WebSettings() = default;
|
||||
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 aa3a6b93cceae8c8bfbefdd7a043ae576f921979..17544d7ed4757fb51e2f82fd1b90638131ba05cc 100755
|
||||
--- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py
|
||||
+++ b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
|
||||
@@ -313,7 +313,7 @@ class CSSProperties(object):
|
||||
if name_without_leading_dash.startswith('-'):
|
||||
name_without_leading_dash = name_without_leading_dash[1:]
|
||||
internal_visited_order = 1
|
||||
- if name_without_leading_dash.startswith('internal-visited-'):
|
||||
+ if name_without_leading_dash.startswith('internal-'):
|
||||
internal_visited_order = 0
|
||||
property_.sorting_key = (-property_.priority,
|
||||
internal_visited_order,
|
||||
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
index b44da8add10fdeadd24653441115df035a93dd50..ce7c7bd32f3a8ea262f01c408474ff4ffe7fe0aa 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_properties.json5
|
||||
+++ b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
@@ -8795,6 +8795,24 @@
|
||||
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
|
||||
},
|
||||
|
||||
+ {
|
||||
+ name: "-electron-corner-smoothing",
|
||||
+ property_methods: ["ParseSingleValue"],
|
||||
+ field_group: "*",
|
||||
+ field_template: "external",
|
||||
+ // To keep this patch small, Length is used instead of a more descriptive
|
||||
+ // custom type.
|
||||
+ // - `system-ui` = `Length::Auto()`
|
||||
+ // - percent = `Length::Percent`
|
||||
+ type_name: "Length",
|
||||
+ converter: "ConvertCornerSmoothing",
|
||||
+ keywords: ["system-ui"],
|
||||
+ default_value: "Length::None()",
|
||||
+ typedom_types: ["Keyword", "Percentage"],
|
||||
+ is_border_radius: true,
|
||||
+ invalidate: ["paint", "border-radius", "clip"],
|
||||
+ },
|
||||
+
|
||||
// Visited properties.
|
||||
{
|
||||
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 10ab8a458fb3348476a6e904f684af77c55b103a..37339df2a5601b59abc50fe75fb844e1b7bb5368 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
@@ -346,6 +346,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
return a.DominantBaseline() == b.DominantBaseline();
|
||||
case CSSPropertyID::kDynamicRangeLimit:
|
||||
return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit();
|
||||
+ case CSSPropertyID::kElectronCornerSmoothing:
|
||||
+ return a.ElectronCornerSmoothing() == b.ElectronCornerSmoothing();
|
||||
case CSSPropertyID::kEmptyCells:
|
||||
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 3fb84db022f14819239cd55da79f43cb9b0bcbc7..c4b7ff8ea240054d9394a0691e978e9b10eecc50 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
|
||||
@@ -12047,5 +12047,25 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
|
||||
CSSValueID::kNone>(stream);
|
||||
}
|
||||
|
||||
+const CSSValue* ElectronCornerSmoothing::ParseSingleValue(
|
||||
+ CSSParserTokenStream& stream,
|
||||
+ const CSSParserContext& context,
|
||||
+ const CSSParserLocalContext&) const {
|
||||
+ // Fail parsing if this rule is disabled by document settings.
|
||||
+ if (Settings* settings = context.GetDocument()->GetSettings();
|
||||
+ settings && !settings->GetElectronCornerSmoothingCSS()) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ // Try to parse `system-ui` keyword first.
|
||||
+ if (auto* ident =
|
||||
+ css_parsing_utils::ConsumeIdent<CSSValueID::kSystemUi>(stream)) {
|
||||
+ return ident;
|
||||
+ }
|
||||
+ // Try to parse as percent.
|
||||
+ return css_parsing_utils::ConsumePercent(
|
||||
+ stream, context, CSSPrimitiveValue::ValueRange::kNonNegative);
|
||||
+}
|
||||
+
|
||||
} // 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 f7f49ef23b77c7a3f27ae8ba129e5eea1617d545..0ddf6f59c45d2f6212317dc18f3c5a80eeda5395 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
|
||||
@@ -3859,4 +3859,12 @@ PositionArea StyleBuilderConverter::ConvertPositionArea(
|
||||
return PositionArea(span[0], span[1], span[2], span[3]);
|
||||
}
|
||||
|
||||
+Length StyleBuilderConverter::ConvertCornerSmoothing(StyleResolverState& state, const CSSValue& value) {
|
||||
+ auto* ident = DynamicTo<CSSIdentifierValue>(value);
|
||||
+ if (ident && ident->GetValueID() == CSSValueID::kSystemUi) {
|
||||
+ return Length::Auto();
|
||||
+ }
|
||||
+ return ConvertLength(state, value);
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
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 b9f8145af13fb9d68e85f166905476c177c3a053..0a9ad304f5039747a0580ab63664d4429a67970d 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
|
||||
@@ -419,6 +419,8 @@ class StyleBuilderConverter {
|
||||
const CSSValue&);
|
||||
|
||||
static PositionArea ConvertPositionArea(StyleResolverState&, const CSSValue&);
|
||||
+
|
||||
+ static Length ConvertCornerSmoothing(StyleResolverState&, const CSSValue&);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.cc b/third_party/blink/renderer/core/exported/web_settings_impl.cc
|
||||
index 4a29a2200eaab5084078e928a68c862296c6ff91..fcd879deec0e68b3b6988402d19570cf0065daa2 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_settings_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_settings_impl.cc
|
||||
@@ -816,4 +816,8 @@ void WebSettingsImpl::SetRootScrollbarThemeColor(
|
||||
settings_->SetRootScrollbarThemeColor(theme_color);
|
||||
}
|
||||
|
||||
+void WebSettingsImpl::SetCornerSmoothingCSS(bool available) {
|
||||
+ settings_->SetElectronCornerSmoothingCSS(available);
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.h b/third_party/blink/renderer/core/exported/web_settings_impl.h
|
||||
index 5e8d2bfbccd0625c2598544a9cba3d71373eded2..e68a97ee75754fc7196f11cf5c731550b5a12276 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_settings_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_settings_impl.h
|
||||
@@ -237,6 +237,7 @@ class CORE_EXPORT WebSettingsImpl final : public WebSettings {
|
||||
void SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
|
||||
bool) override;
|
||||
void SetRootScrollbarThemeColor(std::optional<SkColor>) override;
|
||||
+ void SetCornerSmoothingCSS(bool) override;
|
||||
|
||||
bool RenderVSyncNotificationEnabled() const {
|
||||
return render_v_sync_notification_enabled_;
|
||||
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 524928729e34cc6b2ae427181e2ac4f8c1128688..9ce184f279b11a90c7d6f9b9ab7b20da09122a40 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3576,6 +3576,9 @@ void WebViewImpl::UpdateRendererPreferences(
|
||||
CanvasNoiseToken::Set(renderer_preferences_.canvas_noise_token);
|
||||
|
||||
MaybePreloadSystemFonts(GetPage());
|
||||
+
|
||||
+ GetSettings()->SetCornerSmoothingCSS(
|
||||
+ renderer_preferences_.electron_corner_smoothing_css);
|
||||
}
|
||||
|
||||
void WebViewImpl::SetHistoryIndexAndLength(int32_t history_index,
|
||||
diff --git a/third_party/blink/renderer/core/frame/settings.json5 b/third_party/blink/renderer/core/frame/settings.json5
|
||||
index f4cdee12ea4352067f5de3e074e43d51ef56d2e5..6377e4b1ea8aa46b0bf69f8420b6c439bea70dba 100644
|
||||
--- a/third_party/blink/renderer/core/frame/settings.json5
|
||||
+++ b/third_party/blink/renderer/core/frame/settings.json5
|
||||
@@ -1261,5 +1261,10 @@
|
||||
initial: false,
|
||||
type: "bool"
|
||||
},
|
||||
+ {
|
||||
+ name: "electronCornerSmoothingCSS",
|
||||
+ initial: true,
|
||||
+ invalidate: ["Style"],
|
||||
+ },
|
||||
],
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/paint/box_painter_base.cc b/third_party/blink/renderer/core/paint/box_painter_base.cc
|
||||
index 57f71cbd80d88416693e5b83f695fd02eb7a405b..d638da7a734fa40de118d056c59488b63caff7e2 100644
|
||||
--- a/third_party/blink/renderer/core/paint/box_painter_base.cc
|
||||
+++ b/third_party/blink/renderer/core/paint/box_painter_base.cc
|
||||
@@ -417,16 +417,20 @@ void BoxPainterBase::PaintInsetBoxShadow(const PaintInfo& info,
|
||||
ContouredRect inner_rounded_rect(
|
||||
FloatRoundedRect(inner_rect, bounds.GetRadii()));
|
||||
ApplySpreadToShadowShape(inner_rounded_rect, -shadow.Spread());
|
||||
+ ContouredRect contoured_bounds(
|
||||
+ bounds, ContouredBorderGeometry::ContouredBorder(
|
||||
+ style, PhysicalRect::EnclosingRect(bounds.Rect()))
|
||||
+ .GetCornerCurvature());
|
||||
if (inner_rounded_rect.IsEmpty()) {
|
||||
// |AutoDarkMode::Disabled()| is used because |shadow_color| has already
|
||||
// been adjusted for dark mode.
|
||||
- context.FillRoundedRect(bounds, shadow_color, AutoDarkMode::Disabled());
|
||||
+ context.FillContouredRect(contoured_bounds, shadow_color, AutoDarkMode::Disabled());
|
||||
continue;
|
||||
}
|
||||
GraphicsContextStateSaver state_saver(context);
|
||||
if (bounds.IsRounded()) {
|
||||
// TODO(crbug.com/397459628) render corner-shape with box-shadow
|
||||
- context.ClipContouredRect(ContouredRect(bounds));
|
||||
+ context.ClipContouredRect(contoured_bounds);
|
||||
} else {
|
||||
context.Clip(bounds.Rect());
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
|
||||
index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad6721eaef 100644
|
||||
--- a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
|
||||
+++ b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
|
||||
@@ -43,6 +43,24 @@ float EffectiveCurvature(Superellipse superellipse, const gfx::SizeF& radius) {
|
||||
: superellipse.Exponent();
|
||||
}
|
||||
|
||||
+float SmoothnessFromLength(const Length& length) {
|
||||
+ // `none` = 0%
|
||||
+ if (length.IsNone()) {
|
||||
+ return 0.0f;
|
||||
+ }
|
||||
+
|
||||
+ // `system-ui` keyword, represented internally as "auto" length
|
||||
+ if (length.HasAuto()) {
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+ return 0.6f;
|
||||
+#else
|
||||
+ return 0.0f;
|
||||
+#endif // BUILDFLAG(IS_MAC)
|
||||
+ }
|
||||
+
|
||||
+ return length.Percent() / 100.0f;
|
||||
+}
|
||||
+
|
||||
ContouredRect::CornerCurvature CalcCurvatureFor(
|
||||
const ComputedStyle& style,
|
||||
const FloatRoundedRect::Radii& radii) {
|
||||
@@ -50,7 +68,8 @@ ContouredRect::CornerCurvature CalcCurvatureFor(
|
||||
EffectiveCurvature(style.CornerTopLeftShape(), radii.TopLeft()),
|
||||
EffectiveCurvature(style.CornerTopRightShape(), radii.TopRight()),
|
||||
EffectiveCurvature(style.CornerBottomRightShape(), radii.BottomRight()),
|
||||
- EffectiveCurvature(style.CornerBottomLeftShape(), radii.BottomLeft()));
|
||||
+ EffectiveCurvature(style.CornerBottomLeftShape(), radii.BottomLeft()),
|
||||
+ SmoothnessFromLength(style.ElectronCornerSmoothing()));
|
||||
}
|
||||
|
||||
ContouredRect PixelSnappedContouredBorderInternal(
|
||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
||||
index 291676c6583722a3dfbac4d4aaad1ea2ae3cc079..5cd89e8c6c79ab339ffbc330d9bcdb08cca6e869 100644
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1646,6 +1646,8 @@ component("platform") {
|
||||
"widget/widget_base.h",
|
||||
"widget/widget_base_client.h",
|
||||
"windows_keyboard_codes.h",
|
||||
+ "//electron/shell/renderer/electron_smooth_round_rect.h",
|
||||
+ "//electron/shell/renderer/electron_smooth_round_rect.cc",
|
||||
]
|
||||
|
||||
sources -= blink_platform_avx_files
|
||||
diff --git a/third_party/blink/renderer/platform/geometry/contoured_rect.h b/third_party/blink/renderer/platform/geometry/contoured_rect.h
|
||||
index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca2197b0af514 100644
|
||||
--- a/third_party/blink/renderer/platform/geometry/contoured_rect.h
|
||||
+++ b/third_party/blink/renderer/platform/geometry/contoured_rect.h
|
||||
@@ -47,19 +47,29 @@ class PLATFORM_EXPORT ContouredRect {
|
||||
constexpr CornerCurvature(float top_left,
|
||||
float top_right,
|
||||
float bottom_right,
|
||||
- float bottom_left)
|
||||
+ float bottom_left,
|
||||
+ float smoothness)
|
||||
: top_left_(top_left),
|
||||
top_right_(top_right),
|
||||
bottom_right_(bottom_right),
|
||||
- bottom_left_(bottom_left) {
|
||||
+ bottom_left_(bottom_left),
|
||||
+ smoothness_(smoothness) {
|
||||
DCHECK_GE(top_left, 0);
|
||||
DCHECK_GE(top_right, 0);
|
||||
DCHECK_GE(bottom_right, 0);
|
||||
DCHECK_GE(bottom_left, 0);
|
||||
+ DCHECK_GE(smoothness, 0);
|
||||
}
|
||||
+ constexpr CornerCurvature(float top_left,
|
||||
+ float top_right,
|
||||
+ float bottom_right,
|
||||
+ float bottom_left)
|
||||
+ : CornerCurvature(top_left, top_right, bottom_right, bottom_left, 0) {}
|
||||
+
|
||||
+ constexpr bool IsSmooth() const { return smoothness_ > 0.0f; }
|
||||
|
||||
constexpr bool IsRound() const {
|
||||
- return (top_left_ == kRound) && IsUniform();
|
||||
+ return (top_left_ == kRound) && IsUniform() && !IsSmooth();
|
||||
}
|
||||
|
||||
constexpr bool IsUniform() const {
|
||||
@@ -71,6 +81,7 @@ class PLATFORM_EXPORT ContouredRect {
|
||||
constexpr float TopRight() const { return top_right_; }
|
||||
constexpr float BottomRight() const { return bottom_right_; }
|
||||
constexpr float BottomLeft() const { return bottom_left_; }
|
||||
+ constexpr float Smoothness() const { return smoothness_; }
|
||||
|
||||
constexpr bool operator==(const CornerCurvature&) const = default;
|
||||
|
||||
@@ -81,6 +92,7 @@ class PLATFORM_EXPORT ContouredRect {
|
||||
float top_right_ = kRound;
|
||||
float bottom_right_ = kRound;
|
||||
float bottom_left_ = kRound;
|
||||
+ float smoothness_ = 0.0f;
|
||||
};
|
||||
|
||||
// A Corner is a axis-aligned quad, with the points ordered (start, outer,
|
||||
diff --git a/third_party/blink/renderer/platform/geometry/path_builder.cc b/third_party/blink/renderer/platform/geometry/path_builder.cc
|
||||
index 346cfc0b13b31808fbe1381b3785150810f347bb..29a004e6b668d172534cd503f16de57d42368b2e 100644
|
||||
--- a/third_party/blink/renderer/platform/geometry/path_builder.cc
|
||||
+++ b/third_party/blink/renderer/platform/geometry/path_builder.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/geometry/path_builder.h"
|
||||
|
||||
+#include "electron/shell/renderer/electron_smooth_round_rect.h"
|
||||
#include "third_party/blink/renderer/platform/geometry/contoured_rect.h"
|
||||
#include "third_party/blink/renderer/platform/geometry/infinite_int_rect.h"
|
||||
#include "third_party/blink/renderer/platform/geometry/path.h"
|
||||
@@ -231,6 +232,19 @@ PathBuilder& PathBuilder::AddContouredRect(
|
||||
AddRoundedRect(target_rect);
|
||||
return *this;
|
||||
}
|
||||
+
|
||||
+ // TODO(clavin): decompose `electron::DrawSmoothRoundRect` into corners
|
||||
+ if (contoured_rect.GetCornerCurvature().IsSmooth()) {
|
||||
+ const gfx::RectF& box = contoured_rect.Rect();
|
||||
+ const FloatRoundedRect::Radii& radii = contoured_rect.GetRadii();
|
||||
+ builder_.addPath(electron::DrawSmoothRoundRect(
|
||||
+ box.x(), box.y(), box.width(), box.height(),
|
||||
+ std::min(contoured_rect.GetCornerCurvature().Smoothness(), 1.0f),
|
||||
+ radii.TopLeft().width(), radii.TopRight().width(),
|
||||
+ radii.BottomRight().width(), radii.BottomLeft().width()));
|
||||
+ return *this;
|
||||
+ }
|
||||
+
|
||||
const FloatRoundedRect& origin_rect = contoured_rect.GetOriginRect();
|
||||
|
||||
if (origin_rect == target_rect) {
|
||||
@@ -11,10 +11,10 @@ ensure it has minimum contrast required to be accessible.
|
||||
This should be upstreamed to Chromium if possible.
|
||||
|
||||
diff --git a/ui/views/window/frame_caption_button.cc b/ui/views/window/frame_caption_button.cc
|
||||
index 9f2f19eca80d420e10e5269fb24d4ca52f234ae9..ec54aaa17054468a21af4a1a9736da9134dfe4e6 100644
|
||||
index f70d810e5c316a0dfee0b12a0972679f5f56b22b..5a5b2b3e1a70c7365a4d6deb90c183f8392c8c9f 100644
|
||||
--- a/ui/views/window/frame_caption_button.cc
|
||||
+++ b/ui/views/window/frame_caption_button.cc
|
||||
@@ -107,7 +107,7 @@ FrameCaptionButton::FrameCaptionButton(PressedCallback callback,
|
||||
@@ -108,7 +108,7 @@ FrameCaptionButton::FrameCaptionButton(PressedCallback callback,
|
||||
FrameCaptionButton::~FrameCaptionButton() = default;
|
||||
|
||||
// static
|
||||
@@ -23,7 +23,7 @@ index 9f2f19eca80d420e10e5269fb24d4ca52f234ae9..ec54aaa17054468a21af4a1a9736da91
|
||||
// Use IsDark() to change target colors instead of PickContrastingColor(), so
|
||||
// that DefaultFrameHeader::GetTitleColor() (which uses different target
|
||||
// colors) can change between light/dark targets at the same time. It looks
|
||||
@@ -124,6 +124,22 @@ SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) {
|
||||
@@ -125,6 +125,22 @@ SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) {
|
||||
.color;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ index 9f2f19eca80d420e10e5269fb24d4ca52f234ae9..ec54aaa17054468a21af4a1a9736da91
|
||||
float FrameCaptionButton::GetInactiveButtonColorAlphaRatio() {
|
||||
return 0.38f;
|
||||
diff --git a/ui/views/window/frame_caption_button.h b/ui/views/window/frame_caption_button.h
|
||||
index 0ac923a3ca6052d499ed7c1a4f156b0f19ad4e64..3164f79828218d57843eba823e0f14ff456b2df4 100644
|
||||
index e74917399d3306e6557069d85fe90d153cecf585..738965e15ea4a5c3d71a5bf79ea0df78dac9cd73 100644
|
||||
--- a/ui/views/window/frame_caption_button.h
|
||||
+++ b/ui/views/window/frame_caption_button.h
|
||||
@@ -44,8 +44,18 @@ class VIEWS_EXPORT FrameCaptionButton : public Button {
|
||||
@@ -45,8 +45,18 @@ class VIEWS_EXPORT FrameCaptionButton : public Button {
|
||||
FrameCaptionButton& operator=(const FrameCaptionButton&) = delete;
|
||||
~FrameCaptionButton() override;
|
||||
|
||||
@@ -70,10 +70,10 @@ index 0ac923a3ca6052d499ed7c1a4f156b0f19ad4e64..3164f79828218d57843eba823e0f14ff
|
||||
|
||||
// Gets the alpha ratio for the colors of inactive frame caption buttons.
|
||||
static float GetInactiveButtonColorAlphaRatio();
|
||||
@@ -134,6 +144,7 @@ class VIEWS_EXPORT FrameCaptionButton : public Button {
|
||||
@@ -135,6 +145,7 @@ class VIEWS_EXPORT FrameCaptionButton : public Button {
|
||||
// TODO(b/292154873): Store the foreground color instead of the background
|
||||
// color for the SkColor type.
|
||||
absl::variant<ui::ColorId, SkColor> color_ = gfx::kPlaceholderColor;
|
||||
std::variant<ui::ColorId, SkColor> color_ = gfx::kPlaceholderColor;
|
||||
+ SkColor button_color_ = SkColor();
|
||||
|
||||
// Whether the button should be painted as active.
|
||||
|
||||
@@ -90,10 +90,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 610ed4c922705697b27af569af55064daeff5d25..9cb52cb768e648235f89f65e870d853d45268900 100644
|
||||
index 067b3cc0d6a8b5990dc4bad0f15e47bd4922a26a..4aaf506c9fadb3f4c5a79560bf4558462d2c8705 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -168,6 +168,8 @@ viz_component("service") {
|
||||
@@ -178,6 +178,8 @@ viz_component("service") {
|
||||
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
|
||||
"display_embedder/skia_render_copy_results.cc",
|
||||
"display_embedder/skia_render_copy_results.h",
|
||||
@@ -509,10 +509,10 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93
|
||||
+
|
||||
+#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_
|
||||
diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109ccda35248f 100644
|
||||
index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f47d872e42 100644
|
||||
--- a/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
+++ b/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
@@ -149,7 +149,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
@@ -156,7 +156,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
if (!canvas_)
|
||||
return;
|
||||
|
||||
@@ -522,10 +522,10 @@ index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109cc
|
||||
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 d119eb1e217cf90c85bf752f1530345b1eec01f2..655ed4ee5525a126309f173775a28e183b4dd29a 100644
|
||||
index 2b6ceac536ca667caad8f1aa1d8ab6c5139083d8..869468a0ab7708fc300a098c47d5d490f17190a8 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
|
||||
@@ -112,7 +112,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -115,7 +115,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
params->gpu_compositing, params->widget);
|
||||
auto output_surface = output_surface_provider->CreateOutputSurface(
|
||||
params->widget, params->gpu_compositing, display_client.get(),
|
||||
@@ -564,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1
|
||||
gpu::SyncPointManager* GetSyncPointManager() override;
|
||||
gpu::Scheduler* GetGpuScheduler() override;
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index 378910976c702d81c263973d29e17646c3963494..84553085b75b8cb9296c4af726f9a7bfc0318980 100644
|
||||
index 7839f5afb9ac1aef3f809042d14e6bf2f48f84af..7df780d195e3cfcbfc0857133f2c0d21abe04121 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -441,8 +441,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
@@ -431,8 +431,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
|
||||
root_params->display_private =
|
||||
display_private.BindNewEndpointAndPassReceiver();
|
||||
@@ -585,10 +585,10 @@ index 378910976c702d81c263973d29e17646c3963494..84553085b75b8cb9296c4af726f9a7bf
|
||||
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
|
||||
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
|
||||
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
index 7d19b6be8bb0e0269c381cf6efdf79eaeff1e935..b8ec06ade095df99c024396a601dbf1abb97cc00 100644
|
||||
index 3046e60995bceb1c9931038be3d309577a830a60..4476f48510f807d03f05a4afa2a648dac8720010 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
@@ -117,7 +117,6 @@ interface DisplayClient {
|
||||
@@ -125,7 +125,6 @@ interface DisplayClient {
|
||||
|
||||
// Creates a LayeredWindowUpdater implementation to draw into a layered
|
||||
// window.
|
||||
@@ -620,10 +620,10 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
|
||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index 7f71cc6b8812cc112262d3e9153884e428a7e495..8a61b0cc5d45a55ac188babf63b59492cff428e1 100644
|
||||
index c802f9aae242c1be364890e0e6968d09be87f946..38b6c47f526b428562f340966352d32ba918f2d5 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -92,6 +92,7 @@ class DisplayPrivate;
|
||||
@@ -88,6 +88,7 @@ class DisplayPrivate;
|
||||
class ExternalBeginFrameController;
|
||||
} // namespace mojom
|
||||
|
||||
@@ -631,7 +631,7 @@ index 7f71cc6b8812cc112262d3e9153884e428a7e495..8a61b0cc5d45a55ac188babf63b59492
|
||||
class HostFrameSinkManager;
|
||||
class LocalSurfaceId;
|
||||
class RasterContextProvider;
|
||||
@@ -154,6 +155,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory {
|
||||
@@ -146,6 +147,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory {
|
||||
viz::mojom::ExternalBeginFrameControllerClient>
|
||||
CreateExternalBeginFrameControllerClient() = 0;
|
||||
};
|
||||
@@ -647,7 +647,7 @@ index 7f71cc6b8812cc112262d3e9153884e428a7e495..8a61b0cc5d45a55ac188babf63b59492
|
||||
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
@@ -198,6 +208,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -190,6 +200,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@@ -657,7 +657,7 @@ index 7f71cc6b8812cc112262d3e9153884e428a7e495..8a61b0cc5d45a55ac188babf63b59492
|
||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -620,6 +633,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -629,6 +642,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
simple_begin_frame_observers_;
|
||||
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;
|
||||
|
||||
|
||||
@@ -80,10 +80,10 @@ index 801db538979ba62facdcf3a472dade56723ca639..7abac9a5b13b393713534ae51664c2e5
|
||||
private:
|
||||
const std::string service_interface_name_;
|
||||
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
|
||||
index b7dfacb25a09b105e982c013119271b8f137e7b9..8c351bb09e5110a2c6692acc37e7187c43eec8ff 100644
|
||||
index 60c4a301c32a46cdc332cccd1cd4ae78802ee8b9..85fc14b2ef520abb191f926dc44a272f4c9e874b 100644
|
||||
--- a/content/browser/service_host/utility_process_host.cc
|
||||
+++ b/content/browser/service_host/utility_process_host.cc
|
||||
@@ -539,7 +539,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
@@ -540,7 +540,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
// Take ownership of |client_| so the destructor doesn't notify it of
|
||||
// termination.
|
||||
auto client = std::move(client_);
|
||||
@@ -93,7 +93,7 @@ index b7dfacb25a09b105e982c013119271b8f137e7b9..8c351bb09e5110a2c6692acc37e7187c
|
||||
|
||||
std::optional<std::string> UtilityProcessHost::GetServiceName() {
|
||||
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
|
||||
index ab6b64737245a840a3e2b06d2ab501ef4aaed7a2..9cf85b5fc97cf797965642d9bae5b3b0abf56e80 100644
|
||||
index 1164da12ee71a8575c17bf1b84a505e8a32b96b3..4cbc30fc4b57440d06a0a0f642cc44c5c755e7f9 100644
|
||||
--- a/content/browser/service_host/utility_process_host.h
|
||||
+++ b/content/browser/service_host/utility_process_host.h
|
||||
@@ -79,7 +79,7 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
|
||||
@@ -7,7 +7,7 @@ This allows embedders to call SetDefersLoading without reaching into Blink inter
|
||||
This might be upstreamable?
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
|
||||
index 23b29fe25bc463ff1d36aa502a27c4222595e7c5..c1ac6172c4cee72f64f42ca64d2db9c0f1f48738 100644
|
||||
index 0527831e1f8d7923ba0f687a5c0da8573189d867..f72af0e6cfcf06d47bd917def993f081530ab66b 100644
|
||||
--- a/third_party/blink/public/web/web_document_loader.h
|
||||
+++ b/third_party/blink/public/web/web_document_loader.h
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -28,10 +28,10 @@ index 23b29fe25bc463ff1d36aa502a27c4222595e7c5..c1ac6172c4cee72f64f42ca64d2db9c0
|
||||
|
||||
// Returns the http referrer of original request which initited this load.
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
|
||||
index 1c6da71f9526f1567fe18d40524818f48e62584a..63b9bdae7f6552e047023be3b503bf05154e7ca9 100644
|
||||
index e86efe8c9fc2d27fefc5e47afe401b8a6b1419ba..9d1ef55e4e122f30564f35406c8b51335e3d6996 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.h
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.h
|
||||
@@ -327,7 +327,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
|
||||
@@ -328,7 +328,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
|
||||
soft_navigation_heuristics_task_id,
|
||||
bool should_skip_screenshot);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user