Compare commits

..

2 Commits

Author SHA1 Message Date
João Silva
792b6a40d1 fix: narrow HandleTermination and Shutdown to uint32_t, add tests
Signed-off-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-03-17 15:59:49 -04:00
João Silva
e87807dcbf fix: correct utility process exit code on Windows
On Windows, process exit codes are 32-bit unsigned integers (DWORD).
When passed from Chromium to Electron as a signed int and then
implicitly converted to uint64_t, values with the high bit set
(e.g., NTSTATUS codes) undergo sign extension, producing incorrect
values.

Cast the exit code to uint32_t before widening to uint64_t to
prevent sign extension and preserve the original Windows exit code.

Fixes #49455

Signed-off-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-03-17 15:59:39 -04:00
123 changed files with 2153 additions and 1477 deletions

View File

@@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js/npm
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
with:
node-version: 24.12.x
- name: Setting Up Dig Site

View File

@@ -17,7 +17,7 @@ jobs:
contents: read
steps:
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 22.17.x
- name: Sparse checkout repository

View File

@@ -33,31 +33,7 @@ jobs:
ISSUE_URL: ${{ github.event.issue.html_url }}
run: |
gh issue edit $ISSUE_URL --remove-label 'blocked/need-repro','blocked/need-info ❌'
pr-needs-signed-commits-commented:
name: Remove needs-signed-commits on comment
if: ${{ github.event.issue.pull_request && (contains(github.event.issue.labels.*.name, 'needs-signed-commits')) && (github.event.comment.user.login == github.event.issue.user.login) }}
runs-on: ubuntu-slim
steps:
- name: Get author association
id: get-author-association
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: *get-author-association
- name: Generate GitHub App token
uses: electron/github-app-auth-action@e14e47722ed120360649d0789e25b9baece12725 # v2.0.0
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
id: generate-token
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Remove label
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
ISSUE_URL: ${{ github.event.issue.html_url }}
run: |
gh issue edit $ISSUE_URL --remove-label 'needs-signed-commits'
pr-reviewer-requested:
name: Maintainer requested reviewer on PR
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/request-review') && github.event.comment.user.type != 'Bot' }}

View File

@@ -124,7 +124,7 @@ jobs:
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
with:
node-version: 22.21.x
cache: yarn

View File

@@ -132,7 +132,7 @@ jobs:
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
with:
node-version: 22.21.x
cache: yarn

View File

@@ -77,7 +77,7 @@ jobs:
cp $(which node) /mnt/runner-externals/node24/bin/
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'win' }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
with:
node-version: 22.21.x
- name: Add TCC permissions on macOS
@@ -214,7 +214,6 @@ jobs:
- name: Run Electron Tests
shell: bash
timeout-minutes: 40
env:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
@@ -284,19 +283,6 @@ jobs:
fi
fi
- name: Take screenshot on timeout or cancellation
if: ${{ inputs.target-platform != 'linux' && (cancelled() || failure()) }}
shell: bash
run: |
screenshot_dir="src/electron/spec/artifacts"
mkdir -p "$screenshot_dir"
screenshot_file="$screenshot_dir/screenshot-timeout-$(date +%Y%m%d%H%M%S).png"
if [ "${{ inputs.target-platform }}" = "macos" ]; then
screencapture -x "$screenshot_file" || true
elif [ "${{ inputs.target-platform }}" = "win" ]; then
powershell -command "Add-Type -AssemblyName System.Windows.Forms; \$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds; \$bitmap = New-Object System.Drawing.Bitmap(\$screen.Width, \$screen.Height); \$graphics = [System.Drawing.Graphics]::FromImage(\$bitmap); \$graphics.CopyFromScreen(\$screen.Location, [System.Drawing.Point]::Empty, \$screen.Size); \$bitmap.Save('$screenshot_file')" || true
fi
- name: Upload Test results to Datadog
env:
DD_ENV: ci
@@ -312,7 +298,7 @@ jobs:
fi
if: always() && !cancelled()
- name: Upload Test Artifacts
if: always()
if: always() && !cancelled()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: ${{ inputs.target-platform == 'linux' && format('test_artifacts_{0}_{1}_{2}', env.ARTIFACT_KEY, inputs.display-server, matrix.shard) || format('test_artifacts_{0}_{1}', env.ARTIFACT_KEY, matrix.shard) }}

View File

@@ -51,6 +51,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.29.5
uses: github/codeql-action/upload-sarif@c793b717bc78562f491db7b0e93a3a178b099162 # v3.29.5
with:
sarif_file: results.sarif

6
.remarkrc Normal file
View File

@@ -0,0 +1,6 @@
{
"plugins": [
["remark-lint-code-block-style", "fenced"],
["remark-lint-fenced-code-flag"]
]
}

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'147.0.7727.0',
'147.0.7719.0',
'node_version':
'v24.14.0',
'nan_version':

View File

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

View File

@@ -245,10 +245,6 @@ static_library("chrome") {
"//chrome/browser/ui/views/dark_mode_manager_linux.cc",
"//chrome/browser/ui/views/dark_mode_manager_linux.h",
]
sources += [
"//chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.cc",
"//chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h",
]
public_deps += [ "//components/dbus" ]
}

View File

@@ -256,7 +256,7 @@ async function startRepl () {
if (option.file && !option.webdriver) {
const file = option.file;
// eslint-disable-next-line n/no-deprecated-api
const protocol = URL.canParse(file) ? new URL(file).protocol : null;
const protocol = url.parse(file).protocol;
const extension = path.extname(file);
if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:' || protocol === 'chrome:') {
await loadApplicationByURL(file);

View File

@@ -88,15 +88,11 @@ app.whenReady().then(() => {
* `timeoutType` string (optional) _Linux_ _Windows_ - The timeout duration of the notification. Can be 'default' or 'never'.
* `replyPlaceholder` string (optional) _macOS_ - The placeholder to write in the inline reply input field.
* `sound` string (optional) _macOS_ - The name of the sound file to play when the notification is shown.
* `urgency` string (optional) _Linux_ _Windows_ - The urgency level of the notification. Can be 'normal', 'critical', or 'low'.
* `urgency` string (optional) _Linux_ - The urgency level of the notification. Can be 'normal', 'critical', or 'low'.
* `actions` [NotificationAction[]](structures/notification-action.md) (optional) _macOS_ - Actions to add to the notification. Please read the available actions and limitations in the `NotificationAction` documentation.
* `closeButtonText` string (optional) _macOS_ - A custom title for the close button of an alert. An empty string will cause the default localized text to be used.
* `toastXml` string (optional) _Windows_ - A custom description of the Notification on Windows superseding all properties above. Provides full customization of design and behavior of the notification.
> [!NOTE]
> On Windows, `urgency` type 'critical' sorts the notification higher in Action Center (above default priority notifications), but does not prevent auto-dismissal. To prevent auto-dismissal, you should also set
> `timeoutType` to 'never'.
### Instance Events
Objects created with `new Notification` emit the following events:

View File

@@ -2235,16 +2235,6 @@ Returns `string` - The identifier of a WebContents stream. This identifier can b
with `navigator.mediaDevices.getUserMedia` using a `chromeMediaSource` of `tab`.
The identifier is restricted to the web contents that it is registered to and is only valid for 10 seconds.
#### `contents.getOrCreateDevToolsTargetId()`
Returns `string` - The Chrome DevTools Protocol
[TargetID](https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetID)
associated with this WebContents. This is the reverse of
[`webContents.fromDevToolsTargetId()`](#webcontentsfromdevtoolstargetidtargetid).
> [!NOTE]
> This method creates a new DevTools agent for this WebContents if one does not already exist.
#### `contents.getOSProcessId()`
Returns `Integer` - The operating system `pid` of the associated renderer

View File

@@ -39,7 +39,7 @@ etc.
## Documentation
* Write prose according to our [documentation style guide](./style-guide.md).
* Write [remark](https://github.com/remarkjs/remark) markdown style.
You can run `npm run lint:docs` to ensure that your documentation changes are
formatted correctly.

View File

@@ -12,10 +12,6 @@ To create a frameless window, set the [`BaseWindowContructorOptions`][] `frame`
```
On Wayland (Linux), frameless windows have GTK drop shadows and extended
resize boundaries by default. To create a fully frameless window with no
decorations, set `hasShadow: false` in the window constructor options.
## Transparent windows
![Transparent Window](../images/transparent-window.png)

View File

@@ -50,7 +50,7 @@ sections.
In the main process, set an IPC listener on the `set-title` channel with the `ipcMain.on` API:
```js {7-11,23} title='main.js (Main Process)'
```js {6-10,22} title='main.js (Main Process)'
const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('node:path')

View File

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

View File

@@ -45,6 +45,8 @@
"null-loader": "^4.0.1",
"pre-flight": "^2.0.0",
"process": "^0.11.10",
"remark-cli": "^12.0.1",
"remark-preset-lint-markdown-style-guide": "^6.0.1",
"semver": "^7.6.3",
"stream-json": "^1.9.1",
"tap-xunit": "^2.4.1",
@@ -71,7 +73,7 @@
"lint:objc": "node ./script/lint.js --objc",
"lint:py": "node ./script/lint.js --py",
"lint:gn": "node ./script/lint.js --gn",
"lint:docs": "npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown && npm run lint:api-history",
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown && npm run lint:api-history",
"lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
"lint:docs-relative-links": "lint-roller-markdown-links --resource-root . --root docs \"**/*.md\"",
"lint:markdown": "node ./script/lint.js --md",

View File

@@ -23,10 +23,10 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 42a0a7e5be01fe346cc2ad83d3395425a41e1699..40d1f104794795dba6cd59518819e98a4cdbfc44 100644
index 60661707197f972da2f6ee0718a344581da529cf..e4cb58ffaaeb9de75ec9658819f7305760fff9cb 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4769,6 +4769,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4759,6 +4759,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -53,10 +53,10 @@ index c803bf1d93bb9aabf0f9098c4d58aa7528d18d79..ced097d57cec93b3d3062a6d7d9f7d03
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 7e5f1d80ff5395ea11eb558acabe63ccc3e5a17e..d241042fc37ffe4a2afecbc3c02e89f18e990929 100644
index 675791f9db1320ee9b3c915f4595eef2183802d5..1ce4e9a1e7b5d5cfbb6201c000eada80b3b3d174 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -674,6 +674,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -673,6 +673,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -67,7 +67,7 @@ index 7e5f1d80ff5395ea11eb558acabe63ccc3e5a17e..d241042fc37ffe4a2afecbc3c02e89f1
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index d293c49e6774de889fa9959234c82b41a4b1efe1..0787bc8a602c60e5b42933813baa6b9d923c9823 100644
index 851e792c6c6f26b6074ffe8b0ba39a5813fabacc..8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -216,6 +216,7 @@ void LocalWindowProxy::Initialize() {

View File

@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index 503225a84c1fe3835e97d8cc521f661339de105e..9949bd699ccca7fef8750816663fd66701b08d69 100644
index bafc8421e14071a926a48bee1958a44d266a9a0b..4463080e08f7a0635ef240794deae1ea8d90e148 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -240,6 +240,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
@@ -244,6 +244,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
}
}

View File

@@ -23,10 +23,10 @@ index c33775220e161d38e41efe8fea897815737341f8..e9636b69a8eb748aaa493466c3190ec6
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 5b1453e29d09170b698eb67a95f2822510525740..24d72cca5a230af3aaa43ad9ada92c2af17f06bf 100644
index 4e63b70ed936dc675a0a38bc9b53477b867735aa..3587150432068e1c75b3da9a4108c51d47d48127 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -762,6 +762,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -757,6 +757,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -39,7 +39,7 @@ index 5b1453e29d09170b698eb67a95f2822510525740..24d72cca5a230af3aaa43ad9ada92c2a
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 89fed16c112d55c13a9f23695e2898d630f7d815..b7f486337f46daac015644525c9870f54e03bb46 100644
index 2dddaff6c16c55288b6ea72cb8df0f8737971d71..dce9dae250ff2ac070752830df41cc45ed72823e 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -134,6 +134,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -51,10 +51,10 @@ index 89fed16c112d55c13a9f23695e2898d630f7d815..b7f486337f46daac015644525c9870f5
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 79bd8d43a71731e5076196877448462656a04d48..b5d7f50817f503956f19fcea687b5b0751268b44 100644
index 722eff1cf2e51fe628b873c67694764c99dae496..b16c96b5682846d897c2f0f4dd3881d386928b68 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -655,8 +655,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -646,8 +646,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
// which updates `visibility_`, unless the host is hidden. Make sure no update
// is needed.

View File

@@ -32,7 +32,7 @@ index 23672617af41f1d88b551da7b4ad0a19e39a2092..df032abeeca76c0cd914cbefcb6ba1a9
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index cd34e8f534e86d4ff11ea1d8020d215f37cd730b..9ee7cd49b021ff4277b7bfd9c9e015eb75489562 100644
index c13ae7f9f49afc0f5355920453df0cebcd55bf3d..1e96abbeac5d466c1831e6687796a031c4cfa596 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
@@ -43,7 +43,7 @@ index cd34e8f534e86d4ff11ea1d8020d215f37cd730b..9ee7cd49b021ff4277b7bfd9c9e015eb
#include "build/build_config.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -472,6 +473,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -464,6 +465,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
bool should_screenshot_on_mainframe_same_doc_navigation = true;
#endif // BUILDFLAG(IS_ANDROID)

View File

@@ -49,10 +49,10 @@ index 901b727ed898cdd840df5ff7e2380fbee5d7fde2..1caacaeed9ddf1162cfa393fe4a7c86a
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 44bd9c7356a30394f4bfa5333743619443d42216..91fa883ae557d3341789c006c3791f8788e39238 100644
index d1928b0e0a22a61fdaa36b0bb8992b3c4e5bffdd..ccfff39476e867885eed383a1d0f455389ab7eec 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -779,10 +779,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -778,10 +778,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 44bd9c7356a30394f4bfa5333743619443d42216..91fa883ae557d3341789c006c3791f87
if (!Client())
return false;
@@ -839,6 +835,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -838,6 +834,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 39168e90fd6ea68e562f0a2c6d8ba1162bc29e71..1b2b58497541b06857bc8f0d79172e8106003845 100644
index e14d2d0b5eaadb11b93ad9031f10706f9f8ed7df..9e033d3ffd9f733fedd0b5ac0af8ad4386f49ae4 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -133,6 +133,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(

View File

@@ -11,10 +11,10 @@ This patch can (and should) be removed when we can prevent those symbols
from being stripped in the release build.
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index beb5213714e1ab6260ed735099b0bcac90cdab66..fcbf88740deea6335ec70ab61795f501f4b432ce 100644
index 7e56497d4809c1946e636f3210c67575f8ae84bd..7ad7d3594890bcc9774f22c0cb3866a7e2b855fc 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -113,7 +113,7 @@ declare_args() {
@@ -100,7 +100,7 @@ declare_args() {
# Chrome's clang. crbug.com/1033839
use_thin_lto =
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&

View File

@@ -33,10 +33,10 @@ index 4b1fd316496e33f9e805aec89a91062587e6ee16..1b6fce9e2780a37e1e8bf3f8a62dc6bc
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 589d635d17884050b20b491d65833b7893f5e3e6..672da0774617ae3ac79983aa460b333d6aa325f2 100644
index d9942ad11f3497f2870c1a4e5fd63fa3706a496c..19f58acab5d3c3eba98e9492a387cd9798c9172c 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4637,7 +4637,7 @@ static_library("browser") {
@@ -4660,7 +4660,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index 589d635d17884050b20b491d65833b7893f5e3e6..672da0774617ae3ac79983aa460b333d
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index cfea9608df1620632dfe6f225e857e32ff0fab4f..3cb2213bc57db3b0c01f75c06a8a07609a1cfa86 100644
index 559ebea3d099b71df92b644e78786cf086856633..6622bc9dec05351646ceef70b031b1242e2c0e83 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7776,9 +7776,12 @@ test("unit_tests") {
@@ -7785,9 +7785,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index cfea9608df1620632dfe6f225e857e32ff0fab4f..3cb2213bc57db3b0c01f75c06a8a0760
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8773,6 +8776,10 @@ test("unit_tests") {
@@ -8780,6 +8783,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index cfea9608df1620632dfe6f225e857e32ff0fab4f..3cb2213bc57db3b0c01f75c06a8a0760
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8830,7 +8837,6 @@ test("unit_tests") {
@@ -8837,7 +8844,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index c5ee522e5ffb316bebfce23adb116b0b7cbd8ab8..f92fc4bbddd99bcd4b3e38d59e8c8df4ef6f59e4 100644
index 4071923717092ce31fa8031184af71af089588ce..270e221668e27207970c2e131432d2efa7038a75 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10124,6 +10124,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -10019,6 +10019,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,7 +21,7 @@ index c5ee522e5ffb316bebfce23adb116b0b7cbd8ab8..f92fc4bbddd99bcd4b3e38d59e8c8df4
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 382b9ad9c6e8df480f6b36df04f799318233e249..310d4cdd98bd0808e3d414b07bc3c14dc64482a1 100644
index 5106dc268e7ade5b89198f641b0a17902b87e951..cbd5c331e801445bd1ab0984776231a2a648a29a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5377,6 +5377,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -62,10 +62,10 @@ index 382b9ad9c6e8df480f6b36df04f799318233e249..310d4cdd98bd0808e3d414b07bc3c14d
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 19dbb921c9644522588ff74d0a1925f826736957..4e7b36729741a79cfdf04f89a8ec615d3148b294 100644
index ecfe129905639e9b7a5ed973017539cfaec9c2af..39308fa42e57b2dfba91aaa6f33d1a0bea3273ae 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -658,6 +658,10 @@ struct CreateNewWindowParams {
@@ -651,6 +651,10 @@ struct CreateNewWindowParams {
pending_associated_remote<blink.mojom.Widget> widget;
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
@@ -77,10 +77,10 @@ index 19dbb921c9644522588ff74d0a1925f826736957..4e7b36729741a79cfdf04f89a8ec615d
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index d2dccc29b0e13ab5c87b4c6803e79dc781e52ea2..be6639ef1a7eebb147afee483a35898d1ea5d95f 100644
index 3a7c61028412a84e3b96f689dd56b7f161afbb94..5eec6acbb6fa94ca9d7ee1324a7fdb62de8aa42f 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -877,6 +877,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -868,6 +868,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -90,7 +90,7 @@ index d2dccc29b0e13ab5c87b4c6803e79dc781e52ea2..be6639ef1a7eebb147afee483a35898d
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 3b6c42b2c4cd5d9e5753af25b27925ff0d933568..e6f51d39b4f2f6b162814996921958ca1252e1d7 100644
index bf77fbd24b051eb029fa283a1fa82f4995fb6d02..ec1bb0fec53be50236dcdddd5b09db01fdad3f4c 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -205,6 +205,7 @@ class NetworkService;
@@ -101,7 +101,7 @@ index 3b6c42b2c4cd5d9e5753af25b27925ff0d933568..e6f51d39b4f2f6b162814996921958ca
} // namespace network
namespace sandbox {
@@ -1468,6 +1469,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1450,6 +1451,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -170,10 +170,10 @@ index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea0
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6ee766c52202804adc532b1585224b4e35239f9a..42a0a7e5be01fe346cc2ad83d3395425a41e1699 100644
index 2cf52ebc1ce7c469855554c83a07c4ef3d8aff57..60661707197f972da2f6ee0718a344581da529cf 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6879,6 +6879,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6844,6 +6844,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
params->started_by_ad =
GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack();
@@ -224,10 +224,10 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..2060e04795ba8e7a923fd0fe3485b8c5
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 06efc300ee7a014759de6d0d61d0ced6c8bb965f..d8354c7554750bd17c5ad67db2a07453e7a4e5ca 100644
index cbc875cf147d4cd76ceb6e769e1ad17f992bc6ca..dfbc59e40438c378b87df8e0ea64a08ae877b817 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2341,6 +2341,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2329,6 +2329,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -8,10 +8,10 @@ electron objects that extend gin::Wrappable and gets
allocated on the cpp heap
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
index c29e8554933994ff56ccea394af34e17c4e9fc2c..6befb717f83d93d97033c240aa281e0bcb94e69c 100644
index c29e8554933994ff56ccea394af34e17c4e9fc2c..42512541b36ceb353483a29eca2c858b9628854b 100644
--- a/gin/public/wrappable_pointer_tags.h
+++ b/gin/public/wrappable_pointer_tags.h
@@ -76,7 +76,20 @@ enum WrappablePointerTag : uint16_t {
@@ -76,7 +76,19 @@ enum WrappablePointerTag : uint16_t {
kTextInputControllerBindings, // content::TextInputControllerBindings
kWebAXObjectProxy, // content::WebAXObjectProxy
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
@@ -27,7 +27,6 @@ index c29e8554933994ff56ccea394af34e17c4e9fc2c..6befb717f83d93d97033c240aa281e0b
+ kElectronReplyChannel, // gin_helper::internal::ReplyChannel
+ kElectronScreen, // electron::api::Screen
+ kElectronSession, // electron::api::Session
+ kElectronTray, // electron::api::Tray
+ kElectronWebRequest, // electron::api::WebRequest
+ kLastPointerTag = kElectronWebRequest,
};

View File

@@ -8,10 +8,10 @@ where callsites that deal with multiple contexts need to distinguish
the current isolate.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index d64fef6bfc37264dcdc1bbea22eb5c4e099553dd..41d40326505c4ced9837df7f03b791c9435124bf 100644
index be73f8a82ec031899cfaa7a7ddcf9e0170d187ad..09ca1f311b68a195f52a90aa375e7ea83bd439fa 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -382,6 +382,7 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -388,6 +388,7 @@ class CONTENT_EXPORT ContentRendererClient {
// WillDestroyServiceWorkerContextOnWorkerThread() is called.
virtual void WillEvaluateServiceWorkerOnWorkerThread(
blink::WebServiceWorkerContextProxy* context_proxy,
@@ -34,10 +34,10 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415
virtual void DidClearWindowObject() {}
virtual void DidChangeScrollOffset() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 40d1f104794795dba6cd59518819e98a4cdbfc44..8352f70c6c11af2890a03a2fae1729d27fc8da1f 100644
index e4cb58ffaaeb9de75ec9658819f7305760fff9cb..25c04e67478865344d0b1291f6a584324d8d2fa8 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4775,10 +4775,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
@@ -4765,10 +4765,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
observer.DidInstallConditionalFeatures(context, world_id);
}
@@ -167,10 +167,10 @@ index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd
// Called when initial script evaluation finished for the main script.
// |success| is true if the evaluation completed with no uncaught exception.
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index d241042fc37ffe4a2afecbc3c02e89f18e990929..044c38438029702fdbb6747b64932bd0d26372a5 100644
index 1ce4e9a1e7b5d5cfbb6201c000eada80b3b3d174..c3557fdc4916cd199a61ab087f0866ce4297ba7e 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -678,7 +678,8 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -677,7 +677,8 @@ class BLINK_EXPORT WebLocalFrameClient {
int32_t world_id) {}
// WebKit is about to release its reference to a v8 context for a frame.
@@ -181,7 +181,7 @@ index d241042fc37ffe4a2afecbc3c02e89f18e990929..044c38438029702fdbb6747b64932bd0
// Geometry notifications ----------------------------------------------
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 0787bc8a602c60e5b42933813baa6b9d923c9823..c4adcc6083e09e56416587fbcde10c9026e54066 100644
index 8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41..85ae42670cc038e18e4a0ea05e3de25c116b7a79 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -108,11 +108,12 @@ void LocalWindowProxy::DisposeContext(Lifecycle next_status,

View File

@@ -49,7 +49,7 @@ index 97c8014fadf2231321c05a1f74d91418946bf9fc..5263aaef4498ae7a19842dd3eb90a096
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index 07ba390764528c414f356adaf8dc423fcdb23a89..ca32391b67284206feb49a234dd96136f0fd8e76 100644
index 8060008a22ed6aabb1821cf725caec500d80425c..f5685b0275793219f84bd1891195a29dab6fcb4a 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -168,6 +168,12 @@ namespace crostini {

View File

@@ -14,7 +14,7 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d4d4bd6ad9098db89b47264821f008868eda9b9b..a663f42e3b9e7bcaf8e463439ada312938f2cf15 100644
index e4b50b13b686e4c89ca6e678fb78952a4d347c37..6dde94189fcff81a759bc73351f37b97fa39a9ee 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5348,7 +5348,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(

View File

@@ -223,7 +223,7 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ebb64bfdabfd22146cac139b7800714e7648d31b..6a2444ad5d20164be9877cf6b856d2bf762dcd26 100644
index db4f2316ba98a0ced74a303390fee16d0050eee6..861720198a3cbfe198ec328f899cdb6d0fcafdf7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5312,8 +5312,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -329,10 +329,10 @@ index 709994f0523c39d432fe45882ad839d9ab721822..af9f5907d729a2d8225abea37ee6ceb5
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 850e8688c769e62e6ed88182e1d46d00495d1a49..264149120abd0a0697a09465008eb007657175bc 100644
index 5b03de2243e84bd2f82be1055b3f1c196bf491ba..1ef2c84b730aaadbef1cbb7d0abe8ef2e903a69f 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -411,8 +411,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -423,8 +423,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -343,10 +343,10 @@ index 850e8688c769e62e6ed88182e1d46d00495d1a49..264149120abd0a0697a09465008eb007
return true;
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index a23493edbd1cac256a9914aabe2a53042326a192..b2d50c7cbfe30baa0f2a3218ef5190242d7ad0a7 100644
index 4cc90f1e5e7cf245de8e6b28f95864745eaf74b0..867e67863050d5a4f01e4d3f1b5cf9f17d8c4034 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -185,8 +185,7 @@ class MimeHandlerViewGuest
@@ -187,8 +187,7 @@ class MimeHandlerViewGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 884c9c6cf1e7a46a2a375d53b4b8761c769f2992..46d2505f8ac3aeccc2003763fecb78aedce53575 100644
index 5dc2d7c4405eb32ea697c28c4c79a3da3d1d7ff2..0e71782c946029113b2da9989521cb06fbce11be 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1956,6 +1956,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1950,6 +1950,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index 884c9c6cf1e7a46a2a375d53b4b8761c769f2992..46d2505f8ac3aeccc2003763fecb78ae
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1975,9 +1995,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1969,9 +1989,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index 884c9c6cf1e7a46a2a375d53b4b8761c769f2992..46d2505f8ac3aeccc2003763fecb78ae
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1985,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1979,9 +1997,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index a36dd07237392e537c389628b5814e205c1f979f..3d7544d24afc3d86d59a8a1e0de6bc6956ba63ae 100644
index d0ec6830b555bcaddd882d4b626bca7762ad0317..9b25f25f035792cdb9ab0a3c99254b48a6c497ad 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -588,7 +588,11 @@
@@ -573,7 +573,11 @@
}
host()->WasHidden();

View File

@@ -34,10 +34,10 @@ index bd0f3ec2116a137d2a24e81e6bf0b5854a47f2f9..e1585de8fad7b11174d51666e7dce681
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 95f75a24fa3e799dc4227e6438b1d0cc316ba4b9..79bd8d43a71731e5076196877448462656a04d48 100644
index 1aeb55dc79528bf36abd25ded50f7365724bf0b2..722eff1cf2e51fe628b873c67694764c99dae496 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -719,7 +719,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -710,7 +710,7 @@ void RenderWidgetHostViewAura::HideImpl() {
CHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 35753f009bdf0e2d1ccde3d12b73cdf6041ae0c7..7beeb90db6b577a674622076faaa52b6925f97e9 100644
index ce9c92a5ff2568baba932133c5d9430405d6d10b..063c91ef413a91e047cb52fea04e8fdb73e861ee 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1923,6 +1923,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1926,6 +1926,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -63,7 +63,7 @@ index f11fbd0c31ef0a160133d12beddbbfb0b5195afe..46d56af320bda5e0204c023d78533fd3
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 415bafe16971135dcf7e91c11e2efc693359ef3f..c5ab920f1443e28ac3f69182756aa7eeedf4de0e 100644
index daae87e4794a3a15f95c600721d1c25f6360bcd4..7dbc3878f18f12d0433172d7aca50692e951fbe6 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1294,6 +1294,9 @@ interface NetworkContext {

View File

@@ -400,7 +400,7 @@ index 225e017909b8869231b870eaaf161a0b5e93e2a0..846a5251429630b8528a84a3d67ed56c
if (schemes.allow_non_standard_schemes_in_origins)
url::EnableNonStandardSchemesForAndroidWebView();
diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h
index 3b17b8c52c364272f7aee02581922649229662e1..1db5e9868ab7c6bb07eb6211886542dcc0d7a0e4 100644
index 6cbaa4c6f7af7b1b9a9145e050fbed13daa523ac..0102ef660ecbddd38e143708983bd546d67fe1c9 100644
--- a/content/public/common/content_client.h
+++ b/content/public/common/content_client.h
@@ -139,6 +139,9 @@ class CONTENT_EXPORT ContentClient {

View File

@@ -10,7 +10,7 @@ Electron needs this constructor, namely for gin_helper::Constructible
objects.
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 0e4f17437ea2c687cb188e59b3b044557d6ad5fe..4c0c31a07b83506bb5f07a228ca79fb0c866d3fd 100644
index 196749df48a41595da226a4baec72051446fc442..256e6634d9689ebcc53dfc8849587a73ad311463 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -145,6 +145,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,

View File

@@ -20,7 +20,7 @@ making three primary changes to Blink:
* Controls whether the CSS rule is available.
diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
index 617af0ab9475d0f5c4ec68f9ae502aa7134414cc..d495fb33a73544c069e9835334fa13ed9581ec0c 100644
index 01215910aa9a7f804251155c22962efe3cdfa25e..affdd9a597b4fdda80006760cf03d47ae8f5ef3c 100644
--- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
+++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
@@ -50,7 +50,7 @@ enum CSSSampleId {
@@ -46,10 +46,10 @@ index 6e60de1319c5506d7180719fa230ab9cf537b832..e570e335fbd413340ddedeee423eca71
'internal-forced-visited-'):
internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index e388ec680c1492b7ef7f3428f16d35f4d13c4b53..56cabedc4588cefd69f7b5509eb093b42c122a92 100644
index f4fe8834fcbeb65563ec8da2f7e0ad2c53c16dff..9fdc5362ce5d5708741376f9703f65e1bad38c41 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -9596,6 +9596,27 @@
@@ -9555,6 +9555,26 @@
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
},
@@ -66,7 +66,6 @@ index e388ec680c1492b7ef7f3428f16d35f4d13c4b53..56cabedc4588cefd69f7b5509eb093b4
+ type_name: "Length",
+ default_value: "Length::None()",
+ keywords: ["system-ui"],
+ percentages_depend_on_used_value: false,
+ converter: "ConvertCornerSmoothing",
+ runtime_flag: "ElectronCSSCornerSmoothing",
+ valid_for_permission_element: true,
@@ -78,7 +77,7 @@ index e388ec680c1492b7ef7f3428f16d35f4d13c4b53..56cabedc4588cefd69f7b5509eb093b4
{
name: "-internal-visited-color",
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc
index 2afe18e9e4a5404ed184aeedc1c02a313853f463..7c3b0c2da6ded539764ce59bc43f49e9ffe71b5e 100644
index 1ca69ff2d1c3fbbf46dd72c7ecb587b8da3e6596..d522c0c1ca4694218811432816f6808c06d78201 100644
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
@@ -421,6 +421,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
@@ -91,10 +90,10 @@ index 2afe18e9e4a5404ed184aeedc1c02a313853f463..7c3b0c2da6ded539764ce59bc43f49e9
return a.EmptyCells() == b.EmptyCells();
case CSSPropertyID::kFill:
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
index 44288dcc847fd9328d15c4576de6d7c98e8cb662..35c2ef984401b51c2d688cef7e56e89b5660e27b 100644
index 91680e1e1b273a847c68a2de7aa4408669abb8ee..81e62e16728c52fc3fa2a74ec66456061a872da1 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -13206,5 +13206,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
@@ -13186,5 +13186,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
CSSValueID::kNone>(stream);
}
@@ -132,10 +131,10 @@ index 44288dcc847fd9328d15c4576de6d7c98e8cb662..35c2ef984401b51c2d688cef7e56e89b
} // 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 59cbbbaf800308d1f2c917adeb25e55df394bee4..0022411e2a7cb36997c51c23f0214d369daef48c 100644
index 95385f759d94f8627c71f2626e9bb7071fc492ed..e3765fe54fce2fa8ca458b14dd158be7c7b0281c 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
@@ -4191,6 +4191,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
@@ -4179,6 +4179,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
return PositionTryFallback(scoped_name, tactic_list);
}
@@ -152,10 +151,10 @@ index 59cbbbaf800308d1f2c917adeb25e55df394bee4..0022411e2a7cb36997c51c23f0214d36
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 ecdd00ea111b4736b062ddc452a4091ee47f51c8..f5590b70bee07e1db8ae0915464e58df95a03e60 100644
index 63af4a35ae43f3683594afc8ada1c75b5b1655f8..1e1b428551b97b717c347dde717aba46f66a056a 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
@@ -459,6 +459,7 @@ class StyleBuilderConverter {
@@ -457,6 +457,7 @@ class StyleBuilderConverter {
StyleResolverState&,
const CSSValue&,
bool allow_any_keyword_in_position_area = false);
@@ -203,10 +202,10 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f
return result;
}
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index eb2472737bd6e20a6bf9fdb311a412036d7dbff7..1872c87c8ec04263ab40072bdbc28520f6fd7c83 100644
index 549d6807865a52be3e85d0a047a7ae1c306f5670..449790bac809e6d891459cfcc6109c841cbfafc2 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1671,6 +1671,8 @@ component("platform") {
@@ -1672,6 +1672,8 @@ component("platform") {
"widget/widget_base.h",
"widget/widget_base_client.h",
"windows_keyboard_codes.h",
@@ -314,7 +313,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661
auto DrawAsSinglePath = [&]() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 19184b04ae49211d339b71af9141b4425059d522..7ea37369440109fe7dad2cbeb2e910f26d3a73eb 100644
index 1d094ca3afdb7dd2643bb9d01e8545bc2afd2569..755c2230b1466302579230e410a4d49fb61e98e7 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -214,6 +214,10 @@

View File

@@ -7,19 +7,18 @@ This allows embedders to call SetDefersLoading without reaching into Blink inter
This might be upstreamable?
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
index b6da61a76551f1de95b8cfb0a1167b14040f3dd1..9413492f8e0fd6c5371c66329e1ad6d4163ba670 100644
index 33e23680b927d417b0882c7572fe32dc2d2b90c3..9413492f8e0fd6c5371c66329e1ad6d4163ba670 100644
--- a/third_party/blink/public/web/web_document_loader.h
+++ b/third_party/blink/public/web/web_document_loader.h
@@ -38,6 +38,8 @@
@@ -38,6 +38,7 @@
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
#include "third_party/blink/public/platform/web_archive_info.h"
#include "third_party/blink/public/platform/web_common.h"
+#include "third_party/blink/public/platform/web_loader_freeze_mode.h"
+#include "third_party/blink/public/platform/web_source_location.h"
#include "third_party/blink/public/platform/web_source_location.h"
#include "third_party/blink/public/web/web_navigation_type.h"
namespace blink {
@@ -62,6 +64,8 @@ class BLINK_EXPORT WebDocumentLoader {
@@ -63,6 +64,8 @@ class BLINK_EXPORT WebDocumentLoader {
virtual std::unique_ptr<ExtraData> Clone() = 0;
};
@@ -29,10 +28,10 @@ index b6da61a76551f1de95b8cfb0a1167b14040f3dd1..9413492f8e0fd6c5371c66329e1ad6d4
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index ee90152234391448ffb070897bdc48cc078012ea..ae4f8abb8a385f9c33423b71065aee1ab120a046 100644
index 98f6a93aa8b022c6f844d6a8d5759d491e6f4867..244acb4ae6f3c7eb80f8aedce4670d090f660afd 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -327,7 +327,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -319,7 +319,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
std::optional<scheduler::TaskAttributionId> task_state_id,
bool should_skip_screenshot);

View File

@@ -90,7 +90,7 @@ index e503e4940c6c5afa8e4907ce3fcabdf8a12e8d81..3df4be54916dda28e3725baba53a7bef
// when it receives the AcceptCHFrame.
EnabledClientHints? enabled_client_hints;
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
index 0d3aa45778e02c4a5bcdea6e8b0f5ab722e86aa3..fbe4f3d2931cdd9893a3c96667015d4091aed479 100644
index 916dadfe0eba27c8493b1b64bb01f9e77153692e..4a599fed851ea5af4be66895b7b2d83c5f128c0d 100644
--- a/services/network/public/mojom/url_response_head.mojom
+++ b/services/network/public/mojom/url_response_head.mojom
@@ -14,6 +14,7 @@ import "services/network/public/mojom/encoded_body_length.mojom";
@@ -112,7 +112,7 @@ index 0d3aa45778e02c4a5bcdea6e8b0f5ab722e86aa3..fbe4f3d2931cdd9893a3c96667015d40
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index ed2de2a74f757f8dbb03d24934468933bc6923ed..a985ad9c86b4cf55abd52d62275e56788dd46a3d 100644
index eb1b02a8a311f5f02302fddf76e468d30951683b..e4c62716106a0665bbeca11f0c94ac431e8b1c4e 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -373,6 +373,9 @@ URLLoader::URLLoader(
@@ -155,7 +155,7 @@ index ed2de2a74f757f8dbb03d24934468933bc6923ed..a985ad9c86b4cf55abd52d62275e5678
if (expected_response_headers_for_synthetic_response &&
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 5c04a9cc1d789b92623cd92be8cb7f94e53a7a1c..ccb3b820435eafaf47c316a3db4789ff605229f3 100644
index f6691de75d3c586c8644eaf1efffbb2b69916007..254cbddbfd5a21f142d2d2767b62320b29ebe27b 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -629,6 +629,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader

View File

@@ -20,10 +20,10 @@ This patch will be removed when the deprecated sync api support is
removed.
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
index 2f6fbe5270245ddb1ef82f097ac1258781acb66e..727b73a37a3258aa44643d66dceba79017d9dbc8 100644
index 26f508b259cab776d32c95731900b30cc8df649f..3b25ba24e81c7b5b27e65f30ea7a2c174c397efa 100644
--- a/components/permissions/permission_util.cc
+++ b/components/permissions/permission_util.cc
@@ -554,7 +554,8 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
@@ -552,7 +552,8 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
return ContentSettingsType::LOCAL_NETWORK;
case PermissionType::LOOPBACK_NETWORK:
return ContentSettingsType::LOOPBACK_NETWORK;

View File

@@ -67,12 +67,12 @@ index 94bd32ce1ddd3f8b4315cd06be59d7550b591891..ad005e0a19a7763da089fccc659d93c8
return _headless_info.get();
}
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index e74be476326c22821087939060ff744b964e9216..7840b6cc54a344426d46c81b7751f38057d3964e 100644
index 5e546b1462ce7944636d6ded2bfa1616390192e1..cb2cbf79138c5b94e1086c5fcada1bafa6d06a04 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -559,7 +559,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -535,7 +535,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
is_translucent_window_ = params->is_translucent;
pending_restoration_data_ = params->state_restoration_data.Clone();
pending_restoration_data_ = params->state_restoration_data;
- if (display::Screen::Get()->IsHeadless()) {
+ if (params->is_headless_mode_window) {
@@ -80,24 +80,23 @@ index e74be476326c22821087939060ff744b964e9216..7840b6cc54a344426d46c81b7751f380
}
diff --git a/components/remote_cocoa/common/native_widget_ns_window.mojom b/components/remote_cocoa/common/native_widget_ns_window.mojom
index a1cdcdd45fc05c8e1456bf7c33f94bf0aa9dcf1b..9aab9244b6387c1d49c2ff6d7c1d3dd2b3737d05 100644
index a9ad418f46fc6fdd437025a475f2538f706baa0c..9bdbd620a68ce3fad8eecd88cac3159fda7d74ae 100644
--- a/components/remote_cocoa/common/native_widget_ns_window.mojom
+++ b/components/remote_cocoa/common/native_widget_ns_window.mojom
@@ -98,6 +98,9 @@ struct NativeWidgetNSWindowInitParams {
@@ -83,6 +83,8 @@ struct NativeWidgetNSWindowInitParams {
// NSWindowCollectionBehaviorParticipatesInCycle (this is not the
// default for NSWindows with NSWindowStyleMaskBorderless).
bool force_into_collection_cycle;
+ // If true, the window was created in headless mode.
+ bool is_headless_mode_window;
+
// Optional data to restore as the window's UI state.
StateRestorationData? state_restoration_data;
// An opaque blob of AppKit data which includes, among other things, a
// window's workspace and fullscreen state, and can be retrieved from or
// applied to a window.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index 79eece0dfff27b4fdb6beb895271e419007de4e3..9dda823b2e80048ba6fdedf398c4032701864d73 100644
index ac1905d73675e5645c8baa38c7c95af54dfb0c33..c2946ef91613438f56e333a198cfbeb1013ffdbc 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -564,6 +564,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -560,6 +560,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
bool is_miniaturized_ = false;
bool is_window_key_ = false;
bool is_mouse_capture_active_ = false;
@@ -106,18 +105,18 @@ index 79eece0dfff27b4fdb6beb895271e419007de4e3..9dda823b2e80048ba6fdedf398c40327
bool is_visible_on_all_workspaces_ = false;
gfx::Rect window_bounds_before_fullscreen_;
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 03caee9409869b7009750cc68e1d1503b9719b76..994483c8e95451ed43aa00f5c4c4e45354bfa8bd 100644
index fe1fc7c7c37918196773cb555423db9077048a0d..8e6a8771ff1e312f25b504d09fec2f7aa3bbbad0 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -477,6 +477,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -468,6 +468,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (!is_tooltip) {
tooltip_manager_ = std::make_unique<TooltipManagerMac>(GetNSWindowMojo());
}
+ is_headless_mode_window_ = params.ShouldInitAsHeadless();
if (params.workspace.length()) {
if (std::optional<std::vector<uint8_t>> restoration_data =
@@ -494,6 +495,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
std::string restoration_data;
@@ -485,6 +486,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
window_params->modal_type = widget->widget_delegate()->GetModalType();
window_params->is_translucent =
params.opacity == Widget::InitParams::WindowOpacity::kTranslucent;
@@ -125,7 +124,7 @@ index 03caee9409869b7009750cc68e1d1503b9719b76..994483c8e95451ed43aa00f5c4c4e453
window_params->is_tooltip = is_tooltip;
// macOS likes to put shadows on most things. However, frameless windows
@@ -682,9 +684,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -666,9 +668,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// case it will never become visible but we want its compositor to produce
// frames for screenshooting and screencasting.
UpdateCompositorProperties();

View File

@@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 26d4c43c9e09b58c764d38f8fbf62afc8f3a3c86..c9cbf38a30e299eb37552a1885362a87bd249495 100644
index d556646077f61e38c661039e3f8347a63a79e3a5..026ffca93b2f9d9996865e62eefc25d609264f36 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -11712,6 +11712,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
@@ -11705,6 +11705,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
target_rph_id);
}
@@ -44,10 +44,10 @@ index 26d4c43c9e09b58c764d38f8fbf62afc8f3a3c86..c9cbf38a30e299eb37552a1885362a87
// origin of |common_params.url| and/or |common_params.initiator_origin|.
url::Origin resolved_origin = url::Origin::Resolve(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index f70c3db4c441a500d000fdcd939a4cb988deb74a..caf60e5bffb5e8b0f109c42a9dfc4b2426fe9bb2 100644
index 2960f24d6d18dac8227e63dace24d9bdf711c85c..8937113a83eec4cf1659f7cd941a3b25e9daae29 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2355,6 +2355,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2346,6 +2346,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@@ -55,7 +55,7 @@ index f70c3db4c441a500d000fdcd939a4cb988deb74a..caf60e5bffb5e8b0f109c42a9dfc4b24
// Whether the origin is newly created within this call, instead of copied
// from an existing document's origin or from `origin_to_commit_`. If this is
// true, we won't try to compare the nonce of this origin (if it's opaque) to
@@ -2391,6 +2392,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
@@ -2382,6 +2383,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
// non-renderer only origin bits will be the same, which will be asserted at
// the end of this function.
origin = origin_to_commit_;

View File

@@ -76,18 +76,18 @@ index 16b11c6115cc5504dbd15d58c4b9786633e90e96..7c0a2308d437a2d9cec433c6ab0fd6a9
if (IsShortcutHandlingSuspended()) {
return;
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
index 99fdad04b8f336ef526902fc6a3b44954c02cf0c..1cf8f9cd6c07d161f5dadcb2752a59aebadaf2ac 100644
index 57e35eb71c3f30341ced923af815e6bb78c26da6..96d2e93306c1aaf963744d52451f31e159c7c8b5 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
@@ -9,6 +9,7 @@
@@ -8,6 +8,7 @@
#include <map>
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
+#include "content/public/browser/media_keys_listener_manager.h"
#include "ui/base/accelerators/command.h"
#include "ui/gfx/native_ui_types.h"
@@ -43,6 +44,9 @@ class GlobalAcceleratorListener {
@@ -42,6 +43,9 @@ class GlobalAcceleratorListener {
// The instance may be nullptr.
static GlobalAcceleratorListener* GetInstance();

View File

@@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index b5d7f50817f503956f19fcea687b5b0751268b44..bed70819558af52b34135fdb4a3ec4e72e840ace 100644
index b16c96b5682846d897c2f0f4dd3881d386928b68..2ae3a467ca4be802cd53b5823f23bf0224c3a761 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3411,6 +3411,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
@@ -3382,6 +3382,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
}
}
@@ -87,10 +87,10 @@ index 5158897a7a7af9f29580faa17498a8dbab40af87..96617b9bb0275144b0e9ed18547d9982
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3413e339934bab9df03d241213d27221bb5eaa20..d4d4bd6ad9098db89b47264821f008868eda9b9b 100644
index 3079d14e75fe31cdc5f7d49a09b026f5d4f7bc62..e4b50b13b686e4c89ca6e678fb78952a4d347c37 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10276,7 +10276,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -10247,7 +10247,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View File

@@ -9,7 +9,7 @@ values requested by Electron apps, instead of requiring user input.
This patch should be submitted upstream.
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc
index 37faffac6fbb00d356c7cc4e685441f7c4d32481..31bd60c4638e48e91c95b5df8c943ca13c3bc134 100644
index a5bb1271231bb092c5e35fcf0cc99f0a18164147..1f02bf54fc6a3c0feb37b51dd6c9be9615073bcf 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc
@@ -15,6 +15,7 @@
@@ -111,8 +111,8 @@ index 37faffac6fbb00d356c7cc4e685441f7c4d32481..31bd60c4638e48e91c95b5df8c943ca1
+
} // namespace
GlobalAcceleratorListenerLinux::BoundCommand::BoundCommand() = default;
@@ -292,6 +378,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts,
GlobalAcceleratorListenerLinux::GlobalAcceleratorListenerLinux(
@@ -253,6 +339,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts,
new_props["description"] =
dbus_utils::Variant::Wrap<"s">(std::move(*description));
}
@@ -125,7 +125,7 @@ index 37faffac6fbb00d356c7cc4e685441f7c4d32481..31bd60c4638e48e91c95b5df8c943ca1
shortcuts.emplace_back(id, std::move(new_props));
}
@@ -299,6 +391,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts,
@@ -260,6 +352,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts,
dbus_xdg::Dictionary props;
props["description"] = dbus_utils::Variant::Wrap<"s">(
base::UTF16ToUTF8(bound_cmd.command.description()));

View File

@@ -20,7 +20,7 @@ index b0b5f62156b35573d4109552ad63a79ac90a4596..ce94c80f7293ccc34994d79ab11cd09b
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
}
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 2da12ab6b451403244a4d9ef30ca978819eb4a82..b629c0bb8e71970c37e62a79c7a91031fc24e917 100644
index fb9cf44fb285ca107f24dfd0030568acf1b3d669..c6644ccf768e8172498fd3d59feb3b7d5d2d1ce1 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -467,6 +467,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 91fa883ae557d3341789c006c3791f8788e39238..bc265108b668b3843c0113792b547f93cfc66bdf 100644
index ccfff39476e867885eed383a1d0f455389ab7eec..0f83d2d4de4dc2a8e76a727b4a3edbdf85c93979 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3222,6 +3222,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3221,6 +3221,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -70,7 +70,7 @@ index 91fa883ae557d3341789c006c3791f8788e39238..bc265108b668b3843c0113792b547f93
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -3279,7 +3280,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3278,7 +3279,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@@ -80,10 +80,10 @@ index 91fa883ae557d3341789c006c3791f8788e39238..bc265108b668b3843c0113792b547f93
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index feb469a17af253cf72975f0d1a049beab6a2c53e..1497d0529b6b9a0e4ac14b89157ab52c20985d9c 100644
index 4bdcc643bd636cf68b0d1a36155114b158ec23fd..bdbc7e8753345ed342d1f4507fbf5878313659ef 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -835,6 +835,7 @@ class CORE_EXPORT LocalFrame final
@@ -829,6 +829,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -92,7 +92,7 @@ index feb469a17af253cf72975f0d1a049beab6a2c53e..1497d0529b6b9a0e4ac14b89157ab52c
mojom::blink::WantResultOption,
mojom::blink::PromiseResultOption);
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index 56d681d3eea661fb0a5b1a135b4d4ea09e9e4577..7bcae985c6c918782f2795746f3ea01fcdcb1bff 100644
index 7f51c2c394512e13b6e04c2483b44b1feefc9447..bab96904371930a1b43426251bbbf24c21ccd2b5 100644
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -987,6 +987,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
@@ -223,7 +223,7 @@ index 782fe8b0931884226d19ad7224d7ec576ca78113..fd36db08a2f9900685280d72fe55bcd0
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
}
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 5670b632ec9b8139885c81ff867a4fc1556c08a5..24a172f8fc2b643d4d0f6073e120d6f553c5c8f9 100644
index 888ef302f330986946cf43c52ccb855652640c38..e090dea38e64fe19ad8ceb1147391dbe48d7db33 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1128,14 +1128,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -245,7 +245,7 @@ index 5670b632ec9b8139885c81ff867a4fc1556c08a5..24a172f8fc2b643d4d0f6073e120d6f5
bool WebLocalFrameImpl::IsInspectorConnected() {
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 66f31022b1470069b27af42c538e14376c64eed7..71d764c85ac7d33e0f8e11bee404e9906c14c384 100644
index c199d07ab8902892bbe1e12d3ff5670a32757374..6dc52189e80ca6dfa712f6fdf934002e7c7de3ef 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -201,6 +201,7 @@ class CORE_EXPORT WebLocalFrameImpl final

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 0e6f4713d61c4ac6d1ea174abc451617a6863829..2deacd7c4b527b197be02df7e218028d6963e2de 100644
index 9d38302c32a040272d9eeab4a7d20755231a3cb6..4c14e547fbedcd7918a3bd950dbed4ed48231fd4 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4923,6 +4923,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4852,6 +4852,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,7 +20,7 @@ index 0e6f4713d61c4ac6d1ea174abc451617a6863829..2deacd7c4b527b197be02df7e218028d
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index e6f51d39b4f2f6b162814996921958ca1252e1d7..1f496db16389734a30f1c07903ff6225aeb1f1b4 100644
index ec1bb0fec53be50236dcdddd5b09db01fdad3f4c..a143a356e3d3f3d26c0fce3d34eee17dab1cdab6 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -350,6 +350,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index bb7dc253bbc1a9e8b194bc55de59bd4e6b7aecc4..4e7e4568cc12bcd7d5a126b3a32cf8373452c9f9 100644
index 643f7b6e0b55bde4e2cdd663c814594e3e5c3616..e00dea2c49cb919428328a32be73a7c270347838 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1657,6 +1657,11 @@
@@ -1653,6 +1653,11 @@
"includes": [12000],
},

View File

@@ -50,7 +50,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 c9811ba7835ed8f96dbde412543e86dc3b5ab13b..2786fa35b0ccf210af0e2ba4b423952211676614 100644
index 902ad8a5f40b547cf197cf143e16bed12a286c8e..dcae324d08cee5657bcfc711bc45f466b4ac592c 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1082,6 +1082,7 @@ component("base") {
@@ -129,10 +129,10 @@ index 416e541436d201aabca26cdbf7e8477103bd014c..8c5f92b03d67e5f0587b0e9420969061
}
diff --git a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
index 275d6dbe1b05f806278c14e2ec5df5d550be787b..750ba56ec139679b994aec04938858c064c76d69 100644
index 08687f5bf1312138f078bef64898235a7cab1f26..f662542733d0e8a0d27a6594942c8533287902bd 100644
--- a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
+++ b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
@@ -972,6 +972,7 @@ if (is_clang_or_gcc) {
@@ -969,6 +969,7 @@ if (is_clang_or_gcc) {
":allocator_base",
":allocator_core",
":buildflags",
@@ -811,7 +811,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..94bd32ce1ddd3f8b4315cd06be59d755
- (NSWindow*)rootWindow {
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 15c81d1f61c5dd994f24a194665de639b6355460..e74be476326c22821087939060ff744b964e9216 100644
index 417422462f62a9d707637fe7e71663106bc92868..5e546b1462ce7944636d6ded2bfa1616390192e1 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -42,6 +42,7 @@
@@ -836,7 +836,7 @@ index 15c81d1f61c5dd994f24a194665de639b6355460..e74be476326c22821087939060ff744b
namespace {
constexpr auto kUIPaintTimeout = base::Milliseconds(500);
@@ -756,10 +760,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -732,10 +736,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@@ -849,7 +849,7 @@ index 15c81d1f61c5dd994f24a194665de639b6355460..e74be476326c22821087939060ff744b
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
@@ -1256,6 +1262,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -1194,6 +1200,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
}
void NativeWidgetNSWindowBridge::SetAllowScreenshots(bool allow) {
@@ -857,7 +857,7 @@ index 15c81d1f61c5dd994f24a194665de639b6355460..e74be476326c22821087939060ff744b
CGSConnectionID connection_id = CGSMainConnectionID();
CGSWindowID window_id = ns_window().windowNumber;
CGRect frame = ns_window().frame;
@@ -1265,6 +1272,10 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -1203,6 +1210,10 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
region.reset(CGRegionCreateWithRect(frame));
}
CGSSetWindowCaptureExcludeShape(connection_id, window_id, region.get());
@@ -974,10 +974,10 @@ index 2f1fcace77c403c0e136ae2fc40633cccccce038..9ce9c1771310e81b18ba6fe4569544ff
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 3913f68ccd32442c16b50b7a48a1876da3061f3b..013b1ba6cffa8ad0040b7939289199a5dfd4563d 100644
index fbef0553694736c84d9902d06113edb88d1a9881..e3f186c1d1966ad1e2099351d7d7ea2df3806fa7 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -362,6 +362,7 @@ source_set("browser") {
@@ -345,6 +345,7 @@ source_set("browser") {
"//ui/webui/resources",
"//v8",
"//v8:v8_version",
@@ -1020,10 +1020,10 @@ index 367834e678f44d6e71c4218d293e11c3569daf2b..c97fb8f0411b45c1a01e4fab8dc40cc3
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 29fe3bd4d8a63c5bd51536a904d191fef0c4e4a1..a36dd07237392e537c389628b5814e205c1f979f 100644
index fd37e14335bebe3235c4a10b4322fc06f4bd9296..d0ec6830b555bcaddd882d4b626bca7762ad0317 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -53,6 +53,7 @@
@@ -52,6 +52,7 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_visibility_state.h"
@@ -1031,7 +1031,7 @@ index 29fe3bd4d8a63c5bd51536a904d191fef0c4e4a1..a36dd07237392e537c389628b5814e20
#include "media/base/media_switches.h"
#include "skia/ext/platform_canvas.h"
#include "skia/ext/skia_utils_mac.h"
@@ -289,8 +290,10 @@
@@ -274,8 +275,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -1042,7 +1042,7 @@ index 29fe3bd4d8a63c5bd51536a904d191fef0c4e4a1..a36dd07237392e537c389628b5814e20
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1713,10 +1716,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1687,10 +1690,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -1055,7 +1055,7 @@ index 29fe3bd4d8a63c5bd51536a904d191fef0c4e4a1..a36dd07237392e537c389628b5814e20
return gfx::NativeViewAccessible([GetInProcessNSView() window]);
}
@@ -1768,9 +1773,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1742,9 +1747,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -1067,7 +1067,7 @@ index 29fe3bd4d8a63c5bd51536a904d191fef0c4e4a1..a36dd07237392e537c389628b5814e20
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2295,20 +2302,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2269,20 +2276,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
GetRenderWidgetAccessibilityTokenCallback callback) {
base::ProcessId pid = getpid();
@@ -1189,10 +1189,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index be65cd3d0696c7df1fa7548e6b0461f81f505287..29e30240e271fc7cad600de7ce5895ef2ff9ba46 100644
index f02b00b5cf5bf1de44031596d5a8284ddbe5182c..9b88f0fde3ffde1860bd517a203e460271f61fa1 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -700,6 +700,7 @@ static_library("test_support") {
@@ -699,6 +699,7 @@ static_library("test_support") {
"//url",
"//url/mojom:url_mojom_gurl",
"//v8",
@@ -1200,7 +1200,7 @@ index be65cd3d0696c7df1fa7548e6b0461f81f505287..29e30240e271fc7cad600de7ce5895ef
]
data_deps = [
@@ -1175,6 +1176,8 @@ static_library("browsertest_support") {
@@ -1174,6 +1175,8 @@ static_library("browsertest_support") {
# TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
# enable the diagnostic by removing this line.
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
@@ -1209,7 +1209,7 @@ index be65cd3d0696c7df1fa7548e6b0461f81f505287..29e30240e271fc7cad600de7ce5895ef
}
mojom("content_test_mojo_bindings") {
@@ -2072,6 +2075,7 @@ test("content_browsertests") {
@@ -2064,6 +2067,7 @@ test("content_browsertests") {
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/webui:test_support",
@@ -1217,7 +1217,7 @@ index be65cd3d0696c7df1fa7548e6b0461f81f505287..29e30240e271fc7cad600de7ce5895ef
]
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3423,6 +3427,7 @@ test("content_unittests") {
@@ -3413,6 +3417,7 @@ test("content_unittests") {
"//ui/shell_dialogs",
"//ui/webui:test_support",
"//url",
@@ -1342,7 +1342,7 @@ index d3ceb8cfbfe1fb63804232c3fd62bafcd90752bd..a82ca8b52a4b8f96ccb013abd5c0bf7c
if (is_ios) {
diff --git a/media/audio/apple/audio_low_latency_input.cc b/media/audio/apple/audio_low_latency_input.cc
index 3a079b0fc34031d062045510fe0e2444792ff942..1be75833d46aaa124e5467904f68e46cce22ead8 100644
index bbfc5f0377d33fb215b03d2c64cc6b04600a3c21..cc2c13e7a4ee31bf7333d005aca0e6b3f5ec0e50 100644
--- a/media/audio/apple/audio_low_latency_input.cc
+++ b/media/audio/apple/audio_low_latency_input.cc
@@ -27,6 +27,7 @@
@@ -1789,7 +1789,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
} // namespace sandbox
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index 66ed65def5c45d87f2e6357228cfcafdd784ed9a..0ad8271d301d91b2b24b5efed01242426e48aa5b 100644
index c8135570f00e9bd737bd775478ea5a8642507d7a..44265e4f5a7c3bcafe26e6ee1db83bbd048e6ebf 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -439,6 +439,7 @@ component("core") {
@@ -2140,7 +2140,7 @@ index ef031ba14e4c649f6f3a5718ac521e6b424d64cb..38e528450196b4dbd5fa6a25b96baa10
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 341216ac373f158442803ab13f184535a3a8ead6..7ccb8a82b1f3e68d1f74a2763d648475ca623057 100644
index f4570ade0bc32c45e35b2d1eb11a192f3d78efd9..4da3ddf5aa20ce6320af522a04f2a251e995f610 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -355,6 +355,13 @@ component("base") {
@@ -2381,7 +2381,7 @@ index 5c0cad2640d84193e396ac1faff7d61230ab388c..edaf2a169d67cfa7903c56989801b156
sources += [
"test/desktop_window_tree_host_win_test_api.cc",
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index aa73ba06160c983189dd214529344a8bcf9fbe98..79eece0dfff27b4fdb6beb895271e419007de4e3 100644
index 68fd2b250c73d25d00b88c54ff162c5258c2633a..ac1905d73675e5645c8baa38c7c95af54dfb0c33 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -19,6 +19,7 @@
@@ -2402,7 +2402,7 @@ index aa73ba06160c983189dd214529344a8bcf9fbe98..79eece0dfff27b4fdb6beb895271e419
@class NSView;
namespace remote_cocoa {
@@ -514,10 +517,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -510,10 +513,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
@@ -2416,18 +2416,18 @@ index aa73ba06160c983189dd214529344a8bcf9fbe98..79eece0dfff27b4fdb6beb895271e419
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503b9719b76 100644
index d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db9077048a0d 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -21,6 +21,7 @@
@@ -20,6 +20,7 @@
#include "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
#include "components/remote_cocoa/browser/ns_view_ids.h"
#include "components/remote_cocoa/browser/window.h"
#include "components/remote_cocoa/common/native_widget_ns_window.mojom.h"
+#include "electron/mas.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
#include "ui/accessibility/accessibility_features.h"
@@ -372,8 +373,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -363,8 +364,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (in_process_ns_window_bridge_) {
return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view());
}
@@ -2440,7 +2440,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
}
gfx::NativeViewAccessible
@@ -389,8 +394,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -380,8 +385,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[in_process_ns_window_bridge_->ns_view() window]);
}
@@ -2453,7 +2453,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1500,9 +1509,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1484,9 +1493,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// for PWAs. However this breaks accessibility on in-process windows,
// so set it back to NO when a local window gains focus. See
// https://crbug.com/41485830.
@@ -2465,7 +2465,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
// Explicitly set the keyboard accessibility state on regaining key
// window status.
if (is_key && is_content_first_responder) {
@@ -1655,17 +1666,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1639,17 +1650,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -2486,7 +2486,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
*pid = getpid();
id element_id = GetNativeViewAccessible();
@@ -1678,6 +1692,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1662,6 +1676,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
}
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);
@@ -2495,10 +2495,10 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
}
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
index 665710e53332bc843e32942b0ea423ec68a613a5..3c7e85dba436517513f8a293ba68f72dc0aaa7a5 100644
index faa860ef58afdde28e7929c99e191b06e67efad6..827372d5f2c7e72e741a1a082998e590d75935e3 100644
--- a/ui/views/controls/webview/BUILD.gn
+++ b/ui/views/controls/webview/BUILD.gn
@@ -48,6 +48,12 @@ component("webview") {
@@ -46,6 +46,12 @@ component("webview") {
"//url",
]

View File

@@ -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 3b928d610abb810ed0db57c316bce7f816940dfa..35753f009bdf0e2d1ccde3d12b73cdf6041ae0c7 100644
index 4bbe1bb13c798c22eb6bca42efa557d3f71c155b..ce9c92a5ff2568baba932133c5d9430405d6d10b 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -171,6 +171,11 @@
@@ -134,7 +134,7 @@ index 3b928d610abb810ed0db57c316bce7f816940dfa..35753f009bdf0e2d1ccde3d12b73cdf6
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -1036,6 +1146,13 @@ void NetworkContext::SetClient(
@@ -1039,6 +1149,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -148,7 +148,7 @@ index 3b928d610abb810ed0db57c316bce7f816940dfa..35753f009bdf0e2d1ccde3d12b73cdf6
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2722,6 +2839,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2725,6 +2842,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::CoalescingCertVerifier>(
std::move(cert_verifier)));
@@ -190,7 +190,7 @@ index 1f89266833da7d955c1d537d637e1e5820ddcbd5..f11fbd0c31ef0a160133d12beddbbfb0
std::unique_ptr<HostResolver> internal_host_resolver_;
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 4faa19ffd7ff87c975e494a60f4fd3cb66f1b7b4..415bafe16971135dcf7e91c11e2efc693359ef3f 100644
index 7648c9a76f98fe38ea9f5ea95b894d9ebc71ef9f..daae87e4794a3a15f95c600721d1c25f6360bcd4 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -324,6 +324,17 @@ struct SocketBrokerRemotes {

View File

@@ -79,7 +79,7 @@ index 89edc47028e80170bcc0f11a0f27d30067d1ef6c..313bbe4f1815c7e2042d4a4600f92203
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
index 6e0a316a22753e6fd437739d5d9769c438b82e31..bd14d2f98d35ff85f71c03e7d05f0b6d20cad774 100644
index 8ccff8edf6c45a96978fea0b02a8d7ebd8768578..264af7461226718ff300faa22ba4587594b79ae4 100644
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@@ -135,7 +135,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
@@ -133,10 +133,10 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 3b307edcc8e5c29b1b2d2a0fb1410ae37fed986c..51207bea3a7f345e38503f50e25e60ea0425a1a5 100644
index 81069116eb56a4e207bfd32c9243b273b1f8d4a6..fc1739c247e721e9121700561959f0022f0e17e4 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2376,7 +2376,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2359,7 +2359,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index 3b307edcc8e5c29b1b2d2a0fb1410ae37fed986c..51207bea3a7f345e38503f50e25e60ea
creator_type, std::move(receiver));
break;
}
@@ -2384,7 +2384,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2367,7 +2367,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

View File

@@ -61,7 +61,7 @@ index c0696d530d282dcc2d8d95c518faa6326a354e8e..5a967fd5697a92d2acea2ea81b6c1115
CompleteDefaultWebNativeRendererColorIdsDefinition(
mixer, dark_mode,
diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc
index 40ae14a8fb35ab59735a188e15769d8c8d03efbc..cae50ac488e2ffc9c132edbcd574fd560dfc8e65 100644
index 43214fd65d27b6443d54a14ea8557932f65c29e8..6401b52c160728d3a3971ffad5305bde4f9ec363 100644
--- a/ui/color/win/native_color_mixers_win.cc
+++ b/ui/color/win/native_color_mixers_win.cc
@@ -145,6 +145,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,

View File

@@ -44,7 +44,7 @@ index 1455aa5083f8eef7bf9644a1cc522db3e67b0227..5df63357160d96b77c8c123a984aeef9
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 310d4cdd98bd0808e3d414b07bc3c14dc64482a1..ebb64bfdabfd22146cac139b7800714e7648d31b 100644
index cbd5c331e801445bd1ab0984776231a2a648a29a..db4f2316ba98a0ced74a303390fee16d0050eee6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6204,6 +6204,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -60,10 +60,10 @@ index 310d4cdd98bd0808e3d414b07bc3c14dc64482a1..ebb64bfdabfd22146cac139b7800714e
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index e94fdbc3a434e6d1e7a82638bf01789545b2f7ce..8a9a4da89a73afe520d8a7532f456b62e78dee89 100644
index 5a1133454eb9eeeff9672fb97243f51e478c33dd..08311b3d853761fc14c8c7d7c4132441448831be 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1201,6 +1201,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1197,6 +1197,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@@ -72,7 +72,7 @@ index e94fdbc3a434e6d1e7a82638bf01789545b2f7ce..8a9a4da89a73afe520d8a7532f456b62
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index f1ec6796b2e987ab1e6c0e62e9edc075ceff1214..722e19b8fec5977bfc9a197c1ea3f8d6ba5615ae 100644
index 33ee4ba8ae767eae2f29d00f9dc1be0f1728ef8a..e1ad2c3a9c8f0a0bc05b15f230005558e218a6e2 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -33,6 +33,7 @@

View File

@@ -7,7 +7,7 @@ Subject: refactor: expose HostImportModuleDynamically and
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 832fbc9666cc3eac9c08a36a7014a6fb6f3aff39..1b1b13ff86db65197ae9544f25d1a49985c957ed 100644
index f0d418dc5460da7742e333c744a2fe4535660f4c..c7576dadbf4b86c5c51e47b5acd20e03a6c812cf 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -738,8 +738,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local<v8::Context> context) {

View File

@@ -6,10 +6,10 @@ Subject: refactor: patch electron PermissionTypes into blink
6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
index 727b73a37a3258aa44643d66dceba79017d9dbc8..b3d872be603b68bb7aa2af267f05212ae7efd46c 100644
index 3b25ba24e81c7b5b27e65f30ea7a2c174c397efa..f0503f0502a5b4bf2fe3b22ccde42acece395e6a 100644
--- a/components/permissions/permission_util.cc
+++ b/components/permissions/permission_util.cc
@@ -554,9 +554,17 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
@@ -552,9 +552,17 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
return ContentSettingsType::LOCAL_NETWORK;
case PermissionType::LOOPBACK_NETWORK:
return ContentSettingsType::LOOPBACK_NETWORK;

View File

@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a663f42e3b9e7bcaf8e463439ada312938f2cf15..b9a2f127138e78c1cea4af084f34421908e86224 100644
index 6dde94189fcff81a759bc73351f37b97fa39a9ee..bc19afc0674f26e3d77b4af5544bb03095c7b31e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10438,25 +10438,13 @@ void WebContentsImpl::RendererUnresponsive(
@@ -10409,25 +10409,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host);

View File

@@ -245,7 +245,7 @@ index 1ef2c9052262eccdbc40030746a858b7f30ac469..c7101b0d71826b05f61bfe0e74429d92
}
diff --git a/content/common/features.cc b/content/common/features.cc
index bfc58f4a0b06033ce97b389f2e602453c1bcf061..1c5f81ee51036be1303c2f4f356f8da30cbb9614 100644
index 98d558b26a945950c1911df124c0b845fd40aefd..77d44ead73ff425f279d8a5925b49f53276846f3 100644
--- a/content/common/features.cc
+++ b/content/common/features.cc
@@ -369,6 +369,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);
@@ -264,7 +264,7 @@ index bfc58f4a0b06033ce97b389f2e602453c1bcf061..1c5f81ee51036be1303c2f4f356f8da3
BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/content/common/features.h b/content/common/features.h
index 685d9f3bee3f1a1bd139b6c70447bfd059fdefcf..de268dc4d77ae479396dfcf56dbdf39f965ab707 100644
index 767d3b6bc803fad77bafc551ebcd476eb2ad0d68..87e366f23d9199139ec65f7b70fb5c3ab5a62cc9 100644
--- a/content/common/features.h
+++ b/content/common/features.h
@@ -143,6 +143,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);

View File

@@ -54,7 +54,7 @@ index 9b598ba34285bfe04c7c45557dd51af73bece3fe..c435d4441c99f87cc6a38fa73f73da6b
if (mouse_event_callback.Run(mouse_event)) {
return;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b9a2f127138e78c1cea4af084f34421908e86224..3f767c219bdb6d73bff9942312736d9523bc6a02 100644
index bc19afc0674f26e3d77b4af5544bb03095c7b31e..b8c2a2be98f4bbe5d05a11e82a131e156c20b858 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4475,6 +4475,12 @@ void WebContentsImpl::RenderWidgetWasResized(
@@ -71,10 +71,10 @@ index b9a2f127138e78c1cea4af084f34421908e86224..3f767c219bdb6d73bff9942312736d95
const gfx::PointF& client_pt) {
if (delegate_) {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 8a9a4da89a73afe520d8a7532f456b62e78dee89..289e4d4c39e46a08505cba2d92ae6ce83973e526 100644
index 08311b3d853761fc14c8c7d7c4132441448831be..65848b8dc49bff70f12b1d28937d14ebb44afa1b 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1131,6 +1131,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1127,6 +1127,7 @@ class CONTENT_EXPORT WebContentsImpl
double GetPendingZoomLevel(RenderWidgetHostImpl* rwh) override;

View File

@@ -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 bd2d3870edb37f32b97c4e5756ce12b44ee6ac2d..4e2ece73a02b7314d0eb3a61ef6958dcefdc2ef9 100644
index a59380373f612fc7b43eae9608904324dec2d77f..4c2cbeb11f6a7847f5253d88a18df42c1c9cc27c 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -24326,6 +24326,21 @@
@@ -24105,6 +24105,21 @@
]
}
],

View File

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 1416e23beb20e7c18b5cfa61f922c68b7ce65c48..49f9f583c3261fe4d7036f9a91ec8c651a191858 100644
index 9f16560b06c390ad1fc82001f8c44a64abd1d89a..7c5c60d2a91cc5ffdd1c1eec753a7a1ab4af6036 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1138,11 +1138,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1133,11 +1133,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabledOnRoot() {

View File

@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 51207bea3a7f345e38503f50e25e60ea0425a1a5..c78e0dcfadcacc68f4d4c2e818e67f19dfba1a5c 100644
index fc1739c247e721e9121700561959f0022f0e17e4..4848bb6ec4e6fdd95781f5b904f90716de2b338a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1956,6 +1956,10 @@ bool RenderProcessHostImpl::Init() {
@@ -1939,6 +1939,10 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), IsJitDisabled());

View File

@@ -9,7 +9,7 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6a2444ad5d20164be9877cf6b856d2bf762dcd26..13a7c72b8e728ebe6e4fb3aa7af7ae5e652256d5 100644
index 861720198a3cbfe198ec328f899cdb6d0fcafdf7..8a733118b17d65ae9e9d5c0949e7f4db1be58716 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4192,6 +4192,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -35,7 +35,7 @@ index 6a2444ad5d20164be9877cf6b856d2bf762dcd26..13a7c72b8e728ebe6e4fb3aa7af7ae5e
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index f071103d3b15d46c96dc193bdbd657e00eb1083e..b0c7360c88bca2f0b3e902c14ade90cf11b17184 100644
index 78776430d970d73d3c92f94c26764a3e94ee0013..cce0d7df8ea6608a4fdb84d5eefbfb252a0031db 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -129,11 +129,14 @@ class PrerenderHandle;

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index f92fc4bbddd99bcd4b3e38d59e8c8df4ef6f59e4..cc07391a5901cb3823eb08c9487b0e90d7250fb1 100644
index 270e221668e27207970c2e131432d2efa7038a75..9941a16e36331535ef790f342f1c328a26415e31 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9179,6 +9179,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -9107,6 +9107,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,7 +37,7 @@ index f92fc4bbddd99bcd4b3e38d59e8c8df4ef6f59e4..cc07391a5901cb3823eb08c9487b0e90
if (had_fullscreen_token && !GetView()->HasFocus()) {
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 13a7c72b8e728ebe6e4fb3aa7af7ae5e652256d5..3413e339934bab9df03d241213d27221bb5eaa20 100644
index 8a733118b17d65ae9e9d5c0949e7f4db1be58716..3079d14e75fe31cdc5f7d49a09b026f5d4f7bc62 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4492,21 +4492,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(

View File

@@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 1f6c015c361b3146db760643e3670a110634d75b..d4d9c10d3420a5ff998aeb593ea6a25556d1215e 100644
index 0f9aaa9b31b96b1310df344f481c5497e8b9780a..8e711da7c19fbf102708368a18edb65e4c8fc46b 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -414,6 +414,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -420,6 +420,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}

View File

@@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
initialized.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index d4d9c10d3420a5ff998aeb593ea6a25556d1215e..d64fef6bfc37264dcdc1bbea22eb5c4e099553dd 100644
index 8e711da7c19fbf102708368a18edb65e4c8fc46b..be73f8a82ec031899cfaa7a7ddcf9e0170d187ad 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -414,6 +414,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -420,6 +420,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}

View File

@@ -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 61048eed79af294d250f5d01ac3f728e35f6f3e5..4c44415b01d779ad91da835e4de9737fbb310e65 100644
index 9a012316cc00c6abdefe46a62c33a1afa33a2e39..6a2f71dafe8d06ed295fe408e2ebb50df349c098 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -819,6 +819,8 @@ export class MainImpl {
@@ -830,6 +830,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-expect-error Exported for Tests.js
globalThis.Main.Main = MainImpl;

View File

@@ -9,5 +9,5 @@ refactor_use_non-deprecated_nskeyedarchiver_apis.patch
chore_turn_off_launchapplicationaturl_deprecation_errors_in_squirrel.patch
fix_crash_when_process_to_extract_zip_cannot_be_launched.patch
use_uttype_class_instead_of_deprecated_uttypeconformsto.patch
fix_clean_up_orphaned_staged_updates_before_downloading_new_update.patch
fix_clean_up_old_staged_updates_before_downloading_new_update.patch
fix_add_explicit_json_property_mappings_for_shipit_request_model.patch

View File

@@ -0,0 +1,64 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andy Locascio <loc@anthropic.com>
Date: Tue, 6 Jan 2026 08:23:03 -0800
Subject: fix: clean up old staged updates before downloading new update
When checkForUpdates() is called while an update is already staged,
Squirrel creates a new temporary directory for the download without
cleaning up the old one. This can lead to significant disk usage if
the app keeps checking for updates without restarting.
This change adds a force parameter to pruneUpdateDirectories that
bypasses the AwaitingRelaunch state check. This is called before
creating a new temp directory, ensuring old staged updates are
cleaned up when a new download starts.
diff --git a/Squirrel/SQRLUpdater.m b/Squirrel/SQRLUpdater.m
index d156616e81e6f25a3bded30e6216b8fc311f31bc..6cd4346bf43b191147aff819cb93387e71275a46 100644
--- a/Squirrel/SQRLUpdater.m
+++ b/Squirrel/SQRLUpdater.m
@@ -543,11 +543,17 @@ - (RACSignal *)downloadBundleForUpdate:(SQRLUpdate *)update intoDirectory:(NSURL
#pragma mark File Management
- (RACSignal *)uniqueTemporaryDirectoryForUpdate {
- return [[[RACSignal
+ // Clean up any old staged update directories before creating a new one.
+ // This prevents disk usage from growing when checkForUpdates() is called
+ // multiple times without the app restarting.
+ return [[[[[self
+ pruneUpdateDirectoriesWithForce:YES]
+ ignoreValues]
+ concat:[RACSignal
defer:^{
SQRLDirectoryManager *directoryManager = [[SQRLDirectoryManager alloc] initWithApplicationIdentifier:SQRLShipItLauncher.shipItJobLabel];
return [directoryManager storageURL];
- }]
+ }]]
flattenMap:^(NSURL *storageURL) {
NSURL *updateDirectoryTemplate = [storageURL URLByAppendingPathComponent:[SQRLUpdaterUniqueTemporaryDirectoryPrefix stringByAppendingString:@"XXXXXXX"]];
char *updateDirectoryCString = strdup(updateDirectoryTemplate.path.fileSystemRepresentation);
@@ -643,7 +649,7 @@ - (BOOL)isRunningOnReadOnlyVolume {
- (RACSignal *)performHousekeeping {
return [[RACSignal
- merge:@[ [self pruneUpdateDirectories], [self truncateLogs] ]]
+ merge:@[ [self pruneUpdateDirectoriesWithForce:NO], [self truncateLogs] ]]
catch:^(NSError *error) {
NSLog(@"Error doing housekeeping: %@", error);
return [RACSignal empty];
@@ -658,11 +664,12 @@ - (RACSignal *)performHousekeeping {
///
/// Sends each removed directory then completes, or errors, on an unspecified
/// thread.
-- (RACSignal *)pruneUpdateDirectories {
+- (RACSignal *)pruneUpdateDirectoriesWithForce:(BOOL)force {
return [[[RACSignal
defer:^{
- // If we already have updates downloaded we don't wanna prune them.
- if (self.state == SQRLUpdaterStateAwaitingRelaunch) return [RACSignal empty];
+ // If we already have updates downloaded we don't wanna prune them,
+ // unless force is YES (used when starting a new download).
+ if (!force && self.state == SQRLUpdaterStateAwaitingRelaunch) return [RACSignal empty];
SQRLDirectoryManager *directoryManager = [[SQRLDirectoryManager alloc] initWithApplicationIdentifier:SQRLShipItLauncher.shipItJobLabel];
return [directoryManager storageURL];

View File

@@ -1,130 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andy Locascio <loc@anthropic.com>
Date: Tue, 6 Jan 2026 08:23:03 -0800
Subject: fix: clean up orphaned staged updates before downloading new update
When checkForUpdates() is called while an update is already staged,
Squirrel creates a new temporary directory for the download without
cleaning up the old one. This can lead to significant disk usage if
the app keeps checking for updates without restarting.
This change adds a pruneOrphanedUpdateDirectories step before creating
a new temp directory. Unlike a blanket prune, this reads the current
ShipItState.plist and preserves the directory it references, deleting
only truly orphaned update directories. This keeps the on-disk
footprint bounded (at most 2 dirs) while ensuring quitAndInstall
remains safe to call even when a new check is in progress.
Refs https://github.com/electron/electron/issues/50200
diff --git a/Squirrel/SQRLUpdater.m b/Squirrel/SQRLUpdater.m
index d156616e81e6f25a3bded30e6216b8fc311f31bc..41856e5754228d33982db72f97f2ff241615a357 100644
--- a/Squirrel/SQRLUpdater.m
+++ b/Squirrel/SQRLUpdater.m
@@ -543,11 +543,19 @@ - (RACSignal *)downloadBundleForUpdate:(SQRLUpdate *)update intoDirectory:(NSURL
#pragma mark File Management
- (RACSignal *)uniqueTemporaryDirectoryForUpdate {
- return [[[RACSignal
+ // Clean up any orphaned update directories before creating a new one.
+ // This prevents disk usage from growing when checkForUpdates() is called
+ // multiple times without the app restarting. The currently staged update
+ // (referenced by ShipItState.plist) is always preserved so quitAndInstall
+ // remains safe to call while a new check is in progress.
+ return [[[[[self
+ pruneOrphanedUpdateDirectories]
+ ignoreValues]
+ concat:[RACSignal
defer:^{
SQRLDirectoryManager *directoryManager = [[SQRLDirectoryManager alloc] initWithApplicationIdentifier:SQRLShipItLauncher.shipItJobLabel];
return [directoryManager storageURL];
- }]
+ }]]
flattenMap:^(NSURL *storageURL) {
NSURL *updateDirectoryTemplate = [storageURL URLByAppendingPathComponent:[SQRLUpdaterUniqueTemporaryDirectoryPrefix stringByAppendingString:@"XXXXXXX"]];
char *updateDirectoryCString = strdup(updateDirectoryTemplate.path.fileSystemRepresentation);
@@ -668,25 +676,68 @@ - (RACSignal *)pruneUpdateDirectories {
return [directoryManager storageURL];
}]
flattenMap:^(NSURL *storageURL) {
- NSFileManager *manager = [[NSFileManager alloc] init];
- NSDirectoryEnumerator *enumerator = [manager enumeratorAtURL:storageURL includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsSubdirectoryDescendants errorHandler:^(NSURL *URL, NSError *error) {
- NSLog(@"Error enumerating item %@ within directory %@: %@", URL, storageURL, error);
- return YES;
- }];
+ return [self removeUpdateDirectoriesInStorageURL:storageURL excludingURL:nil];
+ }]
+ setNameWithFormat:@"%@ -prunedUpdateDirectories", self];
+}
- return [[enumerator.rac_sequence.signal
- filter:^(NSURL *enumeratedURL) {
- NSString *name = enumeratedURL.lastPathComponent;
- return [name hasPrefix:SQRLUpdaterUniqueTemporaryDirectoryPrefix];
- }]
- doNext:^(NSURL *directoryURL) {
- NSError *error = nil;
- if (![manager removeItemAtURL:directoryURL error:&error]) {
- NSLog(@"Error removing old update directory at %@: %@", directoryURL, error.sqrl_verboseDescription);
- }
+/// Lazily removes orphaned temporary directories upon subscription, always
+/// preserving the directory currently referenced by ShipItState.plist so that
+/// quitAndInstall remains safe to call mid-check.
+///
+/// Safe to call in any state. Sends each removed directory then completes on
+/// an unspecified thread. Errors reading the staged request are swallowed
+/// (treated as "nothing staged").
+- (RACSignal *)pruneOrphanedUpdateDirectories {
+ return [[[[[SQRLShipItRequest
+ readUsingURL:self.shipItStateURL]
+ map:^(SQRLShipItRequest *request) {
+ // The request holds the URL to the staged .app bundle; its parent
+ // is the update.XXXXXXX directory we must preserve.
+ return [request.updateBundleURL URLByDeletingLastPathComponent];
+ }]
+ catch:^(NSError *error) {
+ // No staged request (or unreadable) — nothing to preserve.
+ return [RACSignal return:nil];
+ }]
+ flattenMap:^(NSURL *stagedDirectoryURL) {
+ SQRLDirectoryManager *directoryManager = [[SQRLDirectoryManager alloc] initWithApplicationIdentifier:SQRLShipItLauncher.shipItJobLabel];
+ return [[directoryManager storageURL]
+ flattenMap:^(NSURL *storageURL) {
+ return [self removeUpdateDirectoriesInStorageURL:storageURL excludingURL:stagedDirectoryURL];
}];
}]
- setNameWithFormat:@"%@ -prunedUpdateDirectories", self];
+ setNameWithFormat:@"%@ -pruneOrphanedUpdateDirectories", self];
+}
+
+/// Shared enumerate-and-delete logic for update temp directories.
+///
+/// storageURL - The Squirrel storage root to enumerate. Must not be nil.
+/// excludedURL - Directory to skip (compared by standardized path). May be nil.
+- (RACSignal *)removeUpdateDirectoriesInStorageURL:(NSURL *)storageURL excludingURL:(NSURL *)excludedURL {
+ NSParameterAssert(storageURL != nil);
+
+ NSFileManager *manager = [[NSFileManager alloc] init];
+ NSDirectoryEnumerator *enumerator = [manager enumeratorAtURL:storageURL includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsSubdirectoryDescendants errorHandler:^(NSURL *URL, NSError *error) {
+ NSLog(@"Error enumerating item %@ within directory %@: %@", URL, storageURL, error);
+ return YES;
+ }];
+
+ NSString *excludedPath = excludedURL.URLByStandardizingPath.path;
+
+ return [[enumerator.rac_sequence.signal
+ filter:^(NSURL *enumeratedURL) {
+ NSString *name = enumeratedURL.lastPathComponent;
+ if (![name hasPrefix:SQRLUpdaterUniqueTemporaryDirectoryPrefix]) return NO;
+ if (excludedPath != nil && [enumeratedURL.URLByStandardizingPath.path isEqualToString:excludedPath]) return NO;
+ return YES;
+ }]
+ doNext:^(NSURL *directoryURL) {
+ NSError *error = nil;
+ if (![manager removeItemAtURL:directoryURL error:&error]) {
+ NSLog(@"Error removing old update directory at %@: %@", directoryURL, error.sqrl_verboseDescription);
+ }
+ }];
}

View File

@@ -8,7 +8,6 @@
#include <vector>
#include "base/containers/map_util.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "components/prefs/pref_service.h"
@@ -56,14 +55,6 @@ gin::DeprecatedWrapperInfo GlobalShortcut::kWrapperInfo = {
GlobalShortcut::GlobalShortcut() = default;
GlobalShortcut::~GlobalShortcut() {
auto* instance = ui::GlobalAcceleratorListener::GetInstance();
if (instance && instance->IsRegistrationHandledExternally()) {
// Eagerly cancel callbacks so PruneStaleCommands() can clear them before
// the WeakPtrFactory destructor runs.
weak_ptr_factory_.InvalidateWeakPtrs();
instance->PruneStaleCommands();
}
UnregisterAll();
}
@@ -168,10 +159,8 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
// received by GlobalShortcut will correspond to Alt+Shift+K as our command
// id is basically a stringified accelerator.
const std::string fake_extension_id = command_str + "+" + profile_id;
instance->OnCommandsChanged(
fake_extension_id, profile_id, commands, gfx::kNullAcceleratedWidget,
base::BindRepeating(&GlobalShortcut::ExecuteCommand,
weak_ptr_factory_.GetWeakPtr()));
instance->OnCommandsChanged(fake_extension_id, profile_id, commands,
gfx::kNullAcceleratedWidget, this);
command_callback_map_[command_str] = callback;
return true;
} else {

View File

@@ -9,7 +9,6 @@
#include <vector>
#include "base/functional/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "extensions/common/extension_id.h"
#include "shell/common/gin_helper/wrappable.h"
#include "ui/base/accelerators/accelerator.h"
@@ -63,8 +62,6 @@ class GlobalShortcut final
AcceleratorCallbackMap accelerator_callback_map_;
CommandCallbackMap command_callback_map_;
base::WeakPtrFactory<GlobalShortcut> weak_ptr_factory_{this};
};
} // namespace electron::api

View File

@@ -23,8 +23,6 @@
#include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/handle.h"
#include "shell/common/node_includes.h"
#include "v8/include/cppgc/allocation.h"
#include "v8/include/v8-cppgc.h"
namespace gin {
@@ -50,13 +48,12 @@ struct Converter<electron::TrayIcon::IconType> {
namespace electron::api {
const gin::WrapperInfo Tray::kWrapperInfo = {{gin::kEmbedderNativeGin},
gin::kElectronTray};
gin::DeprecatedWrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
Tray::Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid)
: guid_{guid}, tray_icon_{TrayIcon::Create(guid)} {
: guid_(guid), tray_icon_(TrayIcon::Create(guid)) {
SetImage(isolate, image);
tray_icon_->AddObserver(this);
if (guid.has_value())
@@ -66,10 +63,10 @@ Tray::Tray(v8::Isolate* isolate,
Tray::~Tray() = default;
// static
Tray* Tray::New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid,
gin::Arguments* args) {
gin_helper::Handle<Tray> Tray::New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid,
gin::Arguments* args) {
if (!Browser::Get()->is_ready()) {
thrower.ThrowError("Cannot create Tray before app is ready");
return {};
@@ -83,17 +80,17 @@ Tray* Tray::New(gin_helper::ErrorThrower thrower,
// Error thrown by us will be dropped when entering V8.
// Make sure to abort early and propagate the error to JS.
// Refs https://chromium-review.googlesource.com/c/v8/v8/+/5050065
v8::Isolate* isolate = args->isolate();
v8::TryCatch try_catch{isolate};
Tray* tray = cppgc::MakeGarbageCollected<Tray>(
isolate->GetCppHeap()->GetAllocationHandle(), isolate, image, guid);
v8::TryCatch try_catch(args->isolate());
auto* tray = new Tray(args->isolate(), image, guid);
if (try_catch.HasCaught()) {
tray->keep_alive_.Clear();
delete tray;
try_catch.ReThrow();
return {};
}
return tray;
auto handle = gin_helper::CreateHandle(args->isolate(), tray);
handle->Pin(args->isolate());
return handle;
}
void Tray::OnClicked(const gfx::Rect& bounds,
@@ -189,9 +186,9 @@ void Tray::OnDragEnded() {
}
void Tray::Destroy() {
menu_.Clear();
Unpin();
menu_.Reset();
tray_icon_.reset();
keep_alive_.Clear();
}
bool Tray::IsDestroyed() {
@@ -377,13 +374,12 @@ void Tray::SetContextMenu(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> arg) {
if (!CheckAlive())
return;
gin_helper::Handle<Menu> menu;
if (arg->IsNull()) {
menu_.Clear();
menu_.Reset();
tray_icon_->SetContextMenu(nullptr);
} else if (Menu* menu = nullptr;
gin::ConvertFromV8(thrower.isolate(), arg, &menu)) {
menu_ = menu;
} else if (gin::ConvertFromV8(thrower.isolate(), arg, &menu)) {
menu_.Reset(thrower.isolate(), menu.ToV8());
tray_icon_->SetContextMenu(menu->model());
} else {
thrower.ThrowTypeError("Must pass Menu or null");
@@ -441,17 +437,12 @@ void Tray::FillObjectTemplate(v8::Isolate* isolate,
.Build();
}
void Tray::Trace(cppgc::Visitor* visitor) const {
gin::Wrappable<Tray>::Trace(visitor);
visitor->Trace(menu_);
const char* Tray::GetTypeName() {
return GetClassName();
}
const gin::WrapperInfo* Tray::wrapper_info() const {
return &kWrapperInfo;
}
const char* Tray::GetHumanReadableName() const {
return "Electron / Tray";
void Tray::WillBeDestroyed() {
ClearWeak();
}
} // namespace electron::api
@@ -466,7 +457,7 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* const isolate = electron::JavascriptEnvironment::GetIsolate();
gin::Dictionary dict{isolate, exports};
dict.Set("Tray", Tray::GetConstructor(isolate, context, &Tray::kWrapperInfo));
dict.Set("Tray", Tray::GetConstructor(isolate, context));
}
} // namespace

View File

@@ -10,13 +10,14 @@
#include <string>
#include <vector>
#include "gin/wrappable.h"
#include "shell/browser/event_emitter_mixin.h"
#include "shell/browser/ui/tray_icon.h"
#include "shell/browser/ui/tray_icon_observer.h"
#include "shell/common/gin_converters/guid_converter.h"
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/self_keep_alive.h"
#include "shell/common/gin_helper/pinnable.h"
#include "shell/common/gin_helper/wrappable.h"
namespace gfx {
class Image;
@@ -26,43 +27,47 @@ class Image;
namespace gin_helper {
class Dictionary;
class ErrorThrower;
template <typename T>
class Handle;
} // namespace gin_helper
namespace electron::api {
class Menu;
class Tray final : public gin::Wrappable<Tray>,
class Tray final : public gin_helper::DeprecatedWrappable<Tray>,
public gin_helper::EventEmitterMixin<Tray>,
public gin_helper::Constructible<Tray>,
public gin_helper::CleanedUpAtExit,
public gin_helper::Pinnable<Tray>,
private TrayIconObserver {
public:
// gin_helper::Constructible
static Tray* New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid,
gin::Arguments* args);
static gin_helper::Handle<Tray> New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid,
gin::Arguments* args);
static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>);
static const char* GetClassName() { return "Tray"; }
// gin::Wrappable
static const gin::WrapperInfo kWrapperInfo;
void Trace(cppgc::Visitor*) const override;
const gin::WrapperInfo* wrapper_info() const override;
const char* GetHumanReadableName() const override;
// gin_helper::Wrappable
static gin::DeprecatedWrapperInfo kWrapperInfo;
const char* GetTypeName() override;
// Make public for cppgc::MakeGarbageCollected.
Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid);
~Tray() override;
// gin_helper::CleanedUpAtExit
void WillBeDestroyed() override;
// disable copy
Tray(const Tray&) = delete;
Tray& operator=(const Tray&) = delete;
private:
Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
std::optional<base::Uuid> guid);
~Tray() override;
// TrayIconObserver:
void OnClicked(const gfx::Rect& bounds,
const gfx::Point& location,
@@ -110,10 +115,9 @@ class Tray final : public gin::Wrappable<Tray>,
bool CheckAlive();
cppgc::Member<Menu> menu_;
v8::Global<v8::Value> menu_;
std::optional<base::Uuid> guid_;
std::unique_ptr<TrayIcon> tray_icon_;
gin_helper::SelfKeepAlive<Tray> keep_alive_{this};
};
} // namespace electron::api

View File

@@ -244,7 +244,7 @@ void UtilityProcessWrapper::OnServiceProcessLaunch(
EmitWithoutEvent("spawn");
}
void UtilityProcessWrapper::HandleTermination(uint64_t exit_code) {
void UtilityProcessWrapper::HandleTermination(uint32_t exit_code) {
// HandleTermination is called from multiple callsites,
// we need to ensure we only process it for the first callsite.
if (terminated_)
@@ -312,7 +312,7 @@ void UtilityProcessWrapper::CloseConnectorPort() {
}
}
void UtilityProcessWrapper::Shutdown(uint64_t exit_code) {
void UtilityProcessWrapper::Shutdown(uint32_t exit_code) {
node_service_remote_.reset();
HandleTermination(exit_code);
}

View File

@@ -58,7 +58,7 @@ class UtilityProcessWrapper final
static gin_helper::Handle<UtilityProcessWrapper> Create(gin::Arguments* args);
static raw_ptr<UtilityProcessWrapper> FromProcessId(base::ProcessId pid);
void Shutdown(uint64_t exit_code);
void Shutdown(uint32_t exit_code);
// gin_helper::Wrappable
static gin::DeprecatedWrapperInfo kWrapperInfo;
@@ -78,7 +78,7 @@ class UtilityProcessWrapper final
void OnServiceProcessLaunch(const base::Process& process);
void CloseConnectorPort();
void HandleTermination(uint64_t exit_code);
void HandleTermination(uint32_t exit_code);
void PostMessage(gin::Arguments* args);
bool Kill();

View File

@@ -51,7 +51,6 @@
#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/desktop_streams_registry.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/download_request_utils.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/file_select_listener.h"
@@ -2830,11 +2829,6 @@ std::string WebContents::GetMediaSourceID(
return id;
}
std::string WebContents::GetOrCreateDevToolsTargetId() {
auto agent_host = content::DevToolsAgentHost::GetOrCreateFor(web_contents());
return agent_host->GetId();
}
bool WebContents::IsCrashed() const {
return web_contents()->IsCrashed();
}
@@ -4701,8 +4695,6 @@ void WebContents::FillObjectTemplate(v8::Isolate* isolate,
&WebContents::SetWebRTCIPHandlingPolicy)
.SetMethod("setWebRTCUDPPortRange", &WebContents::SetWebRTCUDPPortRange)
.SetMethod("getMediaSourceId", &WebContents::GetMediaSourceID)
.SetMethod("getOrCreateDevToolsTargetId",
&WebContents::GetOrCreateDevToolsTargetId)
.SetMethod("getWebRTCIPHandlingPolicy",
&WebContents::GetWebRTCIPHandlingPolicy)
.SetMethod("getWebRTCUDPPortRange", &WebContents::GetWebRTCUDPPortRange)

View File

@@ -230,7 +230,6 @@ class WebContents final : public ExclusiveAccessContext,
v8::Local<v8::Value> GetWebRTCUDPPortRange(v8::Isolate* isolate) const;
void SetWebRTCUDPPortRange(gin::Arguments* args);
std::string GetMediaSourceID(content::WebContents* request_web_contents);
std::string GetOrCreateDevToolsTargetId();
bool IsCrashed() const;
void ForcefullyCrashRenderer();
void SetUserAgent(const std::string& user_agent);

View File

@@ -9,9 +9,7 @@
#include <utility>
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/common/chrome_paths.h"
@@ -73,29 +71,6 @@ Browser* Browser::Get() {
return ElectronBrowserMainParts::Get()->browser();
}
// static
bool Browser::IsValidProtocolScheme(const std::string& scheme) {
// RFC 3986 Section 3.1:
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
if (scheme.empty()) {
LOG(ERROR) << "Protocol scheme must not be empty";
return false;
}
if (!base::IsAsciiAlpha(scheme[0])) {
LOG(ERROR) << "Protocol scheme must start with an ASCII letter";
return false;
}
for (size_t i = 1; i < scheme.size(); ++i) {
const char c = scheme[i];
if (!base::IsAsciiAlpha(c) && !base::IsAsciiDigit(c) && c != '+' &&
c != '-' && c != '.') {
LOG(ERROR) << "Protocol scheme contains invalid character: '" << c << "'";
return false;
}
}
return true;
}
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
void Browser::Focus(gin::Arguments* args) {
// Focus on the first visible window.

View File

@@ -134,10 +134,6 @@ class Browser : private WindowListObserver {
void SetAppUserModelID(const std::wstring& name);
#endif
// Validate that a protocol scheme conforms to RFC 3986:
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
static bool IsValidProtocolScheme(const std::string& scheme);
// Remove the default protocol handler registry key
bool RemoveAsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args);

View File

@@ -103,19 +103,16 @@ void Browser::ClearRecentDocuments() {}
bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
return false;
return SetDefaultWebClient(protocol);
}
bool Browser::IsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
return false;
auto env = base::Environment::Create();
if (protocol.empty())
return false;
std::vector<std::string> argv = {kXdgSettings, "check",
kXdgSettingsDefaultSchemeHandler, protocol};
if (std::optional<std::string> desktop_name = env->GetVar("CHROME_DESKTOP")) {

View File

@@ -237,7 +237,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
if (protocol.empty())
return false;
NSString* identifier = [base::apple::MainBundle() bundleIdentifier];
@@ -253,7 +253,7 @@ bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
bool Browser::IsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
if (protocol.empty())
return false;
NSString* identifier = [base::apple::MainBundle() bundleIdentifier];

View File

@@ -429,7 +429,7 @@ bool Browser::SetUserTasks(const std::vector<UserTask>& tasks) {
bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
if (protocol.empty())
return false;
// Main Registry Key
@@ -508,7 +508,7 @@ bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
// Software\Classes", which is inherited by "HKEY_CLASSES_ROOT"
// anyway, and can be written by unprivileged users.
if (!IsValidProtocolScheme(protocol))
if (protocol.empty())
return false;
std::wstring exe;
@@ -538,7 +538,7 @@ bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
bool Browser::IsDefaultProtocolClient(const std::string& protocol,
gin::Arguments* args) {
if (!IsValidProtocolScheme(protocol))
if (protocol.empty())
return false;
std::wstring exe;

View File

@@ -43,7 +43,9 @@
#include "media/audio/audio_device_description.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/originating_process_id.h"
#include "services/network/public/cpp/url_loader_factory_builder.h"
#include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "shell/browser/cookie_change_notifier.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/browser/electron_browser_main_parts.h"
@@ -581,9 +583,11 @@ void ElectronBrowserContext::OnNetworkServiceProcessGone(bool /* crashed */) {
url_loader_factory_.reset();
}
std::pair<network::URLLoaderFactoryBuilder,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>>
ElectronBrowserContext::CreateURLLoaderFactoryBuilder() {
scoped_refptr<network::SharedURLLoaderFactory>
ElectronBrowserContext::GetURLLoaderFactory() {
if (url_loader_factory_)
return url_loader_factory_;
network::URLLoaderFactoryBuilder factory_builder;
// Consult the embedder.
@@ -597,16 +601,6 @@ ElectronBrowserContext::CreateURLLoaderFactoryBuilder() {
ukm::kInvalidSourceIdObj, factory_builder, &header_client, nullptr,
nullptr, nullptr, nullptr);
return std::make_pair(std::move(factory_builder), std::move(header_client));
}
scoped_refptr<network::SharedURLLoaderFactory>
ElectronBrowserContext::GetURLLoaderFactory() {
if (url_loader_factory_)
return url_loader_factory_;
auto [factory_builder, header_client] = CreateURLLoaderFactoryBuilder();
network::mojom::URLLoaderFactoryParamsPtr params =
network::mojom::URLLoaderFactoryParams::New();
params->header_client = std::move(header_client);
@@ -624,12 +618,6 @@ ElectronBrowserContext::GetURLLoaderFactory() {
return url_loader_factory_;
}
scoped_refptr<network::SharedURLLoaderFactory>
ElectronBrowserContext::InterceptURLLoaderFactory(
scoped_refptr<network::SharedURLLoaderFactory> factory) {
return CreateURLLoaderFactoryBuilder().first.Finish(factory);
}
content::PushMessagingService*
ElectronBrowserContext::GetPushMessagingService() {
return nullptr;

View File

@@ -19,8 +19,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/media_stream_request.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/network/public/cpp/url_loader_factory_builder.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/ssl_config.mojom.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
@@ -95,8 +93,6 @@ class ElectronBrowserContext : public content::BrowserContext {
ResolveProxyHelper* GetResolveProxyHelper();
content::PreconnectManager* GetPreconnectManager();
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory();
scoped_refptr<network::SharedURLLoaderFactory> InterceptURLLoaderFactory(
scoped_refptr<network::SharedURLLoaderFactory> factory);
std::string GetMediaDeviceIDSalt();
@@ -187,10 +183,6 @@ class ElectronBrowserContext : public content::BrowserContext {
content::MediaResponseCallback callback,
gin::Arguments* args);
std::pair<network::URLLoaderFactoryBuilder,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>>
CreateURLLoaderFactoryBuilder();
// Initialize pref registry.
void InitPrefs();

View File

@@ -87,9 +87,13 @@ HidChooserController::HidChooserController(
exclusion_filters_(std::move(exclusion_filters)),
callback_(std::move(callback)),
initiator_document_(render_frame_host->GetWeakDocumentPtr()),
origin_(render_frame_host->GetLastCommittedOrigin()),
origin_(content::WebContents::FromRenderFrameHost(render_frame_host)
->GetPrimaryMainFrame()
->GetLastCommittedOrigin()),
hid_delegate_(hid_delegate),
render_frame_host_id_(render_frame_host->GetGlobalId()) {
// The use above of GetMainFrame is safe as content::HidService instances are
// not created for fenced frames.
DCHECK(!render_frame_host->IsNestedWithinFencedFrame());
chooser_context_ = HidChooserContextFactory::GetForBrowserContext(

View File

@@ -172,12 +172,6 @@ class NativeWindowMac : public NativeWindow,
void NotifyWindowDidFailToEnterFullScreen();
void NotifyWindowWillLeaveFullScreen();
// Hide/show traffic light buttons around miniaturize/deminiaturize to
// prevent them from flashing at the default position during the restore
// animation when a custom trafficLightPosition is configured.
void HideTrafficLights();
void RestoreTrafficLights();
// Cleanup observers when window is getting closed. Note that the destructor
// can be called much later after window gets closed, so we should not do
// cleanup in destructor.

View File

@@ -1535,18 +1535,6 @@ void NativeWindowMac::RedrawTrafficLights() {
[buttons_proxy_ redraw];
}
void NativeWindowMac::HideTrafficLights() {
if (buttons_proxy_)
[buttons_proxy_ setVisible:NO];
}
void NativeWindowMac::RestoreTrafficLights() {
if (buttons_proxy_ && window_button_visibility_.value_or(true)) {
[buttons_proxy_ redraw];
[buttons_proxy_ setVisible:YES];
}
}
// In simpleFullScreen mode, update the frame for new bounds.
void NativeWindowMac::UpdateFrame() {
NSWindow* window = GetNativeWindow().GetNativeNSWindow();

View File

@@ -22,7 +22,7 @@
#include "services/network/public/cpp/features.h"
#include "services/network/public/mojom/early_hints.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "shell/browser/net/asar/asar_url_loader_factory.h"
#include "shell/browser/net/asar/asar_url_loader.h"
#include "shell/common/options_switches.h"
#include "third_party/abseil-cpp/absl/strings/str_format.h"
#include "url/origin.h"
@@ -36,7 +36,6 @@ ProxyingURLLoaderFactory::InProgressRequest::FollowRedirectParams::
ProxyingURLLoaderFactory::InProgressRequest::InProgressRequest(
ProxyingURLLoaderFactory* factory,
mojo::Remote<network::mojom::URLLoaderFactory> override_target_factory,
uint64_t web_request_id,
int32_t frame_routing_id,
int32_t network_service_request_id,
@@ -46,7 +45,6 @@ ProxyingURLLoaderFactory::InProgressRequest::InProgressRequest(
mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
mojo::PendingRemote<network::mojom::URLLoaderClient> client)
: factory_(factory),
override_target_factory_(std::move(override_target_factory)),
request_(request),
original_initiator_(request.request_initiator),
request_id_(web_request_id),
@@ -240,11 +238,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveResponse(
// Set-Cookie if it existed.
auto saved_headers = current_response_->headers;
current_response_ = std::move(head);
// If this response is from a file or handler, OnHeadersReceived will not
// be called before OnReceiveResponse, so make sure the saved headers exist
// before setting them.
if (saved_headers)
current_response_->headers = saved_headers;
current_response_->headers = saved_headers;
ContinueToResponseStarted(net::OK);
} else {
current_response_ = std::move(head);
@@ -499,12 +493,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToStartRequest(
return;
}
if (!target_loader_.is_bound()) {
auto& target_factory = override_target_factory_.is_bound()
? override_target_factory_
: factory_->target_factory_;
if (!target_factory.is_bound())
return;
if (!target_loader_.is_bound() && factory_->target_factory_.is_bound()) {
// No extensions have cancelled us up to this point, so it's now OK to
// initiate the real network request.
uint32_t options = options_;
@@ -512,7 +501,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToStartRequest(
// might, so we need to set the option on the loader.
if (has_any_extra_headers_listeners_)
options |= network::mojom::kURLLoadOptionUseHeaderClient;
target_factory->CreateLoaderAndStart(
factory_->target_factory_->CreateLoaderAndStart(
target_loader_.BindNewPipeAndPassReceiver(),
network_service_request_id_, options, request_,
proxied_client_receiver_.BindNewPipeAndPassRemote(),
@@ -805,16 +794,23 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart(
request.load_flags |= net::LOAD_IGNORE_LIMITS;
}
mojo::Remote<network::mojom::URLLoaderFactory> override_target_factory;
// Check if user has intercepted this scheme.
bool bypass_custom_protocol_handlers =
options & kBypassCustomProtocolHandlers;
if (!bypass_custom_protocol_handlers) {
auto it = intercepted_handlers_->find(request.url.scheme());
if (it != intercepted_handlers_->end()) {
override_target_factory.Bind(ElectronURLLoaderFactory::Create(
it->second.first, it->second.second));
mojo::PendingRemote<network::mojom::URLLoaderFactory> loader_remote;
this->Clone(loader_remote.InitWithNewPipeAndPassReceiver());
// <scheme, <type, handler>>
it->second.second.Run(
request,
base::BindOnce(&ElectronURLLoaderFactory::StartLoading,
std::move(loader), request_id, options, request,
std::move(client), traffic_annotation,
std::move(loader_remote), it->second.first));
return;
}
}
@@ -822,19 +818,18 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart(
// Chromium does not provide a way to override this behavior. So in order to
// make ServiceWorker work with file:// URLs, we have to intercept its
// requests here.
if (IsForServiceWorkerScript() && request.url.SchemeIsFile() &&
!override_target_factory.is_bound()) {
override_target_factory.Bind(AsarURLLoaderFactory::Create());
if (IsForServiceWorkerScript() && request.url.SchemeIsFile()) {
asar::CreateAsarURLLoader(
request, std::move(loader), std::move(client),
base::MakeRefCounted<net::HttpResponseHeaders>(""));
return;
}
if (!web_request_->HasListener()) {
// Pass-through to the original factory.
auto& target_factory = override_target_factory.is_bound()
? override_target_factory
: target_factory_;
target_factory->CreateLoaderAndStart(std::move(loader), request_id, options,
request, std::move(client),
traffic_annotation);
target_factory_->CreateLoaderAndStart(std::move(loader), request_id,
options, request, std::move(client),
traffic_annotation);
return;
}
@@ -854,9 +849,8 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart(
auto result = requests_.emplace(
web_request_id,
std::make_unique<InProgressRequest>(
this, std::move(override_target_factory), web_request_id,
frame_routing_id_, request_id, options, request, traffic_annotation,
std::move(loader), std::move(client)));
this, web_request_id, frame_routing_id_, request_id, options, request,
traffic_annotation, std::move(loader), std::move(client)));
result.first->second->Restart();
}

View File

@@ -64,8 +64,6 @@ class ProxyingURLLoaderFactory
// For usual requests
InProgressRequest(
ProxyingURLLoaderFactory* factory,
const mojo::Remote<network::mojom::URLLoaderFactory>
override_target_factory,
uint64_t web_request_id,
int32_t frame_routing_id,
int32_t network_service_request_id,
@@ -142,8 +140,6 @@ class ProxyingURLLoaderFactory
void HandleBeforeRequestRedirect();
raw_ptr<ProxyingURLLoaderFactory> const factory_;
const mojo::Remote<network::mojom::URLLoaderFactory>
override_target_factory_;
network::ResourceRequest request_;
const std::optional<url::Origin> original_initiator_;
const uint64_t request_id_ = 0;

View File

@@ -45,7 +45,7 @@ struct NotificationOptions {
std::u16string timeout_type;
std::u16string reply_placeholder;
std::u16string sound;
std::u16string urgency; // Linux/Windows
std::u16string urgency; // Linux
std::vector<NotificationAction> actions;
std::u16string close_button_text;
std::u16string toast_xml;

View File

@@ -280,9 +280,8 @@ void WindowsToastNotification::CreateToastNotificationOnBackgroundThread(
// Continue to create the toast notification
ComPtr<ABI::Windows::UI::Notifications::IToastNotification>
toast_notification;
if (!CreateToastNotification(toast_xml, options, notification_id,
weak_notification, ui_task_runner,
&toast_notification)) {
if (!CreateToastNotification(toast_xml, notification_id, weak_notification,
ui_task_runner, &toast_notification)) {
return; // Error already posted to UI thread
}
@@ -350,7 +349,6 @@ bool WindowsToastNotification::CreateToastXmlDocument(
// returns the created notification via out parameter.
bool WindowsToastNotification::CreateToastNotification(
ComPtr<ABI::Windows::Data::Xml::Dom::IXmlDocument> toast_xml,
const NotificationOptions& options,
const std::string& notification_id,
base::WeakPtr<Notification> weak_notification,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
@@ -418,27 +416,6 @@ bool WindowsToastNotification::CreateToastNotification(
return false;
}
ComPtr<winui::Notifications::IToastNotification4> toast4;
hr = (*toast_notification)->QueryInterface(IID_PPV_ARGS(&toast4));
if (SUCCEEDED(hr)) {
winui::Notifications::ToastNotificationPriority priority =
winui::Notifications::ToastNotificationPriority::
ToastNotificationPriority_Default;
if (options.urgency == u"critical") {
priority = winui::Notifications::ToastNotificationPriority::
ToastNotificationPriority_High;
}
hr = toast4->put_Priority(priority);
if (FAILED(hr)) {
std::string err = base::StrCat({"WinAPI: Setting priority failed, ERROR ",
FailureResultToString(hr)});
DebugLog(err);
PostNotificationFailedToUIThread(weak_notification, err, ui_task_runner);
return false;
}
}
return true;
}

View File

@@ -94,7 +94,6 @@ class WindowsToastNotification : public Notification {
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
static bool CreateToastNotification(
ComPtr<ABI::Windows::Data::Xml::Dom::IXmlDocument> toast_xml,
const NotificationOptions& options,
const std::string& notification_id,
base::WeakPtr<Notification> weak_notification,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,

View File

@@ -52,21 +52,25 @@ bool ElectronSerialDelegate::CanRequestPortPermission(
auto* permission_helper =
WebContentsPermissionHelper::FromWebContents(web_contents);
return permission_helper->CheckSerialAccessPermission(
frame->GetLastCommittedOrigin());
web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin());
}
bool ElectronSerialDelegate::HasPortPermission(
content::RenderFrameHost* frame,
const device::mojom::SerialPortInfo& port) {
auto* web_contents = content::WebContents::FromRenderFrameHost(frame);
return GetChooserContext(frame)->HasPortPermission(
frame->GetLastCommittedOrigin(), port, frame);
web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin(), port,
frame);
}
void ElectronSerialDelegate::RevokePortPermissionWebInitiated(
content::RenderFrameHost* frame,
const base::UnguessableToken& token) {
auto* web_contents = content::WebContents::FromRenderFrameHost(frame);
return GetChooserContext(frame)->RevokePortPermissionWebInitiated(
frame->GetLastCommittedOrigin(), token, frame);
web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin(), token,
frame);
}
const device::mojom::SerialPortInfo* ElectronSerialDelegate::GetPortInfo(

View File

@@ -125,7 +125,7 @@ SerialChooserController::SerialChooserController(
std::move(allowed_bluetooth_service_class_ids)),
callback_(std::move(callback)),
initiator_document_(render_frame_host->GetWeakDocumentPtr()) {
origin_ = render_frame_host->GetLastCommittedOrigin();
origin_ = web_contents_->GetPrimaryMainFrame()->GetLastCommittedOrigin();
chooser_context_ = SerialChooserContextFactory::GetForBrowserContext(
web_contents_->GetBrowserContext())

View File

@@ -256,10 +256,6 @@ using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
shell_->SetWindowLevel(NSNormalWindowLevel);
shell_->UpdateWindowOriginalFrame();
shell_->DetachChildren();
// Hide the traffic light buttons container before miniaturize so that
// when the window is restored, macOS does not render the buttons at
// their default position during the deminiaturize animation.
shell_->HideTrafficLights();
}
- (void)windowDidMiniaturize:(NSNotification*)notification {
@@ -277,10 +273,6 @@ using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
shell_->set_wants_to_be_visible(true);
shell_->AttachChildren();
shell_->SetWindowLevel(level_);
// Reposition traffic light buttons and make them visible again.
// They were hidden in windowWillMiniaturize to prevent a flash at
// the default (0,0) position during the restore animation.
shell_->RestoreTrafficLights();
shell_->NotifyWindowRestore();
}

View File

@@ -243,8 +243,8 @@ void ElectronDesktopWindowTreeHostLinux::UpdateFrameHints() {
// The opaque region is a list of rectangles that contain only fully
// opaque pixels of the window. We need to convert the clipping
// rounded-rect into this format.
SkRRect rrect = layout->GetRoundedWindowBounds();
gfx::RectF rectf(layout->GetWindowBounds());
SkRRect rrect = layout->GetRoundedWindowContentBounds();
gfx::RectF rectf(layout->GetWindowContentBounds());
rectf.Scale(scale);
// It is acceptable to omit some pixels that are opaque, but the region
// must not include any translucent pixels. Therefore, we must

View File

@@ -158,7 +158,7 @@ DialogResult ShowTaskDialogWstr(gfx::AcceleratedWidget parent,
config.hInstance = GetModuleHandle(nullptr);
config.dwFlags = flags;
if (parent && ::IsWindowEnabled(parent)) {
if (parent) {
config.hwndParent = parent;
config.dwFlags |= TDF_POSITION_RELATIVE_TO_WINDOW;
}

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