mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
60 Commits
v39.0.0-ni
...
v38.0.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83373c3679 | ||
|
|
9c4d783d1f | ||
|
|
139ab00d8c | ||
|
|
124bfd25f8 | ||
|
|
d5ce459cea | ||
|
|
ea0773c7c7 | ||
|
|
d426b92326 | ||
|
|
673ec5d39e | ||
|
|
bfdc318d56 | ||
|
|
41093c5ba6 | ||
|
|
22d6210c3c | ||
|
|
b20e91d86f | ||
|
|
658d52ecf1 | ||
|
|
53c17ea4f5 | ||
|
|
71af3e452f | ||
|
|
5081fbe830 | ||
|
|
a4a12fb35a | ||
|
|
564698e27f | ||
|
|
280f643862 | ||
|
|
e2689400aa | ||
|
|
f37f8d41c0 | ||
|
|
7d83554d0e | ||
|
|
8924d682be | ||
|
|
d6c5642155 | ||
|
|
789b4b026a | ||
|
|
44bd560068 | ||
|
|
2783f76f1f | ||
|
|
96957aebf3 | ||
|
|
e8c3b6fe66 | ||
|
|
58e0a96d21 | ||
|
|
b136dbc4cc | ||
|
|
2efd448a87 | ||
|
|
31e6800314 | ||
|
|
f1fef462c0 | ||
|
|
e08f057e91 | ||
|
|
f97bee6f04 | ||
|
|
0b77096f2a | ||
|
|
130f00dfcd | ||
|
|
3a6d7e0c22 | ||
|
|
7907443448 | ||
|
|
a425ddd08e | ||
|
|
9184541193 | ||
|
|
5edb807cff | ||
|
|
c65bfc1e5c | ||
|
|
85a8bfaa31 | ||
|
|
f6d054f0fb | ||
|
|
66a89ec38f | ||
|
|
6d3eeb46e4 | ||
|
|
34dcfb5422 | ||
|
|
e84f0e164e | ||
|
|
68c769de94 | ||
|
|
3eabf175b8 | ||
|
|
9c0ef6f9c6 | ||
|
|
c150a1e004 | ||
|
|
a8b8ad9ca9 | ||
|
|
4268bf91e4 | ||
|
|
79d6160bdc | ||
|
|
41ebb49703 | ||
|
|
c30eae3216 | ||
|
|
b89810f374 |
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -58,16 +58,6 @@ body:
|
||||
label: Last Known Working Electron version
|
||||
description: What is the last version of Electron this worked in, if applicable?
|
||||
placeholder: 16.0.0
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Does the issue also appear in Chromium / Google Chrome?
|
||||
description: If it does, please report the issue in the [Chromium issue tracker](https://issues.chromium.org/issues), not against Electron. Electron will inherit the fix once Chromium resolves the issue.
|
||||
options:
|
||||
- I don't know how to test
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
|
||||
4
.github/actions/fix-sync/action.yml
vendored
4
.github/actions/fix-sync/action.yml
vendored
@@ -19,13 +19,11 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fix llvm toolchain
|
||||
- name: Fix clang
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/llvm-build
|
||||
python3 src/tools/clang/scripts/update.py
|
||||
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681
|
||||
python3 src/tools/clang/scripts/update.py --package objdump
|
||||
- name: Fix esbuild
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
|
||||
20
.github/actions/ssh-debug/action.yml
vendored
20
.github/actions/ssh-debug/action.yml
vendored
@@ -1,20 +0,0 @@
|
||||
name: Debug via SSH
|
||||
description: Setup a SSH server with a tunnel to access it to debug via SSH.
|
||||
inputs:
|
||||
tunnel:
|
||||
description: 'Enable SSH tunneling via cloudflared'
|
||||
required: true
|
||||
default: 'false'
|
||||
timeout:
|
||||
description: 'SSH session timeout in minutes'
|
||||
required: false
|
||||
type: number
|
||||
default: 60
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: $GITHUB_ACTION_PATH/setup-ssh.sh
|
||||
shell: bash
|
||||
env:
|
||||
TUNNEL: ${{ inputs.tunnel }}
|
||||
TIMEOUT: ${{ inputs.timeout }}
|
||||
4
.github/actions/ssh-debug/bashrc
vendored
4
.github/actions/ssh-debug/bashrc
vendored
@@ -1,4 +0,0 @@
|
||||
# If we're in an interactive SSH session and we're not already in tmux and there's no explicit SSH command, auto attach tmux
|
||||
if [ -n "$SSH_TTY" ] && [ -z "$TMUX" ] && [ -z "$SSH_ORIGINAL_COMMAND" ]; then
|
||||
exec tmux attach || exec tmux
|
||||
fi
|
||||
140
.github/actions/ssh-debug/setup-ssh.sh
vendored
140
.github/actions/ssh-debug/setup-ssh.sh
vendored
@@ -1,140 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
get_authorized_keys() {
|
||||
if [ -z "$AUTHORIZED_USERS" ] || ! echo "$AUTHORIZED_USERS" | grep -q "\b$GITHUB_ACTOR\b"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
api_response=$(curl -s "https://api.github.com/users/$GITHUB_ACTOR/keys")
|
||||
|
||||
if echo "$api_response" | jq -e 'type == "object" and has("message")' >/dev/null; then
|
||||
error_msg=$(echo "$api_response" | jq -r '.message')
|
||||
echo "Error: $error_msg"
|
||||
return 1
|
||||
else
|
||||
echo "$api_response" | jq -r '.[].key'
|
||||
fi
|
||||
}
|
||||
|
||||
authorized_keys=$(get_authorized_keys "$GITHUB_ACTOR")
|
||||
|
||||
if [ -n "$authorized_keys" ]; then
|
||||
echo "Configured SSH key(s) for user: $GITHUB_ACTOR"
|
||||
else
|
||||
echo "Error: User '$GITHUB_ACTOR' is not authorized to access this debug session."
|
||||
echo "Authorized users: $AUTHORIZED_USERS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TUNNEL" != "true" ]; then
|
||||
echo "SSH tunneling is disabled. Set enable-tunnel: true to enable remote access."
|
||||
echo "Local SSH server would be available on localhost:2222 if this were a local environment."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "SSH tunneling enabled. Setting up remote access..."
|
||||
|
||||
EXTERNAL_DEPS="curl jq ssh-keygen"
|
||||
|
||||
for dep in $EXTERNAL_DEPS; do
|
||||
if ! command -v "$dep" > /dev/null 2>&1; then
|
||||
echo "Command $dep not installed on the system!" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$GITHUB_ACTION_PATH"
|
||||
|
||||
bashrc_path=$(pwd)/bashrc
|
||||
|
||||
# Source `bashrc` to auto start tmux on SSH login.
|
||||
if ! grep -q "$bashrc_path" ~/.bash_profile; then
|
||||
echo >> ~/.bash_profile # On macOS runner there's no newline at the end of the file
|
||||
echo "source \"$bashrc_path\"" >> ~/.bash_profile
|
||||
fi
|
||||
|
||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH=$(uname -m)
|
||||
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
ARCH="amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
ARCH="arm64"
|
||||
fi
|
||||
|
||||
# Install tmux on macOS runners if not present.
|
||||
if [ "$OS" = "darwin" ] && ! command -v tmux > /dev/null 2>&1; then
|
||||
echo "Installing tmux..."
|
||||
brew install tmux
|
||||
fi
|
||||
|
||||
if [ "$OS" = "darwin" ]; then
|
||||
cloudflared_url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH}.tgz"
|
||||
echo "Downloading \`cloudflared\` from <$cloudflared_url>..."
|
||||
curl --location --silent --output cloudflared.tgz "$cloudflared_url"
|
||||
tar xf cloudflared.tgz
|
||||
rm cloudflared.tgz
|
||||
else
|
||||
cloudflared_url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH}"
|
||||
echo "Downloading \`cloudflared\` from <$cloudflared_url>..."
|
||||
curl --location --silent --output cloudflared "$cloudflared_url"
|
||||
fi
|
||||
|
||||
chmod +x cloudflared
|
||||
|
||||
echo "Setting up SSH key for authorized user: $GITHUB_ACTOR"
|
||||
echo "$authorized_keys" > authorized_keys
|
||||
|
||||
echo 'Creating SSH server key...'
|
||||
ssh-keygen -q -f ssh_host_rsa_key -N ''
|
||||
|
||||
echo 'Creating SSH server config...'
|
||||
sed "s,\$PWD,$PWD,;s,\$USER,$USER," sshd_config.template > sshd_config
|
||||
|
||||
echo 'Starting SSH server...'
|
||||
/usr/sbin/sshd -f sshd_config -D &
|
||||
sshd_pid=$!
|
||||
|
||||
echo 'Starting tmux session...'
|
||||
(cd "$GITHUB_WORKSPACE" && tmux new-session -d -s debug)
|
||||
|
||||
#if no cloudflare tunnel token is provided, exit
|
||||
if [ -z "$CLOUDFLARE_TUNNEL_TOKEN" ]; then
|
||||
echo "Error: required CLOUDFLARE_TUNNEL_TOKEN not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Starting Cloudflare tunnel...'
|
||||
|
||||
./cloudflared tunnel --no-autoupdate run --token "$CLOUDFLARE_TUNNEL_TOKEN" 2>&1 | tee cloudflared.log | sed -u 's/^/cloudflared: /' &
|
||||
cloudflared_pid=$!
|
||||
|
||||
url="$TUNNEL_HOSTNAME"
|
||||
|
||||
public_key=$(cut -d' ' -f1,2 < ssh_host_rsa_key.pub)
|
||||
|
||||
(
|
||||
echo ' '
|
||||
echo ' '
|
||||
echo '🔗 SSH Debug Session Ready!'
|
||||
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
|
||||
echo ' '
|
||||
echo '📋 Copy and run this command to connect:'
|
||||
echo ' '
|
||||
if [ -n "$TUNNEL_HOSTNAME" ]; then
|
||||
echo "ssh-keygen -R action-ssh-debug && echo 'action-ssh-debug $public_key' >> ~/.ssh/known_hosts && ssh -o ProxyCommand='cloudflared access tcp --hostname $url' runner@action-ssh-debug"
|
||||
else
|
||||
echo "ssh-keygen -R action-ssh-debug && echo 'action-ssh-debug $public_key' >> ~/.ssh/known_hosts && ssh -o ProxyCommand='cloudflared access tcp --hostname $url' runner@action-ssh-debug"
|
||||
fi
|
||||
echo ' '
|
||||
echo "⏰ Session expires automatically in $TIMEOUT minutes"
|
||||
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
|
||||
echo ' '
|
||||
echo ' '
|
||||
) | cat
|
||||
|
||||
echo 'Starting SSH session in background...'
|
||||
./ssh-session.sh "$sshd_pid" "$cloudflared_pid" $TIMEOUT &
|
||||
|
||||
echo 'SSH session is running in background. GitHub Action will continue.'
|
||||
echo 'Session will auto-cleanup after timeout or when processes end.'
|
||||
21
.github/actions/ssh-debug/ssh-session.sh
vendored
21
.github/actions/ssh-debug/ssh-session.sh
vendored
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
SSHD_PID=$1
|
||||
CLOUDFLARED_PID=$2
|
||||
SESSION_TIMEOUT=${3:-3600}
|
||||
|
||||
# Wait for timeout or until processes die.
|
||||
sleep "$SESSION_TIMEOUT" &
|
||||
SLEEP_PID=$!
|
||||
|
||||
# Monitor if SSH or cloudflared dies early.
|
||||
while kill -0 "$SSHD_PID" 2>/dev/null && kill -0 "$CLOUDFLARED_PID" 2>/dev/null && kill -0 "$SLEEP_PID" 2>/dev/null; do
|
||||
sleep 10
|
||||
done
|
||||
|
||||
# Cleanup.
|
||||
kill "$SLEEP_PID" 2>/dev/null || true
|
||||
kill "$SSHD_PID" 2>/dev/null || true
|
||||
kill "$CLOUDFLARED_PID" 2>/dev/null || true
|
||||
|
||||
echo "SSH session ended"
|
||||
@@ -1,9 +0,0 @@
|
||||
Port 2222
|
||||
HostKey $PWD/ssh_host_rsa_key
|
||||
PidFile $PWD/sshd.pid
|
||||
|
||||
# Only allow single user
|
||||
AllowUsers $USER
|
||||
|
||||
# Only allow those keys
|
||||
AuthorizedKeysFile $PWD/authorized_keys
|
||||
12
.github/workflows/audit-branch-ci.yml
vendored
12
.github/workflows/audit-branch-ci.yml
vendored
@@ -15,11 +15,7 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 22.17.x
|
||||
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
|
||||
- run: npm install @actions/cache @electron/fiddle-core
|
||||
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
id: audit-errors
|
||||
with:
|
||||
@@ -33,7 +29,7 @@ jobs:
|
||||
// Only want the most recent workflow run that wasn't skipped or cancelled
|
||||
const isValidWorkflowRun = (run) => !['skipped', 'cancelled'].includes(run.conclusion);
|
||||
|
||||
const versions = await ElectronVersions.create({ ignoreCache: true });
|
||||
const versions = await ElectronVersions.create(undefined, { ignoreCache: true });
|
||||
const branches = versions.supportedMajors.map((branch) => `${branch}-x-y`);
|
||||
|
||||
for (const branch of ["main", ...branches]) {
|
||||
@@ -105,6 +101,7 @@ jobs:
|
||||
}
|
||||
|
||||
if (runsWithErrors.length > 0) {
|
||||
core.setOutput('errorsFound', true);
|
||||
core.summary.addHeading('⚠️ Runs with Errors');
|
||||
core.summary.addTable([
|
||||
[
|
||||
@@ -131,7 +128,6 @@ jobs:
|
||||
|
||||
// Set this as failed so it's easy to scan runs to find failures
|
||||
if (runsWithErrors.find((run) => !run.isStale)) {
|
||||
core.setOutput('errorsFound', true);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
} else {
|
||||
@@ -141,7 +137,7 @@ jobs:
|
||||
await core.summary.write();
|
||||
- name: Send Slack message if errors
|
||||
if: ${{ always() && steps.audit-errors.outputs.errorsFound && github.ref == 'refs/heads/main' }}
|
||||
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
|
||||
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0
|
||||
with:
|
||||
payload: |
|
||||
link: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
|
||||
@@ -73,7 +73,6 @@ env:
|
||||
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
|
||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || inputs.target-platform == 'win' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -95,15 +94,6 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Setup SSH Debugging
|
||||
if: ${{ inputs.target-platform == 'macos' && env.ACTIONS_STEP_DEBUG == 'true' }}
|
||||
uses: ./src/electron/.github/actions/ssh-debug
|
||||
with:
|
||||
tunnel: 'true'
|
||||
env:
|
||||
CLOUDFLARE_TUNNEL_TOKEN: ${{ secrets.CLOUDFLARE_TUNNEL_TOKEN }}
|
||||
TUNNEL_HOSTNAME: ${{ secrets.CLOUDFLARED_SSH_HOSTNAME }}
|
||||
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
|
||||
- name: Free up space (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/free-space-macos
|
||||
|
||||
@@ -40,7 +40,6 @@ env:
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -125,15 +124,6 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Setup SSH Debugging
|
||||
if: ${{ inputs.target-platform == 'macos' && env.ACTIONS_STEP_DEBUG == 'true' }}
|
||||
uses: ./src/electron/.github/actions/ssh-debug
|
||||
with:
|
||||
tunnel: 'true'
|
||||
env:
|
||||
CLOUDFLARE_TUNNEL_TOKEN: ${{ secrets.CLOUDFLARE_TUNNEL_TOKEN }}
|
||||
TUNNEL_HOSTNAME: ${{ secrets.CLOUDFLARED_SSH_HOSTNAME }}
|
||||
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
|
||||
2
.github/workflows/pull-request-labeled.yml
vendored
2
.github/workflows/pull-request-labeled.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger Slack workflow
|
||||
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
|
||||
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0
|
||||
with:
|
||||
webhook: ${{ secrets.BACKPORT_REQUESTED_SLACK_WEBHOOK_URL }}
|
||||
webhook-type: webhook-trigger
|
||||
|
||||
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@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'140.0.7312.0',
|
||||
'140.0.7309.0',
|
||||
'node_version':
|
||||
'v22.17.1',
|
||||
'nan_version':
|
||||
|
||||
@@ -67,6 +67,10 @@ template("mac_xib_bundle_data") {
|
||||
ibtool_flags = [
|
||||
"--minimum-deployment-target",
|
||||
mac_deployment_target,
|
||||
|
||||
# TODO(rsesek): Enable this once all the bots are on Xcode 7+.
|
||||
# "--target-device",
|
||||
# "mac",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/ui/views/overlay/toggle_camera_button.h",
|
||||
"//chrome/browser/ui/views/overlay/toggle_microphone_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/toggle_microphone_button.h",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.h",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.mm",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_views.cc",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_views.h",
|
||||
"//chrome/browser/ui/views/picture_in_picture/picture_in_picture_bounds_change_animation.cc",
|
||||
@@ -284,8 +286,6 @@ static_library("chrome") {
|
||||
"//chrome/browser/process_singleton_mac.mm",
|
||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.h",
|
||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.mm",
|
||||
]
|
||||
deps += [ ":system_media_capture_permissions_mac_conflict" ]
|
||||
}
|
||||
@@ -508,17 +508,15 @@ source_set("chrome_spellchecker") {
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
# These sources create an object file conflict with one in |:chrome|, so they
|
||||
# must live in a separate target.
|
||||
# Conflicting sources:
|
||||
# //chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm
|
||||
# //chrome/browser/permissions/system/system_media_capture_permissions_mac.mm
|
||||
source_set("system_media_capture_permissions_mac_conflict") {
|
||||
sources = [
|
||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.h",
|
||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.mm",
|
||||
]
|
||||
deps = [ "//chrome/common" ]
|
||||
}
|
||||
# These sources create an object file conflict with one in |:chrome|, so they
|
||||
# must live in a separate target.
|
||||
# Conflicting sources:
|
||||
# //chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm
|
||||
# //chrome/browser/permissions/system/system_media_capture_permissions_mac.mm
|
||||
source_set("system_media_capture_permissions_mac_conflict") {
|
||||
sources = [
|
||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.h",
|
||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.mm",
|
||||
]
|
||||
deps = [ "//chrome/common" ]
|
||||
}
|
||||
|
||||
@@ -331,22 +331,6 @@ Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https:
|
||||
|
||||
Disable exposition of [Navigator API][] on the global scope from Node.js.
|
||||
|
||||
## Chromium Flags
|
||||
|
||||
There isn't a documented list of all Chromium switches, but there are a few ways to find them.
|
||||
|
||||
The easiest way is through Chromium's flags page, which you can access at `about://flags`. These flags don't directly match switch names, but they show up in the process's command-line arguments.
|
||||
|
||||
To see these arguments, enable a flag in `about://flags`, then go to `about://version` in Chromium. You'll find a list of command-line arguments, including `--flag-switches-begin --your --list --flag-switches-end`, which contains the list of your flag enabled switches.
|
||||
|
||||
Most flags are included as part of `--enable-features=`, but some are standalone switches, like `--enable-experimental-web-platform-features`.
|
||||
|
||||
A complete list of flags exists in [Chromium's flag metadata page](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/flag-metadata.json), but this list includes platform, environment and GPU specific, expired and potentially non-functional flags, so many of them might not always work in every situation.
|
||||
|
||||
Keep in mind that standalone switches can sometimes be split into individual features, so there's no fully complete list of switches.
|
||||
|
||||
Finally, you'll need to ensure that the version of Chromium in Electron matches the version of the browser you're using to cross-reference the switches.
|
||||
|
||||
[app]: app.md
|
||||
[append-switch]: command-line.md#commandlineappendswitchswitch-value
|
||||
[debugging-main-process]: ../tutorial/debugging-main-process.md
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
# ColorSpace Object
|
||||
|
||||
* `primaries` string - The color primaries of the color space. Can be one of the following values:
|
||||
* `bt709` - BT709 primaries (also used for sRGB)
|
||||
* `bt470m` - BT470M primaries
|
||||
* `bt470bg` - BT470BG primaries
|
||||
* `smpte170m` - SMPTE170M primaries
|
||||
* `smpte240m` - SMPTE240M primaries
|
||||
* `film` - Film primaries
|
||||
* `bt2020` - BT2020 primaries
|
||||
* `smptest428-1` - SMPTEST428-1 primaries
|
||||
* `smptest431-2` - SMPTEST431-2 primaries
|
||||
* `p3` - P3 primaries
|
||||
* `xyz-d50` - XYZ D50 primaries
|
||||
* `adobe-rgb` - Adobe RGB primaries
|
||||
* `apple-generic-rgb` - Apple Generic RGB primaries
|
||||
* `wide-gamut-color-spin` - Wide Gamut Color Spin primaries
|
||||
* `ebu-3213-e` - EBU 3213-E primaries
|
||||
* `custom` - Custom primaries
|
||||
* `invalid` - Invalid primaries
|
||||
|
||||
* `transfer` string - The transfer function of the color space. Can be one of the following values:
|
||||
* `bt709` - BT709 transfer function
|
||||
* `bt709-apple` - BT709 Apple transfer function
|
||||
* `gamma18` - Gamma 1.8 transfer function
|
||||
* `gamma22` - Gamma 2.2 transfer function
|
||||
* `gamma24` - Gamma 2.4 transfer function
|
||||
* `gamma28` - Gamma 2.8 transfer function
|
||||
* `smpte170m` - SMPTE170M transfer function
|
||||
* `smpte240m` - SMPTE240M transfer function
|
||||
* `linear` - Linear transfer function
|
||||
* `log` - Log transfer function
|
||||
* `log-sqrt` - Log Square Root transfer function
|
||||
* `iec61966-2-4` - IEC61966-2-4 transfer function
|
||||
* `bt1361-ecg` - BT1361 ECG transfer function
|
||||
* `srgb` - sRGB transfer function
|
||||
* `bt2020-10` - BT2020-10 transfer function
|
||||
* `bt2020-12` - BT2020-12 transfer function
|
||||
* `pq` - PQ (Perceptual Quantizer) transfer function
|
||||
* `smptest428-1` - SMPTEST428-1 transfer function
|
||||
* `hlg` - HLG (Hybrid Log-Gamma) transfer function
|
||||
* `srgb-hdr` - sRGB HDR transfer function
|
||||
* `linear-hdr` - Linear HDR transfer function
|
||||
* `custom` - Custom transfer function
|
||||
* `custom-hdr` - Custom HDR transfer function
|
||||
* `scrgb-linear-80-nits` - scRGB Linear 80 nits transfer function
|
||||
* `invalid` - Invalid transfer function
|
||||
|
||||
* `matrix` string - The color matrix of the color space. Can be one of the following values:
|
||||
* `rgb` - RGB matrix
|
||||
* `bt709` - BT709 matrix
|
||||
* `fcc` - FCC matrix
|
||||
* `bt470bg` - BT470BG matrix
|
||||
* `smpte170m` - SMPTE170M matrix
|
||||
* `smpte240m` - SMPTE240M matrix
|
||||
* `ycocg` - YCoCg matrix
|
||||
* `bt2020-ncl` - BT2020 NCL matrix
|
||||
* `ydzdx` - YDzDx matrix
|
||||
* `gbr` - GBR matrix
|
||||
* `invalid` - Invalid matrix
|
||||
|
||||
* `range` string - The color range of the color space. Can be one of the following values:
|
||||
* `limited` - Limited color range (RGB values ranging from 16 to 235)
|
||||
* `full` - Full color range (RGB values from 0 to 255)
|
||||
* `derived` - Range defined by the transfer function and matrix
|
||||
* `invalid` - Invalid range
|
||||
|
||||
## Common `ColorSpace` definitions
|
||||
|
||||
### Standard Color Spaces
|
||||
|
||||
**sRGB**:
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'srgb',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**Display P3**:
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'p3',
|
||||
transfer: 'srgb',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**XYZ D50**:
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'xyz-d50',
|
||||
transfer: 'linear',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
### HDR Color Spaces
|
||||
|
||||
**Extended sRGB** (extends sRGB to all real values):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'srgb-hdr',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**scRGB Linear** (linear transfer function for all real values):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'linear-hdr',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**scRGB Linear 80 Nits** (with an SDR white level of 80 nits):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'scrgb-linear-80-nits',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**HDR10** (BT.2020 primaries with PQ transfer function):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt2020',
|
||||
transfer: 'pq',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
**HLG** (BT.2020 primaries with HLG transfer function):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt2020',
|
||||
transfer: 'hlg',
|
||||
matrix: 'rgb',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
|
||||
### Video Color Spaces
|
||||
|
||||
**Rec. 601** (SDTV):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'smpte170m',
|
||||
transfer: 'smpte170m',
|
||||
matrix: 'smpte170m',
|
||||
range: 'limited'
|
||||
}
|
||||
```
|
||||
|
||||
**Rec. 709** (HDTV):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
matrix: 'bt709',
|
||||
range: 'limited'
|
||||
}
|
||||
```
|
||||
|
||||
**JPEG** (typical color space for JPEG images):
|
||||
|
||||
```js
|
||||
const cs = {
|
||||
primaries: 'bt709',
|
||||
transfer: 'srgb',
|
||||
matrix: 'smpte170m',
|
||||
range: 'full'
|
||||
}
|
||||
```
|
||||
@@ -1,35 +1,17 @@
|
||||
# USBDevice Object
|
||||
|
||||
* `configuration` Object (optional) - A [USBConfiguration](https://developer.mozilla.org/en-US/docs/Web/API/USBConfiguration) object containing information about the currently selected configuration of a USB device.
|
||||
* `configurationValue` Integer - the configuration value of this configuration.
|
||||
* `configurationName` string - the name provided by the device to describe this configuration.
|
||||
* `interfaces` Object[] - An array of [USBInterface](https://developer.mozilla.org/en-US/docs/Web/API/USBInterface) objects containing information about an interface provided by the USB device.
|
||||
* `interfaceNumber` Integer - the interface number of this interface.
|
||||
* `alternate` Object - the currently selected alternative configuration of this interface.
|
||||
* `alternateSetting` Integer - the alternate setting number of this interface.
|
||||
* `interfaceClass` Integer - the class of this interface. See [USB.org](https://www.usb.org/defined-class-codes) for class code descriptions.
|
||||
* `interfaceSubclass` Integer - the subclass of this interface.
|
||||
* `interfaceProtocol` Integer - the protocol supported by this interface.
|
||||
* `interfaceName` string (optional) - the name of the interface, if one is provided by the device.
|
||||
* `endpoints` Object[] - an array containing instances of the [USBEndpoint interface](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint) describing each of the endpoints that are part of this interface.
|
||||
* `endpointNumber` Integer - this endpoint's "endpoint number" which is a value from 1 to 15.
|
||||
* `direction` string - the direction in which this endpoint transfers data - can be either 'in' or 'out'.
|
||||
* `type` string - the type of this endpoint - can be either 'bulk', 'interrupt', or 'isochronous'.
|
||||
* `packetSize` Integer - the size of the packets that data sent through this endpoint will be divided into.
|
||||
* `alternates` Object[] - an array containing instances of the [USBAlternateInterface](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface) interface describing each of the alternative configurations possible for this interface.
|
||||
* `configurations` Object[] - An array of [USBConfiguration](https://developer.mozilla.org/en-US/docs/Web/API/USBConfiguration) interfaces for controlling a paired USB device.
|
||||
* `deviceClass` Integer - The device class for the communication interface supported by the device.
|
||||
* `deviceId` string - Unique identifier for the device.
|
||||
* `deviceProtocol` Integer - The device protocol for the communication interface supported by the device.
|
||||
* `deviceSubclass` Integer - The device subclass for the communication interface supported by the device.
|
||||
* `deviceVersionMajor` Integer - The major version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionMinor` Integer - The minor version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionSubminor` Integer - The subminor version number of the device as defined by the device manufacturer.
|
||||
* `manufacturerName` string (optional) - The manufacturer name of the device.
|
||||
* `vendorId` Integer - The USB vendor ID.
|
||||
* `productId` Integer - The USB product ID.
|
||||
* `productName` string (optional) - Name of the device.
|
||||
* `serialNumber` string (optional) - The USB device serial number.
|
||||
* `usbVersionMajor` Integer - The USB protocol major version supported by the device.
|
||||
* `usbVersionMinor` Integer - The USB protocol minor version supported by the device.
|
||||
* `usbVersionSubminor` Integer - The USB protocol subminor version supported by the device.
|
||||
* `vendorId` Integer - The USB vendor ID.
|
||||
* `manufacturerName` string (optional) - The manufacturer name of the device.
|
||||
* `usbVersionMajor` Integer - The USB protocol major version supported by the device
|
||||
* `usbVersionMinor` Integer - The USB protocol minor version supported by the device
|
||||
* `usbVersionSubminor` Integer - The USB protocol subminor version supported by the device
|
||||
* `deviceClass` Integer - The device class for the communication interface supported by the device
|
||||
* `deviceSubclass` Integer - The device subclass for the communication interface supported by the device
|
||||
* `deviceProtocol` Integer - The device protocol for the communication interface supported by the device
|
||||
* `deviceVersionMajor` Integer - The major version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionMinor` Integer - The minor version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionSubminor` Integer - The subminor version number of the device as defined by the device manufacturer.
|
||||
|
||||
@@ -37,23 +37,6 @@ The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
|
||||
|
||||
You should use `webFrame.findFrameByToken(frameToken)` instead.
|
||||
|
||||
### Behavior Changed: window.open popups are always resizable
|
||||
|
||||
Per current [WHATWG spec](https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-open-dev), the `window.open` API will now always create a resizable popup window.
|
||||
|
||||
To restore previous behavior:
|
||||
|
||||
```js
|
||||
webContents.setWindowOpenHandler((details) => {
|
||||
return {
|
||||
action: 'allow',
|
||||
overrideBrowserWindowOptions: {
|
||||
resizable: details.features.includes('resizable=yes')
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (37.0)
|
||||
|
||||
### Utility Process unhandled rejection behavior change
|
||||
|
||||
@@ -74,22 +74,46 @@ describe('keyboard input', () => {
|
||||
Furthermore, WebdriverIO allows you to access Electron APIs to get static information about your application:
|
||||
|
||||
```js @ts-nocheck
|
||||
import { browser } from '@wdio/globals'
|
||||
import { browser, $, expect } from '@wdio/globals'
|
||||
|
||||
describe('trigger message modal', async () => {
|
||||
it('message modal can be triggered from a test', async () => {
|
||||
await browser.electron.execute(
|
||||
(electron, param1, param2, param3) => {
|
||||
const appWindow = electron.BrowserWindow.getFocusedWindow()
|
||||
electron.dialog.showMessageBox(appWindow, {
|
||||
message: 'Hello World!',
|
||||
detail: `${param1} + ${param2} + ${param3} = ${param1 + param2 + param3}`
|
||||
})
|
||||
},
|
||||
1,
|
||||
2,
|
||||
3
|
||||
)
|
||||
describe('when the make smaller button is clicked', () => {
|
||||
it('should decrease the window height and width by 10 pixels', async () => {
|
||||
const boundsBefore = await browser.electron.browserWindow('getBounds')
|
||||
expect(boundsBefore.width).toEqual(210)
|
||||
expect(boundsBefore.height).toEqual(310)
|
||||
|
||||
await $('.make-smaller').click()
|
||||
const boundsAfter = await browser.electron.browserWindow('getBounds')
|
||||
expect(boundsAfter.width).toEqual(200)
|
||||
expect(boundsAfter.height).toEqual(300)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
or to retrieve other Electron process information:
|
||||
|
||||
```js @ts-nocheck
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
import { browser, expect } from '@wdio/globals'
|
||||
|
||||
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), { encoding: 'utf-8' }))
|
||||
const { name, version } = packageJson
|
||||
|
||||
describe('electron APIs', () => {
|
||||
it('should retrieve app metadata through the electron API', async () => {
|
||||
const appName = await browser.electron.app('getName')
|
||||
expect(appName).toEqual(name)
|
||||
const appVersion = await browser.electron.app('getVersion')
|
||||
expect(appVersion).toEqual(version)
|
||||
})
|
||||
|
||||
it('should pass args through to the launched application', async () => {
|
||||
// custom args are set in the wdio.conf.js file as they need to be set before WDIO starts
|
||||
const argv = await browser.electron.mainProcess('argv')
|
||||
expect(argv).toContain('--foo')
|
||||
expect(argv).toContain('--bar=baz')
|
||||
})
|
||||
})
|
||||
```
|
||||
@@ -182,7 +206,7 @@ npm install --save-dev @playwright/test
|
||||
```
|
||||
|
||||
:::caution Dependencies
|
||||
This tutorial was written with `@playwright/test@1.52.0`. Check out
|
||||
This tutorial was written with `@playwright/test@1.41.1`. Check out
|
||||
[Playwright's releases][playwright-releases] page to learn about
|
||||
changes that might affect the code below.
|
||||
:::
|
||||
@@ -194,10 +218,10 @@ To point this API to your Electron app, you can pass the path to your main proce
|
||||
entry point (here, it is `main.js`).
|
||||
|
||||
```js {5} @ts-nocheck
|
||||
import { test, _electron as electron } from '@playwright/test'
|
||||
const { test, _electron: electron } = require('@playwright/test')
|
||||
|
||||
test('launch app', async () => {
|
||||
const electronApp = await electron.launch({ args: ['.'] })
|
||||
const electronApp = await electron.launch({ args: ['main.js'] })
|
||||
// close app
|
||||
await electronApp.close()
|
||||
})
|
||||
@@ -207,10 +231,10 @@ After that, you will access to an instance of Playwright's `ElectronApp` class.
|
||||
is a powerful class that has access to main process modules for example:
|
||||
|
||||
```js {5-10} @ts-nocheck
|
||||
import { test, _electron as electron } from '@playwright/test'
|
||||
const { test, _electron: electron } = require('@playwright/test')
|
||||
|
||||
test('get isPackaged', async () => {
|
||||
const electronApp = await electron.launch({ args: ['.'] })
|
||||
const electronApp = await electron.launch({ args: ['main.js'] })
|
||||
const isPackaged = await electronApp.evaluate(async ({ app }) => {
|
||||
// This runs in Electron's main process, parameter here is always
|
||||
// the result of the require('electron') in the main app script.
|
||||
@@ -226,10 +250,10 @@ It can also create individual [Page][playwright-page] objects from Electron Brow
|
||||
For example, to grab the first BrowserWindow and save a screenshot:
|
||||
|
||||
```js {6-7} @ts-nocheck
|
||||
import { test, _electron as electron } from '@playwright/test'
|
||||
const { test, _electron: electron } = require('@playwright/test')
|
||||
|
||||
test('save screenshot', async () => {
|
||||
const electronApp = await electron.launch({ args: ['.'] })
|
||||
const electronApp = await electron.launch({ args: ['main.js'] })
|
||||
const window = await electronApp.firstWindow()
|
||||
await window.screenshot({ path: 'intro.png' })
|
||||
// close app
|
||||
@@ -241,7 +265,7 @@ Putting all this together using the Playwright test-runner, let's create a `exam
|
||||
test file with a single test and assertion:
|
||||
|
||||
```js title='example.spec.js' @ts-nocheck
|
||||
import { test, expect, _electron as electron } from '@playwright/test'
|
||||
const { test, expect, _electron: electron } = require('@playwright/test')
|
||||
|
||||
test('example test', async () => {
|
||||
const electronApp = await electron.launch({ args: ['.'] })
|
||||
|
||||
@@ -82,7 +82,6 @@ auto_filenames = {
|
||||
"docs/api/structures/browser-window-options.md",
|
||||
"docs/api/structures/certificate-principal.md",
|
||||
"docs/api/structures/certificate.md",
|
||||
"docs/api/structures/color-space.md",
|
||||
"docs/api/structures/cookie.md",
|
||||
"docs/api/structures/cpu-usage.md",
|
||||
"docs/api/structures/crash-report.md",
|
||||
|
||||
@@ -91,12 +91,6 @@ export function parseFeatures (features: string) {
|
||||
delete parsed[key];
|
||||
}
|
||||
|
||||
// Per spec - https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-open-dev
|
||||
// windows are always resizable.
|
||||
if (parsed.resizable !== undefined) {
|
||||
delete parsed.resizable;
|
||||
}
|
||||
|
||||
if (parsed.left !== undefined) parsed.x = parsed.left;
|
||||
if (parsed.top !== undefined) parsed.y = parsed.top;
|
||||
|
||||
|
||||
@@ -137,3 +137,4 @@ 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
|
||||
revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch
|
||||
|
||||
@@ -10,10 +10,10 @@ Needed for:
|
||||
2) //electron/shell/common:web_contents_utility
|
||||
|
||||
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
|
||||
index 647c4457217c87cfc1dfaeb99b2f2b66395cbfe4..3b9a57ec56b34673f684ac19a0324c775b3040c2 100644
|
||||
index 950646641fa53cc690db65f81c07aab30c3cf7c6..4afa6a16d888b297b150b32b2a9f795541c560bf 100644
|
||||
--- a/content/public/common/BUILD.gn
|
||||
+++ b/content/public/common/BUILD.gn
|
||||
@@ -383,6 +383,8 @@ mojom("interfaces") {
|
||||
@@ -382,6 +382,8 @@ mojom("interfaces") {
|
||||
"//content/common/*",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common:mojom_blink",
|
||||
|
||||
@@ -33,7 +33,7 @@ index 2fb245ad4daabdf430be1f593e73b2da90504419..2f7cd882b6c6d893917b1f7850ee0843
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index d090c2ac6d075915f7533ddcc3f75608fbaa18ea..29bd19809f7c50187b84fb9e6577df8e9aca8204 100644
|
||||
index 40660c2e292cb0559ebef28ab1172eb6871c5423..0d8cac8fe3a75e823400ae819bbb6edaefbafdb6 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4760,7 +4760,7 @@ static_library("browser") {
|
||||
@@ -46,10 +46,10 @@ index d090c2ac6d075915f7533ddcc3f75608fbaa18ea..29bd19809f7c50187b84fb9e6577df8e
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index b4592a79623dc2659a75249b716085e88b483955..de666e79b0d5f261ab1528593e0b85b74cae8bb6 100644
|
||||
index a11499f0976966d1941e7da6621343a2cce34ead..786febeb58506ce70b0557bbee9060183f108caa 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7458,9 +7458,12 @@ test("unit_tests") {
|
||||
@@ -7455,9 +7455,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index b4592a79623dc2659a75249b716085e88b483955..de666e79b0d5f261ab1528593e0b85b7
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8391,6 +8394,10 @@ test("unit_tests") {
|
||||
@@ -8388,6 +8391,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index b4592a79623dc2659a75249b716085e88b483955..de666e79b0d5f261ab1528593e0b85b7
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8446,7 +8453,6 @@ test("unit_tests") {
|
||||
@@ -8443,7 +8450,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",
|
||||
|
||||
@@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 3f62466413bf1df98ecbd70633123d7c652a61dc..2cbc92cab0bf5affbc1f655d96b805dcaf670150 100644
|
||||
index 4358fcc3dd45e6801b034b21c4ff29144501b719..09f80b28b68a47aec778183d46f1e847649b241b 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1872,6 +1872,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
|
||||
@@ -25,7 +25,7 @@ Refs https://issues.chromium.org/issues/40210365 which is blocked
|
||||
on https://issues.chromium.org/issues/42203693
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001dec5b08ff 100644
|
||||
index d1b95149ea0d16af2606900f10898a355026ffe1..fe1d866cba3b1a221092e1d6dced027894b3f3af 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -35,6 +35,8 @@ v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;
|
||||
@@ -37,7 +37,7 @@ index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001d
|
||||
|
||||
std::unique_ptr<v8::Isolate::CreateParams> getModifiedIsolateParams(
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
@@ -203,10 +205,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
@@ -205,10 +207,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ index 11846daf710f7cc272da17f14b8813fea93fe7e6..136fa55e7945f1d6abf5731c9cbaa921
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (!options_.preload_libraries_.empty()) {
|
||||
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
|
||||
index 580fa663e729a43bef44a10de8983c4aecc312fb..f39af3df87786a472f987309ac0dea699b9f0d9f 100644
|
||||
index a0995700d414f3126d11ae2cf4c02b06b820a06e..5b3e1c8cf09b7135443c056c27239fb9ef3fd9c9 100644
|
||||
--- a/content/browser/service_host/utility_process_host.h
|
||||
+++ b/content/browser/service_host/utility_process_host.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -284,7 +284,7 @@ index 580fa663e729a43bef44a10de8983c4aecc312fb..f39af3df87786a472f987309ac0dea69
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
namespace base {
|
||||
@@ -134,14 +135,31 @@ class CONTENT_EXPORT UtilityProcessHost final
|
||||
@@ -134,14 +135,31 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
std::variant<base::FilePath, base::ScopedFD> file);
|
||||
#endif
|
||||
|
||||
@@ -319,7 +319,7 @@ index 580fa663e729a43bef44a10de8983c4aecc312fb..f39af3df87786a472f987309ac0dea69
|
||||
// Requests that the process bind a receiving pipe targeting the interface
|
||||
// named by `receiver`. Calls to this method generally end up in
|
||||
// `ChildThreadImpl::OnBindReceiver()` and the option is used for testing
|
||||
@@ -185,6 +203,27 @@ class CONTENT_EXPORT UtilityProcessHost final
|
||||
@@ -185,6 +203,27 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
std::optional<raw_ptr<ZygoteCommunication>> zygote_for_testing_;
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
|
||||
@@ -130,10 +130,10 @@ index 2f7d7fbb8d95791dd287170b9f99dd420cfa9487..b705afe19cbb3a39a42a869eb994e7aa
|
||||
} // 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 e92887580b37210c86b33b3ce18052cfd6a3f674..84bd1305ed1b278501df27acf153144c3f146a72 100644
|
||||
index 8f3031a26ad1e50d7658319360734ea58e78d6d0..a524bb02db69f5716a37d392e9f63e5a24ad1f73 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
|
||||
@@ -4033,6 +4033,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
@@ -4013,6 +4013,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
return PositionTryFallback(scoped_name, tactic_list);
|
||||
}
|
||||
|
||||
@@ -150,10 +150,10 @@ index e92887580b37210c86b33b3ce18052cfd6a3f674..84bd1305ed1b278501df27acf153144c
|
||||
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 40123605bcd044d11ffa643c9ed0a182795059b3..ff3153cbe24212e844b34b5829dacf1a84bb06b8 100644
|
||||
index 047757180c5af2a45296d347b44cec156d74c65d..24a607ac9f49176dac2c14da85f0ca85f87b1189 100644
|
||||
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
|
||||
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
|
||||
@@ -434,6 +434,7 @@ class StyleBuilderConverter {
|
||||
@@ -431,6 +431,7 @@ class StyleBuilderConverter {
|
||||
static PositionTryFallback ConvertSinglePositionTryFallback(
|
||||
StyleResolverState&,
|
||||
const CSSValue&);
|
||||
@@ -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 52ae779fed980c7fb06d770fd3395d56c247b065..664c87d634730b22369007922c967a4089635197 100644
|
||||
index 4ca6cbc36ce4e183d3291c1a03b89b0a58fc5810..8811ec2ffed7e11c9ee4e25a4491568c55cd95a6 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 @@
|
||||
|
||||
@@ -97,10 +97,10 @@ index 136fa55e7945f1d6abf5731c9cbaa92148f8117d..ba6dbc588c809c482770d2f78d1cd97e
|
||||
|
||||
std::optional<std::string> UtilityProcessHost::GetServiceName() {
|
||||
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
|
||||
index f39af3df87786a472f987309ac0dea699b9f0d9f..6f470d19fa5fa0bd4d2bdb1be4aa0cb3a70d3936 100644
|
||||
index 5b3e1c8cf09b7135443c056c27239fb9ef3fd9c9..b33f3f7ea5e92b8dc63fec0acdb4d9eaea57af99 100644
|
||||
--- a/content/browser/service_host/utility_process_host.h
|
||||
+++ b/content/browser/service_host/utility_process_host.h
|
||||
@@ -88,7 +88,7 @@ class CONTENT_EXPORT UtilityProcessHost final
|
||||
@@ -88,7 +88,7 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
virtual void OnProcessTerminatedNormally() {}
|
||||
// Called when the process has terminated due to a crash. The `type` field
|
||||
// indicates the type of crash. See above.
|
||||
|
||||
@@ -7,7 +7,7 @@ We don't use gin to create the V8 platform, because we need to inject Node
|
||||
things.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 079e9db7df8e47904c337783f7f75d7ea3b3d643..528abd094dd501e462fd197bfd69379e11ba9eaf 100644
|
||||
index b3416c90c9071d8d32d30ecf257b64f133b2ae07..8632f1c18b407bb7832900bcebadacb3707224ac 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -162,11 +162,13 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 40441331934df92b9903c005065e6eedcfed69e1..96fc4ccc3f1dd65cf59df4a32adb587193afe6d0 100644
|
||||
index 7693ff03125e2c4a7a02d19c4a0096b2ee566e48..2417a0e46102202f0e696c47cdd6d84b248dabfd 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1547,6 +1547,11 @@
|
||||
|
||||
@@ -15,7 +15,7 @@ for us to register the isolate in between Isolate::Allocate and
|
||||
Isolate::Initialize.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 528abd094dd501e462fd197bfd69379e11ba9eaf..5255c1094c88761c19af1ea294ceccaca63b5ae4 100644
|
||||
index 8632f1c18b407bb7832900bcebadacb3707224ac..d1b95149ea0d16af2606900f10898a355026ffe1 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -81,7 +81,8 @@ IsolateHolder::IsolateHolder(
|
||||
|
||||
@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 4f6afc75d3cbeda40b34442153653beecd09767c..e08e5b83dad4d2e6f6b0c09303718c16f2ddcef9 100644
|
||||
index 7f7c60a6777c72c76eff5a261e0af12c2a244634..d928082d92b96dc0b33cec9c6942baa8830239e1 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1055,6 +1055,7 @@ component("base") {
|
||||
@@ -715,7 +715,7 @@ index ef3b5ceba5e460cdfc609245a53d6d1720f32564..910043ba8cc79774550c0097f5bef53e
|
||||
|
||||
defines = []
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index f6ebfaf945c0b024f18e5e09f04dfa43caf63e22..c8e241cdeac0bfbfe715404722aab6d6d1ded2f1 100644
|
||||
index 00210ede4f315e9c694a4f477eedd316c2e0c23b..b2557fa60946176ad38edafcd874b5d3a8276c10 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -319,6 +319,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -1874,10 +1874,10 @@ index fe3f85073e31de487a08e57d7f9b07aa4eccf8f3..cf5b07203c8bd559a404600cc98cc8ec
|
||||
// enough.
|
||||
return PlatformFontMac::SystemFontType::kGeneral;
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 88c3981b7be09054de9496ff81fcb9db206235b5..b4917fdc2fb6f6f75f1c6696c5bb2386ee2d0a0b 100644
|
||||
index b57de34473e7a5615c176ad22a99b3fa028c50ba..fcec8ef135d6aa9bd30f191e51ff98cf8701b027 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -721,6 +721,8 @@ component("views") {
|
||||
@@ -719,6 +719,8 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
@@ -1886,7 +1886,7 @@ index 88c3981b7be09054de9496ff81fcb9db206235b5..b4917fdc2fb6f6f75f1c6696c5bb2386
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1150,6 +1152,8 @@ source_set("test_support") {
|
||||
@@ -1148,6 +1150,8 @@ source_set("test_support") {
|
||||
"//ui/base/mojom:ui_base_types",
|
||||
]
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index c08fedd7b86671c6102e8de0564187b613df5cd9..3f62466413bf1df98ecbd70633123d7c652a61dc 100644
|
||||
index 0715ffeda932d5ef8b5c90008ada8e84efbff765..4358fcc3dd45e6801b034b21c4ff29144501b719 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -165,6 +165,11 @@
|
||||
|
||||
@@ -6,14 +6,26 @@ Subject: Preconnect manager
|
||||
* Patch disables the profile related changes added in
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/3928470.
|
||||
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
|
||||
index 9fe1c93b5cf2a5e7551f070d1d1d01683350675d..6ec8305948c3e2552775a458621c7794f839d09c 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager.h
|
||||
+++ b/chrome/browser/predictors/preconnect_manager.h
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
-#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
||||
#include "content/public/browser/preconnect_request.h"
|
||||
#include "content/public/browser/storage_partition_config.h"
|
||||
#include "mojo/public/cpp/bindings/receiver.h"
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager_impl.cc b/chrome/browser/predictors/preconnect_manager_impl.cc
|
||||
index 57d544c0b03c80bdc015ce79d3aa78054d43c6e7..e9547e23d8bb2a5ac120c901405720cbde89737c 100644
|
||||
index 639247fec01823ee942a1fb56f2511020ab0f228..6a625fcdd0ddcd55591a90126551f174c81889b1 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager_impl.cc
|
||||
+++ b/chrome/browser/predictors/preconnect_manager_impl.cc
|
||||
@@ -13,9 +13,11 @@
|
||||
#include "base/trace_event/trace_event.h"
|
||||
@@ -14,9 +14,11 @@
|
||||
#include "base/types/optional_util.h"
|
||||
#include "chrome/browser/predictors/predictors_features.h"
|
||||
#include "chrome/browser/predictors/predictors_traffic_annotations.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
||||
#include "chrome/browser/preloading/preloading_prefs.h"
|
||||
@@ -22,7 +34,7 @@ index 57d544c0b03c80bdc015ce79d3aa78054d43c6e7..e9547e23d8bb2a5ac120c901405720cb
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
@@ -106,12 +108,15 @@ PreconnectManagerImpl::PreconnectManagerImpl(
|
||||
@@ -105,12 +107,15 @@ PreconnectManagerImpl::PreconnectManagerImpl(
|
||||
PreconnectManagerImpl::~PreconnectManagerImpl() = default;
|
||||
|
||||
bool PreconnectManagerImpl::IsEnabled() {
|
||||
@@ -38,3 +50,17 @@ index 57d544c0b03c80bdc015ce79d3aa78054d43c6e7..e9547e23d8bb2a5ac120c901405720cb
|
||||
}
|
||||
|
||||
base::WeakPtr<PreconnectManager> PreconnectManagerImpl::GetWeakPtr() {
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager_impl.h b/chrome/browser/predictors/preconnect_manager_impl.h
|
||||
index cf28c1c2572cf7c8c555ffdcb0e945b1b3c5d3ce..e057183ba0ec3ddf803302cf6e8418cb44b6b42a 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager_impl.h
|
||||
+++ b/chrome/browser/predictors/preconnect_manager_impl.h
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "chrome/browser/predictors/preconnect_manager.h"
|
||||
#include "chrome/browser/predictors/proxy_lookup_client_impl.h"
|
||||
#include "chrome/browser/predictors/resolve_host_client_impl.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
||||
+#endif
|
||||
#include "content/public/browser/preconnect_request.h"
|
||||
#include "content/public/browser/storage_partition_config.h"
|
||||
#include "net/base/network_anonymization_key.h"
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <khammond@slack-corp.com>
|
||||
Date: Wed, 16 Jul 2025 20:19:56 -0700
|
||||
Subject: Revert "Use more binaries from clang toolchain in mac build"
|
||||
|
||||
This reverts commit 17b850a9f8e913fb5e465d895f545b069def57d1.
|
||||
|
||||
As part of the above commit, Chrome began bundling their otool
|
||||
and nm binaries into third-party/llvm-build. These binaries are
|
||||
not found in our current CI builds, and we'll need to modify
|
||||
our actions to ensure they either persist or are added on MacOS.
|
||||
|
||||
This patch can be removed when both otool and nm are correctly
|
||||
persisted with third-party/llvm-build.
|
||||
|
||||
diff --git a/DEPS b/DEPS
|
||||
index 15a18361c468af57a286895448e39284d6d39bbe..559f7755314dd7dfbf74c89880a99b4a8e48ce74 100644
|
||||
--- a/DEPS
|
||||
+++ b/DEPS
|
||||
@@ -906,13 +906,6 @@ deps = {
|
||||
'generation': 1752145989568677,
|
||||
'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_coverage_tools',
|
||||
},
|
||||
- {
|
||||
- 'object_name': 'Mac/llvmobjdump-llvmorg-21-init-16348-gbd809ffb-13.tar.xz',
|
||||
- 'sha256sum': 'fff3642ab8fbfffa4f5e8feda7b7f8ab7838099b2d0d1f5ce323a1d8aebf05ca',
|
||||
- 'size_bytes': 5490072,
|
||||
- 'generation': 1752145989091474,
|
||||
- 'condition': 'host_os == "mac" and host_cpu == "x64"',
|
||||
- },
|
||||
{
|
||||
'object_name': 'Mac_arm64/clang-llvmorg-21-init-16348-gbd809ffb-13.tar.xz',
|
||||
'sha256sum': '68460f5290547d101c4c9c2e4ea74b783159e553e90dad5b422f03f58d16d05c',
|
||||
@@ -941,13 +934,6 @@ deps = {
|
||||
'generation': 1752146011858185,
|
||||
'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_coverage_tools',
|
||||
},
|
||||
- {
|
||||
- 'object_name': 'Mac_arm64/llvmobjdump-llvmorg-21-init-16348-gbd809ffb-13.tar.xz',
|
||||
- 'sha256sum': 'a8fddab5bd008eeac135e832fe327d15459bc7b1d2ca87a12fa4a9ba3c4be009',
|
||||
- 'size_bytes': 5317004,
|
||||
- 'generation': 1752146011233744,
|
||||
- 'condition': 'host_os == "mac" and host_cpu == "arm64"',
|
||||
- },
|
||||
{
|
||||
'object_name': 'Win/clang-llvmorg-21-init-16348-gbd809ffb-13.tar.xz',
|
||||
'sha256sum': '1021cc3231615a3556f691820014eb40dc93b4eb714bf4037dced002a454b763',
|
||||
diff --git a/build/toolchain/apple/toolchain.gni b/build/toolchain/apple/toolchain.gni
|
||||
index d3fdadf72eb0aa36ae9ae0d4324b61143bc55b66..d5210da1aa3bbda87ca540f67a1768dec70f3675 100644
|
||||
--- a/build/toolchain/apple/toolchain.gni
|
||||
+++ b/build/toolchain/apple/toolchain.gni
|
||||
@@ -115,9 +115,6 @@ template("single_apple_toolchain") {
|
||||
host_toolchain = host_toolchain
|
||||
}
|
||||
|
||||
- # bin_path is only used in some builds.
|
||||
- not_needed(invoker, [ "bin_path" ])
|
||||
-
|
||||
# When the invoker has explicitly overridden cc_wrapper in the
|
||||
# toolchain args, use those values, otherwise default to the global one.
|
||||
# This works because the only reasonable override that toolchains might
|
||||
@@ -213,7 +210,7 @@ template("single_apple_toolchain") {
|
||||
linker_driver_args = "-Wcrl,driver,$ld"
|
||||
|
||||
# Specify an explicit path for the strip binary.
|
||||
- _strippath = "${prefix}llvm-strip"
|
||||
+ _strippath = invoker.bin_path + "strip"
|
||||
_installnametoolpath = "${prefix}llvm-install-name-tool"
|
||||
linker_driver_args += " -Wcrl,strippath,${_strippath} -Wcrl,installnametoolpath,${_installnametoolpath}"
|
||||
_enable_dsyms = enable_dsyms
|
||||
@@ -496,8 +493,13 @@ template("single_apple_toolchain") {
|
||||
# search path in /usr/bin are thin wrappers around xcrun, which requires a
|
||||
# full CommandLineTools or Xcode install, and still may not choose the
|
||||
# appropriate binary if there are multiple installs.
|
||||
- nm = "${prefix}llvm-nm"
|
||||
- otool = "${prefix}llvm-otool"
|
||||
+ if (host_os == "mac") {
|
||||
+ nm = invoker.bin_path + "nm"
|
||||
+ otool = invoker.bin_path + "otool"
|
||||
+ } else {
|
||||
+ nm = "${prefix}llvm-nm"
|
||||
+ otool = "${prefix}llvm-otool"
|
||||
+ }
|
||||
|
||||
link_command = "$linker_driver_env $linker_driver"
|
||||
link_command += " -Wcrl,otoolpath,$otool -Wcrl,nmpath,$nm"
|
||||
diff --git a/tools/clang/scripts/sync_deps.py b/tools/clang/scripts/sync_deps.py
|
||||
index 79871b89f773f9d88c74832ad0488a8f7f3e2405..7c18b8f2ade0889d82251337f62574ed8533dc43 100755
|
||||
--- a/tools/clang/scripts/sync_deps.py
|
||||
+++ b/tools/clang/scripts/sync_deps.py
|
||||
@@ -34,14 +34,12 @@ CLANG_PLATFORM_TO_PACKAGE_FILES = {
|
||||
'clang-tidy',
|
||||
'clangd',
|
||||
'llvm-code-coverage',
|
||||
- 'llvmobjdump',
|
||||
],
|
||||
'Mac_arm64': [
|
||||
'clang',
|
||||
'clang-tidy',
|
||||
'clangd',
|
||||
'llvm-code-coverage',
|
||||
- 'llvmobjdump',
|
||||
],
|
||||
'Win': [
|
||||
'clang',
|
||||
@@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't
|
||||
necessary.
|
||||
|
||||
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
|
||||
index b087a48440b25561991ce4c4002bf0d9e2acf10e..7bbed72665f0bea9eff33cd4a7412b81621308e8 100644
|
||||
index 7f5e8e161f7503c0bffe50304db1c73b987b9a2b..7c2c91b6571264dd02dc2cad8861a26c596f6980 100644
|
||||
--- a/testing/variations/fieldtrial_testing_config.json
|
||||
+++ b/testing/variations/fieldtrial_testing_config.json
|
||||
@@ -24561,6 +24561,21 @@
|
||||
@@ -24597,6 +24597,21 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -35,10 +35,10 @@ index 315e54d061dea3ce28583c6eb456196dc873a1a6..c6981b845253a81f3865ccd71f97bdc7
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 07165bf281f91ebda0dd34ac1a30b35db333352e..2a4f0f0e52287e75e70196960574da929ce6c35f 100644
|
||||
index 04c72f708b0fc8b2e45c834d8f40753718860f00..42ceaff9c5c8b15645ebe31f610ba779146d4a8c 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -126,11 +126,14 @@ class PrerenderHandle;
|
||||
@@ -127,11 +127,14 @@ class PrerenderHandle;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
class RenderWidgetHost;
|
||||
@@ -53,7 +53,7 @@ index 07165bf281f91ebda0dd34ac1a30b35db333352e..2a4f0f0e52287e75e70196960574da92
|
||||
class WebUI;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -284,6 +287,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
@@ -285,6 +288,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
||||
network::mojom::WebSandboxFlags::kNone;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ index dfc5c935005bf8fb59d4bf5dd6dcb31468128cd6..4b8c2223d4d7eebe88c54d232ac8f8e2
|
||||
const WebSecurityOrigin& script_origin) {
|
||||
return false;
|
||||
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
index 8aaf3c12144273bb35bba3e77e0fd505282213df..a6eab67460b49b4594440be2f6e41f852b201e12 100644
|
||||
index 0ecbc9efc6b58ca605ec9b2d917b24b823b2c1e8..8587f9b9bf62b48271ce5a43f4402ba193672f5e 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
@@ -823,6 +823,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
|
||||
@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
|
||||
patching legacy devtools code.
|
||||
|
||||
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
|
||||
index 27011f3676688f0ad16962af6f1def9c23e24900..551c5307be04e6f2d8f63049d6dbb9a5793eec02 100644
|
||||
index 908271e753368265b2ea7deaeb67c72c3589b7ae..d9a21515b8a20a2fbee8ed3acc50491c9062101b 100644
|
||||
--- a/front_end/entrypoints/main/MainImpl.ts
|
||||
+++ b/front_end/entrypoints/main/MainImpl.ts
|
||||
@@ -736,6 +736,8 @@ export class MainImpl {
|
||||
@@ -732,6 +732,8 @@ export class MainImpl {
|
||||
globalThis.Main = globalThis.Main || {};
|
||||
// @ts-expect-error Exported for Tests.js
|
||||
globalThis.Main.Main = MainImpl;
|
||||
|
||||
@@ -17,7 +17,7 @@ Upstreams:
|
||||
- https://github.com/nodejs/node/pull/39136
|
||||
|
||||
diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc
|
||||
index 6f9406eecacb7411a2e84a7b51e60b726d1961f3..a0cfb0bc3776dc3682cdb332ed418286d3243bd1 100644
|
||||
index 6f9406eecacb7411a2e84a7b51e60b726d1961f3..bffdb0259eeed7389adb54a8ff13a1ac4e767d90 100644
|
||||
--- a/deps/ncrypto/ncrypto.cc
|
||||
+++ b/deps/ncrypto/ncrypto.cc
|
||||
@@ -786,7 +786,7 @@ bool SafeX509SubjectAltNamePrint(const BIOPointer& out, X509_EXTENSION* ext) {
|
||||
@@ -110,7 +110,7 @@ index 6f9406eecacb7411a2e84a7b51e60b726d1961f3..a0cfb0bc3776dc3682cdb332ed418286
|
||||
if (len + 2 != rem) return {};
|
||||
return reinterpret_cast<const char*>(buf + 3);
|
||||
+#endif
|
||||
+ return {};
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
const std::string_view SSLPointer::getClientHelloServerName() const {
|
||||
@@ -128,7 +128,7 @@ index 6f9406eecacb7411a2e84a7b51e60b726d1961f3..a0cfb0bc3776dc3682cdb332ed418286
|
||||
if (len + 2 > rem) return {};
|
||||
return reinterpret_cast<const char*>(buf + 5);
|
||||
+#endif
|
||||
+ return {};
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
std::optional<const std::string_view> SSLPointer::GetServerName(
|
||||
|
||||
@@ -65,6 +65,10 @@ async function main () {
|
||||
platformFlags.push(`-isysroot ${path.resolve(sdkPath, sdkToUse)}`);
|
||||
}
|
||||
|
||||
// TODO(ckerr) this is cribbed from read obj/electron/electron_app.ninja.
|
||||
// Maybe it would be better to have this script literally open up that
|
||||
// file and pull cflags_cc from it instead of using bespoke code here?
|
||||
// I think it's unlikely to work; but if it does, it would be more futureproof
|
||||
const cxxflags = [
|
||||
'-std=c++20',
|
||||
'-Wno-trigraphs',
|
||||
@@ -124,7 +128,7 @@ async function main () {
|
||||
return process.exit(installStatus !== 0 ? installStatus : signal);
|
||||
}
|
||||
|
||||
const onlyTests = args.only?.split(',');
|
||||
const onlyTests = args.only && args.only.split(',');
|
||||
|
||||
const DISABLED_TESTS = new Set([
|
||||
'nannew-test.js',
|
||||
|
||||
106
script/native-tests.py
Executable file
106
script/native-tests.py
Executable file
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from lib.native_tests import TestsList, Verbosity, DisabledTestsPolicy
|
||||
|
||||
|
||||
class Command:
|
||||
LIST = 'list'
|
||||
RUN = 'run'
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Run Google Test binaries')
|
||||
|
||||
parser.add_argument('command',
|
||||
choices=[Command.LIST, Command.RUN],
|
||||
help='command to execute')
|
||||
|
||||
parser.add_argument('-b', '--binary', nargs='+', required=False,
|
||||
help='binaries to run')
|
||||
parser.add_argument('-c', '--config', required=True,
|
||||
help='path to a tests config')
|
||||
parser.add_argument('-t', '--tests-dir', required=False,
|
||||
help='path to a directory with test binaries')
|
||||
parser.add_argument('-o', '--output-dir', required=False,
|
||||
help='path to a folder to save tests results')
|
||||
|
||||
disabled_tests = parser.add_mutually_exclusive_group()
|
||||
disabled_tests.add_argument('--only-disabled-tests',
|
||||
dest='disabled_tests_policy',
|
||||
action='store_const',
|
||||
const=DisabledTestsPolicy.ONLY,
|
||||
help='run disabled tests only')
|
||||
disabled_tests.add_argument('--include-disabled-tests',
|
||||
dest='disabled_tests_policy',
|
||||
action='store_const',
|
||||
const=DisabledTestsPolicy.INCLUDE,
|
||||
help='if disabled tests should be run as well')
|
||||
parser.set_defaults(disabled_tests_policy=DisabledTestsPolicy.DISABLE)
|
||||
|
||||
verbosity = parser.add_mutually_exclusive_group()
|
||||
verbosity.add_argument('-v', '--verbosity', required=False,
|
||||
default=Verbosity.CHATTY,
|
||||
choices=Verbosity.get_all(),
|
||||
help='set verbosity level')
|
||||
verbosity.add_argument('-q', '--quiet', required=False, action='store_const',
|
||||
const=Verbosity.ERRORS, dest='verbosity',
|
||||
help='suppress stdout from test binaries')
|
||||
verbosity.add_argument('-qq', '--quiet-quiet',
|
||||
# https://youtu.be/bXd-zZLV2i0?t=41s
|
||||
required=False, action='store_const',
|
||||
const=Verbosity.SILENT, dest='verbosity',
|
||||
help='suppress stdout and stderr from test binaries')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Additional checks.
|
||||
if args.command == Command.RUN and args.tests_dir is None:
|
||||
parser.error("specify a path to a dir with test binaries via --tests-dir")
|
||||
|
||||
# Absolutize and check paths.
|
||||
# 'config' must exist and be a file.
|
||||
args.config = os.path.abspath(args.config)
|
||||
if not os.path.isfile(args.config):
|
||||
parser.error(f"file '{args.config}' doesn't exist")
|
||||
|
||||
# 'tests_dir' must exist and be a directory.
|
||||
if args.tests_dir is not None:
|
||||
args.tests_dir = os.path.abspath(args.tests_dir)
|
||||
if not os.path.isdir(args.tests_dir):
|
||||
parser.error(f"directory '{args.tests_dir}' doesn't exist")
|
||||
|
||||
# 'output_dir' must exist and be a directory.
|
||||
if args.output_dir is not None:
|
||||
args.output_dir = os.path.abspath(args.output_dir)
|
||||
if not os.path.isdir(args.output_dir):
|
||||
parser.error(f"directory '{args.output_dir}' doesn't exist")
|
||||
|
||||
return args
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
tests_list = TestsList(args.config, args.tests_dir)
|
||||
|
||||
if args.command == Command.LIST:
|
||||
all_binaries_names = tests_list.get_for_current_platform()
|
||||
print('\n'.join(all_binaries_names))
|
||||
return 0
|
||||
|
||||
if args.command == Command.RUN:
|
||||
if args.binary is not None:
|
||||
return tests_list.run(args.binary, args.output_dir, args.verbosity,
|
||||
args.disabled_tests_policy)
|
||||
|
||||
return tests_list.run_all(args.output_dir, args.verbosity,
|
||||
args.disabled_tests_policy)
|
||||
|
||||
raise AssertionError(f"unexpected command '{args.command}'")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
@@ -73,7 +73,6 @@ async function main () {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`All ${DISABLED_TESTS.length} disabled specs exist.`);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,20 +136,6 @@ new Promise<string>((resolve, reject) => {
|
||||
|
||||
return release;
|
||||
})
|
||||
.then(async (release) => {
|
||||
const gnArgs = await fs.promises.readFile(path.resolve(ELECTRON_DIR, 'build/args/all.gn'), 'utf8');
|
||||
|
||||
const abiVersionLine = gnArgs.split('\n').find((line) => line.startsWith('node_module_version = '));
|
||||
const abiVersion = abiVersionLine ? abiVersionLine.split('=')[1].trim() : null;
|
||||
if (!abiVersion) {
|
||||
throw new Error('Could not find node_module_version in GN args');
|
||||
}
|
||||
|
||||
const abiVersionFile = path.join(tempDir, 'abi_version');
|
||||
await fs.promises.writeFile(abiVersionFile, abiVersion);
|
||||
|
||||
return release;
|
||||
})
|
||||
.then(async (release) => {
|
||||
const currentBranch = await getCurrentBranch();
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"bullseye_amd64": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "986ffe8f444b650c38de1786a930516bf9447ec7003a6c367de4aade8ebdb186",
|
||||
"Sha256Sum": "f89d7f27fdff95336d20c899c795f70f16ba488205f7f493b0d118cbf89dea59",
|
||||
"SysrootDir": "debian_bullseye_amd64-sysroot",
|
||||
"Tarball": "debian_bullseye_amd64_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"bullseye_arm64": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "6be0900393d73e69518f0996807dbc542c0d47cab1c4903c9d188347f945114a",
|
||||
"Sha256Sum": "68164118871fddfe9212aa22364fe9c015023ab68a76af6910a319a800246d58",
|
||||
"SysrootDir": "debian_bullseye_arm64-sysroot",
|
||||
"Tarball": "debian_bullseye_arm64_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
@@ -22,44 +22,37 @@
|
||||
},
|
||||
"bullseye_armhf": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "060631cd0583b5204c646d41a5fbbe6080fd7a822feefba01900bd8e41a67b13",
|
||||
"Sha256Sum": "409047dc2431e4fa4499facc5ca13a74e1941f7b85e414b6e1b4298bc6caca1a",
|
||||
"SysrootDir": "debian_bullseye_armhf-sysroot",
|
||||
"Tarball": "debian_bullseye_armhf_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"bullseye_i386": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "a6b63543ac2a57f477a6ea54b1e36dc8bfeb2f19c963866f79b1b2a93ed43a6e",
|
||||
"Sha256Sum": "1ae04410396ac2a46c60f112c7eb8e47d39cb73579f99d75ba81fb1b08ef1c08",
|
||||
"SysrootDir": "debian_bullseye_i386-sysroot",
|
||||
"Tarball": "debian_bullseye_i386_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"bullseye_mips64el": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "814ccd5d9524020b23a16a5a581644ca8ba2f1e3515a1ddcbb62e938d4f4e0b0",
|
||||
"Sha256Sum": "3b6d3383614bbed33a6580ab7c15a55b92cd2d400617bd956c0ab3e5cd3873d2",
|
||||
"SysrootDir": "debian_bullseye_mips64el-sysroot",
|
||||
"Tarball": "debian_bullseye_mips64el_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"bullseye_mipsel": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "7f3218966b7bc636409a0f3d5104d9046b03faf660847f9026df9ce2c9775d53",
|
||||
"Sha256Sum": "9922c66285fa037aaddb4afd4bb13eaaa65fdd889b35d94c61fb4e4076c228f0",
|
||||
"SysrootDir": "debian_bullseye_mipsel-sysroot",
|
||||
"Tarball": "debian_bullseye_mipsel_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"bullseye_ppc64el": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "bdab0a372cf5bfdc154226cc5ed72d417096c725085d193509d1f12e0debec66",
|
||||
"Sha256Sum": "370e28ad70f2edca39fad2f16dd23e315b67728d61c327cda42d32300b06812c",
|
||||
"SysrootDir": "debian_bullseye_ppc64el-sysroot",
|
||||
"Tarball": "debian_bullseye_ppc64el_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
},
|
||||
"trixie_riscv64": {
|
||||
"Key": "20250129T203412Z-2",
|
||||
"Sha256Sum": "2183652af753225da2371d7bccddcb0269ee388e4508ed1fdeb810cb05cba898",
|
||||
"SysrootDir": "debian_trixie_riscv64-sysroot",
|
||||
"Tarball": "debian_trixie_riscv64_sysroot.tar.xz",
|
||||
"URL": "https://dev-cdn.electronjs.org/linux-sysroots"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "base/uuid.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/predictors/preconnect_manager.h"
|
||||
#include "chrome/browser/predictors/predictors_traffic_annotations.h" // nogncheck
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/download/public/common/download_danger_type.h"
|
||||
@@ -1361,8 +1360,7 @@ static void StartPreconnectOnUI(ElectronBrowserContext* browser_context,
|
||||
{url::Origin::Create(url), num_sockets_to_preconnect,
|
||||
net::NetworkAnonymizationKey::CreateSameSite(
|
||||
net::SchemefulSite(origin))}};
|
||||
browser_context->GetPreconnectManager()->Start(
|
||||
url, requests, predictors::kLoadingPredictorPreconnectTrafficAnnotation);
|
||||
browser_context->GetPreconnectManager()->Start(url, requests);
|
||||
}
|
||||
|
||||
void Session::Preconnect(const gin_helper::Dictionary& options,
|
||||
|
||||
@@ -185,40 +185,32 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
|
||||
return false;
|
||||
|
||||
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
|
||||
NSURL* protocol_url =
|
||||
[NSURL URLWithString:[protocol_ns stringByAppendingString:@":"]];
|
||||
|
||||
if (!protocol_url)
|
||||
CFStringRef protocol_cf = base::apple::NSToCFPtrCast(protocol_ns);
|
||||
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
CFArrayRef bundleList = LSCopyAllHandlersForURLScheme(protocol_cf);
|
||||
#pragma clang diagnostic pop
|
||||
if (!bundleList) {
|
||||
return false;
|
||||
|
||||
// Get all applications that can handle this URL scheme.
|
||||
NSArray<NSURL*>* app_urls =
|
||||
[[NSWorkspace sharedWorkspace] URLsForApplicationsToOpenURL:protocol_url];
|
||||
|
||||
if (app_urls.count == 0)
|
||||
return false;
|
||||
|
||||
// Find the first application that isn't our bundle.
|
||||
NSString* other_bundle_id = nil;
|
||||
for (NSURL* app_url in app_urls) {
|
||||
NSBundle* app_bundle = [NSBundle bundleWithURL:app_url];
|
||||
NSString* app_identifier = [app_bundle bundleIdentifier];
|
||||
|
||||
if (app_identifier && ![identifier isEqualToString:app_identifier]) {
|
||||
other_bundle_id = app_identifier;
|
||||
}
|
||||
// On macOS, we can't query the default, but the handlers list seems to put
|
||||
// Apple's defaults first, so we'll use the first option that isn't our bundle
|
||||
CFStringRef other = nil;
|
||||
for (CFIndex i = 0; i < CFArrayGetCount(bundleList); ++i) {
|
||||
other =
|
||||
base::apple::CFCast<CFStringRef>(CFArrayGetValueAtIndex(bundleList, i));
|
||||
if (![identifier isEqualToString:(__bridge NSString*)other]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// No other app was found, set it to none instead of setting it back to
|
||||
// itself.
|
||||
if (!other_bundle_id) {
|
||||
other_bundle_id = @"None";
|
||||
// No other app was found set it to none instead of setting it back to itself.
|
||||
if ([identifier isEqualToString:(__bridge NSString*)other]) {
|
||||
other = base::apple::NSToCFPtrCast(@"None");
|
||||
}
|
||||
|
||||
OSStatus return_code = LSSetDefaultHandlerForURLScheme(
|
||||
base::apple::NSToCFPtrCast(protocol_ns),
|
||||
base::apple::NSToCFPtrCast(other_bundle_id));
|
||||
OSStatus return_code = LSSetDefaultHandlerForURLScheme(protocol_cf, other);
|
||||
return return_code == noErr;
|
||||
}
|
||||
|
||||
@@ -248,28 +240,21 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
|
||||
return false;
|
||||
|
||||
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
|
||||
NSURL* protocol_url =
|
||||
[NSURL URLWithString:[protocol_ns stringByAppendingString:@":"]];
|
||||
|
||||
if (!protocol_url)
|
||||
return false;
|
||||
|
||||
NSURL* default_app_url =
|
||||
[[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:protocol_url];
|
||||
|
||||
if (!default_app_url)
|
||||
return false;
|
||||
|
||||
NSBundle* default_app_bundle = [NSBundle bundleWithURL:default_app_url];
|
||||
NSString* default_bundle_id = [default_app_bundle bundleIdentifier];
|
||||
|
||||
if (!default_bundle_id)
|
||||
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
base::apple::ScopedCFTypeRef<CFStringRef> bundleId(
|
||||
LSCopyDefaultHandlerForURLScheme(
|
||||
base::apple::NSToCFPtrCast(protocol_ns)));
|
||||
#pragma clang diagnostic pop
|
||||
if (!bundleId)
|
||||
return false;
|
||||
|
||||
// Ensure the comparison is case-insensitive
|
||||
// as bundle IDs should be compared case-insensitively
|
||||
NSComparisonResult result =
|
||||
[default_bundle_id caseInsensitiveCompare:identifier];
|
||||
// as LS does not persist the case of the bundle id.
|
||||
NSComparisonResult result = [base::apple::CFToNSPtrCast(bundleId.get())
|
||||
caseInsensitiveCompare:identifier];
|
||||
return result == NSOrderedSame;
|
||||
}
|
||||
|
||||
|
||||
@@ -1308,30 +1308,44 @@ void NativeWindowMac::UpdateVibrancyRadii(bool fullscreen) {
|
||||
|
||||
if (vibrantView != nil && !vibrancy_type_.empty()) {
|
||||
const bool no_rounded_corner = !HasStyleMask(NSWindowStyleMaskTitled);
|
||||
const int macos_version = base::mac::MacOSMajorVersion();
|
||||
const bool modal = is_modal();
|
||||
|
||||
// If the window is modal, its corners are rounded unless
|
||||
// the user has explicitly passed |roundedCorners: false|.
|
||||
bool should_round_modal = !no_rounded_corner && is_modal();
|
||||
// If the window is modal, its corners are rounded on macOS >= 11 or higher
|
||||
// unless the user has explicitly passed noRoundedCorners.
|
||||
bool should_round_modal =
|
||||
!no_rounded_corner && macos_version >= 11 && modal;
|
||||
// If the window is nonmodal, its corners are rounded if it is frameless and
|
||||
// the user hasn't passed |roundedCorners: false|.
|
||||
bool should_round_nonmodal =
|
||||
!no_rounded_corner && !is_modal() && !has_frame();
|
||||
// the user hasn't passed noRoundedCorners.
|
||||
bool should_round_nonmodal = !no_rounded_corner && !modal && !has_frame();
|
||||
|
||||
if (should_round_nonmodal || should_round_modal) {
|
||||
CGFloat radius = fullscreen ? 0.0f : 9.0f;
|
||||
CGFloat dimension = 2 * radius + 1;
|
||||
NSImage* maskImage =
|
||||
[NSImage imageWithSize:NSMakeSize(dimension, dimension)
|
||||
flipped:NO
|
||||
drawingHandler:^BOOL(NSRect rect) {
|
||||
[[NSBezierPath bezierPathWithRoundedRect:rect
|
||||
xRadius:radius
|
||||
yRadius:radius] fill];
|
||||
return YES;
|
||||
}];
|
||||
CGFloat radius;
|
||||
if (fullscreen) {
|
||||
radius = 0.0f;
|
||||
} else if (macos_version >= 11) {
|
||||
radius = 9.0f;
|
||||
} else {
|
||||
// Smaller corner radius on versions prior to Big Sur.
|
||||
radius = 5.0f;
|
||||
}
|
||||
|
||||
maskImage.capInsets = NSEdgeInsetsMake(radius, radius, radius, radius);
|
||||
maskImage.resizingMode = NSImageResizingModeStretch;
|
||||
CGFloat dimension = 2 * radius + 1;
|
||||
NSSize size = NSMakeSize(dimension, dimension);
|
||||
NSImage* maskImage = [NSImage imageWithSize:size
|
||||
flipped:NO
|
||||
drawingHandler:^BOOL(NSRect rect) {
|
||||
NSBezierPath* bezierPath = [NSBezierPath
|
||||
bezierPathWithRoundedRect:rect
|
||||
xRadius:radius
|
||||
yRadius:radius];
|
||||
[[NSColor blackColor] set];
|
||||
[bezierPath fill];
|
||||
return YES;
|
||||
}];
|
||||
|
||||
[maskImage setCapInsets:NSEdgeInsetsMake(radius, radius, radius, radius)];
|
||||
[maskImage setResizingMode:NSImageResizingModeStretch];
|
||||
[vibrantView setMaskImage:maskImage];
|
||||
[window_ setCornerMask:maskImage];
|
||||
}
|
||||
|
||||
@@ -1282,7 +1282,12 @@ void NativeWindowViews::SetOpacity(const double opacity) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
const double boundedOpacity = std::clamp(opacity, 0.0, 1.0);
|
||||
HWND hwnd = GetAcceleratedWidget();
|
||||
SetLayered();
|
||||
if (!layered_) {
|
||||
LONG ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
ex_style |= WS_EX_LAYERED;
|
||||
::SetWindowLong(hwnd, GWL_EXSTYLE, ex_style);
|
||||
layered_ = true;
|
||||
}
|
||||
::SetLayeredWindowAttributes(hwnd, 0, boundedOpacity * 255, LWA_ALPHA);
|
||||
opacity_ = boundedOpacity;
|
||||
#else
|
||||
@@ -1725,16 +1730,6 @@ void NativeWindowViews::UpdateThickFrame() {
|
||||
FlipWindowStyle(GetAcceleratedWidget(), resizable_, WS_THICKFRAME);
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowViews::SetLayered() {
|
||||
HWND hwnd = GetAcceleratedWidget();
|
||||
if (!layered_) {
|
||||
LONG ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
ex_style |= WS_EX_LAYERED;
|
||||
::SetWindowLong(hwnd, GWL_EXSTYLE, ex_style);
|
||||
layered_ = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void NativeWindowViews::OnWidgetActivationChanged(views::Widget* changed_widget,
|
||||
|
||||
@@ -178,7 +178,6 @@ class NativeWindowViews : public NativeWindow,
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
TaskbarHost& taskbar_host() { return taskbar_host_; }
|
||||
void UpdateThickFrame();
|
||||
void SetLayered();
|
||||
#endif
|
||||
|
||||
SkColor overlay_button_color() const { return overlay_button_color_; }
|
||||
|
||||
@@ -54,8 +54,8 @@ void ResolveHostFunction::Run() {
|
||||
receiver_.set_disconnect_handler(base::BindOnce(
|
||||
&ResolveHostFunction::OnComplete, this, net::ERR_NAME_NOT_RESOLVED,
|
||||
net::ResolveErrorInfo(net::ERR_FAILED),
|
||||
/*resolved_addresses=*/net::AddressList(),
|
||||
/*endpoint_results_with_metadata=*/net::HostResolverEndpointResults()));
|
||||
/*resolved_addresses=*/std::nullopt,
|
||||
/*endpoint_results_with_metadata=*/std::nullopt));
|
||||
if (electron::IsUtilityProcess()) {
|
||||
URLLoaderBundle::GetInstance()->GetHostResolver()->ResolveHost(
|
||||
network::mojom::HostResolverHost::NewHostPortPair(
|
||||
@@ -76,8 +76,9 @@ void ResolveHostFunction::Run() {
|
||||
void ResolveHostFunction::OnComplete(
|
||||
int result,
|
||||
const net::ResolveErrorInfo& resolve_error_info,
|
||||
const net::AddressList& resolved_addresses,
|
||||
const net::HostResolverEndpointResults& endpoint_results_with_metadata) {
|
||||
const std::optional<net::AddressList>& resolved_addresses,
|
||||
const std::optional<net::HostResolverEndpointResults>&
|
||||
endpoint_results_with_metadata) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
// Ensure that we outlive the `receiver_.reset()` call.
|
||||
|
||||
@@ -51,8 +51,8 @@ class ResolveHostFunction
|
||||
// network::mojom::ResolveHostClient implementation
|
||||
void OnComplete(int result,
|
||||
const net::ResolveErrorInfo& resolve_error_info,
|
||||
const net::AddressList& resolved_addresses,
|
||||
const net::HostResolverEndpointResults&
|
||||
const std::optional<net::AddressList>& resolved_addresses,
|
||||
const std::optional<net::HostResolverEndpointResults>&
|
||||
endpoint_results_with_metadata) override;
|
||||
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/synchronization/atomic_flag.h"
|
||||
#include "base/task/lazy_thread_pool_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner_thread_mode.h"
|
||||
#include "base/task/task_traits.h"
|
||||
#include "components/dbus/thread_linux/dbus_thread_linux.h"
|
||||
#include "components/dbus/utils/check_for_service_and_start.h"
|
||||
#include "dbus/bus.h"
|
||||
@@ -40,13 +37,6 @@ constexpr char kXdgPortalRequiredVersionFlag[] = "xdg-portal-required-version";
|
||||
|
||||
bool g_portal_available = false;
|
||||
|
||||
// Refs
|
||||
// https://source.chromium.org/chromium/chromium/src/+/main:components/dbus/thread_linux/dbus_thread_linux.cc;l=16-24;drc=1c281d7923af032d78ea7247e99b717dfebeb0b2
|
||||
base::LazyThreadPoolSingleThreadTaskRunner g_electron_dbus_thread_task_runner =
|
||||
LAZY_THREAD_POOL_SINGLE_THREAD_TASK_RUNNER_INITIALIZER(
|
||||
base::TaskTraits(base::MayBlock(), base::TaskPriority::USER_BLOCKING),
|
||||
base::SingleThreadTaskRunnerThreadMode::SHARED);
|
||||
|
||||
struct FileChooserProperties : dbus::PropertySet {
|
||||
dbus::Property<uint32_t> version;
|
||||
|
||||
@@ -71,7 +61,7 @@ void CheckPortalAvailabilityOnBusThread() {
|
||||
dbus::Bus::Options options;
|
||||
options.bus_type = dbus::Bus::SESSION;
|
||||
options.connection_type = dbus::Bus::PRIVATE;
|
||||
options.dbus_task_runner = g_electron_dbus_thread_task_runner.Get();
|
||||
options.dbus_task_runner = dbus_thread_linux::GetTaskRunner();
|
||||
scoped_refptr<dbus::Bus> bus = base::MakeRefCounted<dbus::Bus>(options);
|
||||
dbus_utils::CheckForServiceAndStart(
|
||||
bus, kXdgPortalService,
|
||||
@@ -114,7 +104,7 @@ void StartPortalAvailabilityTestInBackground() {
|
||||
VLOG(1) << "Unable to parse --xdg-portal-required-version";
|
||||
}
|
||||
|
||||
g_electron_dbus_thread_task_runner.Get()->PostTask(
|
||||
dbus_thread_linux::GetTaskRunner()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&CheckPortalAvailabilityOnBusThread));
|
||||
}
|
||||
|
||||
|
||||
@@ -176,11 +176,6 @@ void ElectronDesktopWindowTreeHostWin::UpdateAllowScreenshots() {
|
||||
if (allowed == allow_screenshots_)
|
||||
return;
|
||||
|
||||
// On some older Windows versions, setting the display affinity
|
||||
// to WDA_EXCLUDEFROMCAPTURE won't prevent the window from being
|
||||
// captured - setting WS_EX_LAYERED mitigates this issue.
|
||||
if (base::win::GetVersion() < base::win::Version::WIN11_22H2)
|
||||
native_window_view_->SetLayered();
|
||||
::SetWindowDisplayAffinity(
|
||||
GetAcceleratedWidget(),
|
||||
allow_screenshots_ ? WDA_NONE : WDA_EXCLUDEFROMCAPTURE);
|
||||
|
||||
@@ -98,98 +98,6 @@ base::Value UsbChooserContext::DeviceInfoToValue(
|
||||
device_value.Set("deviceVersionMinor", device_info.device_version_minor);
|
||||
device_value.Set("deviceVersionSubminor",
|
||||
device_info.device_version_subminor);
|
||||
|
||||
bool has_active_configuration = false;
|
||||
base::Value::List configuration_list;
|
||||
for (const auto& configuration : device_info.configurations) {
|
||||
base::Value::Dict configuration_value;
|
||||
configuration_value.Set("configurationValue",
|
||||
configuration->configuration_value);
|
||||
configuration_value.Set("configurationName",
|
||||
configuration->configuration_name
|
||||
? *configuration->configuration_name
|
||||
: std::u16string_view());
|
||||
|
||||
for (const auto& interface : configuration->interfaces) {
|
||||
base::Value::Dict interface_value;
|
||||
interface_value.Set("interfaceNumber", interface->interface_number);
|
||||
|
||||
base::Value::List alternate_list;
|
||||
for (const auto& alternate : interface->alternates) {
|
||||
base::Value::Dict alternate_value;
|
||||
alternate_value.Set("alternateSetting", alternate->alternate_setting);
|
||||
alternate_value.Set("interfaceClass", alternate->class_code);
|
||||
alternate_value.Set("interfaceSubclass", alternate->subclass_code);
|
||||
alternate_value.Set("interfaceProtocol", alternate->protocol_code);
|
||||
alternate_value.Set("interfaceName", alternate->interface_name
|
||||
? *alternate->interface_name
|
||||
: std::u16string_view());
|
||||
|
||||
base::Value::List endpoint_list;
|
||||
for (const auto& endpoint : alternate->endpoints) {
|
||||
base::Value::Dict endpoint_value;
|
||||
endpoint_value.Set("endpointNumber", endpoint->endpoint_number);
|
||||
|
||||
bool inbound = endpoint->direction ==
|
||||
device::mojom::UsbTransferDirection::INBOUND;
|
||||
endpoint_value.Set("direction", inbound ? "in" : "out");
|
||||
|
||||
std::string type;
|
||||
switch (endpoint->type) {
|
||||
case device::mojom::UsbTransferType::ISOCHRONOUS:
|
||||
type = "isochronous";
|
||||
break;
|
||||
case device::mojom::UsbTransferType::BULK:
|
||||
type = "bulk";
|
||||
break;
|
||||
case device::mojom::UsbTransferType::INTERRUPT:
|
||||
type = "interrupt";
|
||||
break;
|
||||
default:
|
||||
NOTREACHED() << "Unknown USB transfer type: "
|
||||
<< static_cast<int>(endpoint->type);
|
||||
}
|
||||
endpoint_value.Set("type", type);
|
||||
endpoint_value.Set("packetSize",
|
||||
static_cast<int>(endpoint->packet_size));
|
||||
endpoint_list.Append(std::move(endpoint_value));
|
||||
}
|
||||
|
||||
alternate_value.Set("endpoints", base::Value(std::move(endpoint_list)));
|
||||
|
||||
if (alternate->alternate_setting == 0) {
|
||||
auto active_alternate_value = alternate_value.Clone();
|
||||
interface_value.Set("alternate", std::move(active_alternate_value));
|
||||
}
|
||||
|
||||
alternate_list.Append(std::move(alternate_value));
|
||||
}
|
||||
|
||||
interface_value.Set("alternates", std::move(alternate_list));
|
||||
|
||||
configuration_value.Set("interfaces",
|
||||
base::Value(std::move(interface_value)));
|
||||
}
|
||||
|
||||
if (device_info.active_configuration &&
|
||||
device_info.active_configuration ==
|
||||
configuration->configuration_value) {
|
||||
auto active_configuration_value = configuration_value.Clone();
|
||||
has_active_configuration = true;
|
||||
configuration_value.Set("configuration",
|
||||
std::move(active_configuration_value));
|
||||
}
|
||||
|
||||
configuration_list.Append(std::move(configuration_value));
|
||||
}
|
||||
|
||||
device_value.Set("configurations", std::move(configuration_list));
|
||||
|
||||
// Set value for "configuration" to null if no active configuration.
|
||||
if (!has_active_configuration) {
|
||||
device_value.Set("configuration", base::Value());
|
||||
}
|
||||
|
||||
return base::Value(std::move(device_value));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/gfx/color_space.h"
|
||||
#include "ui/gfx/geometry/insets.h"
|
||||
#include "ui/gfx/geometry/point.h"
|
||||
#include "ui/gfx/geometry/point_f.h"
|
||||
@@ -231,363 +230,4 @@ bool Converter<WrappedSkColor>::FromV8(v8::Isolate* isolate,
|
||||
return true;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> Converter<gfx::ColorSpace>::ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const gfx::ColorSpace& val) {
|
||||
auto dict = gin_helper::Dictionary::CreateEmpty(isolate);
|
||||
|
||||
// Convert primaries to string
|
||||
std::string primaries;
|
||||
switch (val.GetPrimaryID()) {
|
||||
case gfx::ColorSpace::PrimaryID::BT709:
|
||||
primaries = "bt709";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::BT470M:
|
||||
primaries = "bt470m";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::BT470BG:
|
||||
primaries = "bt470bg";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::SMPTE170M:
|
||||
primaries = "smpte170m";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::SMPTE240M:
|
||||
primaries = "smpte240m";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::FILM:
|
||||
primaries = "film";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::BT2020:
|
||||
primaries = "bt2020";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::SMPTEST428_1:
|
||||
primaries = "smptest428-1";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::SMPTEST431_2:
|
||||
primaries = "smptest431-2";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::P3:
|
||||
primaries = "p3";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::XYZ_D50:
|
||||
primaries = "xyz-d50";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::ADOBE_RGB:
|
||||
primaries = "adobe-rgb";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::APPLE_GENERIC_RGB:
|
||||
primaries = "apple-generic-rgb";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN:
|
||||
primaries = "wide-gamut-color-spin";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::CUSTOM:
|
||||
primaries = "custom";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::EBU_3213_E:
|
||||
primaries = "ebu-3213-e";
|
||||
break;
|
||||
case gfx::ColorSpace::PrimaryID::INVALID:
|
||||
primaries = "invalid";
|
||||
break;
|
||||
}
|
||||
|
||||
// Convert transfer function to string
|
||||
std::string transfer;
|
||||
switch (val.GetTransferID()) {
|
||||
case gfx::ColorSpace::TransferID::BT709:
|
||||
transfer = "bt709";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::BT709_APPLE:
|
||||
transfer = "bt709-apple";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::GAMMA18:
|
||||
transfer = "gamma18";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::GAMMA22:
|
||||
transfer = "gamma22";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::GAMMA24:
|
||||
transfer = "gamma24";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::GAMMA28:
|
||||
transfer = "gamma28";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SMPTE170M:
|
||||
transfer = "smpte170m";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SMPTE240M:
|
||||
transfer = "smpte240m";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::LINEAR:
|
||||
transfer = "linear";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::LOG:
|
||||
transfer = "log";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::LOG_SQRT:
|
||||
transfer = "log-sqrt";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::IEC61966_2_4:
|
||||
transfer = "iec61966-2-4";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::BT1361_ECG:
|
||||
transfer = "bt1361-ecg";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SRGB:
|
||||
transfer = "srgb";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::BT2020_10:
|
||||
transfer = "bt2020-10";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::BT2020_12:
|
||||
transfer = "bt2020-12";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::PQ:
|
||||
transfer = "pq";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SMPTEST428_1:
|
||||
transfer = "smptest428-1";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::HLG:
|
||||
transfer = "hlg";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SRGB_HDR:
|
||||
transfer = "srgb-hdr";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::LINEAR_HDR:
|
||||
transfer = "linear-hdr";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::CUSTOM:
|
||||
transfer = "custom";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::CUSTOM_HDR:
|
||||
transfer = "custom-hdr";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS:
|
||||
transfer = "scrgb-linear-80-nits";
|
||||
break;
|
||||
case gfx::ColorSpace::TransferID::INVALID:
|
||||
transfer = "invalid";
|
||||
break;
|
||||
}
|
||||
|
||||
// Convert matrix to string
|
||||
std::string matrix;
|
||||
switch (val.GetMatrixID()) {
|
||||
case gfx::ColorSpace::MatrixID::RGB:
|
||||
matrix = "rgb";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::BT709:
|
||||
matrix = "bt709";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::FCC:
|
||||
matrix = "fcc";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::BT470BG:
|
||||
matrix = "bt470bg";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::SMPTE170M:
|
||||
matrix = "smpte170m";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::SMPTE240M:
|
||||
matrix = "smpte240m";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::YCOCG:
|
||||
matrix = "ycocg";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::BT2020_NCL:
|
||||
matrix = "bt2020-ncl";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::YDZDX:
|
||||
matrix = "ydzdx";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::GBR:
|
||||
matrix = "gbr";
|
||||
break;
|
||||
case gfx::ColorSpace::MatrixID::INVALID:
|
||||
matrix = "invalid";
|
||||
break;
|
||||
}
|
||||
|
||||
// Convert range to string
|
||||
std::string range;
|
||||
switch (val.GetRangeID()) {
|
||||
case gfx::ColorSpace::RangeID::LIMITED:
|
||||
range = "limited";
|
||||
break;
|
||||
case gfx::ColorSpace::RangeID::FULL:
|
||||
range = "full";
|
||||
break;
|
||||
case gfx::ColorSpace::RangeID::DERIVED:
|
||||
range = "derived";
|
||||
break;
|
||||
case gfx::ColorSpace::RangeID::INVALID:
|
||||
range = "invalid";
|
||||
break;
|
||||
}
|
||||
|
||||
dict.Set("primaries", primaries);
|
||||
dict.Set("transfer", transfer);
|
||||
dict.Set("matrix", matrix);
|
||||
dict.Set("range", range);
|
||||
|
||||
return dict.GetHandle();
|
||||
}
|
||||
|
||||
bool Converter<gfx::ColorSpace>::FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
gfx::ColorSpace* out) {
|
||||
gin::Dictionary dict(isolate);
|
||||
if (!gin::ConvertFromV8(isolate, val, &dict))
|
||||
return false;
|
||||
|
||||
std::string primaries_str, transfer_str, matrix_str, range_str;
|
||||
|
||||
// Default values if not specified
|
||||
gfx::ColorSpace::PrimaryID primaries = gfx::ColorSpace::PrimaryID::BT709;
|
||||
gfx::ColorSpace::TransferID transfer = gfx::ColorSpace::TransferID::SRGB;
|
||||
gfx::ColorSpace::MatrixID matrix = gfx::ColorSpace::MatrixID::RGB;
|
||||
gfx::ColorSpace::RangeID range = gfx::ColorSpace::RangeID::FULL;
|
||||
|
||||
// Get primaries
|
||||
if (dict.Get("primaries", &primaries_str)) {
|
||||
if (primaries_str == "bt709")
|
||||
primaries = gfx::ColorSpace::PrimaryID::BT709;
|
||||
else if (primaries_str == "bt470m")
|
||||
primaries = gfx::ColorSpace::PrimaryID::BT470M;
|
||||
else if (primaries_str == "bt470bg")
|
||||
primaries = gfx::ColorSpace::PrimaryID::BT470BG;
|
||||
else if (primaries_str == "smpte170m")
|
||||
primaries = gfx::ColorSpace::PrimaryID::SMPTE170M;
|
||||
else if (primaries_str == "smpte240m")
|
||||
primaries = gfx::ColorSpace::PrimaryID::SMPTE240M;
|
||||
else if (primaries_str == "film")
|
||||
primaries = gfx::ColorSpace::PrimaryID::FILM;
|
||||
else if (primaries_str == "bt2020")
|
||||
primaries = gfx::ColorSpace::PrimaryID::BT2020;
|
||||
else if (primaries_str == "smptest428-1")
|
||||
primaries = gfx::ColorSpace::PrimaryID::SMPTEST428_1;
|
||||
else if (primaries_str == "smptest431-2")
|
||||
primaries = gfx::ColorSpace::PrimaryID::SMPTEST431_2;
|
||||
else if (primaries_str == "p3")
|
||||
primaries = gfx::ColorSpace::PrimaryID::P3;
|
||||
else if (primaries_str == "xyz-d50")
|
||||
primaries = gfx::ColorSpace::PrimaryID::XYZ_D50;
|
||||
else if (primaries_str == "adobe-rgb")
|
||||
primaries = gfx::ColorSpace::PrimaryID::ADOBE_RGB;
|
||||
else if (primaries_str == "apple-generic-rgb")
|
||||
primaries = gfx::ColorSpace::PrimaryID::APPLE_GENERIC_RGB;
|
||||
else if (primaries_str == "wide-gamut-color-spin")
|
||||
primaries = gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN;
|
||||
else if (primaries_str == "ebu-3213-e")
|
||||
primaries = gfx::ColorSpace::PrimaryID::EBU_3213_E;
|
||||
|
||||
if (primaries_str == "custom") {
|
||||
gin_helper::ErrorThrower(isolate).ThrowTypeError(
|
||||
"'custom' not supported.");
|
||||
return false;
|
||||
} else {
|
||||
primaries = gfx::ColorSpace::PrimaryID::INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
// Get transfer
|
||||
if (dict.Get("transfer", &transfer_str)) {
|
||||
if (transfer_str == "bt709")
|
||||
transfer = gfx::ColorSpace::TransferID::BT709;
|
||||
else if (transfer_str == "bt709-apple")
|
||||
transfer = gfx::ColorSpace::TransferID::BT709_APPLE;
|
||||
else if (transfer_str == "gamma18")
|
||||
transfer = gfx::ColorSpace::TransferID::GAMMA18;
|
||||
else if (transfer_str == "gamma22")
|
||||
transfer = gfx::ColorSpace::TransferID::GAMMA22;
|
||||
else if (transfer_str == "gamma24")
|
||||
transfer = gfx::ColorSpace::TransferID::GAMMA24;
|
||||
else if (transfer_str == "gamma28")
|
||||
transfer = gfx::ColorSpace::TransferID::GAMMA28;
|
||||
else if (transfer_str == "smpte170m")
|
||||
transfer = gfx::ColorSpace::TransferID::SMPTE170M;
|
||||
else if (transfer_str == "smpte240m")
|
||||
transfer = gfx::ColorSpace::TransferID::SMPTE240M;
|
||||
else if (transfer_str == "linear")
|
||||
transfer = gfx::ColorSpace::TransferID::LINEAR;
|
||||
else if (transfer_str == "log")
|
||||
transfer = gfx::ColorSpace::TransferID::LOG;
|
||||
else if (transfer_str == "log-sqrt")
|
||||
transfer = gfx::ColorSpace::TransferID::LOG_SQRT;
|
||||
else if (transfer_str == "iec61966-2-4")
|
||||
transfer = gfx::ColorSpace::TransferID::IEC61966_2_4;
|
||||
else if (transfer_str == "bt1361-ecg")
|
||||
transfer = gfx::ColorSpace::TransferID::BT1361_ECG;
|
||||
else if (transfer_str == "srgb")
|
||||
transfer = gfx::ColorSpace::TransferID::SRGB;
|
||||
else if (transfer_str == "bt2020-10")
|
||||
transfer = gfx::ColorSpace::TransferID::BT2020_10;
|
||||
else if (transfer_str == "bt2020-12")
|
||||
transfer = gfx::ColorSpace::TransferID::BT2020_12;
|
||||
else if (transfer_str == "pq")
|
||||
transfer = gfx::ColorSpace::TransferID::PQ;
|
||||
else if (transfer_str == "smptest428-1")
|
||||
transfer = gfx::ColorSpace::TransferID::SMPTEST428_1;
|
||||
else if (transfer_str == "hlg")
|
||||
transfer = gfx::ColorSpace::TransferID::HLG;
|
||||
else if (transfer_str == "srgb-hdr")
|
||||
transfer = gfx::ColorSpace::TransferID::SRGB_HDR;
|
||||
else if (transfer_str == "linear-hdr")
|
||||
transfer = gfx::ColorSpace::TransferID::LINEAR_HDR;
|
||||
else if (transfer_str == "scrgb-linear-80-nits")
|
||||
transfer = gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS;
|
||||
|
||||
if (transfer_str == "custom" || transfer_str == "custom-hdr") {
|
||||
gin_helper::ErrorThrower(isolate).ThrowTypeError(
|
||||
"'custom', 'custom-hdr' not supported.");
|
||||
return false;
|
||||
} else {
|
||||
primaries = gfx::ColorSpace::PrimaryID::INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
// Get matrix
|
||||
if (dict.Get("matrix", &matrix_str)) {
|
||||
if (matrix_str == "rgb")
|
||||
matrix = gfx::ColorSpace::MatrixID::RGB;
|
||||
else if (matrix_str == "bt709")
|
||||
matrix = gfx::ColorSpace::MatrixID::BT709;
|
||||
else if (matrix_str == "fcc")
|
||||
matrix = gfx::ColorSpace::MatrixID::FCC;
|
||||
else if (matrix_str == "bt470bg")
|
||||
matrix = gfx::ColorSpace::MatrixID::BT470BG;
|
||||
else if (matrix_str == "smpte170m")
|
||||
matrix = gfx::ColorSpace::MatrixID::SMPTE170M;
|
||||
else if (matrix_str == "smpte240m")
|
||||
matrix = gfx::ColorSpace::MatrixID::SMPTE240M;
|
||||
else if (matrix_str == "ycocg")
|
||||
matrix = gfx::ColorSpace::MatrixID::YCOCG;
|
||||
else if (matrix_str == "bt2020-ncl")
|
||||
matrix = gfx::ColorSpace::MatrixID::BT2020_NCL;
|
||||
else if (matrix_str == "ydzdx")
|
||||
matrix = gfx::ColorSpace::MatrixID::YDZDX;
|
||||
else if (matrix_str == "gbr")
|
||||
matrix = gfx::ColorSpace::MatrixID::GBR;
|
||||
else
|
||||
matrix = gfx::ColorSpace::MatrixID::INVALID;
|
||||
}
|
||||
|
||||
// Get range
|
||||
if (dict.Get("range", &range_str)) {
|
||||
if (range_str == "limited")
|
||||
range = gfx::ColorSpace::RangeID::LIMITED;
|
||||
else if (range_str == "full")
|
||||
range = gfx::ColorSpace::RangeID::FULL;
|
||||
else if (range_str == "derived")
|
||||
range = gfx::ColorSpace::RangeID::DERIVED;
|
||||
else
|
||||
range = gfx::ColorSpace::RangeID::INVALID;
|
||||
}
|
||||
|
||||
*out = gfx::ColorSpace(primaries, transfer, matrix, range);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace gin
|
||||
|
||||
@@ -18,7 +18,6 @@ class PointF;
|
||||
class Size;
|
||||
class Rect;
|
||||
class Insets;
|
||||
class ColorSpace;
|
||||
enum class ResizeEdge;
|
||||
} // namespace gfx
|
||||
|
||||
@@ -88,15 +87,6 @@ struct Converter<WrappedSkColor> {
|
||||
WrappedSkColor* out);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Converter<gfx::ColorSpace> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
const gfx::ColorSpace& val);
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
gfx::ColorSpace* out);
|
||||
};
|
||||
|
||||
} // namespace gin
|
||||
|
||||
#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_
|
||||
|
||||
@@ -1273,16 +1273,6 @@ describe('chromium features', () => {
|
||||
});
|
||||
}
|
||||
|
||||
it('is always resizable', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.loadFile(path.resolve(__dirname, 'fixtures', 'blank.html'));
|
||||
w.webContents.executeJavaScript(`
|
||||
{ b = window.open('about:blank', '', 'resizable=no,show=no'); null }
|
||||
`);
|
||||
const [, popup] = await once(app, 'browser-window-created') as [any, BrowserWindow];
|
||||
expect(popup.isResizable()).to.be.true();
|
||||
});
|
||||
|
||||
// FIXME(zcbenz): This test is making the spec runner hang on exit on Windows.
|
||||
ifit(process.platform !== 'win32')('disables node integration when it is disabled on the parent window', async () => {
|
||||
const windowUrl = url.pathToFileURL(path.join(fixturesPath, 'pages', 'window-opener-no-node-integration.html'));
|
||||
|
||||
Reference in New Issue
Block a user