mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
50 Commits
ci/docs-on
...
fix-pdf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
045200d662 | ||
|
|
f62d7254c4 | ||
|
|
c7aa0b537d | ||
|
|
048d620701 | ||
|
|
15cdae1cf0 | ||
|
|
bac383c219 | ||
|
|
49eb165ef9 | ||
|
|
a468ed7f10 | ||
|
|
5444738721 | ||
|
|
a6959ca97b | ||
|
|
45353ae38c | ||
|
|
f702327dce | ||
|
|
fda3a3d493 | ||
|
|
dae5dad167 | ||
|
|
940ebb6c7a | ||
|
|
793565e4be | ||
|
|
1f322ebce3 | ||
|
|
f009e077f2 | ||
|
|
fed73040e2 | ||
|
|
828fd59a72 | ||
|
|
e892840975 | ||
|
|
7373173e44 | ||
|
|
5d5e672f17 | ||
|
|
e39943bf45 | ||
|
|
f331606e07 | ||
|
|
cca55117e4 | ||
|
|
bf29d2f0bd | ||
|
|
fea1a2a987 | ||
|
|
a51c56aca9 | ||
|
|
89f25e6af3 | ||
|
|
e0db4046b2 | ||
|
|
3b9130d815 | ||
|
|
52ed4646d9 | ||
|
|
68098c317f | ||
|
|
52e0307cc1 | ||
|
|
7fffe77909 | ||
|
|
3ccb1bc0a8 | ||
|
|
0917ed5f6f | ||
|
|
a67aad0f50 | ||
|
|
ceb6d28fd3 | ||
|
|
e12ab6708e | ||
|
|
6101025368 | ||
|
|
97b0280ad4 | ||
|
|
1044fe675d | ||
|
|
42af60cc7e | ||
|
|
cadba11088 | ||
|
|
8aeee3f714 | ||
|
|
dd54e84a58 | ||
|
|
d4b7d9e9cf | ||
|
|
83a5ba1e2c |
72
.github/actions/build-electron/action.yml
vendored
72
.github/actions/build-electron/action.yml
vendored
@@ -17,9 +17,6 @@ inputs:
|
||||
is-release:
|
||||
description: 'Is release build'
|
||||
required: true
|
||||
strip-binaries:
|
||||
description: 'Strip binaries (Linux only)'
|
||||
required: false
|
||||
generate-symbols:
|
||||
description: 'Generate symbols'
|
||||
required: true
|
||||
@@ -63,22 +60,14 @@ runs:
|
||||
sudo launchctl limit maxfiles 65536 200000
|
||||
fi
|
||||
|
||||
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
|
||||
NINJA_SUMMARIZE_BUILD=1 e build
|
||||
cp out/Default/.ninja_log out/electron_ninja_log
|
||||
node electron/script/check-symlinks.js
|
||||
- name: Strip Electron Binaries ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.strip-binaries == 'true' }}
|
||||
run: |
|
||||
cd src
|
||||
electron/script/copy-debug-symbols.py --target-cpu="${{ inputs.target-arch }}" --out-dir=out/Default/debug --compress
|
||||
electron/script/strip-binaries.py --target-cpu="${{ inputs.target-arch }}" --verbose
|
||||
electron/script/add-debug-link.py --target-cpu="${{ inputs.target-arch }}" --debug-dir=out/Default/debug
|
||||
- name: Build Electron dist.zip ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES -d explain
|
||||
e build --target electron:electron_dist_zip
|
||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
|
||||
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
||||
@@ -90,7 +79,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_mksnapshot
|
||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
# Remove unused args from mksnapshot_args
|
||||
SEDOPTION="-i"
|
||||
@@ -100,20 +89,7 @@ runs:
|
||||
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
||||
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
||||
|
||||
if [ "${{ inputs.target-platform }}" = "linux" ]; then
|
||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
|
||||
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator
|
||||
else
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
|
||||
fi
|
||||
fi
|
||||
|
||||
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_mksnapshot_zip
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
cd out/Default
|
||||
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
||||
@@ -147,7 +123,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_chromedriver
|
||||
e build --target electron:electron_chromedriver_zip
|
||||
|
||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||
@@ -198,24 +174,24 @@ runs:
|
||||
electron/script/zip-symbols.py -b $BUILD_PATH
|
||||
fi
|
||||
- name: Generate FFMpeg ${{ inputs.step-suffix }}
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
run: |
|
||||
cd src
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
|
||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
|
||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
|
||||
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
e build --target electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:hunspell_dictionaries_zip
|
||||
- name: Generate Libcxx ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
e build --target electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxx_headers_zip
|
||||
e build --target electron:libcxxabi_headers_zip
|
||||
e build --target electron:libcxx_objects_zip
|
||||
- name: Remove Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::remove-matcher owner=clang::"
|
||||
@@ -238,7 +214,29 @@ runs:
|
||||
echo 'Uploading Electron release distribution to GitHub releases'
|
||||
script/release/uploaders/upload.py --verbose
|
||||
fi
|
||||
- name: Generate siso report
|
||||
if: ${{ inputs.target-platform != 'win' && !cancelled() }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e d siso report -C out/Default > siso_report.txt
|
||||
SISO_REPORT_PATH=$(grep -o '/.*siso-report-[^ ]*' siso_report.txt)
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $GITHUB_ENV
|
||||
cat siso_report.txt
|
||||
echo "SISO REPORT AT $SISO_REPORT_PATH"
|
||||
- name: Generate siso report (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' && !cancelled() }}
|
||||
shell: powershell
|
||||
run: |
|
||||
cd src
|
||||
e d siso report -C out\Default > siso_report.txt
|
||||
$SISO_REPORT_PATH = Get-Content "siso_report.txt" | Select-String "report file:\s*(.+)" | ForEach-Object {
|
||||
$_.Matches.Groups[1].Value.Trim()
|
||||
}
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH"
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $env:GITHUB_ENV
|
||||
- name: Generate Artifact Key
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ inputs.is-asan }}" = "true" ]; then
|
||||
@@ -250,9 +248,11 @@ runs:
|
||||
# The current generated_artifacts_<< artifact.key >> name was taken from CircleCI
|
||||
# to ensure we don't break anything, but we may be able to improve that.
|
||||
- name: Move all Generated Artifacts to Upload Folder ${{ inputs.step-suffix }}
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: ./src/electron/script/actions/move-artifacts.sh
|
||||
- name: Upload Generated Artifacts ${{ inputs.step-suffix }}
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
with:
|
||||
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
||||
|
||||
17
.github/actions/cipd-install/action.yml
vendored
17
.github/actions/cipd-install/action.yml
vendored
@@ -14,6 +14,9 @@ inputs:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
package:
|
||||
description: 'Package to install'
|
||||
dependency-version:
|
||||
description: 'Version of the dependency to install'
|
||||
default: ''
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -22,15 +25,23 @@ runs:
|
||||
run : |
|
||||
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
|
||||
- name: Create ensure file for ${{ inputs.dependency }}
|
||||
if: ${{ inputs.dependency-version == '' }}
|
||||
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' }}
|
||||
|
||||
- name: Create ensure file for ${{ inputs.dependency }} from dependency-version
|
||||
if: ${{ inputs.dependency-version != '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }} on macOS"
|
||||
echo '${{ inputs.package }} ${{ inputs.dependency-version }}' > ${{ inputs.dependency }}_ensure_file
|
||||
cat ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
|
||||
if: ${{ inputs.target-platform != 'win' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }}"
|
||||
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' }}
|
||||
|
||||
16
.github/actions/fix-sync/action.yml
vendored
16
.github/actions/fix-sync/action.yml
vendored
@@ -20,6 +20,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fix llvm toolchain
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/llvm-build
|
||||
@@ -27,6 +28,7 @@ runs:
|
||||
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681
|
||||
python3 src/tools/clang/scripts/update.py --package objdump
|
||||
- name: Fix esbuild
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
|
||||
@@ -36,6 +38,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/esbuild/${platform}
|
||||
- name: Fix rustc
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/rust-toolchain
|
||||
@@ -59,6 +62,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: gn/gn/windows-amd64
|
||||
- name: Fix reclient
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: reclient
|
||||
@@ -67,6 +71,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/rbe/client/${platform}
|
||||
- name: Configure reclient configs
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
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
|
||||
@@ -84,6 +89,7 @@ runs:
|
||||
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
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: ninja
|
||||
@@ -92,10 +98,20 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/ninja/${platform}
|
||||
- name: Set ninja in path
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
||||
- name: Fix siso
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: siso
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/third_party/siso/cipd
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: build/siso/${platform}
|
||||
- name: Fixup angle git
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
cd src/third_party/angle
|
||||
|
||||
@@ -13,8 +13,9 @@ runs:
|
||||
git config --global core.fscache true
|
||||
git config --global core.longpaths true
|
||||
git config --global core.preloadindex true
|
||||
git config --global core.longpaths true
|
||||
fi
|
||||
export BUILD_TOOLS_SHA=274cba0474f0d1e4e6adbb66c1da48556cb0add5
|
||||
export BUILD_TOOLS_SHA=c13f4bdb50e65da46a4703f8f882079dd21fd99e
|
||||
npm i -g @electron/build-tools
|
||||
# Update depot_tools to ensure python
|
||||
e d update_depot_tools
|
||||
|
||||
@@ -97,7 +97,7 @@ runs:
|
||||
|
||||
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
||||
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
||||
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld x $src_cache -o"$TEMP_DIR_PATH"
|
||||
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld20 x $src_cache -o"$TEMP_DIR_PATH"
|
||||
|
||||
- name: Move Src Cache (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
|
||||
2
.github/workflows/archaeologist-dig.yml
vendored
2
.github/workflows/archaeologist-dig.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
- name: Setting Up Dig Site
|
||||
|
||||
2
.github/workflows/audit-branch-ci.yml
vendored
2
.github/workflows/audit-branch-ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: 22.17.x
|
||||
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
|
||||
|
||||
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -86,11 +86,11 @@ jobs:
|
||||
|
||||
# Docs Only Jobs
|
||||
docs-only:
|
||||
needs: setup
|
||||
needs: [setup, checkout-linux]
|
||||
if: ${{ needs.setup.outputs.docs-only == 'true' }}
|
||||
uses: ./.github/workflows/pipeline-electron-docs-only.yml
|
||||
with:
|
||||
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
||||
container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
secrets: inherit
|
||||
|
||||
# Checkout Jobs
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
|
||||
checkout-linux:
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-linux}}
|
||||
if: ${{ !inputs.skip-linux}}
|
||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
container:
|
||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||
@@ -196,6 +196,7 @@ jobs:
|
||||
linux-gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
target-platform: linux
|
||||
target-archs: x64 arm arm64
|
||||
@@ -225,7 +226,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
test-runs-on: macos-13
|
||||
test-runs-on: macos-15-large
|
||||
target-platform: macos
|
||||
target-arch: x64
|
||||
is-release: false
|
||||
@@ -244,7 +245,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
test-runs-on: macos-14
|
||||
test-runs-on: macos-15
|
||||
target-platform: macos
|
||||
target-arch: arm64
|
||||
is-release: false
|
||||
@@ -261,6 +262,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
||||
@@ -281,6 +283,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
||||
@@ -302,6 +305,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-arm64-4core
|
||||
@@ -322,9 +326,10 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-arm64-4core
|
||||
test-runs-on: ubuntu-22.04-arm
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
target-platform: linux
|
||||
@@ -383,7 +388,7 @@ jobs:
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
||||
test-runs-on: electron-hosted-windows-arm64-4core
|
||||
test-runs-on: windows-11-arm
|
||||
target-platform: win
|
||||
target-arch: arm64
|
||||
is-release: false
|
||||
|
||||
3
.github/workflows/linux-publish.yml
vendored
3
.github/workflows/linux-publish.yml
vendored
@@ -50,7 +50,6 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -66,7 +65,6 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -82,6 +80,5 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -12,6 +12,9 @@ concurrency:
|
||||
group: electron-docs-only-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GCLIENT_EXTRA_ARGS: --custom-var=checkout_arm=True --custom-var=checkout_arm64=True
|
||||
|
||||
jobs:
|
||||
docs-only:
|
||||
name: Docs Only Compile
|
||||
@@ -19,6 +22,22 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Generate DEPS Hash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
- name: Restore src cache via AKS
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
with:
|
||||
target-platform: linux
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
|
||||
@@ -48,11 +48,6 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
default: '0'
|
||||
strip-binaries:
|
||||
description: 'Strip the binaries before release (Linux only)'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
is-asan:
|
||||
description: 'Building the Address Sanitizer (ASan) Linux build'
|
||||
required: false
|
||||
@@ -118,7 +113,7 @@ jobs:
|
||||
run: df -h
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
cache: yarn
|
||||
@@ -176,7 +171,7 @@ jobs:
|
||||
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 }}
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --remote-build siso
|
||||
- name: Run Electron Only Hooks
|
||||
run: |
|
||||
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
||||
@@ -186,9 +181,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: Setup Number of Ninja Processes
|
||||
run: |
|
||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||
- name: Free up space (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/free-space-macos
|
||||
@@ -201,7 +193,6 @@ jobs:
|
||||
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
|
||||
is-release: '${{ inputs.is-release }}'
|
||||
generate-symbols: '${{ inputs.generate-symbols }}'
|
||||
strip-binaries: '${{ inputs.strip-binaries }}'
|
||||
upload-to-storage: '${{ inputs.upload-to-storage }}'
|
||||
is-asan: '${{ inputs.is-asan }}'
|
||||
- name: Set GN_EXTRA_ARGS for MAS Build
|
||||
|
||||
@@ -68,29 +68,15 @@ jobs:
|
||||
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
cp $(which node) /mnt/runner-externals/node20/bin/
|
||||
- name: Install Git on Windows arm64 runners
|
||||
if: ${{ inputs.target-arch == 'arm64' && inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
choco install -y --no-progress git.install --params "'/GitAndUnixToolsOnPath'"
|
||||
choco install -y --no-progress git
|
||||
choco install -y --no-progress python --version 3.11.9
|
||||
choco install -y --no-progress visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
|
||||
echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "C:\Python311" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
- name: Add TCC permissions on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
|
||||
configure_user_tccdb () {
|
||||
local values=$1
|
||||
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
|
||||
@@ -111,11 +97,12 @@ jobs:
|
||||
"'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceCamera','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceBluetoothAlways','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceScreenCapture','/bin/bash',1,2,3,1,NULL,NULL,NULL,'UNUSED',NULL,0,$epochdate"
|
||||
)
|
||||
for values in "${userValuesArray[@]}"; do
|
||||
# Sonoma and higher have a few extra values
|
||||
# Ref: https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-tccdb-macos.sh
|
||||
if [ "$OSTYPE" = "darwin23" ]; then
|
||||
if [ "$OSTYPE" = "darwin23" ] || [ "$OSTYPE" = "darwin24" ]; then
|
||||
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
configure_sys_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
else
|
||||
@@ -123,9 +110,17 @@ jobs:
|
||||
configure_sys_tccdb "$values"
|
||||
fi
|
||||
done
|
||||
|
||||
# Ref: https://github.com/getsentry/sentry-cocoa/blob/main/scripts/ci-enable-permissions.sh
|
||||
if [ "$OSTYPE" = "darwin24" ]; then
|
||||
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
|
||||
fi
|
||||
- name: Turn off the unexpectedly quit dialog on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: defaults write com.apple.CrashReporter DialogType server
|
||||
- name: Set xcode to 16.4
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
@@ -156,6 +151,7 @@ jobs:
|
||||
git config --global core.fscache true
|
||||
git config --global core.longpaths true
|
||||
git config --global core.preloadindex true
|
||||
git config --global core.longpaths true
|
||||
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
|
||||
@@ -196,12 +192,12 @@ jobs:
|
||||
unzip -:o dist.zip
|
||||
unzip -:o chromedriver.zip
|
||||
unzip -:o mksnapshot.zip
|
||||
- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
||||
if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
||||
run: |
|
||||
sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||
cd src/electron
|
||||
./script/codesign/generate-identity.sh
|
||||
#- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
||||
# if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
||||
# run: |
|
||||
# sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||
# cd src/electron
|
||||
# ./script/codesign/generate-identity.sh
|
||||
- name: Install Datadog CLI
|
||||
run: |
|
||||
cd src/electron
|
||||
|
||||
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
uses: github/codeql-action/upload-sarif@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
.github/workflows/semantic.yml
vendored
2
.github/workflows/semantic.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: semantic-pull-request
|
||||
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
|
||||
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
101
BUILD.gn
101
BUILD.gn
@@ -44,6 +44,7 @@ if (is_mac) {
|
||||
|
||||
if (is_linux) {
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//electron/build/linux/strip_binary.gni")
|
||||
import("//tools/generate_stubs/rules.gni")
|
||||
|
||||
pkg_config("gio_unix") {
|
||||
@@ -654,6 +655,7 @@ source_set("electron_lib") {
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gtk:gtk_config",
|
||||
"//ui/linux:display_server_utils",
|
||||
"//ui/linux:linux_ui",
|
||||
"//ui/linux:linux_ui_factory",
|
||||
"//ui/wm",
|
||||
@@ -686,7 +688,7 @@ source_set("electron_lib") {
|
||||
deps += [
|
||||
"//components/app_launch_prefetch",
|
||||
"//components/crash/core/app:crash_export_thunks",
|
||||
"//ui/native_theme:native_theme_browser",
|
||||
"//third_party/libxml:xml_writer",
|
||||
"//ui/wm",
|
||||
"//ui/wm/public",
|
||||
]
|
||||
@@ -1425,6 +1427,18 @@ dist_zip("electron_dist_zip") {
|
||||
":licenses",
|
||||
]
|
||||
if (is_linux) {
|
||||
if (is_official_build) {
|
||||
data_deps += [
|
||||
":strip_chrome_crashpad_handler",
|
||||
":strip_chrome_sandbox",
|
||||
":strip_electron_binary",
|
||||
":strip_libEGL_shlib",
|
||||
":strip_libGLESv2_shlib",
|
||||
":strip_libffmpeg_shlib",
|
||||
":strip_libvk_swiftshader_shlib",
|
||||
]
|
||||
}
|
||||
|
||||
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
|
||||
}
|
||||
deps = data_deps
|
||||
@@ -1470,6 +1484,16 @@ group("electron_mksnapshot") {
|
||||
|
||||
dist_zip("electron_mksnapshot_zip") {
|
||||
data_deps = mksnapshot_deps
|
||||
if (is_linux && is_official_build) {
|
||||
data_deps += [
|
||||
":strip_libEGL_shlib",
|
||||
":strip_libGLESv2_shlib",
|
||||
":strip_libffmpeg_shlib",
|
||||
":strip_libvk_swiftshader_shlib",
|
||||
":strip_mksnapshot_binary",
|
||||
":strip_v8_context_snapshot_generator_binary",
|
||||
]
|
||||
}
|
||||
deps = data_deps
|
||||
outputs = [ "$root_build_dir/mksnapshot.zip" ]
|
||||
}
|
||||
@@ -1594,3 +1618,78 @@ group("copy_node_headers") {
|
||||
group("node_headers") {
|
||||
public_deps = [ ":tar_node_headers" ]
|
||||
}
|
||||
|
||||
if (is_linux && is_official_build) {
|
||||
strip_binary("strip_electron_binary") {
|
||||
binary_input = "$root_out_dir/$electron_project_name"
|
||||
symbol_output = "$root_out_dir/debug/$electron_project_name.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ ":electron_app" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_chrome_crashpad_handler") {
|
||||
binary_input = "$root_out_dir/chrome_crashpad_handler"
|
||||
symbol_output = "$root_out_dir/debug/chrome_crashpad_handler.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_chrome_sandbox") {
|
||||
binary_input = "$root_out_dir/chrome_sandbox"
|
||||
symbol_output = "$root_out_dir/debug/chrome-sandbox.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//sandbox/linux:chrome_sandbox" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libEGL_shlib") {
|
||||
binary_input = "$root_out_dir/libEGL.so"
|
||||
symbol_output = "$root_out_dir/debug/libEGL.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/angle:libEGL" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libGLESv2_shlib") {
|
||||
binary_input = "$root_out_dir/libGLESv2.so"
|
||||
symbol_output = "$root_out_dir/debug/libGLESv2.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/angle:libGLESv2" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libffmpeg_shlib") {
|
||||
binary_input = "$root_out_dir/libffmpeg.so"
|
||||
symbol_output = "$root_out_dir/debug/libffmpeg.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/ffmpeg" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libvk_swiftshader_shlib") {
|
||||
binary_input = "$root_out_dir/libvk_swiftshader.so"
|
||||
symbol_output = "$root_out_dir/debug/libvk_swiftshader.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_mksnapshot_binary") {
|
||||
_binary_path = rebase_path(
|
||||
get_label_info(
|
||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
"root_out_dir") + "/mksnapshot",
|
||||
root_build_dir)
|
||||
binary_input = "$root_out_dir/$_binary_path"
|
||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
compress_debug_sections = true
|
||||
deps = mksnapshot_deps
|
||||
}
|
||||
|
||||
strip_binary("strip_v8_context_snapshot_generator_binary") {
|
||||
_binary_path = rebase_path(
|
||||
get_label_info(
|
||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
"root_out_dir") + "/v8_context_snapshot_generator",
|
||||
root_build_dir)
|
||||
binary_input = "$root_out_dir/$_binary_path"
|
||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
compress_debug_sections = true
|
||||
deps = mksnapshot_deps
|
||||
}
|
||||
}
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'141.0.7350.0',
|
||||
'141.0.7390.7',
|
||||
'node_version':
|
||||
'v22.18.0',
|
||||
'v22.19.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||
node_module_version = 139
|
||||
node_module_version = 140
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -70,6 +70,5 @@ v8_expose_public_symbols = true
|
||||
# sensitive content by enterprise users.
|
||||
enterprise_cloud_content_analysis = false
|
||||
|
||||
# Disable siso until we are ready to use it.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/6638830
|
||||
use_siso = false
|
||||
# We don't use anything from here, and it causes target collisions
|
||||
enable_linux_installer = false
|
||||
|
||||
@@ -12,7 +12,7 @@ TEMPLATE_H = """
|
||||
|
||||
namespace electron::snapshot_checksum {
|
||||
|
||||
const std::string kChecksum = "{checksum}";
|
||||
inline constexpr std::string_view kChecksum = "{checksum}";
|
||||
|
||||
} // namespace electron::snapshot_checksum
|
||||
|
||||
|
||||
70
build/linux/strip_binary.gni
Normal file
70
build/linux/strip_binary.gni
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright 2021 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.gni;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
||||
# The notable difference is it has an option to compress the debug sections
|
||||
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
# Extracts symbols from a binary into a symbol file.
|
||||
#
|
||||
# Args:
|
||||
# binary_input: Path to the binary containing symbols to extract, e.g.:
|
||||
# "$root_out_dir/chrome"
|
||||
# symbol_output: Desired output file for symbols, e.g.:
|
||||
# "$root_out_dir/chrome.debug"
|
||||
# stripped_binary_output: Desired output file for stripped file, e.g.:
|
||||
# "$root_out_dir/chrome.stripped"
|
||||
# compress_debug_sections: If true, compress the extracted debug sections
|
||||
template("strip_binary") {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"deps",
|
||||
"testonly",
|
||||
])
|
||||
action("${target_name}") {
|
||||
llvm_strip_binary = "${clang_base_path}/bin/llvm-strip"
|
||||
llvm_objcopy_binary = "${clang_base_path}/bin/llvm-objcopy"
|
||||
script = "//electron/build/linux/strip_binary.py"
|
||||
|
||||
if (defined(invoker.stripped_binary_output)) {
|
||||
stripped_binary_output = invoker.stripped_binary_output
|
||||
} else {
|
||||
stripped_binary_output = invoker.binary_input + ".stripped"
|
||||
}
|
||||
if (defined(invoker.symbol_output)) {
|
||||
symbol_output = invoker.symbol_output
|
||||
} else {
|
||||
symbol_output = invoker.binary_input + ".debug"
|
||||
}
|
||||
|
||||
inputs = [
|
||||
invoker.binary_input,
|
||||
llvm_strip_binary,
|
||||
llvm_objcopy_binary,
|
||||
]
|
||||
outputs = [
|
||||
symbol_output,
|
||||
stripped_binary_output,
|
||||
]
|
||||
args = [
|
||||
"--llvm-strip-binary-path",
|
||||
rebase_path(llvm_strip_binary, root_build_dir),
|
||||
"--llvm-objcopy-binary-path",
|
||||
rebase_path(llvm_objcopy_binary, root_build_dir),
|
||||
"--symbol-output",
|
||||
rebase_path(symbol_output, root_build_dir),
|
||||
"--stripped-binary-output",
|
||||
rebase_path(stripped_binary_output, root_build_dir),
|
||||
"--binary-input",
|
||||
rebase_path(invoker.binary_input, root_build_dir),
|
||||
]
|
||||
|
||||
if (defined(invoker.compress_debug_sections) &&
|
||||
invoker.compress_debug_sections) {
|
||||
args += [ "--compress-debug-sections" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
63
build/linux/strip_binary.py
Normal file
63
build/linux/strip_binary.py
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright 2021 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.py;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
||||
# The notable difference is it has an option to compress the debug sections
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.")
|
||||
parser.add_argument("--llvm-strip-binary-path",
|
||||
help="Path to llvm-strip executable.")
|
||||
parser.add_argument("--llvm-objcopy-binary-path",
|
||||
required=True,
|
||||
help="Path to llvm-objcopy executable.")
|
||||
parser.add_argument("--binary-input", help="Input ELF binary.")
|
||||
parser.add_argument("--symbol-output",
|
||||
help="File to write extracted debug info (.debug).")
|
||||
parser.add_argument("--compress-debug-sections",
|
||||
action="store_true",
|
||||
help="Compress extracted debug info.")
|
||||
parser.add_argument("--stripped-binary-output",
|
||||
help="File to write stripped binary.")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Replicate the behavior of:
|
||||
# eu-strip <binary_input> -o <stripped_binary_output> -f <symbol_output>
|
||||
|
||||
objcopy_args = [
|
||||
"--only-keep-debug",
|
||||
args.binary_input,
|
||||
args.symbol_output,
|
||||
]
|
||||
|
||||
if args.compress_debug_sections:
|
||||
objcopy_args.insert(0, "--compress-debug-sections")
|
||||
|
||||
subprocess.check_output([args.llvm_objcopy_binary_path] + objcopy_args)
|
||||
subprocess.check_output([
|
||||
args.llvm_strip_binary_path,
|
||||
"--strip-debug",
|
||||
"--strip-unneeded",
|
||||
"-o",
|
||||
args.stripped_binary_output,
|
||||
args.binary_input,
|
||||
])
|
||||
subprocess.check_output([
|
||||
args.llvm_objcopy_binary_path,
|
||||
f"--add-gnu-debuglink={args.symbol_output}",
|
||||
args.stripped_binary_output,
|
||||
])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -3,7 +3,7 @@
|
||||
load("@builtin//struct.star", "module")
|
||||
|
||||
def __platform_properties(ctx):
|
||||
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:ef35d347f4a4a2d32b76fd908e66e96f59bf8ba7379fd5626548244c45343b2b"
|
||||
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:d7cb1ab14a0f20aa669c23f22c15a9dead761dcac19f43985bf9dd5f41fbef3a"
|
||||
return {
|
||||
"default": {
|
||||
"OSFamily": "Linux",
|
||||
|
||||
66
build/siso/main.star
Normal file
66
build/siso/main.star
Normal file
@@ -0,0 +1,66 @@
|
||||
load("@builtin//encoding.star", "json")
|
||||
load("@builtin//path.star", "path")
|
||||
load("@builtin//runtime.star", "runtime")
|
||||
load("@builtin//struct.star", "module")
|
||||
load("@config//main.star", upstream_init = "init")
|
||||
load("@config//win_sdk.star", "win_sdk")
|
||||
load("@config//gn_logs.star", "gn_logs")
|
||||
|
||||
def init(ctx):
|
||||
mod = upstream_init(ctx)
|
||||
step_config = json.decode(mod.step_config)
|
||||
|
||||
# Buildbarn doesn't support input_root_absolute_path so disable that
|
||||
for rule in step_config["rules"]:
|
||||
input_root_absolute_path = rule.get("input_root_absolute_path", False)
|
||||
if input_root_absolute_path:
|
||||
rule.pop("input_root_absolute_path", None)
|
||||
|
||||
# Only wrap clang rules with a remote wrapper if not on Linux. These are currently only
|
||||
# needed for X-Compile builds, which run on Windows and Mac.
|
||||
if runtime.os != "linux":
|
||||
for rule in step_config["rules"]:
|
||||
if rule["name"].startswith("clang/") or rule["name"].startswith("clang-cl/"):
|
||||
rule["remote_wrapper"] = "../../buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper"
|
||||
if "inputs" not in rule:
|
||||
rule["inputs"] = []
|
||||
rule["inputs"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
||||
rule["inputs"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
||||
|
||||
if "executables" not in step_config:
|
||||
step_config["executables"] = []
|
||||
step_config["executables"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
||||
step_config["executables"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
||||
|
||||
if runtime.os == "darwin":
|
||||
# Update platforms to match our default siso config instead of reclient configs.
|
||||
step_config["platforms"].update({
|
||||
"clang": step_config["platforms"]["default"],
|
||||
"clang_large": step_config["platforms"]["default"],
|
||||
})
|
||||
|
||||
if runtime.os == "windows":
|
||||
# Add additional Windows SDK headers needed by Electron
|
||||
win_toolchain_dir = win_sdk.toolchain_dir(ctx)
|
||||
if win_toolchain_dir:
|
||||
sdk_version = gn_logs.read(ctx).get("windows_sdk_version")
|
||||
step_config["input_deps"][win_toolchain_dir + ":headers"].extend([
|
||||
# third_party/electron_node/deps/uv/include/uv/win.h includes mswsock.h
|
||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/mswsock.h"),
|
||||
# third_party/electron_node/src/debug_utils.cc includes lm.h
|
||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/Lm.h"),
|
||||
])
|
||||
|
||||
# Update platforms to match our default siso config instead of reclient configs.
|
||||
step_config["platforms"].update({
|
||||
"clang-cl": step_config["platforms"]["default"],
|
||||
"clang-cl_large": step_config["platforms"]["default"],
|
||||
"lld-link": step_config["platforms"]["default"],
|
||||
})
|
||||
|
||||
return module(
|
||||
"config",
|
||||
step_config = json.encode(step_config),
|
||||
filegroups = mod.filegroups,
|
||||
handlers = mod.handlers,
|
||||
)
|
||||
12
build/zip.py
12
build/zip.py
@@ -41,6 +41,8 @@ PATHS_TO_SKIP = [
|
||||
'resources/inspector',
|
||||
'gen/third_party/devtools-frontend/src',
|
||||
'gen/ui/webui',
|
||||
# Skip because these get zipped separately in script/zip-symbols.py
|
||||
'debug',
|
||||
]
|
||||
|
||||
def skip_path(dep, dist_zip, target_cpu):
|
||||
@@ -80,6 +82,11 @@ def main(argv):
|
||||
dep = dep.strip()
|
||||
if not skip_path(dep, dist_zip, target_cpu):
|
||||
dist_files.add(dep)
|
||||
# On Linux, filter out any files which have a .stripped companion
|
||||
if sys.platform == 'linux':
|
||||
dist_files = {
|
||||
dep for dep in dist_files if f"{dep.removeprefix('./')}.stripped" not in dist_files
|
||||
}
|
||||
if sys.platform == 'darwin' and not should_flatten:
|
||||
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
|
||||
else:
|
||||
@@ -96,10 +103,13 @@ def main(argv):
|
||||
dirname = os.path.dirname(dep)
|
||||
arcname = (
|
||||
os.path.join(dirname, 'chrome-sandbox')
|
||||
if basename == 'chrome_sandbox'
|
||||
if basename.removesuffix('.stripped') == 'chrome_sandbox'
|
||||
else dep
|
||||
)
|
||||
name_to_write = arcname
|
||||
# On Linux, strip the .stripped suffix from the name before zipping
|
||||
if sys.platform == 'linux':
|
||||
name_to_write = name_to_write.removesuffix('.stripped')
|
||||
if should_flatten:
|
||||
if flatten_relative_to:
|
||||
if name_to_write.startswith(flatten_relative_to):
|
||||
|
||||
@@ -23,6 +23,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/browser_process.h",
|
||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
|
||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
|
||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.cc",
|
||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.h",
|
||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
|
||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
|
||||
"//chrome/browser/devtools/devtools_eye_dropper.cc",
|
||||
|
||||
@@ -86,7 +86,7 @@ Field trials to be forcefully enabled or disabled.
|
||||
|
||||
For example: `WebRTC-Audio-Red-For-Opus/Enabled/`
|
||||
|
||||
### --host-rules=`rules`
|
||||
### --host-rules=`rules` _Deprecated_
|
||||
|
||||
A comma-separated list of `rules` that control how hostnames are mapped.
|
||||
|
||||
@@ -104,9 +104,23 @@ These mappings apply to the endpoint host in a net request (the TCP connect
|
||||
and host resolver in a direct connection, and the `CONNECT` in an HTTP proxy
|
||||
connection, and the endpoint host in a `SOCKS` proxy connection).
|
||||
|
||||
**Deprecated:** Use the `--host-resolver-rules` switch instead.
|
||||
|
||||
### --host-resolver-rules=`rules`
|
||||
|
||||
Like `--host-rules` but these `rules` only apply to the host resolver.
|
||||
A comma-separated list of `rules` that control how hostnames are mapped.
|
||||
|
||||
For example:
|
||||
|
||||
* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1
|
||||
* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to
|
||||
"proxy".
|
||||
* `MAP test.com [::1]:77` Forces "test.com" to resolve to IPv6 loopback. Will
|
||||
also force the port of the resulting socket address to be 77.
|
||||
* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for
|
||||
"www.google.com".
|
||||
|
||||
These `rules` only apply to the host resolver.
|
||||
|
||||
### --ignore-certificate-errors
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# MenuItem
|
||||
|
||||
## Class: MenuItem
|
||||
|
||||
> Add items to native application menus and context menus.
|
||||
|
||||
@@ -211,6 +211,10 @@ Returns `Object`:
|
||||
system.
|
||||
* `free` Integer - The total amount of memory not being used by applications or disk
|
||||
cache.
|
||||
* `fileBacked` Integer _macOS_ - The amount of memory that currently has been paged out to storage.
|
||||
Includes memory for file caches, network buffers, and other system services.
|
||||
* `purgeable` Integer _macOS_ - The amount of memory that is marked as "purgeable". The system can reclaim it
|
||||
if memory pressure increases.
|
||||
* `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in Kilobytes available to the
|
||||
system.
|
||||
* `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in Kilobytes available to the
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
# ServiceWorkerMain
|
||||
## Class: ServiceWorkerMain
|
||||
|
||||
> An instance of a Service Worker representing a version of a script for a given scope.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
## Class: ServiceWorkerMain
|
||||
|
||||
Process: [Main](../glossary.md#main-process)<br />
|
||||
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._
|
||||
|
||||
|
||||
@@ -939,14 +939,18 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `deprecated-sync-clipboard-read` _Deprecated_ - Request access to run `document.execCommand("paste")`
|
||||
* `fileSystem` - Access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
* `securityOrigin` string (optional) - The security origin of the `media` check.
|
||||
* `mediaType` string (optional) - The type of media access being requested, can be `video`,
|
||||
`audio` or `unknown`
|
||||
`audio` or `unknown`.
|
||||
* `requestingUrl` string (optional) - The last URL the requesting frame loaded. This is not provided for cross-origin sub frames making permission checks.
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame.
|
||||
* `filePath` string (optional) - The path of a `fileSystem` request.
|
||||
* `isDirectory` boolean (optional) - Whether a `fileSystem` request is a directory.
|
||||
* `fileAccessType` string (optional) - The access type of a `fileSystem` request. Can be `writable` or `readable`.
|
||||
|
||||
Sets the handler which can be used to respond to permission checks for the `session`.
|
||||
Returning `true` will allow the permission and `false` will reject it. Please note that
|
||||
@@ -968,6 +972,9 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
|
||||
})
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `isMainFrame` will always be `false` for a `fileSystem` request as a result of Chromium limitations.
|
||||
|
||||
#### `ses.setDisplayMediaRequestHandler(handler[, opts])`
|
||||
|
||||
* `handler` Function | null
|
||||
|
||||
@@ -14,44 +14,11 @@ This document uses the following convention to categorize breaking changes:
|
||||
|
||||
## Planned Breaking API Changes (39.0)
|
||||
|
||||
### Removed: `ELECTRON_OZONE_PLATFORM_HINT` evironment variable
|
||||
### Deprecated: `--host-rules` command line switch
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426) in Electron 38.
|
||||
Chromium is deprecating the `--host-rules` switch.
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
## Planned Breaking API Changes (38.0)
|
||||
|
||||
### Deprecated: `ELECTRON_OZONE_PLATFORM_HINT` environment variable
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426).
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
This environment variable will be [removed soon](https://chromium-review.googlesource.com/c/chromium/src/+/6819616).
|
||||
|
||||
### Removed: macOS 11 support
|
||||
|
||||
macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/6594615).
|
||||
|
||||
Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey)
|
||||
or later will be required to run Electron v38.0.0 and higher.
|
||||
|
||||
### Removed: `plugin-crashed` event
|
||||
|
||||
The `plugin-crashed` event has been removed from `webContents`.
|
||||
|
||||
### Deprecated: `webFrame.routingId` property
|
||||
|
||||
The `routingId` property will be removed from `webFrame` objects.
|
||||
|
||||
You should use `webFrame.frameToken` instead.
|
||||
|
||||
### Deprecated: `webFrame.findFrameByRoutingId(routingId)`
|
||||
|
||||
The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
|
||||
|
||||
You should use `webFrame.findFrameByToken(frameToken)` instead.
|
||||
You should use `--host-resolver-rules` instead.
|
||||
|
||||
### Behavior Changed: window.open popups are always resizable
|
||||
|
||||
@@ -76,6 +43,37 @@ When using shared texture offscreen rendering feature, the `paint` event now emi
|
||||
It moves the `sharedTextureHandle`, `planes`, `modifier` into a unified `handle` property.
|
||||
See [here](https://www.electronjs.org/docs/latest/api/structures/offscreen-shared-texture) for more details.
|
||||
|
||||
## Planned Breaking API Changes (38.0)
|
||||
|
||||
### Removed: `ELECTRON_OZONE_PLATFORM_HINT` environment variable
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426).
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
### Removed: macOS 11 support
|
||||
|
||||
macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/6594615).
|
||||
|
||||
Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey)
|
||||
or later will be required to run Electron v38.0.0 and higher.
|
||||
|
||||
### Removed: `plugin-crashed` event
|
||||
|
||||
The `plugin-crashed` event has been removed from `webContents`.
|
||||
|
||||
### Deprecated: `webFrame.routingId` property
|
||||
|
||||
The `routingId` property will be removed from `webFrame` objects.
|
||||
|
||||
You should use `webFrame.frameToken` instead.
|
||||
|
||||
### Deprecated: `webFrame.findFrameByRoutingId(routingId)`
|
||||
|
||||
The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
|
||||
|
||||
You should use `webFrame.findFrameByToken(frameToken)` instead.
|
||||
|
||||
## Planned Breaking API Changes (37.0)
|
||||
|
||||
### Utility Process unhandled rejection behavior change
|
||||
|
||||
@@ -191,12 +191,6 @@ $ ./out/Testing/electron
|
||||
|
||||
### Packaging
|
||||
|
||||
On linux, first strip the debugging and symbol information:
|
||||
|
||||
```sh
|
||||
$ electron/script/strip-binaries.py -d out/Release
|
||||
```
|
||||
|
||||
To package the electron build as a distributable zip file:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -9,10 +9,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | TBD | ✅ |
|
||||
| 39.0.0 | 2025-Sep-04 | 2025-Oct-01 | 2025-Oct-28 | 2026-May-05 | M142 | TBD | ✅ |
|
||||
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | v22.18 | ✅ |
|
||||
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |
|
||||
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | ✅ |
|
||||
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | ✅ |
|
||||
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | 🚫 |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
|
||||
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | 🚫 |
|
||||
|
||||
@@ -1034,14 +1034,12 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__fwd/get.h",
|
||||
"//third_party/libc++/src/include/__fwd/ios.h",
|
||||
"//third_party/libc++/src/include/__fwd/istream.h",
|
||||
"//third_party/libc++/src/include/__fwd/map.h",
|
||||
"//third_party/libc++/src/include/__fwd/mdspan.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory_resource.h",
|
||||
"//third_party/libc++/src/include/__fwd/ostream.h",
|
||||
"//third_party/libc++/src/include/__fwd/pair.h",
|
||||
"//third_party/libc++/src/include/__fwd/queue.h",
|
||||
"//third_party/libc++/src/include/__fwd/set.h",
|
||||
"//third_party/libc++/src/include/__fwd/span.h",
|
||||
"//third_party/libc++/src/include/__fwd/sstream.h",
|
||||
"//third_party/libc++/src/include/__fwd/stack.h",
|
||||
@@ -1381,7 +1379,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/aligned_storage.h",
|
||||
"//third_party/libc++/src/include/__type_traits/aligned_union.h",
|
||||
"//third_party/libc++/src/include/__type_traits/alignment_of.h",
|
||||
"//third_party/libc++/src/include/__type_traits/can_extract_key.h",
|
||||
"//third_party/libc++/src/include/__type_traits/common_reference.h",
|
||||
"//third_party/libc++/src/include/__type_traits/common_type.h",
|
||||
"//third_party/libc++/src/include/__type_traits/conditional.h",
|
||||
@@ -1462,6 +1459,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_relocatable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unbounded_array.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_union.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unqualified.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unsigned.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_valid_expansion.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_void.h",
|
||||
@@ -1522,6 +1520,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__utility/small_buffer.h",
|
||||
"//third_party/libc++/src/include/__utility/swap.h",
|
||||
"//third_party/libc++/src/include/__utility/to_underlying.h",
|
||||
"//third_party/libc++/src/include/__utility/try_key_extraction.h",
|
||||
"//third_party/libc++/src/include/__utility/unreachable.h",
|
||||
"//third_party/libc++/src/include/__variant/monostate.h",
|
||||
"//third_party/libc++/src/include/__vector/comparison.h",
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { Menu } from 'electron/main';
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const bindings = process._linkedBinding('electron_browser_app');
|
||||
const commandLine = process._linkedBinding('electron_common_command_line');
|
||||
const { app } = bindings;
|
||||
|
||||
Object.setPrototypeOf(app, EventEmitter.prototype);
|
||||
|
||||
// Only one app object permitted.
|
||||
export default app;
|
||||
|
||||
|
||||
@@ -199,7 +199,14 @@ BrowserWindow.prototype.setBackgroundThrottling = function (allowed: boolean) {
|
||||
};
|
||||
|
||||
BrowserWindow.prototype.addBrowserView = function (browserView: BrowserView) {
|
||||
if (browserView.ownerWindow) { browserView.ownerWindow.removeBrowserView(browserView); }
|
||||
if (this._browserViews.includes(browserView)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const ownerWindow = browserView.ownerWindow;
|
||||
if (ownerWindow && ownerWindow !== this) {
|
||||
ownerWindow.removeBrowserView(browserView);
|
||||
}
|
||||
this.contentView.addChildView(browserView.webContentsView);
|
||||
browserView.ownerWindow = this;
|
||||
browserView.webContents._setOwnerWindow(this);
|
||||
|
||||
@@ -882,7 +882,7 @@ export function create (options = {}): Electron.WebContents {
|
||||
return new (WebContents as any)(options);
|
||||
}
|
||||
|
||||
export function fromId (id: string) {
|
||||
export function fromId (id: number) {
|
||||
return binding.fromId(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/node": "^22.7.7",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/stream-json": "^1.7.7",
|
||||
"@types/stream-json": "^1.7.8",
|
||||
"@types/temp": "^0.9.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
||||
"@typescript-eslint/parser": "^8.7.0",
|
||||
@@ -45,7 +45,7 @@
|
||||
"remark-cli": "^12.0.1",
|
||||
"remark-preset-lint-markdown-style-guide": "^6.0.1",
|
||||
"semver": "^7.6.3",
|
||||
"stream-json": "^1.8.0",
|
||||
"stream-json": "^1.9.1",
|
||||
"tap-xunit": "^2.4.1",
|
||||
"temp": "^0.9.4",
|
||||
"timers-browserify": "1.4.2",
|
||||
|
||||
@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
|
||||
module.
|
||||
|
||||
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
|
||||
index 431214277314941c5ec031f03ad09e7f22800983..4cc48bbc3f8434876f35767c1a9f01d27388be99 100644
|
||||
index 345c94f6e26e88aac77b9feb92bd8d6665234981..8ef2ab8987da63f321d1dbb79f2eded8b8209bfc 100644
|
||||
--- a/crypto/digest/digest_extra.cc
|
||||
+++ b/crypto/digest/digest_extra.cc
|
||||
@@ -46,6 +46,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
@@ -47,6 +47,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
|
||||
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
|
||||
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
|
||||
@@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b
|
||||
|
||||
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
|
||||
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
|
||||
index 710c6e6d110378d1db10d8c2ae57b2d844c603b9..dbb1e0cd5e9480d1ac7a86cbca6fae29d6a8dca4 100644
|
||||
index b604aba00c1c6cea8002b6dc298ea5fe979589b1..1c123aa1dca09ae60c31be2a6dab9a64748eac17 100644
|
||||
--- a/include/openssl/digest.h
|
||||
+++ b/include/openssl/digest.h
|
||||
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
|
||||
|
||||
@@ -28,7 +28,7 @@ RC2 Ciphers: rc2-40-cbc
|
||||
It's unclear whether this would be accepted upstream. We should try regardless.
|
||||
|
||||
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
|
||||
index 2622dc78d1da236862312f55bc0a40f26116486e..ac7aff6518ad5c2a0e48bd91d60a1f825851b634 100644
|
||||
index 6513df01c4b3e4d33fc6b521d9aae78ec5499e73..52eb7fea420e3d81d274fd5c1e21e4da0229687f 100644
|
||||
--- a/crypto/cipher/get_cipher.cc
|
||||
+++ b/crypto/cipher/get_cipher.cc
|
||||
@@ -31,6 +31,7 @@ static const struct {
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f8431434e42 100644
|
||||
index 24c0d496f9d655f0f32634430e9c31d5592be939..b62418ba31927c5c4e2b424b993e40c63c868201 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1206,7 +1206,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1207,7 +1207,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f84
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2567,13 +2567,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2568,13 +2568,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,9 +132,11 @@ chore_grandfather_in_electron_views_and_delegates.patch
|
||||
refactor_patch_electron_permissiontypes_into_blink.patch
|
||||
revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch
|
||||
build_partial_revert_mac_fullscreen_top_chrome_mouse_events.patch
|
||||
revert_update_siso-chromium_image.patch
|
||||
build_set_mac_sdk_minimum_to_10.patch
|
||||
fix_add_macos_memory_query_fallback_to_avoid_crash.patch
|
||||
fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch
|
||||
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
|
||||
feat_add_support_for_embedder_snapshot_validation.patch
|
||||
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
|
||||
chore_add_electron_objects_to_wrappablepointertag.patch
|
||||
chore_expose_isolate_parameter_in_script_lifecycle_observers.patch
|
||||
revert_partial_remove_unused_prehandlemouseevent.patch
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc9823ab51e5 100644
|
||||
index 558575cf06b10b59e114a9f53b90f01d8ecf63c4..0204ce5351a5190a20317f0cef6d3e8421541cac 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -271,6 +271,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -272,6 +272,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc98
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -380,7 +384,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -381,7 +385,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
#endif
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e90be3d39b 100644
|
||||
index 284da783658bec333be748941784d43b13f6f244..18714ce8fc27c8d56c5deac27ba335078c452d0a 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
@@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e9
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 7dc7f4d0ae5c553e757ca2df68a9f6121b009778..5ef55881665aae1190336ddd686de7f0f9fc6a4e 100644
|
||||
index bc2ec7491d7072be77307d7b8af06e5397e2bdfb..addef4de8a95f47964a895e1d1cc4763f565a028 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4676,6 +4676,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4679,6 +4679,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 7dc7f4d0ae5c553e757ca2df68a9f6121b009778..5ef55881665aae1190336ddd686de7f0
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa56dbfa2dc 100644
|
||||
index 2950a6f600aab24226ef59acabddc74c9b67cac8..f0f4335aa815ea50dbf9b720b41e4eb31f27fb90 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa5
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index 5c1c325d1e4037b0b413c3519e963c5f0210086a..994dd3118dfa43816db60e5dfb61c00bf366e92d 100644
|
||||
index 101e727b3a97bc764315eb694dc3975f9a408f9c..52e8828d8fffaba8ab05436cb4d727595f18238a 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -662,6 +662,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -661,6 +661,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 36baf908d3be8aed44ff60b8de2cffe2eee15efe..8d73ddb12013ce195026b9f63050cf33
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d2691fac2b7 100644
|
||||
index b02b60ff5f6650332c54ecc66f6fdb274b737aa7..1aacf6f66b543a4ede6ab5d885143dd4a0821e8a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d26
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 081c8fabbcc514e47ff33d7e07a5eac3d112a518..e3fab574523a4b63069587b2fcaf30267fddf7c4 100644
|
||||
index fcc0928abbc454281b022e0451d993651ecba42f..16066fe34ee0335a0dabe00b6890e5844349c0b5 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -81,6 +81,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
@@ -8,7 +8,7 @@ accessing Blink internals. Its inverse, which already exists, is used in
|
||||
Android WebView.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_message_port_converter.h b/third_party/blink/public/web/web_message_port_converter.h
|
||||
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e7521cb71b8 100644
|
||||
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..cdf9bca3df292531831b6df0077ba211a29548aa 100644
|
||||
--- a/third_party/blink/public/web/web_message_port_converter.h
|
||||
+++ b/third_party/blink/public/web/web_message_port_converter.h
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -19,18 +19,20 @@ index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e75
|
||||
} // namespace v8
|
||||
|
||||
namespace blink {
|
||||
@@ -25,6 +26,9 @@ class BLINK_EXPORT WebMessagePortConverter {
|
||||
@@ -25,6 +26,11 @@ class BLINK_EXPORT WebMessagePortConverter {
|
||||
// neutered, it will return nullopt.
|
||||
static std::optional<MessagePortChannel>
|
||||
DisentangleAndExtractMessagePortChannel(v8::Isolate*, v8::Local<v8::Value>);
|
||||
+
|
||||
+ BLINK_EXPORT static v8::Local<v8::Value>
|
||||
+ EntangleAndInjectMessagePortChannel(v8::Local<v8::Context>, MessagePortChannel);
|
||||
+ EntangleAndInjectMessagePortChannel(v8::Isolate*,
|
||||
+ v8::Local<v8::Context>,
|
||||
+ MessagePortChannel);
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_message_port_converter.cc b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef732225d6 100644
|
||||
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..bbd3c968027549b89087d9a4394f575d84213eba 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -41,19 +43,20 @@ index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_message_port.h"
|
||||
#include "third_party/blink/renderer/core/messaging/message_port.h"
|
||||
|
||||
@@ -21,4 +22,15 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
|
||||
@@ -21,4 +22,16 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
|
||||
return port->Disentangle();
|
||||
}
|
||||
|
||||
+v8::Local<v8::Value>
|
||||
+WebMessagePortConverter::EntangleAndInjectMessagePortChannel(
|
||||
+ v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
+ MessagePortChannel port_channel) {
|
||||
+ auto* execution_context = ToExecutionContext(context);
|
||||
+ CHECK(execution_context);
|
||||
+ auto* port = MakeGarbageCollected<MessagePort>(*execution_context);
|
||||
+ port->Entangle(std::move(port_channel));
|
||||
+ return port->ToV8(context->GetIsolate(), context->Global());
|
||||
+ return port->ToV8(isolate, context->Global());
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
|
||||
@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
|
||||
WindowList.
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aabbba621cb 100644
|
||||
index 7f8d93e3637188280cc6e10c5c47a2cdbc0cc38f..7ccd2a61b45b3f864c1d8caefd3b235308986a8c 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -19,9 +19,9 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
#include "content/public/browser/web_ui_data_source.h"
|
||||
+#include "electron/shell/browser/electron_browser_context.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/ax_mode.h"
|
||||
#include "ui/accessibility/ax_updates_and_events.h"
|
||||
#include "ui/accessibility/platform/ax_platform.h"
|
||||
@@ -173,7 +174,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
@@ -178,7 +179,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
rvh->GetRoutingID(), accessibility_mode);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
|
||||
base::Value::Dict target_data;
|
||||
target_data.Set(kSessionIdField, browser->session_id().id());
|
||||
@@ -197,7 +198,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -224,7 +225,7 @@ void HandleAccessibilityRequestCallback(
|
||||
auto& browser_accessibility_state =
|
||||
*content::BrowserAccessibilityState::GetInstance();
|
||||
base::Value::Dict data;
|
||||
@@ -39,7 +39,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
|
||||
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
|
||||
bool web = mode.has_mode(ui::AXMode::kWebContents);
|
||||
@@ -258,7 +259,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -285,7 +286,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kIsScreenReaderActive, is_screen_reader_active);
|
||||
|
||||
std::string pref_api_type =
|
||||
@@ -48,7 +48,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
bool pref_api_type_supported = false;
|
||||
|
||||
std::vector<ui::AXApiType::Type> supported_api_types =
|
||||
@@ -326,11 +327,11 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -353,11 +354,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(page_list));
|
||||
|
||||
base::Value::List browser_list;
|
||||
@@ -61,8 +61,8 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
+#endif
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
std::string json_string;
|
||||
@@ -804,7 +805,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -845,7 +846,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
const std::string value = CheckJSValue(data.FindString(kValueField));
|
||||
|
||||
if (string_name == kApiTypeField) {
|
||||
@@ -72,7 +72,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
pref->SetString(prefs::kShownAccessibilityApiType, value);
|
||||
}
|
||||
}
|
||||
@@ -858,7 +860,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
@@ -899,7 +901,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -82,7 +82,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
std::string accessibility_contents =
|
||||
@@ -885,6 +888,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -926,6 +929,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -90,7 +90,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
base::Value::Dict result = BuildTargetDescriptor(browser);
|
||||
@@ -897,6 +901,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -938,6 +942,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
base::Value::Dict result;
|
||||
@@ -940,11 +945,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
@@ -981,11 +986,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
}
|
||||
|
||||
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
|
||||
@@ -115,7 +115,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
// Check to see if it is in the supported types list.
|
||||
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
|
||||
supported_types.end()) {
|
||||
@@ -1014,8 +1021,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
@@ -1055,10 +1062,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -127,11 +127,13 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
+ registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void AccessibilityUIMessageHandler::OnVisibilityChanged(
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7f1648148 100644
|
||||
index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83c1d1fa0a 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
@@ -27,6 +27,8 @@ namespace content {
|
||||
@@ -28,6 +28,8 @@ namespace content {
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
@@ -140,7 +142,7 @@ index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7
|
||||
namespace user_prefs {
|
||||
class PrefRegistrySyncable;
|
||||
} // namespace user_prefs
|
||||
@@ -77,6 +79,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
@@ -79,6 +81,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler,
|
||||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,11 +6,11 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
index d321fe74be7af24d1246224d7a28c9dede3635b2..af2cb60c42863b1fdad487c28d544b7a7dade805 100644
|
||||
index 1d002528ba2b90d9c361c77ab00aeb1ccd000177..77f3b011f9c3710ac93ad20a92eafea0d35bb9a7 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -167,6 +167,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
(network::mojom::AttributionSupport support),
|
||||
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
(const std::optional<uint64_t> canvas_noise_token),
|
||||
(override));
|
||||
|
||||
+ MOCK_METHOD(
|
||||
@@ -23,10 +23,10 @@ index d321fe74be7af24d1246224d7a28c9dede3635b2..af2cb60c42863b1fdad487c28d544b7a
|
||||
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 87c448c04f8f164f7b2dca6f21a8ea9cc26db163..e88cfee7ad8495e7733c85efc8d21ad2aef26db0 100644
|
||||
index ac7638da0c0b360d21b88e4e458d3687949884fa..45d2fe002330cb4aa7c81defaa5004d5e62e369a 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -773,6 +773,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -786,6 +786,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 7944fe64e0da112fc670358b75506bb199bb5e4a..0e3c16c6af2a078943e9f39808134ab2
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index b14f5bc3f023c512a066ce9ec9f681c96b1fafc4..b930145db575eb8c4e84297ddd610bd90fb5d3a8 100644
|
||||
index e98d74fecf4275ef8e7c6d23e5ea5ec3af80b926..0927d69b56d064327f0659d8ffe6ceff98064947 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -580,8 +580,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
|
||||
// which updates `visibility_`, unless the host is hidden. Make sure no update
|
||||
// is needed.
|
||||
@@ -80,34 +80,34 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
|
||||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
|
||||
index 3f4fdfcdf2f701a394e182bd61baf226338ef7f8..f2faa1225e8ca6abb190e6f7a0775545fa3f785d 100644
|
||||
index 0dc1cd52dec74ede2117eb244e423d7f3ad322ea..352c64b3aec50546451a0033114e3a35dcf32136 100644
|
||||
--- a/content/test/test_page_broadcast.h
|
||||
+++ b/content/test/test_page_broadcast.h
|
||||
@@ -51,6 +51,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
network::mojom::AttributionSupport support) override;
|
||||
void UpdateColorProviders(
|
||||
@@ -53,6 +53,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
const blink::ColorProviderColorMaps& color_provider_colors) override;
|
||||
void UpdateCanvasNoiseToken(
|
||||
std::optional<uint64_t> canvas_noise_token) override;
|
||||
+ void SetSchedulerThrottling(bool allowed) override {}
|
||||
|
||||
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
|
||||
};
|
||||
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
|
||||
index b6a4e3609af1f090f1f845d77fa0589e5b178d8a..989b2cf76ce88614b57e75ce2fcace101225f43e 100644
|
||||
index bcf8559d759e73e4f3f00710d263fe24cc801828..556f990868b862452156cec2354a90ae75352251 100644
|
||||
--- a/third_party/blink/public/mojom/page/page.mojom
|
||||
+++ b/third_party/blink/public/mojom/page/page.mojom
|
||||
@@ -175,4 +175,7 @@ interface PageBroadcast {
|
||||
// 2. The ColorProvider associated with the WebContents changes as a result
|
||||
// of theme changes.
|
||||
UpdateColorProviders(ColorProviderColorMaps color_provider_colors);
|
||||
@@ -180,4 +180,7 @@ interface PageBroadcast {
|
||||
// the noise token at ReadyToCommit time and update blink::WebViews that
|
||||
// were made at request time.
|
||||
UpdateCanvasNoiseToken(uint64? canvas_noise_token);
|
||||
+
|
||||
+ // Whether to enable the Renderer scheduler background throttling.
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index c8d27cfee8ef3fe244291f4667b59df1037c359b..92ed53a689991ec8eca9572bf2f7a212acfc4a38 100644
|
||||
index b3553c0783a7b00e055f82ef0b72bd866284473d..c91e49807ec0b56d867504831118269116024626 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -360,6 +360,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -365,6 +365,7 @@ class BLINK_EXPORT WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -116,10 +116,10 @@ index c8d27cfee8ef3fe244291f4667b59df1037c359b..92ed53a689991ec8eca9572bf2f7a212
|
||||
// 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 b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835dd692581 100644
|
||||
index 714b713cd466ac289b3d172ac484ddfd2b46190b..be43ac07eb6563dcb72374dfc4f3bd34913e98c3 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2485,6 +2485,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2500,6 +2500,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835
|
||||
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 &&
|
||||
@@ -3986,10 +3990,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -4009,10 +4013,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,10 +155,10 @@ index b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835
|
||||
// Do not throttle if the page should be painting.
|
||||
bool is_visible =
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 5c8a5d7f9b675a460740643fc26d778a08ef7112..2ebae3e0a5b76eb9551d286af1ed64e1e58b9de4 100644
|
||||
index 883269126ff93c26765ab62013035c6193f8adbb..f821da879a6b6b04d33ef60037a053f3a5c0851d 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -166,7 +166,7 @@ index 5c8a5d7f9b675a460740643fc26d778a08ef7112..2ebae3e0a5b76eb9551d286af1ed64e1
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -935,6 +936,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -943,6 +944,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df233b75e2 100644
|
||||
index cdb5b9246087b5678cf6a0f2713f6238dafc13de..7efbe7524c5ddd3785fff0e2d8901f931f024f48 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index f23c955831d9acda8e115e418b0b0f9a29e52d58..dfcc54b3834ca173707bcf97bfa2d72a64638044 100644
|
||||
index 7d0f966131a4e91efd4652e23dec8287e98b82a9..75975a8d48b05ba25b169b93b62bb7d34eb3f5b7 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -738,10 +738,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -751,10 +751,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index f23c955831d9acda8e115e418b0b0f9a29e52d58..dfcc54b3834ca173707bcf97bfa2d72a
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -795,6 +791,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -808,6 +804,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 2213c498dc7dc4560b23bb53e19d6e957dea712d..154a18226ff02089e9b8c46823ccd49ba6f6471f 100644
|
||||
index 28d3c301465335cc664dad51e41133cd04fa8a62..290363dfa65a3207e5ade788825d470122a4afc8 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -122,6 +122,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
@@ -126,6 +126,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
perfetto::Category("drm"),
|
||||
perfetto::Category("drmcursor"),
|
||||
perfetto::Category("dwrite"),
|
||||
|
||||
@@ -11,10 +11,10 @@ To accomplish this, we need to make simdutf's config public here
|
||||
for use by third_party/electron_node.
|
||||
|
||||
diff --git a/third_party/simdutf/BUILD.gn b/third_party/simdutf/BUILD.gn
|
||||
index 5fbce38841f04dad38f202f529ae84c609c6a8de..9f5ef9bceade8e30bbd2be616b9143e9708fefd8 100644
|
||||
index 68f1ed4e012cff5e0abd64a153a329518860689d..eeb846525e58f038733318915a770bafa22cafc5 100644
|
||||
--- a/third_party/simdutf/BUILD.gn
|
||||
+++ b/third_party/simdutf/BUILD.gn
|
||||
@@ -6,9 +6,14 @@ source_set("header") {
|
||||
@@ -8,9 +8,14 @@ source_set("header") {
|
||||
sources = [ "simdutf.h" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ This patch can (and should) be removed when we can prevent those symbols
|
||||
from being stripped in the release build.
|
||||
|
||||
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
|
||||
index babd5a12fa7fbe263e1ecd6d269a2965a3024bbe..cf116f19c4031e3bec6c82125761ebbcb32c5c79 100644
|
||||
index 0611cd47ef35d3b137a3278896a9174ae2fc3c31..a076c0f461b50fea86679a148b857739f7ec2c3d 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -88,7 +88,7 @@ declare_args() {
|
||||
|
||||
@@ -33,10 +33,10 @@ index e648bb4ed2ff72441faa8773e449e0b6174f5af5..fd2c1d3ac575d10de7d5c09e4418d172
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 0aa7413be9e1aecbf24c32a0759a65b0e331f97d..cc444cfd073846696ed8b4ebc532db2b01d4ee6d 100644
|
||||
index f2f0b13a9b96b906d39cfad4236a7e72b9439e06..7a2dc270b8c19f4418074ad23dd793d15223b33a 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4760,7 +4760,7 @@ static_library("browser") {
|
||||
@@ -4811,7 +4811,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index 0aa7413be9e1aecbf24c32a0759a65b0e331f97d..cc444cfd073846696ed8b4ebc532db2b
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fdd411e769 100644
|
||||
index c60cdd5bf0b3327b5495238c9296b99413c7c226..433a20d22a4df2355d6d407963047491bf3f3b2b 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7464,9 +7464,12 @@ test("unit_tests") {
|
||||
@@ -7515,9 +7515,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fd
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8397,6 +8400,10 @@ test("unit_tests") {
|
||||
@@ -8447,6 +8450,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fd
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8453,7 +8460,6 @@ test("unit_tests") {
|
||||
@@ -8503,7 +8510,6 @@ test("unit_tests") {
|
||||
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -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 5af795411d1ddf92238abdf27e649f33951cf6b2..9c11c173d70408f54c1c18ae4306e01a4558aef7 100644
|
||||
index 24a1d143954ae05ae0b79b0994b76ef9218fb848..5c9b2ed8ba48a1056560ca1cd1d5b976aee4815c 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 27be83a4f2517fe2023a1ebb990b6e8bbed18f7f..886f02b8831fbb9276749dcd49c7245c47dfadb2 100644
|
||||
index 7dcefd2bceb209c6e74445259fac00e3e2280ff7..3a233d2e9dafc2093ead8f9c9104d06fe6176252 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -851,6 +851,7 @@ target(libcxx_target_type, "libc++") {
|
||||
@@ -841,6 +841,7 @@ target(libcxx_target_type, "libc++") {
|
||||
# need to explicitly depend on libc++.
|
||||
visibility = [
|
||||
"//build/config:common_deps",
|
||||
|
||||
@@ -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 27ea41fb7d0134dc2e9bc2f2a7c7d85ef5ce61a3..3735d7ed0d719f8957c80030aee86f169ddbf69e 100644
|
||||
index 666ed8890f60cd0477b814b4b44571002eca9bff..73f730ff05a22938a834921d4842bf1f9faaca67 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9817,6 +9817,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9823,6 +9823,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 27ea41fb7d0134dc2e9bc2f2a7c7d85ef5ce61a3..3735d7ed0d719f8957c80030aee86f16
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25833fcb6a 100644
|
||||
index 3677a957465f59ab80ac059bfcb5afdf98513b48..7a6760e0efdf6972eb497407b68202c5bfffd006 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5316,6 +5316,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5298,6 +5298,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
create_params.initially_hidden = renderer_started_hidden;
|
||||
create_params.initial_popup_url = params.target_url;
|
||||
|
||||
@@ -35,7 +35,7 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
// Even though all codepaths leading here are in response to a renderer
|
||||
// trying to open a new window, if the new window ends up in a different
|
||||
// browsing instance, then the RenderViewHost, RenderWidgetHost,
|
||||
@@ -5371,6 +5375,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5353,6 +5357,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// Sets the newly created WebContents WindowOpenDisposition.
|
||||
new_contents_impl->original_window_open_disposition_ = params.disposition;
|
||||
|
||||
@@ -48,7 +48,7 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
// 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
|
||||
@@ -5412,12 +5422,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5394,12 +5404,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
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 fc433c5802ecb880f3f144f09c3d318814672213..6a1e1f2cfc60451bb097b3625245fbfb3f0d12a4 100644
|
||||
index 90cc84198b7f23c6a07ab503f60a577fdfba5baa..722b27b8adaf86624058ace5f9b5871ff0ede627 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -657,6 +657,10 @@ struct CreateNewWindowParams {
|
||||
@@ -661,6 +661,10 @@ struct CreateNewWindowParams {
|
||||
pending_associated_remote<blink.mojom.Widget> widget;
|
||||
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
|
||||
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
|
||||
@@ -77,10 +77,10 @@ index fc433c5802ecb880f3f144f09c3d318814672213..6a1e1f2cfc60451bb097b3625245fbfb
|
||||
|
||||
// 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 689203b138adf10a27c47dea61d3fe352df80b1e..2988ef70882ed30105d888491feb88db429c85ca 100644
|
||||
index 750edc0c6767ab6a59d010b4f3f02770e50450b0..60e7eebb4f40df18e3fa28f57b7bbb20733477e7 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -867,6 +867,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -884,6 +884,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -90,10 +90,10 @@ index 689203b138adf10a27c47dea61d3fe352df80b1e..2988ef70882ed30105d888491feb88db
|
||||
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 ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580a573fba0 100644
|
||||
index eb7b1fdf7c3b3373201db40f03fc498c4ee08d25..f27b387da5ff4e4f20d28d80043151ad2f2e9d51 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -199,6 +199,7 @@ class NetworkService;
|
||||
@@ -201,6 +201,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -101,7 +101,7 @@ index ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1435,6 +1436,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1449,6 +1450,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -111,10 +111,10 @@ index ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943f06978ad 100644
|
||||
index a8c0f1c63847f814b6e71fe24ae9aed24b26ba19..80d004eb9060e33af9e60b31a862a7dcecb254e8 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -32,6 +32,17 @@ namespace content {
|
||||
@@ -33,6 +33,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
@@ -133,7 +133,7 @@ index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943
|
||||
WebContents* source,
|
||||
const OpenURLParams& params,
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d 100644
|
||||
index 1af915fcc91ae29bb9a6e2fc51f788178365ee4c..6a43f8c30857bfb32867e63d570ad26459af9ae8 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -152,7 +152,7 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
|
||||
#include "content/public/common/window_container_type.mojom-forward.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
||||
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
|
||||
@@ -384,6 +386,16 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -381,6 +383,16 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const StoragePartitionConfig& partition_config,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
@@ -170,10 +170,10 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 01099351f93a2c1c2ed77e75c5bfb9d18f0f9495..7dc7f4d0ae5c553e757ca2df68a9f6121b009778 100644
|
||||
index a8d472bb78f3a9478b70cf3d98c35affec7caf39..bc2ec7491d7072be77307d7b8af06e5397e2bdfb 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6770,6 +6770,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6772,6 +6772,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -232,10 +232,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 23a95863dc888a9ffb4b09c2b034665ef1186f7c..558f6afcdf8faa91744ac2143a03de88c0965366 100644
|
||||
index 68ab3d483fe60671de50ec8952a0f71f103e4ad3..7ea5e45c08d7af439cf3eec041391ed7902ec865 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2354,6 +2354,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2333,6 +2333,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 92a2addc902f74544df918229537d2a450ad8cbd..4e19bc4e7f83da466f02faaa20ed221f83aacf80 100644
|
||||
index 5eb6e4d1815a7a56c7fff1d6f095e6c7e8127b84..808d897ba80abb9cced32a02cb7026305afe0dd2 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -225,6 +225,7 @@ vs-chromium-project.txt
|
||||
@@ -226,6 +226,7 @@ vs-chromium-project.txt
|
||||
/data
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Wed, 20 Aug 2025 04:03:11 +0900
|
||||
Subject: chore: add electron objects to WrappablePointerTag
|
||||
|
||||
Extends gin::WrappablePointerTag with tags needed for
|
||||
electron objects that extend gin::Wrappable and gets
|
||||
allocated on the cpp heap
|
||||
|
||||
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
|
||||
index 80ec409efe1635390887d1324be661643818abff..2e20b63d1fca56efb43c18d0fa04b1e2b4cf339a 100644
|
||||
--- a/gin/public/wrappable_pointer_tags.h
|
||||
+++ b/gin/public/wrappable_pointer_tags.h
|
||||
@@ -66,7 +66,12 @@ enum WrappablePointerTag : uint16_t {
|
||||
kTextInputControllerBindings, // content::TextInputControllerBindings
|
||||
kWebAXObjectProxy, // content::WebAXObjectProxy
|
||||
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
|
||||
- kLastPointerTag = kWrappedExceptionHandler,
|
||||
+ kElectronApp, // electron::api::App
|
||||
+ kElectronDebugger, // electron::api::Debugger
|
||||
+ kElectronEvent, // gin_helper::internal::Event
|
||||
+ kElectronNetLog, // electron::api::NetLog
|
||||
+ kElectronSession, // electron::api::Session
|
||||
+ kLastPointerTag = kElectronEvent,
|
||||
};
|
||||
|
||||
static_assert(kLastPointerTag <
|
||||
@@ -0,0 +1,272 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Mon, 1 Sep 2025 18:17:13 +0900
|
||||
Subject: chore: expose isolate parameter in script lifecycle observers
|
||||
|
||||
Needed after https://chromium-review.googlesource.com/c/v8/v8/+/6875273
|
||||
where callsites that deal with multiple contexts need to distinguish
|
||||
the current isolate.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 79d59c3f4d3d2d5ff39bd65ded489183247656a8..20b49742578ccf363738ee032228f30a4cd676ea 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -398,6 +398,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// WillDestroyServiceWorkerContextOnWorkerThread() is called.
|
||||
virtual void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 18714ce8fc27c8d56c5deac27ba335078c452d0a..263405c605a0477b7a39bc274d7ee03be0b9cac5 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -141,7 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
int32_t world_id) {}
|
||||
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
virtual void DidChangeScrollOffset() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index addef4de8a95f47964a895e1d1cc4763f565a028..8bef2220b9a416011cebf4da672c15d117a34efa 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4685,10 +4685,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
observer.DidInstallConditionalFeatures(context, world_id);
|
||||
}
|
||||
|
||||
-void RenderFrameImpl::WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+void RenderFrameImpl::WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
- observer.WillReleaseScriptContext(context, world_id);
|
||||
+ observer.WillReleaseScriptContext(isolate, context, world_id);
|
||||
}
|
||||
|
||||
void RenderFrameImpl::DidChangeScrollOffset() {
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index f0f4335aa815ea50dbf9b720b41e4eb31f27fb90..319f222565e4ef25206cc44d33ec5e291b8ea089 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -604,7 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
int world_id) override;
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
blink::WebMediaStreamDeviceObserver* MediaStreamDeviceObserver() override;
|
||||
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
index 37691ecee7a72b2ec47ff575239f628116cf136b..c67e3faf7440514e203e5b15a68fc34525a045a2 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.cc
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
@@ -318,6 +318,7 @@ void ServiceWorkerContextClient::WorkerContextStarted(
|
||||
}
|
||||
|
||||
void ServiceWorkerContextClient::WillEvaluateScript(
|
||||
+ v8::Isolate* const v8_isolate,
|
||||
v8::Local<v8::Context> v8_context) {
|
||||
DCHECK(worker_task_runner_->RunsTasksInCurrentSequence());
|
||||
start_timing_->script_evaluation_start_time = base::TimeTicks::Now();
|
||||
@@ -336,8 +337,8 @@ void ServiceWorkerContextClient::WillEvaluateScript(
|
||||
|
||||
DCHECK(proxy_);
|
||||
GetContentClient()->renderer()->WillEvaluateServiceWorkerOnWorkerThread(
|
||||
- proxy_, v8_context, service_worker_version_id_, service_worker_scope_,
|
||||
- script_url_, service_worker_token_);
|
||||
+ proxy_, v8_isolate, v8_context, service_worker_version_id_,
|
||||
+ service_worker_scope_, script_url_, service_worker_token_);
|
||||
}
|
||||
|
||||
void ServiceWorkerContextClient::DidEvaluateScript(bool success) {
|
||||
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
|
||||
index 1f5e24bc38d6ced52e4773236522e9520efc6f6d..a22ca5968fce5e6a0c436ec9b40f0e2f7c1482cf 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.h
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.h
|
||||
@@ -165,7 +165,8 @@ class ServiceWorkerContextClient
|
||||
void WorkerContextStarted(
|
||||
blink::WebServiceWorkerContextProxy* proxy,
|
||||
scoped_refptr<base::SequencedTaskRunner> worker_task_runner) override;
|
||||
- void WillEvaluateScript(v8::Local<v8::Context> v8_context) override;
|
||||
+ void WillEvaluateScript(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> v8_context) override;
|
||||
void DidEvaluateScript(bool success) override;
|
||||
void WillInitializeWorkerContext() override;
|
||||
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
|
||||
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
|
||||
index 37fc43bfc6804c2abb0cf107e2575c72cfca9023..9f3c88be38b9c8960a38649c7f3bf71dff182383 100644
|
||||
--- a/extensions/renderer/dispatcher.cc
|
||||
+++ b/extensions/renderer/dispatcher.cc
|
||||
@@ -612,6 +612,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
|
||||
void Dispatcher::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
|
||||
index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c9988b069b2 100644
|
||||
--- a/extensions/renderer/dispatcher.h
|
||||
+++ b/extensions/renderer/dispatcher.h
|
||||
@@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver,
|
||||
// variables.
|
||||
void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc
|
||||
index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb27e54244 100644
|
||||
--- a/extensions/renderer/extension_frame_helper.cc
|
||||
+++ b/extensions/renderer/extension_frame_helper.cc
|
||||
@@ -439,6 +439,7 @@ void ExtensionFrameHelper::DidCreateScriptContext(
|
||||
}
|
||||
|
||||
void ExtensionFrameHelper::WillReleaseScriptContext(
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
extension_dispatcher_->WillReleaseScriptContext(
|
||||
diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h
|
||||
index e16f370211ba014f778e7b9021b83988a5d27661..a79b20fe95050d6e92615711988384deea3fa1e0 100644
|
||||
--- a/extensions/renderer/extension_frame_helper.h
|
||||
+++ b/extensions/renderer/extension_frame_helper.h
|
||||
@@ -188,7 +188,8 @@ class ExtensionFrameHelper
|
||||
blink::WebDocumentLoader* document_loader) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
void OnDestruct() override;
|
||||
void DidClearWindowObject() override;
|
||||
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd16fd295b 100644
|
||||
--- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
+++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
@@ -120,7 +120,8 @@ class WebServiceWorkerContextClient {
|
||||
//
|
||||
// |v8_context| is the V8 context of the worker and is used to support
|
||||
// service workers in Chrome extensions.
|
||||
- virtual void WillEvaluateScript(v8::Local<v8::Context> v8_context) {}
|
||||
+ virtual void WillEvaluateScript(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> v8_context) {}
|
||||
|
||||
// Called when initial script evaluation finished for the main script.
|
||||
// |success| is true if the evaluation completed with no uncaught exception.
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index 52e8828d8fffaba8ab05436cb4d727595f18238a..6743653f5018c06d3e173aaacdca7275c6ec703f 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -665,7 +665,8 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
int32_t world_id) {}
|
||||
|
||||
// WebKit is about to release its reference to a v8 context for a frame.
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
// Geometry notifications ----------------------------------------------
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 2e8653654686f4fc775288f059ff27daa38e02d5..b0e061525f442952e5f8a90fed7002830dbb4bc3 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -108,11 +108,12 @@ void LocalWindowProxy::DisposeContext(Lifecycle next_status,
|
||||
|
||||
ScriptState::Scope scope(script_state_);
|
||||
v8::Local<v8::Context> context = script_state_->GetContext();
|
||||
+ CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
|
||||
// The embedder could run arbitrary code in response to the
|
||||
// willReleaseScriptContext callback, so all disposing should happen after
|
||||
// it returns.
|
||||
- GetFrame()->Client()->WillReleaseScriptContext(context, world_->GetWorldId());
|
||||
- CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
|
||||
+ GetFrame()->Client()->WillReleaseScriptContext(
|
||||
+ GetIsolate(), context, world_->GetWorldId());
|
||||
MainThreadDebugger::Instance(GetIsolate())
|
||||
->ContextWillBeDestroyed(script_state_);
|
||||
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 8d73ddb12013ce195026b9f63050cf33f0bfb0fd..078f0e67e8de6a05178e8e2410f61784fe656dee 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -303,7 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
int32_t world_id) = 0;
|
||||
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 1aacf6f66b543a4ede6ab5d885143dd4a0821e8a..c695d942e295d9137a284e5536a10d49a055bbf4 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -303,10 +303,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
|
||||
}
|
||||
|
||||
void LocalFrameClientImpl::WillReleaseScriptContext(
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
if (web_frame_->Client()) {
|
||||
- web_frame_->Client()->WillReleaseScriptContext(context, world_id);
|
||||
+ web_frame_->Client()->WillReleaseScriptContext(isolate, context, world_id);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 16066fe34ee0335a0dabe00b6890e5844349c0b5..cc84479f65bdbe56cb4b38bfcef0d752bbe68d35 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -83,7 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
int32_t world_id) override;
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
|
||||
// Returns true if we should allow register V8 extensions to be added.
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index d8f3b11c98fd58baa9995762a29847b9fd760c84..5a9c9356a2098dfa9d28a5d30b19b492463216c8 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -422,7 +422,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
int32_t world_id) override {}
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
bool AllowScriptExtensions() override { return false; }
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
index eff817cda59a7b6e746813d5c42911d80547b5bd..217c4f76d62dd4910e89d4cb4cff4206fc84cfb1 100644
|
||||
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
@@ -180,6 +180,7 @@ void ServiceWorkerGlobalScopeProxy::WillEvaluateScript() {
|
||||
ScriptState::Scope scope(
|
||||
WorkerGlobalScope()->ScriptController()->GetScriptState());
|
||||
Client().WillEvaluateScript(
|
||||
+ WorkerGlobalScope()->ScriptController()->GetScriptState()->GetIsolate(),
|
||||
WorkerGlobalScope()->ScriptController()->GetContext());
|
||||
top_level_script_evaluation_start_time_ = base::TimeTicks::Now();
|
||||
}
|
||||
@@ -10,7 +10,7 @@ Subject: chore: "grandfather in" Electron Views and Delegates
|
||||
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
|
||||
|
||||
diff --git a/ui/views/view.h b/ui/views/view.h
|
||||
index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d275513b80e 100644
|
||||
index ee028fccef7dcc9c3522d09e503d2ac49ffd329a..a56c2f87ee21a2bba2cb65acd426cb192124fa85 100644
|
||||
--- a/ui/views/view.h
|
||||
+++ b/ui/views/view.h
|
||||
@@ -80,6 +80,19 @@ class ArcNotificationContentView;
|
||||
@@ -49,7 +49,7 @@ index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d27
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop class.
|
||||
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
|
||||
index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e075f4095 100644
|
||||
index ff9c5abfdb02d9798b1491e2bbc296f2c7c74398..47d8a897d58b0d3829734105e81b887684dd009b 100644
|
||||
--- a/ui/views/widget/widget_delegate.h
|
||||
+++ b/ui/views/widget/widget_delegate.h
|
||||
@@ -168,6 +168,12 @@ namespace crostini {
|
||||
@@ -73,7 +73,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `SetOwnedByWidget()`.
|
||||
@@ -465,6 +472,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
@@ -464,6 +471,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
};
|
||||
class RegisterDeleteCallbackPassKey {
|
||||
private:
|
||||
@@ -81,7 +81,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `RegisterDeleteDelegateCallback()`.
|
||||
@@ -922,6 +930,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
@@ -921,6 +929,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
View* GetContentsView() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -7,10 +7,10 @@ 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 f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d764a85205 100644
|
||||
index 5625973d8cb18de3c77fbf001e02fdf2827f60fb..5d50a77051a9d2d906ec547796469d980eb42a35 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -132,6 +132,7 @@ class KeyStorageLinux;
|
||||
@@ -133,6 +133,7 @@ class KeyStorageLinux;
|
||||
class NativeBackendKWallet;
|
||||
class NativeDesktopMediaList;
|
||||
class PartnerBookmarksReader;
|
||||
@@ -18,7 +18,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
class Profile;
|
||||
class ProfileImpl;
|
||||
class ScopedAllowBlockingForProfile;
|
||||
@@ -279,6 +280,9 @@ class BackendImpl;
|
||||
@@ -280,6 +281,9 @@ class BackendImpl;
|
||||
class InFlightIO;
|
||||
bool CleanupDirectorySync(const base::FilePath&);
|
||||
} // namespace disk_cache
|
||||
@@ -28,7 +28,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
namespace enterprise_connectors {
|
||||
class LinuxKeyRotationCommand;
|
||||
} // namespace enterprise_connectors
|
||||
@@ -572,6 +576,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -574,6 +578,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class ::DesktopNotificationBalloon;
|
||||
friend class ::FirefoxProfileLock;
|
||||
friend class ::GaiaConfig;
|
||||
@@ -36,7 +36,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -613,6 +618,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class cronet::CronetPrefsManager;
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
|
||||
@@ -34,10 +34,10 @@ index 2dc44d4787d5198cff7be2cf98ad5acf2d3a9a0b..27a0335aac2bd4239616cf71f5d015c9
|
||||
|
||||
class ScrollEvent;
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 896721c02c1cf0dac03d98b152af210e6382ccee..f84b915edfd76df977aaa4fc7f0c1ae694726784 100644
|
||||
index 7dd0e38866576389d59aecdd5a9ecc712996a597..4c626e026e5b19db737533607957d0ff2fbeae28 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
|
||||
@@ -1358,6 +1358,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
@@ -1367,6 +1367,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
return background_paint_brush_;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ index dcda976f4c3cc0ba6bcf015d5bf7435df009ae30..13cfa18bf406f244ec361a1230ccce44
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1fa92aa8d 100644
|
||||
index 76893d462786eaff21838614a8251b97bec92a79..72474adfb09f85118b4f752a22d121ab2b4c588a 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3239,15 +3239,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -114,7 +114,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
|
||||
}
|
||||
} else if (message == WM_NCLBUTTONDOWN &&
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index 2aa7ca1f713da54d12c7ac78103a260a4744d040..7449d7642022145fc1be76b299fa1db2d724122b 100644
|
||||
index 15e8cde9508170addec55290c859c91224bb2c33..a34948b9a42f030c71e453f1c534215fc2e671fa 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
|
||||
@@ -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 2482c7544c44204073d629389ba02cce0d665529..d60ab39f3adfa225b7b4cd413c707fd05b88f924 100644
|
||||
index 2fd9e3ce15869b284ff8716c02ce8dc6392b2a7b..7bda1bd1d7c34e369c27e4ec283888fe4d50458d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5287,7 +5287,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5269,7 +5269,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,10 +14,10 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index 8221d7b96395b06ee177be302dd476c83f569eaf..4c4500421f9cd164ab49b85457e6e37e0b4a703c 100644
|
||||
index 354a5870ef5b07a5903a1b40fcbb00462bf4a64b..bf3af2152ff7ca54412442b275ec7eedd60110ba 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -226,7 +226,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
@@ -225,7 +225,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
BrowserContext* browser_context,
|
||||
const StoragePartitionConfig& partition_config) {
|
||||
DCHECK(browser_context);
|
||||
|
||||
@@ -27,12 +27,12 @@ index c390a83277f564f1a67a7dcffa36b9d77a35bc0b..b13273a4b194ad5e8ca2d1639ebca831
|
||||
// When the enterprise policy is not set, use finch/feature flag choice.
|
||||
return base::FeatureList::IsEnabled(
|
||||
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
index 56eeddf89e225119a5a50b05562f1de93ed698f7..dbb9c96117816121665288a50216b1dc4ca35494 100644
|
||||
index 32e9d7e81ee8008b7e8fd491ec16afc01b5ff35e..51213f193cc5977f9f30dd39548eaf012a4857fa 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -252,10 +252,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
|
||||
@@ -234,10 +234,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
|
||||
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||
bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) {
|
||||
+# if 0
|
||||
PrefService* prefs =
|
||||
@@ -42,7 +42,7 @@ index 56eeddf89e225119a5a50b05562f1de93ed698f7..dbb9c96117816121665288a50216b1dc
|
||||
+#endif
|
||||
+ return true;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
|
||||
#endif // BUILDFLAG(ENABLE_PDF_INK2)
|
||||
|
||||
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
|
||||
index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd60960228 100644
|
||||
|
||||
@@ -80,20 +80,20 @@ index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d9
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index a1d4f57fe0d8cc69471c57bcdf17bee7b2d8aecc..a2387a6fdfbddceea8c21b449197a11215c423e9 100644
|
||||
index 00cea7307c68c3d8ae93f5ed6df33cef9065fe7b..c2a3892b0ade29d59b06753fdc84f44dc0890f39 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2371,8 +2371,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
@@ -2359,7 +2359,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
- const std::string& frame_name,
|
||||
const std::string& frame_name,
|
||||
- const GURL& target_url) {
|
||||
+ const GURL& target_url,
|
||||
+ const content::mojom::CreateNewWindowParams& params) {
|
||||
if (IsActorOperatingOnWebContents(
|
||||
if (actor::IsActorOperatingOnWebContents(
|
||||
profile(), content::WebContents::FromRenderFrameHost(opener))) {
|
||||
// If an ExecutionEngine is acting on the opener, prevent it from creating
|
||||
@@ -2384,7 +2383,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2371,7 +2372,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
return (window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
@@ -103,10 +103,10 @@ index a1d4f57fe0d8cc69471c57bcdf17bee7b2d8aecc..a2387a6fdfbddceea8c21b449197a112
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index e7c724f352f226de2e3bdba58fea2fd6d7a163f0..5436886c68f329081ccd9a6a54501de29728e1f1 100644
|
||||
index 636b265a6813b01a44930ae73655523b739cafd2..23dad43a14673966af3002263b03bb0cfb91e8f6 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -947,8 +947,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -946,8 +946,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -159,10 +159,10 @@ index 08b9f7ad8544011ee1cbb9bc9857ea06e2fa2c0b..69f666bdc05662bc40e133022b5364cb
|
||||
}
|
||||
content::WebContents* CreateCustomWebContents(
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db1951cccbb95 100644
|
||||
index a560d65e113ba4fad4c56d9a2a19df1772079d07..4f621733276141248169b7f5ecc5b6f09140f774 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -202,14 +202,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -204,14 +204,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -180,7 +180,7 @@ index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db195
|
||||
java_gurl);
|
||||
}
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
index 13afd2de87888e927d8baf77f4c3de65179c52f5..06de4a27e625745947d2c119fa8f5eb555d99a1d 100644
|
||||
index a13f342976cb57b091ebfc95538f9ef91bb9e6fa..40506e913c0506e38cd141a46468a7669d6c2093 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -84,8 +84,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -222,10 +222,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 860b5f5eca90b9345073fbee2db016cc6c56154e..64f7b20657c9e004083ecb32544d0dcd1a443343 100644
|
||||
index 4e2e910c62534106209758a0e5aeb329cfbaa529..b7967a4ab1c9d2c7b2a49a610af10190bcd6e0f0 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5250,8 +5250,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5232,8 +5232,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
if (delegate_ &&
|
||||
delegate_->IsWebContentsCreationOverridden(
|
||||
opener, source_site_instance, params.window_container_type,
|
||||
@@ -236,10 +236,10 @@ index 860b5f5eca90b9345073fbee2db016cc6c56154e..64f7b20657c9e004083ecb32544d0dcd
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d42b36b11 100644
|
||||
index 80d004eb9060e33af9e60b31a862a7dcecb254e8..ea179bdf3e702fb1d5be55affe3958f77901cd08 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -155,8 +155,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -250,10 +250,10 @@ index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d..d0842904102fee982bc8502478a0a9067bb77904 100644
|
||||
index 6a43f8c30857bfb32867e63d570ad26459af9ae8..97def739ec2418286b76c0039c61b501293c8f5d 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -364,8 +364,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -361,8 +361,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -356,10 +356,10 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
index 570cfeb6c74f04d4748648b86661ccf603c71452..da8b64d70e5b26431a576cc52316210fce36f99a 100644
|
||||
index fdc6afbf9048fa254d6f361b36765cf95d5eb521..16d297a3f6bde6bc4c038b79a057700aec68b689 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
@@ -582,8 +582,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -584,8 +584,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -398,7 +398,7 @@ index 1d95f5b521d7ab586fcecda6d6f822b432480367..b534327a8bd5b2c31522339b30caf123
|
||||
->options()
|
||||
->block_new_web_contents();
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
||||
index 42e0654da5659ba647529c4b0b97ec5df61d59a1..406e2ca73c182005014b56824e89ddfb25fd28f5 100644
|
||||
index 3a6d0c589ee634b68e929c17ee912a6b1c19b4f6..b13d80623d1fd0d0798cec33cb92f73ed5947ffa 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
|
||||
@@ -8,167 +8,154 @@ Restores part of https://chromium-review.googlesource.com/c/chromium/src/+/67991
|
||||
Patch can be removed once cppgc migration is complete
|
||||
https://github.com/electron/electron/issues/47922
|
||||
|
||||
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
|
||||
index 5a31687bbd0fca61db3a7c41ed73d938340d6446..b84f5fd336bc4b61b2cd0b2fc92382b00e928701 100644
|
||||
--- a/gin/object_template_builder.cc
|
||||
+++ b/gin/object_template_builder.cc
|
||||
@@ -141,7 +141,7 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
: "Objects of this type cannot be created using the "
|
||||
"constructor"))),
|
||||
template_(constructor_template_->InstanceTemplate()) {
|
||||
- template_->SetInternalFieldCount(0);
|
||||
+ template_->SetInternalFieldCount(kNumberOfInternalFields);
|
||||
diff --git a/gin/function_template.h b/gin/function_template.h
|
||||
index 84ab9585240a49048774811718f7ebd6f988e485..f062163cdd81def12fae7e507d18a9133dd0804d 100644
|
||||
--- a/gin/function_template.h
|
||||
+++ b/gin/function_template.h
|
||||
@@ -77,6 +77,7 @@ class GIN_EXPORT CallbackHolderBase {
|
||||
CallbackHolderBase* holder);
|
||||
~DisposeObserver() override;
|
||||
void OnBeforeDispose(v8::Isolate* isolate) override;
|
||||
+ void OnBeforeMicrotasksRunnerDispose(v8::Isolate* isolate) override {}
|
||||
void OnDisposed() override;
|
||||
|
||||
private:
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 083d59f78c542f4900e1b210a0935276516b894b..e32658e386853e2142c325a60ec385635256b758 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -225,6 +225,7 @@ void IsolateHolder::WillCreateMicrotasksRunner() {
|
||||
|
||||
void IsolateHolder::WillDestroyMicrotasksRunner() {
|
||||
DCHECK(g_initialized_microtasks_runner);
|
||||
+ isolate_data_->NotifyBeforeMicrotasksRunnerDispose();
|
||||
g_destroyed_microtasks_runner = true;
|
||||
}
|
||||
|
||||
ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
|
||||
index 884990426f13a6abca22a60dd8cc0685f8435b23..64ac0a64a05105532f3cda898aeac68c21338e60 100644
|
||||
index 9670f9f904c6c864e82409617ac4c7698c6fc3ef..d1014af4b63da244820ff865a8e824ddf68433a9 100644
|
||||
--- a/gin/per_isolate_data.cc
|
||||
+++ b/gin/per_isolate_data.cc
|
||||
@@ -68,12 +68,32 @@ PerIsolateData* PerIsolateData::From(Isolate* isolate) {
|
||||
return static_cast<PerIsolateData*>(isolate->GetData(kEmbedderNativeGin));
|
||||
}
|
||||
|
||||
+void PerIsolateData::DeprecatedSetObjectTemplate(DeprecatedWrapperInfo* info,
|
||||
+ Local<ObjectTemplate> templ) {
|
||||
+ deprecated_object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::SetObjectTemplate(
|
||||
const WrapperInfo* info,
|
||||
Local<ObjectTemplate> templ) {
|
||||
@@ -79,8 +79,13 @@ void PerIsolateData::SetObjectTemplate(
|
||||
object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
|
||||
}
|
||||
|
||||
+void PerIsolateData::SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
+ Local<FunctionTemplate> templ) {
|
||||
+ function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
-void PerIsolateData::SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
- Local<FunctionTemplate> templ) {
|
||||
+void PerIsolateData::DeprecatedSetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info, Local<FunctionTemplate> templ) {
|
||||
+ deprecated_function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
+}
|
||||
+
|
||||
+v8::Local<v8::ObjectTemplate> PerIsolateData::DeprecatedGetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info) {
|
||||
+ DeprecatedObjectTemplateMap::iterator it =
|
||||
+ deprecated_object_templates_.find(info);
|
||||
+ if (it == deprecated_object_templates_.end()) {
|
||||
+ return v8::Local<v8::ObjectTemplate>();
|
||||
+ }
|
||||
+ return it->second.Get(isolate_);
|
||||
+}
|
||||
+
|
||||
v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
const WrapperInfo* info) {
|
||||
ObjectTemplateMap::iterator it = object_templates_.find(info);
|
||||
@@ -83,6 +103,15 @@ v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
+void PerIsolateData::SetFunctionTemplate(
|
||||
+ const WrapperInfo* info, Local<FunctionTemplate> templ) {
|
||||
function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
}
|
||||
|
||||
@@ -103,11 +108,22 @@ v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
return it->second.Get(isolate_);
|
||||
}
|
||||
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info) {
|
||||
+ FunctionTemplateMap::iterator it = function_templates_.find(info);
|
||||
+ if (it == function_templates_.end()) {
|
||||
-v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::DeprecatedGetFunctionTemplate(
|
||||
DeprecatedWrapperInfo* info) {
|
||||
+ DeprecatedFunctionTemplateMap::iterator it =
|
||||
+ deprecated_function_templates_.find(info);
|
||||
+ if (it == deprecated_function_templates_.end()) {
|
||||
+ return v8::Local<v8::FunctionTemplate>();
|
||||
+ }
|
||||
+ return it->second.Get(isolate_);
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::AddDisposeObserver(DisposeObserver* observer) {
|
||||
dispose_observers_.AddObserver(observer);
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+ const WrapperInfo* info) {
|
||||
FunctionTemplateMap::iterator it = function_templates_.find(info);
|
||||
- if (it == function_templates_.end())
|
||||
+ if (it == function_templates_.end()) {
|
||||
return v8::Local<v8::FunctionTemplate>();
|
||||
+ }
|
||||
return it->second.Get(isolate_);
|
||||
}
|
||||
|
||||
@@ -125,6 +141,12 @@ void PerIsolateData::NotifyBeforeDispose() {
|
||||
}
|
||||
}
|
||||
|
||||
+void PerIsolateData::NotifyBeforeMicrotasksRunnerDispose() {
|
||||
+ for (auto& observer : dispose_observers_) {
|
||||
+ observer.OnBeforeMicrotasksRunnerDispose(isolate_.get());
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::NotifyDisposed() {
|
||||
for (auto& observer : dispose_observers_) {
|
||||
observer.OnDisposed();
|
||||
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
|
||||
index bce889749415da341e6e6e4082ac06bbeb4bb80a..d748c1cf8cef7da90686686f1b8072bcd530541d 100644
|
||||
index 82048c08a14d05e1f9bd6ad6cc16d16f0905f879..e38b0ca134e71a968805a547c1eccbc0cd6f6dda 100644
|
||||
--- a/gin/per_isolate_data.h
|
||||
+++ b/gin/per_isolate_data.h
|
||||
@@ -51,11 +51,24 @@ class GIN_EXPORT PerIsolateData {
|
||||
|
||||
static PerIsolateData* From(v8::Isolate* isolate);
|
||||
|
||||
+ void DeprecatedSetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::ObjectTemplate> object_template);
|
||||
@@ -34,6 +34,10 @@ class GIN_EXPORT PerIsolateData {
|
||||
// be entered before the observer is notified, but there will not be a
|
||||
// handle scope by default.
|
||||
virtual void OnBeforeDispose(v8::Isolate* isolate) = 0;
|
||||
+
|
||||
+ // Called just before the microtasks runner is about to be disposed.
|
||||
+ virtual void OnBeforeMicrotasksRunnerDispose(v8::Isolate* isolate) = 0;
|
||||
+
|
||||
// Called just after the isolate has been disposed.
|
||||
virtual void OnDisposed() = 0;
|
||||
};
|
||||
@@ -61,24 +65,29 @@ class GIN_EXPORT PerIsolateData {
|
||||
void SetObjectTemplate(const WrapperInfo* info,
|
||||
v8::Local<v8::ObjectTemplate> object_template);
|
||||
|
||||
+ void SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
+
|
||||
+ v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info);
|
||||
- void SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
- v8::Local<v8::FunctionTemplate> function_template);
|
||||
+ void DeprecatedSetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
+
|
||||
+ void SetFunctionTemplate(
|
||||
+ const WrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
|
||||
- // These are low-level functions for retrieving object or function templates
|
||||
- // stored in this object. Because these templates are often created lazily,
|
||||
- // most clients should call higher-level functions that know how to populate
|
||||
- // these templates if they haven't already been created.
|
||||
v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
|
||||
DeprecatedWrapperInfo* info);
|
||||
|
||||
v8::Local<v8::ObjectTemplate> GetObjectTemplate(const WrapperInfo* info);
|
||||
|
||||
- v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
|
||||
+ v8::Local<v8::FunctionTemplate> DeprecatedGetFunctionTemplate(
|
||||
DeprecatedWrapperInfo* info);
|
||||
|
||||
+ v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info);
|
||||
+ const WrapperInfo* info);
|
||||
+
|
||||
void AddDisposeObserver(DisposeObserver* observer);
|
||||
void RemoveDisposeObserver(DisposeObserver* observer);
|
||||
void NotifyBeforeDispose();
|
||||
@@ -74,14 +87,20 @@ class GIN_EXPORT PerIsolateData {
|
||||
}
|
||||
+ void NotifyBeforeMicrotasksRunnerDispose();
|
||||
void NotifyDisposed();
|
||||
|
||||
private:
|
||||
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
|
||||
+ DeprecatedObjectTemplateMap;
|
||||
void EnableIdleTasks(std::unique_ptr<V8IdleTaskRunner> idle_task_runner);
|
||||
@@ -99,6 +108,8 @@ class GIN_EXPORT PerIsolateData {
|
||||
typedef std::map<const WrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
|
||||
ObjectTemplateMap;
|
||||
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
+ FunctionTemplateMap;
|
||||
typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
+ DeprecatedFunctionTemplateMap;
|
||||
+ typedef std::map<const WrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
FunctionTemplateMap;
|
||||
|
||||
// PerIsolateData doesn't actually own |isolate_|. Instead, the isolate is
|
||||
// owned by the IsolateHolder, which also owns the PerIsolateData.
|
||||
raw_ptr<v8::Isolate, AcrossTasksDanglingUntriaged> isolate_;
|
||||
@@ -107,6 +118,7 @@ class GIN_EXPORT PerIsolateData {
|
||||
raw_ptr<v8::ArrayBuffer::Allocator, DanglingUntriaged> allocator_;
|
||||
+ DeprecatedObjectTemplateMap deprecated_object_templates_;
|
||||
DeprecatedObjectTemplateMap deprecated_object_templates_;
|
||||
ObjectTemplateMap object_templates_;
|
||||
+ FunctionTemplateMap function_templates_;
|
||||
+ DeprecatedFunctionTemplateMap deprecated_function_templates_;
|
||||
FunctionTemplateMap function_templates_;
|
||||
base::ObserverList<DisposeObserver> dispose_observers_;
|
||||
std::shared_ptr<V8ForegroundTaskRunnerBase> task_runner_;
|
||||
std::shared_ptr<V8ForegroundTaskRunnerBase> user_visible_task_runner_;
|
||||
diff --git a/gin/public/wrapper_info.h b/gin/public/wrapper_info.h
|
||||
index 34b5f1c30c05152122f23708a1df62f00296fcd6..dac3459dc822db1b242288293605ab4c4a6cf76f 100644
|
||||
--- a/gin/public/wrapper_info.h
|
||||
+++ b/gin/public/wrapper_info.h
|
||||
@@ -13,6 +13,17 @@
|
||||
|
||||
namespace gin {
|
||||
|
||||
+enum InternalFields {
|
||||
+ kWrapperInfoIndex,
|
||||
+ kEncodedValueIndex,
|
||||
+ kNumberOfInternalFields,
|
||||
+};
|
||||
+
|
||||
+struct GIN_EXPORT DeprecatedWrapperInfo {
|
||||
+ static DeprecatedWrapperInfo* From(v8::Local<v8::Object> object);
|
||||
+ const GinEmbedder embedder;
|
||||
+};
|
||||
+
|
||||
struct GIN_EXPORT WrapperInfo : v8::Object::WrapperTypeInfo {
|
||||
const WrappablePointerTag pointer_tag;
|
||||
};
|
||||
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
|
||||
index 803b5648e1c3ec3621149e98850bebfbf7f2de75..dd49202103993ee03379acd6873b92bc8fccb786 100644
|
||||
--- a/gin/wrappable.cc
|
||||
+++ b/gin/wrappable.cc
|
||||
@@ -48,7 +48,7 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
|
||||
CHECK(!templ.IsEmpty());
|
||||
data->SetObjectTemplate(info, templ);
|
||||
}
|
||||
- CHECK_EQ(0, templ->InternalFieldCount());
|
||||
+ CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
|
||||
v8::Local<v8::Object> wrapper;
|
||||
// |wrapper| may be empty in some extreme cases, e.g., when
|
||||
// Object.prototype.constructor is overwritten.
|
||||
@@ -56,6 +56,12 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
|
||||
return {};
|
||||
}
|
||||
|
||||
+ // Delete the internal fields once gin_helper::DeprecatedWrappable does
|
||||
+ // not exist anymore.
|
||||
+ int indices[] = {kWrapperInfoIndex, kEncodedValueIndex};
|
||||
+ void* values[] = {nullptr, nullptr};
|
||||
+ wrapper->SetAlignedPointerInInternalFields(2, indices, values);
|
||||
+
|
||||
AssociateWithWrapper(isolate, wrapper);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -94,10 +94,10 @@ index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c0
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index f3853a7b412d2a86dfd915441d0dffd4199d5c41..1abeb30142251c7abea1b33f7921f79d85532475 100644
|
||||
index 95d0cac02240f0a64a129cb101a53a3bb86fc914..47144ad8adb01ae611f40570e46fc97a7c93e1d5 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -651,8 +651,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -654,8 +654,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -107,7 +107,7 @@ index f3853a7b412d2a86dfd915441d0dffd4199d5c41..1abeb30142251c7abea1b33f7921f79d
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -661,10 +660,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -664,10 +663,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
|
||||
|
||||
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1fac42e9e 100644
|
||||
index 25c9e17bd063cc07fd2727474395a9276c4a000d..413f3019bd55388e8ebc8fe39af766b7c61e9924 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1956,6 +1956,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1957,6 +1957,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1975,9 +1995,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1976,9 +1996,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme_piece() == kChromeUIScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
@@ -49,7 +49,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -1985,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1986,9 +2004,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
@@ -82,10 +82,10 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b9980dd37184 100644
|
||||
index 4383a2dd4a132e3012c206404399d73ac2d40ad4..912921c2b448e2badac50e8a7ed527aeb8f433a9 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
|
||||
@@ -214,9 +214,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
|
||||
}
|
||||
}
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
@@ -99,7 +99,7 @@ index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b998
|
||||
#endif
|
||||
|
||||
return window_id;
|
||||
@@ -321,7 +325,7 @@ class NativeDesktopMediaList::Worker
|
||||
@@ -319,7 +323,7 @@ class NativeDesktopMediaList::Worker
|
||||
base::WeakPtr<NativeDesktopMediaList> media_list_;
|
||||
|
||||
DesktopMediaID::Type source_type_;
|
||||
@@ -108,7 +108,7 @@ index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b998
|
||||
const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
|
||||
const bool add_current_process_windows_;
|
||||
const bool auto_show_delegated_source_list_;
|
||||
@@ -603,6 +607,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
@@ -601,6 +605,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
FROM_HERE,
|
||||
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
||||
media_list_));
|
||||
@@ -121,7 +121,7 @@ index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b998
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
@@ -1010,6 +1020,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -1008,6 +1018,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 59c8d5a2e687ac6148889c87f353b33959e276f6..7ef10194f02e32a9ec137f7f2519c4a834b81b7a 100644
|
||||
index 57103054e874017bf9926dcdf71786c679f9aac0..571f4cfd4882f048268ebadf00d05ad3c034fedc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -561,7 +561,11 @@
|
||||
@@ -558,7 +558,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
||||
@@ -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 c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6a6114453 100644
|
||||
index 817b5da3f10faf0770274f3e03a3a0cd3400f135..27131371845a81c0af16d59334a98656095f4aeb 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -847,6 +847,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -21,10 +21,10 @@ index c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6
|
||||
// Prompts should remain open and functional across tab switches.
|
||||
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index f07055487abd76b2a72ba555ff1b5bcd996bbd3a..7d46db80c667900576cf46264034890203020a75 100644
|
||||
index 43c840283b1f7ac39c2ecec5741cc206c64a064e..c8b2a66eccc2ca0b2be1f338f6c77b906db69faa 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1026,6 +1026,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -1029,6 +1029,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// cpu-priority boosted to run discard logic.
|
||||
void SetIsDiscarding(bool is_discarding);
|
||||
|
||||
@@ -35,10 +35,10 @@ index f07055487abd76b2a72ba555ff1b5bcd996bbd3a..7d46db80c667900576cf462640348902
|
||||
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index f4c657fe36eba54948cacf9770d9c6c1b55b5fe5..b14f5bc3f023c512a066ce9ec9f681c96b1fafc4 100644
|
||||
index 1ae2c9328679f12cfe7068c6ea0f1589314bc6f0..e98d74fecf4275ef8e7c6d23e5ea5ec3af80b926 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -644,7 +644,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
CHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
|
||||
@@ -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 671960fb876b656abc572664cd1f28492c799123..896721c02c1cf0dac03d98b152af210e6382ccee 100644
|
||||
index 5d0c67f54a321ecb945b04f4981e93ea1e4c8d84..7dd0e38866576389d59aecdd5a9ecc712996a597 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
|
||||
@@ -610,7 +610,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -619,7 +619,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(
|
||||
const gfx::SizeF& aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
@@ -19,7 +19,7 @@ index 671960fb876b656abc572664cd1f28492c799123..896721c02c1cf0dac03d98b152af210e
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index df17e97666de639f05b92a79ee7fbd4a3da6c64f..f404c718e0242ec9269e7d14eb236aa928fb5d58 100644
|
||||
index 7f4aac3aed53b53d8b8d6bc9b5c507e63906060d..aa5b34fa3fdef76b9bb7afd26ecaeda785e25824 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1050,8 +1050,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
@@ -33,11 +33,11 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index d3982d4608c76dcc583ab26914d0f17435f1532f..a1ed237de6315df0534c6e462f3d63bd311dd5a2 100644
|
||||
index 3998bb0849cd5bec52c6148ccf1e1a30511b32fb..5b588c510e1e4d551aaf1a0eef2ec7500fcc326c 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1872,6 +1872,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
@@ -1892,6 +1892,13 @@ void NetworkContext::EnableDurableMessageCollector(
|
||||
it->second->AddReceiver(std::move(receiver));
|
||||
}
|
||||
|
||||
+void NetworkContext::SetUserAgent(const std::string& new_user_agent) {
|
||||
@@ -51,24 +51,24 @@ index d3982d4608c76dcc583ab26914d0f17435f1532f..a1ed237de6315df0534c6e462f3d63bd
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index b9f201ccf04433a29083cd15cfe599fe9600c9c0..137aaf96a8d02b81afe64fde6b19ed1153569941 100644
|
||||
index f7831633a286f7c4aec2dd269b02561275b008c7..799688c0fc662845b1ff75ff472ee667674ab74e 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -326,6 +326,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -333,6 +333,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
const base::UnguessableToken& throttling_profile_id,
|
||||
mojo::PendingReceiver<network::mojom::DurableMessageCollector> receiver)
|
||||
override;
|
||||
+ void SetUserAgent(const std::string& new_user_agent) override;
|
||||
void SetAcceptLanguage(const std::string& new_accept_language) override;
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd4002d0bd0b 100644
|
||||
index 6885ff48db5ddfb8e8ec09e91a4c01231261f8e5..4d674a226ff1ccb0c8288177ce6d55f77d4f8116 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1288,6 +1288,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
@@ -1317,6 +1317,9 @@ interface NetworkContext {
|
||||
mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
pending_receiver<DurableMessageCollector> receiver);
|
||||
|
||||
+ // Updates the user agent to be used for requests.
|
||||
+ SetUserAgent(string new_user_agent);
|
||||
@@ -77,10 +77,10 @@ index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd40
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index 70a5ab342a8954354a3d8245d30df9520cfd398d..02700030ab651b6f8f0aecfe6857ca40e6f3839f 100644
|
||||
index cfd21ce01b7db6a4912de8e4ce0799825fd27e77..def5a1f569d480e95053ca54e117eeae64f28057 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -159,6 +159,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
||||
@@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 6ba55d345d4b18c9c76e26a8a1eb3835dd692581..a2eea9184ebab62c057c0c6e370f03f3b0460859 100644
|
||||
index be43ac07eb6563dcb72374dfc4f3bd34913e98c3..099297e6fac7962eb731ba50cb51b868fa7070ac 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -1886,6 +1886,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1900,6 +1900,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -13,11 +13,11 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 3f8801c6042ef2b20635838e4d4c572d89b94601..055b15ff72844cd54c60cc92042a5465ce2870ad 100644
|
||||
index e761050d9afbbc6d1c25dd8ec6a2a90d548c1195..fc28431861f2499095ecedfd1ffb8c4d43545ea4 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -210,6 +210,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
NativeTheme::~NativeTheme() = default;
|
||||
@@ -240,6 +240,8 @@ void NativeTheme::PaintMenuItemBackground(
|
||||
}
|
||||
|
||||
bool NativeTheme::ShouldUseDarkColors() const {
|
||||
+ if (theme_source() == ThemeSource::kForcedLight) return false;
|
||||
@@ -26,10 +26,10 @@ index 3f8801c6042ef2b20635838e4d4c572d89b94601..055b15ff72844cd54c60cc92042a5465
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a2680fabc45d 100644
|
||||
index cbe76bbc68692228072fa69a8562c290e571505e..a9fd486a77b7edcba63ee889d583dc4e99f008f4 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -458,6 +458,23 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
@@ -460,6 +460,23 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
|
||||
bool use_custom_frame = true) const;
|
||||
|
||||
@@ -53,7 +53,7 @@ index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a268
|
||||
// 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 COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
@@ -701,6 +718,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 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a268
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 0c6d689295a03fc088b57487037d85f4d634a5f4..8e3bab233e8611c68e79d53f125560f4fb086a1e 100644
|
||||
index 0ca923fb1b402ce7a5b112600b86e79b02d96168..5362243aa69bf1a64f860c5757d15298101cde74 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -697,6 +697,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -678,6 +678,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ remove this patch once gin::Wrappable can be managed by V8 Oilpan
|
||||
via https://github.com/electron/electron/issues/47922
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001dec5b08ff 100644
|
||||
index 656267caef2d515f8c3f77535b308108a0b30be1..083d59f78c542f4900e1b210a0935276516b894b 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -35,6 +35,8 @@ v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;
|
||||
@@ -28,7 +28,7 @@ index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001d
|
||||
|
||||
std::unique_ptr<v8::Isolate::CreateParams> getModifiedIsolateParams(
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
@@ -203,10 +205,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
@@ -204,10 +206,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ which removed range-requests-supported on non-http protocols. See https://issues
|
||||
for more information.
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
index 14eeb24b27ae9c3798fac7cfbb2ef53b85250dbe..dfcb69a1bf75af5e315e02702109b958fa8edfcf 100644
|
||||
index 23d5e86aad9509159c74fef32419e26ca68b2e4c..767e6b7e4c85f9f2fafac282c4ebc6ba80e52528 100644
|
||||
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
@@ -11,8 +11,10 @@
|
||||
@@ -104,7 +104,7 @@ index 8c92f1c0c5028069cdad967b5be2bccf8005ed43..8b49dc182296f7f277981aed29b58947
|
||||
using InitializeCB = base::OnceCallback<void(bool)>;
|
||||
void Initialize(InitializeCB init_cb) override;
|
||||
diff --git a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
index 1fdc54c1de28ef0c32fc9a386097d95b48aedcaa..5822251daaa9fa5a49ace1bdad684e0076c225dc 100644
|
||||
index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9ab700a03 100644
|
||||
--- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -123,7 +123,7 @@ index 1fdc54c1de28ef0c32fc9a386097d95b48aedcaa..5822251daaa9fa5a49ace1bdad684e00
|
||||
#include "third_party/blink/renderer/platform/media/resource_fetch_context.h"
|
||||
#include "third_party/blink/renderer/platform/media/url_index.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
|
||||
@@ -313,6 +315,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
@@ -314,6 +316,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
do_fail = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation
|
||||
IsValid is not exposed despite being commented as for embedders, this exposes something that works for us.
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 1abeb30142251c7abea1b33f7921f79d85532475..758022b4ca4c5cb69ff3df0399194dfca5c1b432 100644
|
||||
index 47144ad8adb01ae611f40570e46fc97a7c93e1d5..d4f00ffe8fa1b0f7831430de1b48d0b2dd714499 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {
|
||||
|
||||
@@ -259,7 +259,7 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58
|
||||
+
|
||||
} // namespace content
|
||||
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e74b348406 100644
|
||||
index 404ff1e48a990570dc411a714e570d4f8e1a9ef1..916c5d350cfabae0bfd3da97d6a058f2fb93530d 100644
|
||||
--- a/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -284,7 +284,7 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
|
||||
+bool ProcessLockURLIsCodeCacheScheme(const ProcessLock& process_lock) {
|
||||
+ return base::Contains(url::GetCodeCacheSchemes(),
|
||||
+ process_lock.lock_url().scheme());
|
||||
+ process_lock.GetProcessLockURL().scheme());
|
||||
+}
|
||||
+
|
||||
bool CheckSecurityForAccessingCodeCacheData(
|
||||
@@ -303,17 +303,9 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
// chrome-untrusted scripts, so any http(s) page attempting to store data
|
||||
// about a chrome or chrome-untrusted script would be an indication of
|
||||
// suspicious activity.
|
||||
- if (resource_url.SchemeIs(content::kChromeUIScheme) ||
|
||||
- resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
|
||||
- if (!process_lock.is_locked_to_site()) {
|
||||
- // We can't tell for certain whether this renderer is doing something
|
||||
- // malicious, but we don't trust it enough to store data.
|
||||
- return false;
|
||||
- }
|
||||
+ if (resource_url.SchemeIsHTTPOrHTTPS()) {
|
||||
if (process_lock.matches_scheme(url::kHttpScheme) ||
|
||||
process_lock.matches_scheme(url::kHttpsScheme)) {
|
||||
- if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
+ if (process_lock.MatchesScheme(url::kHttpScheme) ||
|
||||
+ process_lock.MatchesScheme(url::kHttpsScheme)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Pages in custom schemes like isolated-app: are allowed to load http(s)
|
||||
@@ -327,15 +319,22 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (resource_url.SchemeIs(kChromeUIScheme) ||
|
||||
+ resource_url.SchemeIs(kChromeUIUntrustedScheme)) {
|
||||
+ if (process_lock.matches_scheme(kChromeUIScheme) ||
|
||||
+ process_lock.matches_scheme(kChromeUIUntrustedScheme)) {
|
||||
if (resource_url.SchemeIs(content::kChromeUIScheme) ||
|
||||
resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
|
||||
- if (!process_lock.IsLockedToSite()) {
|
||||
- // We can't tell for certain whether this renderer is doing something
|
||||
- // malicious, but we don't trust it enough to store data.
|
||||
- return false;
|
||||
+ if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
+ process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
- if (process_lock.MatchesScheme(url::kHttpScheme) ||
|
||||
- process_lock.MatchesScheme(url::kHttpsScheme)) {
|
||||
- if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
+ if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
+ if (process_lock.matches_scheme(url::kHttpScheme) ||
|
||||
+ process_lock.matches_scheme(url::kHttpsScheme)) {
|
||||
+ if (process_lock.MatchesScheme(url::kHttpScheme) ||
|
||||
+ process_lock.MatchesScheme(url::kHttpsScheme)) {
|
||||
mojo::ReportBadMessage("HTTP(S) pages cannot cache WebUI code");
|
||||
}
|
||||
+ if (ProcessLockURLIsCodeCacheScheme(process_lock)) {
|
||||
@@ -348,15 +347,15 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
// Other schemes which might successfully load chrome or chrome-untrusted
|
||||
// scripts, such as the PDF viewer, are unsupported but not considered
|
||||
- // dangerous.
|
||||
- return process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme);
|
||||
- return process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme);
|
||||
+ // dangerous. Similarly, the process might not be locked to a site.
|
||||
+ return false;
|
||||
}
|
||||
- if (resource_url.SchemeIsHTTPOrHTTPS() ||
|
||||
- blink::CommonSchemeRegistry::IsExtensionScheme(resource_url.scheme())) {
|
||||
- if (process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme)) {
|
||||
- if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
|
||||
- // It is possible for WebUI pages to include open-web content, but such
|
||||
- // usage is rare and we've decided that reasoning about security is easier
|
||||
- // if the WebUI code cache includes only WebUI scripts.
|
||||
@@ -370,13 +369,13 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
|
||||
if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
@@ -433,6 +458,7 @@ std::optional<GURL> CodeCacheHostImpl::GetSecondaryKeyForCodeCache(
|
||||
process_lock.matches_scheme(url::kHttpsScheme) ||
|
||||
process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
process_lock.matches_scheme(content::kChromeUIUntrustedScheme) ||
|
||||
process_lock.MatchesScheme(url::kHttpsScheme) ||
|
||||
process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
process_lock.MatchesScheme(content::kChromeUIUntrustedScheme) ||
|
||||
+ ProcessLockURLIsCodeCacheScheme(process_lock) ||
|
||||
blink::CommonSchemeRegistry::IsExtensionScheme(
|
||||
process_lock.lock_url().scheme())) {
|
||||
return process_lock.lock_url();
|
||||
process_lock.GetProcessLockURL().scheme())) {
|
||||
return process_lock.GetProcessLockURL();
|
||||
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
|
||||
index 225e017909b8869231b870eaaf161a0b5e93e2a0..846a5251429630b8528a84a3d67ed56cb28df5a1 100644
|
||||
--- a/content/common/url_schemes.cc
|
||||
|
||||
@@ -10,11 +10,11 @@ Electron needs this constructor, namely for gin_helper::Constructible
|
||||
objects.
|
||||
|
||||
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
|
||||
index 9f9ae85ad432ce71f308d6c56265a96985f42766..5a31687bbd0fca61db3a7c41ed73d938340d6446 100644
|
||||
index a694f7dc4da4f1bba579ab8c032eea21d8459995..8aaaba327166b1d3b884fe390a389c0c50890af9 100644
|
||||
--- a/gin/object_template_builder.cc
|
||||
+++ b/gin/object_template_builder.cc
|
||||
@@ -144,6 +144,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
template_->SetInternalFieldCount(0);
|
||||
@@ -146,6 +146,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
template_->SetInternalFieldCount(kNumberOfInternalFields);
|
||||
}
|
||||
|
||||
+ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
@@ -28,10 +28,10 @@ index 9f9ae85ad432ce71f308d6c56265a96985f42766..5a31687bbd0fca61db3a7c41ed73d938
|
||||
const ObjectTemplateBuilder& other) = default;
|
||||
|
||||
diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h
|
||||
index cf4f1ae6598fdede655d33baccda254965566ea5..a4c16dc0ec3ff16413fc2a04225a2401989a084b 100644
|
||||
index 9d8f6e5de793ea419875d99a0b46898f2e40ead5..c803363b8050f4084c9250fce9b5b8b171082703 100644
|
||||
--- a/gin/object_template_builder.h
|
||||
+++ b/gin/object_template_builder.h
|
||||
@@ -48,6 +48,9 @@ class GIN_EXPORT ObjectTemplateBuilder {
|
||||
@@ -46,6 +46,9 @@ class GIN_EXPORT ObjectTemplateBuilder {
|
||||
public:
|
||||
explicit ObjectTemplateBuilder(v8::Isolate* isolate);
|
||||
ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name);
|
||||
|
||||
@@ -46,7 +46,7 @@ index e2771b7b281274cdcb601a5bc78a948ad592087b..48d116823a28213e50775f378e6ce04c
|
||||
// OnStop is called by StopAndDeAllocate.
|
||||
virtual void OnStop() = 0;
|
||||
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b4049610fd49da 100644
|
||||
index 86128a6555798e8380ffebd635e02329ccb96a12..7733e2d70b604efd41ce42638dd3472cba0b78ad 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -27,6 +27,61 @@
|
||||
@@ -134,7 +134,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
_errorCallback = errorCallback;
|
||||
}
|
||||
return self;
|
||||
@@ -211,29 +270,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
|
||||
@@ -210,29 +269,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
|
||||
|
||||
class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
|
||||
: public IOSurfaceCaptureDeviceBase,
|
||||
@@ -192,7 +192,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
|
||||
void OnShareableContentCreated(SCShareableContent* content) {
|
||||
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -301,7 +384,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -300,7 +383,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
// Update the content size. This step is neccessary when used together
|
||||
// with SCContentSharingPicker. If the Chrome picker is used, it will
|
||||
// change to retina resolution if applicable.
|
||||
@@ -310,6 +393,9 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -309,6 +392,9 @@ void CreateStream(SCContentFilter* filter) {
|
||||
filter.contentRect.size.height * filter.pointPixelScale);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
gfx::RectF dest_rect_in_frame;
|
||||
actual_capture_format_ = capture_params().requested_format;
|
||||
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
|
||||
@@ -323,6 +409,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
@@ -322,6 +408,7 @@ void CreateStream(SCContentFilter* filter) {
|
||||
stream_ = [[SCStream alloc] initWithFilter:filter
|
||||
configuration:config
|
||||
delegate:helper_];
|
||||
@@ -219,7 +219,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
{
|
||||
NSError* error = nil;
|
||||
bool add_stream_output_result =
|
||||
@@ -480,7 +567,7 @@ void OnStreamError() {
|
||||
@@ -479,7 +566,7 @@ void OnStreamError() {
|
||||
if (fullscreen_module_) {
|
||||
fullscreen_module_->Reset();
|
||||
}
|
||||
@@ -228,7 +228,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
} else {
|
||||
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
|
||||
FROM_HERE, "Stream delegate called didStopWithError");
|
||||
@@ -503,23 +590,41 @@ void OnUpdateConfigurationError() {
|
||||
@@ -502,23 +589,41 @@ void OnUpdateConfigurationError() {
|
||||
}
|
||||
|
||||
// IOSurfaceCaptureDeviceBase:
|
||||
@@ -285,7 +285,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
}
|
||||
void OnStop() override {
|
||||
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -577,8 +682,9 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -576,8 +681,9 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -296,7 +296,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
|
||||
|
||||
// The actual format of the video frames that are sent to `client`.
|
||||
@@ -594,6 +700,10 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -593,6 +699,10 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
// Helper class that acts as output and delegate for `stream_`.
|
||||
ScreenCaptureKitDeviceHelper* __strong helper_;
|
||||
|
||||
@@ -307,7 +307,7 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
// This is used to detect when a captured presentation enters fullscreen mode.
|
||||
// If this happens, the module will call the ResetStreamTo function.
|
||||
std::unique_ptr<ScreenCaptureKitFullscreenModule> fullscreen_module_;
|
||||
@@ -606,6 +716,8 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
@@ -605,6 +715,8 @@ void ResetStreamTo(SCWindow* window) override {
|
||||
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
|
||||
};
|
||||
|
||||
@@ -317,10 +317,10 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
|
||||
|
||||
// Although ScreenCaptureKit is available in 12.3 there were some bugs that
|
||||
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1a9626dca 100644
|
||||
index 7c8f4b60a9299114ac5e71ede6f602643326507a..203422ff6ab9cf98c3e76820e230321c3cafb5ef 100644
|
||||
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
@@ -321,8 +321,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
|
||||
@@ -322,8 +322,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1
|
||||
// For the other capturers, when a bug reports the type of capture it's
|
||||
// easy enough to determine which capturer was used, but it's a little
|
||||
// fuzzier with window capture.
|
||||
@@ -338,13 +346,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
|
||||
@@ -339,13 +347,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
|
||||
}
|
||||
#endif // defined(USE_AURA) || BUILDFLAG(IS_MAC)
|
||||
|
||||
@@ -369,10 +369,10 @@ index 294b5f79955ba72976f8ba127fd19556c81e322c..27553e51b281575c5cb7a4ba4dab06d1
|
||||
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
|
||||
// Assigns integer identifier to the |window| and returns its DesktopMediaID.
|
||||
diff --git a/media/capture/video_capture_types.h b/media/capture/video_capture_types.h
|
||||
index 53e8077c9c0b635df0abdeca43fa9a6373c68252..2805e36cc42190d8197d83f5df235094570e3d5d 100644
|
||||
index accd52db0cf7cb043d7d767b778079b5d1160cfb..357ee6111471405d1f860ea6d5000ac65f4ecb9a 100644
|
||||
--- a/media/capture/video_capture_types.h
|
||||
+++ b/media/capture/video_capture_types.h
|
||||
@@ -355,6 +355,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
|
||||
@@ -358,6 +358,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
|
||||
// Flag indicating whether HiDPI mode should be enabled for tab capture
|
||||
// sessions.
|
||||
bool is_high_dpi_enabled = true;
|
||||
|
||||
@@ -187,7 +187,7 @@ index d9c14f91747bde0e76056d7f2f2ada166e67f994..53be16879777a3b9bef58ead5f7e420c
|
||||
|
||||
UtilityProcessHost::Start(std::move(utility_options),
|
||||
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
|
||||
index 11846daf710f7cc272da17f14b8813fea93fe7e6..136fa55e7945f1d6abf5731c9cbaa92148f8117d 100644
|
||||
index ab48c8b88a7cf311205b221169308d96e95f239f..d714d2022f685052e1def3b0d242d2ea596d790b 100644
|
||||
--- a/content/browser/service_host/utility_process_host.cc
|
||||
+++ b/content/browser/service_host/utility_process_host.cc
|
||||
@@ -245,13 +245,13 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithFileToPreload(
|
||||
@@ -244,7 +244,7 @@ index 11846daf710f7cc272da17f14b8813fea93fe7e6..136fa55e7945f1d6abf5731c9cbaa921
|
||||
UtilityProcessHost::Options&
|
||||
UtilityProcessHost::Options::WithBoundReceiverOnChildProcessForTesting(
|
||||
mojo::GenericPendingReceiver receiver) {
|
||||
@@ -524,9 +554,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -525,9 +555,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -707,10 +707,10 @@ index c5fee4ad8b246bc1113a383794c6101bade24df3..61f0a0f62795b30105c42da363205284
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Whether or not to disclaim TCC responsibility for the process, defaults to
|
||||
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
|
||||
index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7efc175eb 100644
|
||||
index 7f67a828fc76765fa88c1be4d5eed08637c1bae3..b16b7e56efedeb1c10b0b33a569ad2e02505ebf3 100644
|
||||
--- a/sandbox/policy/win/sandbox_win.cc
|
||||
+++ b/sandbox/policy/win/sandbox_win.cc
|
||||
@@ -587,11 +587,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
@@ -588,11 +588,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
// command line flag.
|
||||
ResultCode LaunchWithoutSandbox(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -723,7 +723,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
options.feedback_cursor_off = true;
|
||||
// Network process runs in a job even when unsandboxed. This is to ensure it
|
||||
// does not outlive the browser, which could happen if there is a lot of I/O
|
||||
@@ -894,7 +892,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
@@ -895,7 +893,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
// static
|
||||
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -732,7 +732,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
SandboxDelegate* delegate,
|
||||
TargetPolicy* policy) {
|
||||
const base::CommandLine& launcher_process_command_line =
|
||||
@@ -908,7 +906,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -909,7 +907,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
}
|
||||
|
||||
// Add any handles to be inherited to the policy.
|
||||
@@ -741,7 +741,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
policy->AddHandleToShare(handle);
|
||||
|
||||
if (!policy->GetConfig()->IsConfigured()) {
|
||||
@@ -923,6 +921,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -924,6 +922,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
|
||||
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
|
||||
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
|
||||
@@ -755,7 +755,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
#endif
|
||||
|
||||
if (!delegate->PreSpawnTarget(policy))
|
||||
@@ -934,7 +939,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -935,7 +940,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
// static
|
||||
ResultCode SandboxWin::StartSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -764,7 +764,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
SandboxDelegate* delegate,
|
||||
StartSandboxedProcessCallback result_callback) {
|
||||
SandboxLaunchTimer timer;
|
||||
@@ -944,7 +949,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -945,7 +950,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
*base::CommandLine::ForCurrentProcess())) {
|
||||
base::Process process;
|
||||
ResultCode result =
|
||||
@@ -773,7 +773,7 @@ index fe2fcec8faa149744774f989611d880696690c45..1deb8db59e6f3a98b4c9bc48a62626c7
|
||||
DWORD last_error = GetLastError();
|
||||
std::move(result_callback).Run(std::move(process), last_error, result);
|
||||
return SBOX_ALL_OK;
|
||||
@@ -954,7 +959,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -955,7 +960,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
timer.OnPolicyCreated();
|
||||
|
||||
ResultCode result = GeneratePolicyForSandboxedProcess(
|
||||
|
||||
@@ -20,7 +20,7 @@ making three primary changes to Blink:
|
||||
* Controls whether the CSS rule is available.
|
||||
|
||||
diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
|
||||
index bb284c62d1d0dcd693bcb092044e6723bb339258..3c754cf37c18d0d17dc27e184ba5e8c5ebf8bdae 100644
|
||||
index c5fa337dd4dc80e6dd5e8485ad9ba68ee051ae68..716b487b85d44afe3cf940078983d461375fe556 100644
|
||||
--- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
|
||||
+++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
|
||||
@@ -48,6 +48,7 @@ enum CSSSampleId {
|
||||
@@ -45,10 +45,10 @@ index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97ca
|
||||
'internal-forced-visited-'):
|
||||
internal_visited_order = 0
|
||||
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
index d5405c38bd0e7489b41935fe70e9b5896d872820..35019460c2e6f83ff5b07f0996d8fa32ca3b389e 100644
|
||||
index 3d8de3b51b474f8c10b93e042c7a6f989aec6076..b39d90de9e740b8d908645a1c46b0aa234225903 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_properties.json5
|
||||
+++ b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
@@ -8968,6 +8968,26 @@
|
||||
@@ -8976,6 +8976,26 @@
|
||||
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
|
||||
},
|
||||
|
||||
@@ -76,10 +76,10 @@ index d5405c38bd0e7489b41935fe70e9b5896d872820..35019460c2e6f83ff5b07f0996d8fa32
|
||||
{
|
||||
name: "-internal-visited-color",
|
||||
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
index 687332cf68b3b826d7dcbd5dc10d47f0cd7ce688..653bbb8aef7e6edb31d63b02a9799d5454ce8d57 100644
|
||||
index fc3d725bcff1921756e9c4956dbe1e611bb00ba3..27462de749a760418b5c1457d786e95bf892f9c3 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
@@ -352,6 +352,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
@@ -354,6 +354,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
return a.DominantBaseline() == b.DominantBaseline();
|
||||
case CSSPropertyID::kDynamicRangeLimit:
|
||||
return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit();
|
||||
@@ -89,10 +89,10 @@ index 687332cf68b3b826d7dcbd5dc10d47f0cd7ce688..653bbb8aef7e6edb31d63b02a9799d54
|
||||
return a.EmptyCells() == b.EmptyCells();
|
||||
case CSSPropertyID::kFill:
|
||||
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
|
||||
index 7611587659b5eeccc84dc69bd50080bffaee0ea7..48f606df9c60e792d81d3a44d5acb66e3995052d 100644
|
||||
index 0ba66a67636d75ed8677f66ba8c6f80645f378bb..ef9ce49a3ca4f7760effe09c8619f49f1575c362 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
|
||||
@@ -12279,5 +12279,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
|
||||
@@ -12292,5 +12292,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
|
||||
CSSValueID::kNone>(stream);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 7611587659b5eeccc84dc69bd50080bffaee0ea7..48f606df9c60e792d81d3a44d5acb66e
|
||||
} // namespace css_longhand
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
||||
index 7a5a5e370daea769e710f56a8004d79efa721268..4ba371436c33049952d919dc734be835dfbc783a 100644
|
||||
index d5754172748072b522c73e3071effd8206befda6..31ff0e8df2e30d0d46d6d117154b9b4313a76848 100644
|
||||
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
||||
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
||||
@@ -4022,6 +4022,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
@@ -150,10 +150,10 @@ index 7a5a5e370daea769e710f56a8004d79efa721268..4ba371436c33049952d919dc734be835
|
||||
const CSSValue& value) {
|
||||
const auto& list = To<CSSValueList>(value);
|
||||
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
|
||||
index 851355b1dc6650cded3d847b80917fcfe10c9239..3663993ca5fbc5a9fc2e45c76570cc484c28ec70 100644
|
||||
index 6b801bce099cf7311d487e3fae5065cb11529ca7..4e1c37274e29144a769a5a4916b07d4fa8b86e1d 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
|
||||
@@ -435,6 +435,7 @@ class StyleBuilderConverter {
|
||||
@@ -434,6 +434,7 @@ class StyleBuilderConverter {
|
||||
static PositionTryFallback ConvertSinglePositionTryFallback(
|
||||
StyleResolverState&,
|
||||
const CSSValue&);
|
||||
@@ -162,7 +162,7 @@ index 851355b1dc6650cded3d847b80917fcfe10c9239..3663993ca5fbc5a9fc2e45c76570cc48
|
||||
static TextOverflowData ConvertTextOverflow(StyleResolverState&,
|
||||
const CSSValue&);
|
||||
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 ec80337fdac36fa1636f5142c3827d3bbc81644c..634db12dfb443acabde79e9faf59cb8415991464 100644
|
||||
index 0802c73aa4aaf4e1fb5efd367758f19c36691f71..5f06c0af277a7c937e694470beac707a91f67de2 100644
|
||||
--- a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
|
||||
+++ b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
|
||||
@@ -50,6 +50,24 @@ float EffectiveCurvature(Superellipse superellipse, const gfx::SizeF& radius) {
|
||||
@@ -201,10 +201,10 @@ index ec80337fdac36fa1636f5142c3827d3bbc81644c..634db12dfb443acabde79e9faf59cb84
|
||||
return result;
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
||||
index a33b5209d940d29ae607a05e993e6d5a34aa674f..72e1b4f8a8bbc879dc9e466b76e75d5366199ef8 100644
|
||||
index ad5d60eae0f2e451ebe82ce3d86a9d0417d1c2c7..93e1ebc69a605d23985045962210ad4061eb2f1e 100644
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1657,6 +1657,8 @@ component("platform") {
|
||||
@@ -1671,6 +1671,8 @@ component("platform") {
|
||||
"widget/widget_base.h",
|
||||
"widget/widget_base_client.h",
|
||||
"windows_keyboard_codes.h",
|
||||
@@ -312,7 +312,7 @@ index 7e3d46902fbf736b4240eb3fcb89975a7b222197..57fdc89fc265ad70cb0bff8443cc1026
|
||||
|
||||
auto DrawAsSinglePath = [&]() {
|
||||
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
index 7695a0d0f86a3b07f688f722b9dda3529be52b68..60b62398c8ae4bcb410618dd22c6f088312f3e7a 100644
|
||||
index 8325c24ea4549b6e1ba5404f4756aaf3d9408e2f..9e25ca9f0fbcc3819149c10c6bfd8a5e5ea5acf3 100644
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -214,6 +214,10 @@
|
||||
|
||||
@@ -39,7 +39,7 @@ index aed835411f5728c5685baa43eda2dd1585119b18..0e66085b1c457c1f1f6be241c7d331d7
|
||||
gpu::SurfaceHandle child_window) {
|
||||
NOTREACHED();
|
||||
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
|
||||
index 9e94f648060e9873a120f2c45591ad599a2e62df..93dabe09e44bda68644dcab568a827a92c550e4a 100644
|
||||
index 7236eee85fdbb285a9873138075183d37c129666..2ecb1a92fb3216211e8d429254f5b18e3dcc7346 100644
|
||||
--- a/components/viz/host/host_display_client.h
|
||||
+++ b/components/viz/host/host_display_client.h
|
||||
@@ -39,6 +39,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
@@ -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 f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f47d872e42 100644
|
||||
index 9119e302ad073a3b22ba47f800e7214b580e122b..0d5b95a424a62a77785088dbd759af4f977b010e 100644
|
||||
--- a/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
+++ b/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
@@ -156,7 +156,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
@@ -157,7 +157,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
if (!canvas_)
|
||||
return;
|
||||
|
||||
@@ -522,7 +522,7 @@ index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f4
|
||||
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 13de9eb98059014213af8fb9b73875fb38868eaf..58084dc5b827450c3d969e485bd9a4f69104a8ef 100644
|
||||
index 346e41638ffefe5e5945aa3cfe0ec38887041a0b..38ed2eb97132201eb0adfd8b855c1611eab777f0 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -131,7 +131,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -597,7 +597,7 @@ index e063835e87f08e6a2359886a96d7b78954e3d5b2..34bcf67726f64466d11a56d7a315ce7e
|
||||
|
||||
// Sends the created child window to the browser process so that it can be
|
||||
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
index 3066550e422058eec23d5fe3e655625f5446d694..7358b05a646a2f80717a91182c4929776a404179 100644
|
||||
index 4f1e9c6c4aad3a4c3d52d57f1234841471a4649e..cda1963ca4119db70c94b64365ab67fea89e9255 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
@@ -39,6 +39,7 @@ struct RootCompositorFrameSinkParams {
|
||||
@@ -620,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
|
||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d853beb90cc 100644
|
||||
index 0d1fd44c615041039579691802012b8ef96dc9b5..11e6186b8e06008564246e8034b780a09a498838 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -87,6 +87,7 @@ class DisplayPrivate;
|
||||
@@ -647,7 +647,7 @@ index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d85
|
||||
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
@@ -189,6 +199,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -195,6 +205,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@@ -657,7 +657,7 @@ index f1a4674323d96bc6a1a291b0aaa4c2a35b20648e..682b23f083eff17bc36cdc4698e35d85
|
||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -630,6 +643,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -636,6 +649,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
simple_begin_frame_observers_;
|
||||
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;
|
||||
|
||||
|
||||
@@ -84,10 +84,10 @@ index 2648adb1cf38ab557b66ffd0e3034b26b04d76d6..98eab587f343f6ca472efc3d4e7b31b2
|
||||
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 136fa55e7945f1d6abf5731c9cbaa92148f8117d..ba6dbc588c809c482770d2f78d1cd97e91af3362 100644
|
||||
index d714d2022f685052e1def3b0d242d2ea596d790b..fb4cee1416836c4d0b807a862507a52347f24dd2 100644
|
||||
--- a/content/browser/service_host/utility_process_host.cc
|
||||
+++ b/content/browser/service_host/utility_process_host.cc
|
||||
@@ -628,7 +628,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
@@ -629,7 +629,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
: Client::CrashType::kPreIpcInitialization;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -172,7 +172,7 @@ index d2b9526f9a0bfa9d12a594c35c71499810cb6bb0..aef0eb3508fc37e3a0e9e1c27a71e1aa
|
||||
+
|
||||
} // namespace crypto::apple
|
||||
diff --git a/crypto/apple/keychain_seckeychain.cc b/crypto/apple/keychain_seckeychain.cc
|
||||
index 4ad5acbf29607fe2ea28637f5470599984e317db..61056948062f3fcb5138e309b9f5019c96f9ce00 100644
|
||||
index a737276cb146fdb51433be8ca81947edb54f626e..3adf18cc0f0eb40e88691ba2f5a4b11073f86820 100644
|
||||
--- a/crypto/apple/keychain_seckeychain.cc
|
||||
+++ b/crypto/apple/keychain_seckeychain.cc
|
||||
@@ -25,14 +25,15 @@ KeychainSecKeychain::~KeychainSecKeychain() = default;
|
||||
@@ -182,7 +182,7 @@ index 4ad5acbf29607fe2ea28637f5470599984e317db..61056948062f3fcb5138e309b9f5019c
|
||||
- std::string_view account_name) const {
|
||||
+ std::string_view account_name,
|
||||
+ AppleSecKeychainItemRef* item) const {
|
||||
base::AutoLock lock(GetMacSecurityServicesLock());
|
||||
base::AutoLock lock(GetSecurityFrameworkLock());
|
||||
uint32_t password_length = 0;
|
||||
void* password_data = nullptr;
|
||||
OSStatus status = SecKeychainFindGenericPassword(
|
||||
@@ -198,7 +198,7 @@ index 4ad5acbf29607fe2ea28637f5470599984e317db..61056948062f3fcb5138e309b9f5019c
|
||||
}
|
||||
|
||||
+OSStatus KeychainSecKeychain::ItemDelete(AppleSecKeychainItemRef item) const {
|
||||
+ base::AutoLock lock(GetMacSecurityServicesLock());
|
||||
+ base::AutoLock lock(GetSecurityFrameworkLock());
|
||||
+ return SecKeychainItemDelete(item);
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -112,10 +112,10 @@ index 3a5fbaea905e7c01caee3659ff3be06e8def5615..89da9461e8290b8099456e5222f27877
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff93d826afe 100644
|
||||
index a130ee693ca02585a03ee1806d811db81e4e64c7..38a0bf930ad98de932865a871856e615631dbc12 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -398,6 +398,9 @@ URLLoader::URLLoader(
|
||||
@@ -400,6 +400,9 @@ URLLoader::URLLoader(
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
TaskRunner(request.priority)),
|
||||
per_factory_orb_state_(context.GetMutableOrbState()),
|
||||
@@ -125,7 +125,7 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
options_(PopulateOptions(options,
|
||||
factory_params_->is_orb_enabled,
|
||||
@@ -536,7 +539,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
|
||||
@@ -539,7 +542,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
|
||||
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1151,6 +1154,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1154,6 +1157,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
@@ -155,10 +155,10 @@ index 61f3909c6f0fe606d30da08fbd3222af44c1a9e4..8b5f2162a2bbfe0bd422b89bc13e9ff9
|
||||
|
||||
ad_auction_event_record_request_helper_.HandleResponse(
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 6ba39c957af7927b060be59f7d8837a3e2d41215..e52a276b0dd671317797104d85ccf75f5a333153 100644
|
||||
index 21dc5e84807eb89a4e331e5cca5b38f08c41f72d..9f55ff05f239df939833d98d45d455e864f4f2c3 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -615,6 +615,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -622,6 +622,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: feat: filter out non-shareable windows in the current application in
|
||||
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
|
||||
|
||||
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
index 42705a5c59fb76ba4a6a17a060e215436307de49..7e17594c30ac3cf8cb484b53563b03fc75bd2e0b 100644
|
||||
index 2b90b268dcc43202f5c01ac5a65b4bdfb79235e5..86128a6555798e8380ffebd635e02329ccb96a12 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -254,8 +254,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
|
||||
@@ -253,8 +253,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
|
||||
// fallback. See https://crbug.com/325530044.
|
||||
if (source_.id == display.displayID ||
|
||||
source_.id == webrtc::kFullDesktopScreenId) {
|
||||
|
||||
@@ -20,10 +20,10 @@ This patch will be removed when the deprecated sync api support is
|
||||
removed.
|
||||
|
||||
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
|
||||
index fe0f15f50e1b68579cd1f1d2749e056f15854ace..2aa7d12c278dee9dd987aa5d1aba9d9ba798cff1 100644
|
||||
index 2b132446e1e384de0e51355a44fab38dbaf64f53..83b0237a56d5ea7555ae989bd7bd13886f0c8f13 100644
|
||||
--- a/components/permissions/permission_util.cc
|
||||
+++ b/components/permissions/permission_util.cc
|
||||
@@ -526,6 +526,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
|
||||
@@ -536,6 +536,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
|
||||
return ContentSettingsType::WEB_APP_INSTALLATION;
|
||||
case PermissionType::LOCAL_NETWORK_ACCESS:
|
||||
return ContentSettingsType::LOCAL_NETWORK_ACCESS;
|
||||
@@ -32,7 +32,7 @@ index fe0f15f50e1b68579cd1f1d2749e056f15854ace..2aa7d12c278dee9dd987aa5d1aba9d9b
|
||||
break;
|
||||
}
|
||||
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
|
||||
index 93375d87a26961edd8ae0c25fecc0ea5afc8c0bc..f6a28f5efae758a93aa52ebd28e25ece996f0e7e 100644
|
||||
index 8af9381691776fd7968cab890e32546c285979e4..d92f15f9ff1bf8dc23361e668f6d48199540c4e6 100644
|
||||
--- a/content/browser/permissions/permission_controller_impl.cc
|
||||
+++ b/content/browser/permissions/permission_controller_impl.cc
|
||||
@@ -88,6 +88,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
|
||||
@@ -141,10 +141,10 @@ index a5ac9d4a417ac8e75e761c40841f41ab9057c761..292bd1f9de78828e739dae24a45a1dd3
|
||||
|
||||
bool ClipboardCommands::ExecuteCopy(LocalFrame& frame,
|
||||
diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
index 691726eb23434005adc559534fc0aeede937cc92..a980ed6afb84eceef9c9b594b325e8e3783821ec 100644
|
||||
index b533436f91ba67c6060d4a1976f7c197b6db3afc..63df740efad1e407f0990d2ba48a9cbcb8bdb6f8 100644
|
||||
--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc
|
||||
@@ -145,6 +145,8 @@ String PermissionNameToString(PermissionName name) {
|
||||
@@ -146,6 +146,8 @@ String PermissionNameToString(PermissionName name) {
|
||||
return "web-printing";
|
||||
case PermissionName::SMART_CARD:
|
||||
return "smart-card";
|
||||
|
||||
@@ -16,10 +16,10 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
||||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf9d1f5c19 100644
|
||||
index 52ab5b76078ac160162c6781d886c5466db5f037..0ee6e12a3194d9c99dd7d884afd33f58dad07d09 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -46,7 +46,7 @@
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "components/prefs/pref_service.h"
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
#include "chrome/browser/ui/blocked_content/popunder_preventer.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -271,7 +271,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -196,7 +196,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
if (!popunder_preventer_) {
|
||||
popunder_preventer_ = std::make_unique<PopunderPreventer>(web_contents);
|
||||
} else {
|
||||
@@ -391,12 +391,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -317,12 +317,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
void FullscreenController::FullscreenTabOpeningPopup(
|
||||
content::WebContents* opener,
|
||||
content::WebContents* popup) {
|
||||
@@ -52,7 +52,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -487,8 +489,7 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
@@ -406,8 +408,7 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
#endif // DCHECK_IS_ON()
|
||||
tab_fullscreen_target_display_id_ = display::kInvalidDisplayId;
|
||||
started_fullscreen_transition_ = false;
|
||||
@@ -62,7 +62,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
if (!IsTabFullscreen()) {
|
||||
// Activate any popup windows created while content fullscreen, after exit.
|
||||
popunder_preventer_.reset();
|
||||
@@ -623,18 +624,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -543,18 +544,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
@@ -86,7 +86,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
if (option == TAB) {
|
||||
origin = GetRequestingOrigin();
|
||||
tab_fullscreen_ = true;
|
||||
@@ -671,6 +671,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -592,6 +592,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
origin = url::Origin::Create(extension_url_.value());
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
|
||||
fullscreen_start_time_ = base::TimeTicks::Now();
|
||||
if (option == BROWSER) {
|
||||
@@ -692,6 +693,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -613,6 +614,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
|
||||
if (fullscreen_start_time_ && exclusive_access_tab()) {
|
||||
ukm::SourceId source_id =
|
||||
@@ -703,18 +705,19 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -624,18 +626,19 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
.Record(ukm::UkmRecorder::Get());
|
||||
fullscreen_start_time_.reset();
|
||||
}
|
||||
@@ -125,24 +125,11 @@ index c38ce5558472c785837f1d4d2542f2edf2ffab58..219f562f51b45d2c961246e232ef4daf
|
||||
exclusive_access_manager()->context()->ExitFullscreen();
|
||||
extension_url_.reset();
|
||||
exclusive_access_manager()->UpdateBubble(base::NullCallback());
|
||||
@@ -778,8 +781,12 @@ url::Origin FullscreenController::GetEmbeddingOrigin() const {
|
||||
void FullscreenController::RecordMetricsOnFullscreenApiRequested(
|
||||
content::RenderFrameHost* requesting_frame) {
|
||||
history::HistoryService* service =
|
||||
+ #if 0
|
||||
HistoryServiceFactory::GetForProfileWithoutCreating(
|
||||
exclusive_access_manager()->context()->GetProfile());
|
||||
+ #else
|
||||
+ nullptr;
|
||||
+ #endif
|
||||
if (service) {
|
||||
// Check if the origin has been visited more than a day ago and whether it's
|
||||
// on an allowlist, then record those bits of information in a metric.
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
index 0fa707f6dfcfb26ed15488b099cc03efe548785b..0ef6faf1e2385b091df36b0c0efb89167b17ac34 100644
|
||||
index f9e3ec3c61e0c9f16b13e2ee5fd447e26b49a6da..e06b1fb4a0c256c0f51ff66d06663af46c9c88ae 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
@@ -254,7 +254,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
@@ -256,7 +256,7 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
// Used in testing to set the state to tab fullscreen.
|
||||
bool is_tab_fullscreen_for_testing_ = false;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ While this "hot-swapping" behavior isn't supported, many enterprise update scrip
|
||||
This patch should be removed after the new implementation has been present since the beginning of a stable release. The new implementation was released with Electron 37.0.0, but this fallback was not added until after 37.2.2. That means 38.0.0 would be the first safe release to remove this fallback, giving developers a 1-major-version buffer to safely transition implementations.
|
||||
|
||||
diff --git a/base/system/sys_info_apple.mm b/base/system/sys_info_apple.mm
|
||||
index 02670cbc829a1d8c540c6e0a4bce2f81177eab18..e58f70100b96ff83af4388900946db9962c2a254 100644
|
||||
index 1f020d7a3e624954505b2abeee72011a73643d6b..3b26eec537c0f74ba6a936c6a33820914b4278d2 100644
|
||||
--- a/base/system/sys_info_apple.mm
|
||||
+++ b/base/system/sys_info_apple.mm
|
||||
@@ -6,11 +6,31 @@
|
||||
@@ -29,7 +29,7 @@ index 02670cbc829a1d8c540c6e0a4bce2f81177eab18..e58f70100b96ff83af4388900946db99
|
||||
+
|
||||
+// Implementation of AmountOfPhysicalMemoryImpl before https://crrev.com/c/6274964.
|
||||
+// See Electron patch adding this fallback for more details.
|
||||
+uint64_t AmountOfPhysicalMemoryFallback() {
|
||||
+ByteCount AmountOfPhysicalMemoryFallback() {
|
||||
+ struct host_basic_info hostinfo;
|
||||
+ mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
|
||||
+ base::apple::ScopedMachSendRight host(mach_host_self());
|
||||
@@ -39,7 +39,7 @@ index 02670cbc829a1d8c540c6e0a4bce2f81177eab18..e58f70100b96ff83af4388900946db99
|
||||
+ NOTREACHED();
|
||||
+ }
|
||||
+ DCHECK_EQ(HOST_BASIC_INFO_COUNT, count);
|
||||
+ return hostinfo.max_mem;
|
||||
+ return ByteCount::FromUnsigned(hostinfo.max_mem);
|
||||
+}
|
||||
+
|
||||
+}
|
||||
@@ -56,6 +56,6 @@ index 02670cbc829a1d8c540c6e0a4bce2f81177eab18..e58f70100b96ff83af4388900946db99
|
||||
+ if (rv != 0) {
|
||||
+ return AmountOfPhysicalMemoryFallback();
|
||||
+ }
|
||||
return physical_memory;
|
||||
return ByteCount::FromUnsigned(physical_memory);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ We also need to ensure that an initial paint is scheduled when
|
||||
the compositor is unsuspended in headles mode.
|
||||
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
index 48dfca966a594f54523c129fa49d2a561cb41dec..049cf4f1adcf4f64cd8692f6e6eda7418008e799 100644
|
||||
index eafa32f62cac0627a4e32aa2301c2cbe0b18ede9..8e20b757a1d6d15e5ab2d633b2c8fd65a6cb88b3 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -664,9 +664,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -31,10 +31,10 @@ index 48dfca966a594f54523c129fa49d2a561cb41dec..049cf4f1adcf4f64cd8692f6e6eda741
|
||||
|
||||
// Register the CGWindowID (used to identify this window for video capture)
|
||||
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
|
||||
index 6153ff4982662491be819d822448b64ab18b73d8..75376656300c1b7ebf13fdc2280881cf03baefc7 100644
|
||||
index 31709448e70a4213d1e9dedcb26ac27c4829a32c..3b9da80b4673faae16d8ef7722cd7804e3fac82e 100644
|
||||
--- a/ui/views/widget/widget.h
|
||||
+++ b/ui/views/widget/widget.h
|
||||
@@ -1295,6 +1295,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -1302,6 +1302,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// True if widget was created in headless mode.
|
||||
bool is_headless() const { return is_headless_; }
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ enlarge window above dimensions set during creation of the
|
||||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index f404c718e0242ec9269e7d14eb236aa928fb5d58..3637176c05a7074cb9042b74f7c9ea2e29af5ee5 100644
|
||||
index aa5b34fa3fdef76b9bb7afd26ecaeda785e25824..76893d462786eaff21838614a8251b97bec92a79 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3843,15 +3843,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
|
||||
@@ -28,10 +28,10 @@ The patch should be removed in favor of either:
|
||||
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 17aea8c85f7fba683c64455ce31e430afc256cef..386c9969c074aa971d53cedbd942be3e8575337a 100644
|
||||
index ed42146d41ed88133780217cea15ab068ca77745..f151330a55443f9e4518265ccc2c1368a38474ae 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -11366,6 +11366,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
@@ -11316,6 +11316,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
target_rph_id);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ index 17aea8c85f7fba683c64455ce31e430afc256cef..386c9969c074aa971d53cedbd942be3e
|
||||
// origin of |common_params.url| and/or |common_params.initiator_origin|.
|
||||
url::Origin resolved_origin = url::Origin::Resolve(
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
index 3c0e7a6e8e63fd6ca06de278ff8544124e7bb8c8..ff80074db26650f95a1dc5bac7bb90824541426b 100644
|
||||
index 24ca17c2cf3e633f5609d13cebfc521991e9aabf..8e34fadf2cb21e561d6a4d3b0c7e8c384e33cc73 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2322,6 +2322,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
|
||||
@@ -12,7 +12,7 @@ invisible state of the `viz::DisplayScheduler` owned
|
||||
by the `ui::Compositor`.
|
||||
|
||||
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
|
||||
index 1cb8ea92e46ad45cd8bf9e99f38889964b16768f..3e80241add13eeeb3b5970932f23acec0d91fd4e 100644
|
||||
index 57cac208e943687226348b427c3d80b2cc9288a7..c2794daaa48af44f9cfd374bac45c64b315a6817 100644
|
||||
--- a/ui/compositor/compositor.cc
|
||||
+++ b/ui/compositor/compositor.cc
|
||||
@@ -358,7 +358,8 @@ void Compositor::SetLayerTreeFrameSink(
|
||||
@@ -25,7 +25,7 @@ index 1cb8ea92e46ad45cd8bf9e99f38889964b16768f..3e80241add13eeeb3b5970932f23acec
|
||||
display_private_->SetDisplayColorSpaces(display_color_spaces_);
|
||||
display_private_->SetDisplayColorMatrix(
|
||||
gfx::SkM44ToTransform(display_color_matrix_));
|
||||
@@ -609,7 +610,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
@@ -615,7 +616,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
// updated then. We need to call this even if the visibility hasn't changed,
|
||||
// for the same reason.
|
||||
if (display_private_)
|
||||
@@ -36,7 +36,7 @@ index 1cb8ea92e46ad45cd8bf9e99f38889964b16768f..3e80241add13eeeb3b5970932f23acec
|
||||
|
||||
if (changed) {
|
||||
observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
|
||||
@@ -1073,6 +1076,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
@@ -1079,6 +1082,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
host_begin_frame_observer_->GetBoundRemote());
|
||||
}
|
||||
|
||||
@@ -53,10 +53,10 @@ index 1cb8ea92e46ad45cd8bf9e99f38889964b16768f..3e80241add13eeeb3b5970932f23acec
|
||||
void Compositor::SetSeamlessRefreshRates(
|
||||
const std::vector<float>& seamless_refresh_rates) {
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index 682b23f083eff17bc36cdc4698e35d853beb90cc..df9e598b65594748d59284e1e91d61233eef83a0 100644
|
||||
index 11e6186b8e06008564246e8034b780a09a498838..902c14d3d88fd6e65332ea05c566793cce569089 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -514,6 +514,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -520,6 +520,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
|
||||
const cc::LayerTreeSettings& GetLayerTreeSettings() const;
|
||||
|
||||
@@ -67,7 +67,7 @@ index 682b23f083eff17bc36cdc4698e35d853beb90cc..df9e598b65594748d59284e1e91d6123
|
||||
size_t saved_events_metrics_count_for_testing() const {
|
||||
return host_->saved_events_metrics_count_for_testing();
|
||||
}
|
||||
@@ -724,6 +728,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -730,6 +734,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
// See go/report-ux-metrics-at-painting for details.
|
||||
bool animation_started_ = false;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ This patch should be backported to e29, upstreamed to Chromium, and then
|
||||
removed if it lands upstream.
|
||||
|
||||
diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
|
||||
index f7b051baad322919837bcd3c2516d1d838f8b2f8..303f5512cfff9e04dfd83dd25f2331d9ca0b5ace 100644
|
||||
index c9cce0092930e54ec8b3c10e417e6a568db45bba..0b383018c24c242d47d4e9b239ca249d30ea59f5 100644
|
||||
--- a/ui/events/x/events_x_utils.cc
|
||||
+++ b/ui/events/x/events_x_utils.cc
|
||||
@@ -596,6 +596,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) {
|
||||
@@ -598,6 +598,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) {
|
||||
gfx::Point EventSystemLocationFromXEvent(const x11::Event& xev) {
|
||||
if (auto* crossing = xev.As<x11::CrossingEvent>())
|
||||
return gfx::Point(crossing->root_x, crossing->root_y);
|
||||
|
||||
@@ -9,7 +9,7 @@ to support content settings UI. The support pulls in chrome content settings
|
||||
and UI code which are not valid in the scope of Electron.
|
||||
|
||||
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
index 32f0f62dbc4f0c541440fd99d20e0fc80825f480..bcf7e67eb024a6ec8d2470a338e016c6779840a4 100644
|
||||
index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a285838c8 100644
|
||||
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -23,7 +23,7 @@ index 32f0f62dbc4f0c541440fd99d20e0fc80825f480..bcf7e67eb024a6ec8d2470a338e016c6
|
||||
@@ -28,8 +29,10 @@
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
// TODO(crbug.com/421608904): include auto_picture_in_picture_tab_helper for
|
||||
// Android.
|
||||
// Android when supporting document PiP.
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h"
|
||||
#include "chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h"
|
||||
@@ -83,7 +83,7 @@ index 32f0f62dbc4f0c541440fd99d20e0fc80825f480..bcf7e67eb024a6ec8d2470a338e016c6
|
||||
|
||||
PictureInPictureOcclusionTracker*
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index 8247ce44638b42d43eacd73409631e2a73d7c422..45ccb671305f44980a7998cf230a51e78d603546 100644
|
||||
index fea71317b41429dd3bbd50947673124f7c230394..ddfd48582869c6285274d241b5d876e9c4fbe555 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -471,11 +471,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
|
||||
@@ -9,10 +9,10 @@ focus node change via TextInputManager.
|
||||
chromium-bug: https://crbug.com/1369605
|
||||
|
||||
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 b930145db575eb8c4e84297ddd610bd90fb5d3a8..8407b3a87219d314617295fa664c39b5daa2ce0a 100644
|
||||
index 0927d69b56d064327f0659d8ffe6ceff98064947..c64efad51c18254f957dd0b5b89f3d6ee25bac13 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -3249,6 +3249,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
|
||||
@@ -3247,6 +3247,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 615d2de881f64f322ebfcb8065e87cfcde6b649e..2482c7544c44204073d629389ba02cce0d665529 100644
|
||||
index 7f49174c2e0121ddde50250a38b4ac4fcc43d125..2fd9e3ce15869b284ff8716c02ce8dc6392b2a7b 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -10103,7 +10103,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -10083,7 +10083,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -62,30 +62,41 @@ index b504350cb53273d1db7204771ae080647fe6b878..8fdf6a14d0913aca8f14c412c4afae3a
|
||||
PMPrintSettings print_settings =
|
||||
static_cast<PMPrintSettings>([print_info_ PMPrintSettings]);
|
||||
diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
|
||||
index 2808248f6eb3f5c75f20775d61c9d0d20aaaecf6..7c186bd5653e9bdf1c4046398b138cac09112d42 100644
|
||||
index f8e903f21cee7041dea67b479c298baf9093d719..ed5d59f29992b0925efd89cb0ac4b33a03a31788 100644
|
||||
--- a/printing/printing_context_system_dialog_win.cc
|
||||
+++ b/printing/printing_context_system_dialog_win.cc
|
||||
@@ -74,14 +74,30 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
|
||||
PRINTPAGERANGE ranges[32];
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
#include "printing/printing_context_system_dialog_win.h"
|
||||
|
||||
+#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/compiler_specific.h"
|
||||
+#include "base/containers/span.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "printing/backend/win_helper.h"
|
||||
@@ -74,13 +76,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
|
||||
PRINTPAGERANGE ranges[32] = {};
|
||||
dialog_options.nStartPage = START_PAGE_GENERAL;
|
||||
if (max_pages) {
|
||||
- // Default initialize to print all the pages.
|
||||
UNSAFE_TODO(memset(ranges, 0, sizeof(ranges)));
|
||||
- ranges[0].nFromPage = 1;
|
||||
- ranges[0].nToPage = max_pages;
|
||||
- dialog_options.nPageRanges = 1;
|
||||
- dialog_options.nMaxPageRanges = std::size(ranges);
|
||||
+
|
||||
+ auto page_ranges = settings_->ranges();
|
||||
+ if (!page_ranges.empty()) {
|
||||
+ UNSAFE_TODO({
|
||||
+ for (size_t i = 0; i < page_ranges.size(); i++) {
|
||||
+ auto range = page_ranges[i];
|
||||
+ ranges[i].nFromPage = range.from + 1;
|
||||
+ ranges[i].nToPage = range.to + 1;
|
||||
+ }
|
||||
+ });
|
||||
+ dialog_options.nPageRanges = page_ranges.size();
|
||||
+ if (const auto& src = settings_->ranges(); !src.empty()) {
|
||||
+ const auto transform = [](const printing::PageRange& range) {
|
||||
+ return PRINTPAGERANGE{
|
||||
+ .nFromPage = range.from + 1U,
|
||||
+ .nToPage = range.to + 1U
|
||||
+ };
|
||||
+ };
|
||||
+ const size_t n_items = std::min(std::size(src), std::size(ranges));
|
||||
+ std::ranges::transform(base::span(src).first(n_items), ranges, transform);
|
||||
+ dialog_options.nPageRanges = n_items;
|
||||
+
|
||||
+ // Ensure the Pages radio button is selected.
|
||||
+ dialog_options.Flags |= PD_PAGENUMS;
|
||||
@@ -102,29 +113,35 @@ index 2808248f6eb3f5c75f20775d61c9d0d20aaaecf6..7c186bd5653e9bdf1c4046398b138cac
|
||||
} else {
|
||||
// No need to bother, we don't know how many pages are available.
|
||||
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
index 41a84930fac9cfa6d2534c96ff19c00fccbe4640..41f5e75c39e79c26e894abc1fd93b84a6a21e04a 100644
|
||||
index 987b7a034621fd854148ffb1161749748c6f3fa4..525dadb85d23865b0d401e7feca60959b8596097 100644
|
||||
--- a/ui/gtk/printing/print_dialog_gtk.cc
|
||||
+++ b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
@@ -257,6 +257,24 @@ void PrintDialogGtk::UpdateSettings(
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/no_destructor.h"
|
||||
+#include "base/numerics/safe_conversions.h"
|
||||
#include "base/sequence_checker.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -253,6 +254,22 @@ void PrintDialogGtk::UpdateSettings(
|
||||
|
||||
gtk_print_settings_set_n_copies(gtk_settings_, settings->copies());
|
||||
gtk_print_settings_set_collate(gtk_settings_, settings->collate());
|
||||
+
|
||||
+ auto print_ranges = settings->ranges();
|
||||
+ if (!print_ranges.empty()) {
|
||||
+ if (const auto& ranges = settings->ranges(); !ranges.empty()) {
|
||||
+ // Tell the system that we only intend to print a subset of pages.
|
||||
+ std::vector<GtkPageRange> granges;
|
||||
+ granges.reserve(ranges.size());
|
||||
+ auto transform = [](const printing::PageRange& src) {
|
||||
+ return GtkPageRange{
|
||||
+ .start = base::ClampedNumeric<int>(src.from),
|
||||
+ .end = base::ClampedNumeric<int>(src.to),
|
||||
+ };
|
||||
+ };
|
||||
+ std::ranges::transform(ranges, std::back_inserter(granges), transform);
|
||||
+ gtk_print_settings_set_print_pages(gtk_settings_, GTK_PRINT_PAGES_RANGES);
|
||||
+
|
||||
+ GtkPageRange* ranges;
|
||||
+ ranges = g_new(GtkPageRange, print_ranges.size());
|
||||
+ for (size_t i = 0; i < print_ranges.size(); i++) {
|
||||
+ auto range = print_ranges[i];
|
||||
+ ranges[i].start = range.from;
|
||||
+ ranges[i].end = range.to;
|
||||
+ }
|
||||
+
|
||||
+ gtk_print_settings_set_page_ranges(gtk_settings_, ranges, 1);
|
||||
+ g_free(ranges);
|
||||
+ gtk_print_settings_set_page_ranges(gtk_settings_, granges.data(), granges.size());
|
||||
+ }
|
||||
+
|
||||
if (settings->dpi_horizontal() > 0 && settings->dpi_vertical() > 0) {
|
||||
|
||||
@@ -18,7 +18,7 @@ or resizing, but Electron does not seem to run into that issue
|
||||
for opaque frameless windows even with that block commented out.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 3ed583cf09dec0ae83c3c9449e6ef7e1fa92aa8d..1287e9eda295061a7ee9b758b3c0618933896d82 100644
|
||||
index 72474adfb09f85118b4f752a22d121ab2b4c588a..fa4912943171789f6f326a245185885a4e74c0bb 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1857,7 +1857,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
|
||||
@@ -8,10 +8,10 @@ such as the background turning black when maximizing the window and
|
||||
dynamic background material settings not taking effect.
|
||||
|
||||
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 b5535be3425305a5f1eb4cd3d41e4a775175c8e6..97a01f8a718f47dcee3b08cd76b22c8445400af5 100644
|
||||
index 7d899eef72721c6f3e27c9892ba963fd6b5aaeef..7c61f1f8d57a04cb5c0151c134b4b3d617159032 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
|
||||
@@ -182,6 +182,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) {
|
||||
@@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ index d8be4dffee3947e7ac6dc09cb8e1f2a6a834789b..8eb539af74c1934a55f9b14ad97dd93b
|
||||
// Overridden from DesktopWindowTreeHost:
|
||||
void Init(const Widget::InitParams& params) override;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 1287e9eda295061a7ee9b758b3c0618933896d82..e2b899dd25c12448068c99f1344cba4fea26e2c6 100644
|
||||
index fa4912943171789f6f326a245185885a4e74c0bb..f8832efce276c6dfc520cab2870697aa4d88eff5 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -994,13 +994,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user