mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
17 Commits
v30.0.0-al
...
v25.0.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b69de7c412 | ||
|
|
8c3bbded4f | ||
|
|
d9019fc54b | ||
|
|
7c624c17fa | ||
|
|
3e336d2923 | ||
|
|
95b727ccdb | ||
|
|
382b19f816 | ||
|
|
a1b3b506d7 | ||
|
|
9b25d6b91b | ||
|
|
b113c5d583 | ||
|
|
a36e44c973 | ||
|
|
8ae741102d | ||
|
|
666e8f9647 | ||
|
|
fdceacce44 | ||
|
|
0ad8ffa3d2 | ||
|
|
031283003c | ||
|
|
63fdcba0c8 |
@@ -524,6 +524,18 @@ step-fix-sync: &step-fix-sync
|
||||
mv .git/config.backup .git/config
|
||||
git fetch
|
||||
|
||||
step-fix-clang: &step-fix-clang
|
||||
run:
|
||||
name: Fix Clang on 32-bit Linux ARM
|
||||
command: |
|
||||
if [ "$TARGET_ARCH" == "arm" ]; then
|
||||
# The following custom clang needed on 32-bit Linux ARM due to https://crbug.com/1431201.
|
||||
# Once https://crbug.com/1425409 has been resolved this workaround can be remove
|
||||
cd src/third_party/llvm-build/Release+Asserts
|
||||
curl -O https://dev-cdn.electronjs.org/clang/clang-llvmorg-17-init-4759-g547e3456-2.tar.xz
|
||||
tar xvf clang-llvmorg-17-init-4759-g547e3456-2.tar.xz
|
||||
fi
|
||||
|
||||
step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
|
||||
run:
|
||||
name: Import and trust self-signed codesigning cert on MacOS
|
||||
@@ -1056,6 +1068,7 @@ commands:
|
||||
default: true
|
||||
steps:
|
||||
- *step-gn-gen-default
|
||||
- *step-fix-clang
|
||||
- ninja_build_electron:
|
||||
clean-prebuilt-snapshot: false
|
||||
build-type: << parameters.build-type >>
|
||||
@@ -1598,6 +1611,7 @@ commands:
|
||||
- *step-setup-goma-for-build
|
||||
- *step-wait-for-goma
|
||||
- *step-gn-gen-default
|
||||
- *step-fix-clang
|
||||
|
||||
# Electron app
|
||||
- ninja_build_electron:
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'114.0.5694.0',
|
||||
'114.0.5710.0',
|
||||
'node_version':
|
||||
'v18.15.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -49,3 +49,6 @@ use_qt = false
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/4365718
|
||||
# TODO(codebytere): fix perfetto incompatibility with Node.js.
|
||||
use_perfetto_client_library = false
|
||||
|
||||
# Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4402277
|
||||
enable_check_raw_ptr_fields = false
|
||||
|
||||
@@ -61,6 +61,44 @@ protocol.handle('some-protocol', () => {
|
||||
})
|
||||
```
|
||||
|
||||
### Deprecated: `BrowserWindow.setTrafficLightPosition(position)`
|
||||
|
||||
`BrowserWindow.setTrafficLightPosition(position)` has been deprecated, the
|
||||
`BrowserWindow.setWindowButtonPosition(position)` API should be used instead
|
||||
which accepts `null` instead of `{ x: 0, y: 0 }` to reset the position to
|
||||
system default.
|
||||
|
||||
```js
|
||||
// Deprecated in Electron 25
|
||||
win.setTrafficLightPosition({ x: 10, y: 10 })
|
||||
win.setTrafficLightPosition({ x: 0, y: 0 })
|
||||
|
||||
// Replace with
|
||||
win.setWindowButtonPosition({ x: 10, y: 10 })
|
||||
win.setWindowButtonPosition(null)
|
||||
```
|
||||
|
||||
### Deprecated: `BrowserWindow.getTrafficLightPosition()`
|
||||
|
||||
`BrowserWindow.getTrafficLightPosition()` has been deprecated, the
|
||||
`BrowserWindow.getWindowButtonPosition()` API should be used instead
|
||||
which returns `null` instead of `{ x: 0, y: 0 }` when there is no custom
|
||||
position.
|
||||
|
||||
```js
|
||||
// Deprecated in Electron 25
|
||||
const pos = win.getTrafficLightPosition()
|
||||
if (pos.x === 0 && pos.y === 0) {
|
||||
// No custom position.
|
||||
}
|
||||
|
||||
// Replace with
|
||||
const ret = win.getWindowButtonPosition()
|
||||
if (ret === null) {
|
||||
// No custom position.
|
||||
}
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (24.0)
|
||||
|
||||
### API Changed: `nativeImage.createThumbnailFromPath(path, size)`
|
||||
@@ -98,44 +136,6 @@ nativeImage.createThumbnailFromPath(imagePath, size).then(result => {
|
||||
})
|
||||
```
|
||||
|
||||
### Deprecated: `BrowserWindow.setTrafficLightPosition(position)`
|
||||
|
||||
`BrowserWindow.setTrafficLightPosition(position)` has been deprecated, the
|
||||
`BrowserWindow.setWindowButtonPosition(position)` API should be used instead
|
||||
which accepts `null` instead of `{ x: 0, y: 0 }` to reset the position to
|
||||
system default.
|
||||
|
||||
```js
|
||||
// Removed in Electron 24
|
||||
win.setTrafficLightPosition({ x: 10, y: 10 })
|
||||
win.setTrafficLightPosition({ x: 0, y: 0 })
|
||||
|
||||
// Replace with
|
||||
win.setWindowButtonPosition({ x: 10, y: 10 })
|
||||
win.setWindowButtonPosition(null)
|
||||
```
|
||||
|
||||
### Deprecated: `BrowserWindow.getTrafficLightPosition()`
|
||||
|
||||
`BrowserWindow.getTrafficLightPosition()` has been deprecated, the
|
||||
`BrowserWindow.getWindowButtonPosition()` API should be used instead
|
||||
which returns `null` instead of `{ x: 0, y: 0 }` when there is no custom
|
||||
position.
|
||||
|
||||
```js
|
||||
// Removed in Electron 24
|
||||
const pos = win.getTrafficLightPosition()
|
||||
if (pos.x === 0 && pos.y === 0) {
|
||||
// No custom position.
|
||||
}
|
||||
|
||||
// Replace with
|
||||
const ret = win.getWindowButtonPosition()
|
||||
if (ret === null) {
|
||||
// No custom position.
|
||||
}
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (23.0)
|
||||
|
||||
### Behavior Changed: Draggable Regions on macOS
|
||||
|
||||
@@ -9,11 +9,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | TBD | M114 | TBD | TBD |
|
||||
| 24.0.0 | 2022-Feb-09 | 2023-Mar-07 | 2023-Apr-08 | TBD | M112 | TBD | ✅ |
|
||||
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | TBD | M110 | TBD | ✅ |
|
||||
| 22.0.0 | 2022-Sep-29 | 2022-Oct-25 | 2022-Nov-29 | TBD | M108 | v16.17 | ✅ |
|
||||
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | TBD | M106 | v16.16 | ✅ |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | TBD | ✅ |
|
||||
| 24.0.0 | 2022-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-03 | M112 | v18.14 | ✅ |
|
||||
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-08 | M110 | v18.12 | ✅ |
|
||||
| 22.0.0 | 2022-Sep-29 | 2022-Oct-25 | 2022-Nov-29 | 2023-Oct-10 | M108 | v16.17 | ✅ |
|
||||
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | 2023-Apr-04 | M106 | v16.16 | 🚫 |
|
||||
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | 2023-Feb-07 | M104 | v16.15 | 🚫 |
|
||||
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | 2022-Nov-29 | M102 | v16.14 | 🚫 |
|
||||
| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | 2022-Sep-27 | M100 | v16.13 | 🚫 |
|
||||
|
||||
@@ -274,7 +274,7 @@ calling `createWindow()` once its promise is fulfilled.
|
||||
You typically listen to Node.js events by using an emitter's `.on` function.
|
||||
|
||||
```diff
|
||||
+ app.on('ready').then(() => {
|
||||
+ app.on('ready', () => {
|
||||
- app.whenReady().then(() => {
|
||||
createWindow()
|
||||
})
|
||||
|
||||
@@ -304,7 +304,6 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/__coroutine/trivial_awaitables.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__debug",
|
||||
"//buildtools/third_party/libc++/trunk/include/__debug_utils/randomize_range.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__errc",
|
||||
"//buildtools/third_party/libc++/trunk/include/__exception/exception.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__exception/exception_ptr.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__exception/nested_exception.h",
|
||||
@@ -591,6 +590,11 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__nop_locale_mgmt.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__posix_l_fallback.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__strtonum_fallback.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__system_error/errc.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__system_error/error_category.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__system_error/error_code.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__system_error/error_condition.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__system_error/system_error.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__thread/poll_with_backoff.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__thread/timed_backoff_policy.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__threading_support",
|
||||
|
||||
@@ -26,7 +26,7 @@ export const roleList: Record<RoleId, Role> = {
|
||||
get label () {
|
||||
return isLinux ? 'About' : `About ${app.name}`;
|
||||
},
|
||||
...(isWindows && { appMethod: () => app.showAboutPanel() })
|
||||
...((isWindows || isLinux) && { appMethod: () => app.showAboutPanel() })
|
||||
},
|
||||
close: {
|
||||
label: isMac ? 'Close Window' : 'Close',
|
||||
|
||||
@@ -126,4 +126,4 @@ expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
|
||||
chore_patch_out_profile_methods_in_profile_selections_cc.patch
|
||||
add_gin_converter_support_for_arraybufferview.patch
|
||||
chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
|
||||
revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch
|
||||
revert_x11_keep_windowcache_alive_for_a_time_interval.patch
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 7bf09dd8870040e74cd1a7653665d0806910378c..ec6d1554075ee5454f79e98d0e2e539395499dbe 100644
|
||||
index 7af9fa04eefd67a6a3a3083e01efb85450057135..8a3cec9cb09c08f8a5a88ae671e0f13b643d9b5b 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -243,6 +243,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -244,6 +244,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 7bf09dd8870040e74cd1a7653665d0806910378c..ec6d1554075ee5454f79e98d0e2e5393
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -327,7 +331,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -328,7 +332,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 6c92a2856e447bdda11c7ed2c64b79b93a0eca26..03dedde2d83e6b09fb7e90be7dfdce246f301d8f 100644
|
||||
index fef4c8e02067c44ed804c8b53db1007fae2d2a76..b36304ee0a832c5e1e2fd3af6151b7b03fd98ec4 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -137,6 +137,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index 6c92a2856e447bdda11c7ed2c64b79b93a0eca26..03dedde2d83e6b09fb7e90be7dfdce24
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index ba3672c8a22c5316a225ee3fc0468b296d9c9e56..bd303758e7c53698bd268dc5caa0f596f2b64d81 100644
|
||||
index f45f542fa3131036624686cd33a90097e6400ff5..0bdf1012eea9d754e03d9b6d9f05a1939502e6b1 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4395,6 +4395,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4418,6 +4418,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index ba3672c8a22c5316a225ee3fc0468b296d9c9e56..bd303758e7c53698bd268dc5caa0f596
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index a441c84491884e92e1cc15e7b581e8598dafa30d..fb77bfde937563874a02a1ce54e6e39c8fa7405a 100644
|
||||
index 39119f060d6f8bd1707cf9122708e3571d52ecb8..4b501e4602cd3f39e8e26f839f3cc77832ff690c 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -609,6 +609,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -608,6 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index a441c84491884e92e1cc15e7b581e8598dafa30d..fb77bfde937563874a02a1ce54e6e39c
|
||||
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 ee528077545133ab14002823ce302f6e36780207..8e08121bc2402fcd7c7008c3aa914cd06c963c96 100644
|
||||
index dfd33eede0a8b0935a06eeb8f505a8d0738afa19..06827403830cb730b2521c715ec06aedbf7339c6 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -603,6 +603,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -606,6 +606,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -79,10 +79,10 @@ index e7d4256fa96f5bc8ad71bd13b6b33feef32b443f..0dfeda68a4dbfd6b442f8d8f928c8cb8
|
||||
if (World().IsMainWorld()) {
|
||||
probe::DidCreateMainWorldContext(GetFrame());
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index b21defea45e641eef86c72a91ccd03a55e5cf037..cc0f6e555762a0baaea1e2fb00f1bc745f725282 100644
|
||||
index 2c526726ff1ed7008152086210b25103ce308d5b..c62ab44289bf32ac9d40d3df45f6363409f0dea9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -317,6 +317,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -315,6 +315,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,7 +92,7 @@ index b21defea45e641eef86c72a91ccd03a55e5cf037..cc0f6e555762a0baaea1e2fb00f1bc74
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 7699652913870d0cc323091487d6869c90a716d1..840cdcbace2929b98a292769c5ee6e6aaed135c6 100644
|
||||
index 56ad2a8f3fabe03b2c285231d0e99dbcbaf2a9d2..130423e45f17998bf5a28c719115715941ae6620 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,10 +110,10 @@ index 7699652913870d0cc323091487d6869c90a716d1..840cdcbace2929b98a292769c5ee6e6a
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 7788f1e48f10aca1bffac3f35ac4e03351b7ce8d..4533c4c6b9a0f10c26ac1ee5871ddd1325e5ef4a 100644
|
||||
index cd3cc4ea62f8956b87c711362520308f062de76e..75dd52f5eb3e6a06cd6185d590ba20e17b7e4e1d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index b7bff829d779036ce0341b52ce9adc28eac91fa2..79b48d028ff6742d0d43ac6d32242f505587dafd 100644
|
||||
index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a08332a4ce 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index b7bff829d779036ce0341b52ce9adc28eac91fa2..79b48d028ff6742d0d43ac6d32242f50
|
||||
// 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 46a21ac9dfe9308bbb1b2fb44249cb1ce6e8dcf6..8b2c78985cf718e06244c73b0961a69d3a0f8ac6 100644
|
||||
index 8244852a9728bd7a6e34f0c499b567c7051d5bcc..b1bb027294305c7cc10018d12ace9df80dca1698 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -623,10 +623,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -624,10 +624,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index 46a21ac9dfe9308bbb1b2fb44249cb1ce6e8dcf6..8b2c78985cf718e06244c73b0961a69d
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -674,6 +670,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -675,6 +671,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 7c3a9357e6155e841215fd73ce9b71cbd688b676..04300a24bc1b3a6a0d326d177a4d9e07076b4026 100644
|
||||
index 50a1715278cb1bbc25bd2270860b41229e884000..e53c59416a088dca3757d873a40120acacb7dc79 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -193,11 +193,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,10 +33,10 @@ index 7c3a9357e6155e841215fd73ce9b71cbd688b676..04300a24bc1b3a6a0d326d177a4d9e07
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 44f71ea5d24fe1fc45d8bce83f1b9e5d62f9aec4..6024f883b60a5d52ac6e8f8c69e27d1a560ad459 100644
|
||||
index 6b1cd116564be4257c0d17a2fe89c809bba30798..f2c294ce29b3eae2f07489393516591c4d9c7768 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4567,7 +4567,7 @@ static_library("browser") {
|
||||
@@ -4568,7 +4568,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
@@ -46,10 +46,10 @@ index 44f71ea5d24fe1fc45d8bce83f1b9e5d62f9aec4..6024f883b60a5d52ac6e8f8c69e27d1a
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index e26649fe6b687cf0039f11b325aa8b5729667c5e..7a4922a947091a55d256134083789f7a474a90da 100644
|
||||
index bc6868fa3bfdf36e21af8458c768a35819447443..433d89a4205b0521fcd82fa0f9ed383e7d5e4fa7 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6385,7 +6385,6 @@ test("unit_tests") {
|
||||
@@ -6406,7 +6406,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index e26649fe6b687cf0039f11b325aa8b5729667c5e..7a4922a947091a55d256134083789f7a
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -6411,6 +6410,10 @@ test("unit_tests") {
|
||||
@@ -6432,6 +6431,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,7 +68,7 @@ index e26649fe6b687cf0039f11b325aa8b5729667c5e..7a4922a947091a55d256134083789f7a
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -7337,7 +7340,6 @@ test("unit_tests") {
|
||||
@@ -7356,7 +7359,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -76,7 +76,7 @@ index e26649fe6b687cf0039f11b325aa8b5729667c5e..7a4922a947091a55d256134083789f7a
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:test_support",
|
||||
@@ -7415,6 +7417,10 @@ test("unit_tests") {
|
||||
@@ -7435,6 +7437,10 @@ test("unit_tests") {
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components
|
||||
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 5c15cdf2ab2a8d41774917e6c006247ea9af44ab..b684afd5ef09fc220c042c44e5fcf7032e4bc92d 100644
|
||||
index de465c107163124c6be79c3d10c2dd5678436b5a..b464fac54c13c176cca30bccd51dc25efdc8720b 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1036,6 +1036,7 @@ component("base") {
|
||||
@@ -1030,6 +1030,7 @@ component("base") {
|
||||
"//build/config/compiler:prevent_unsafe_narrowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config/compiler:wglobal_constructors",
|
||||
@@ -76,7 +76,7 @@ index 6926bd6766603f8de2237447c0a8fde2d09b67b4..707a943dd2bbc89917bd4b5b0fbc1d42
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 3b1d9b1a41903d57e65517a046f30b11873b8b73..e231734571cadb6f5aebe49cf853c54f66d7fd8b 100644
|
||||
index 6b988eeae6411649bc35321dd22805a5c5439fb5..e78f16518da14411ceb74c88be31ffce413f986e 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -56,6 +56,7 @@ source_set("browser") {
|
||||
@@ -112,7 +112,7 @@ index 3ec54c242fb920a53fcaa6d8040f2ec88c2727df..27dee1596183d2ead5290a60c08e47e6
|
||||
|
||||
public_deps = [
|
||||
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
|
||||
index 5e9f447e4d946cd48d7b18d81c256baa169f93ea..fcfda1b4fde66c39b53a52d57c5e57b7f239bda1 100644
|
||||
index 642afd72cc0f98fe2590cef0c470f378eabb939e..894769a5de698767117339cab0fc2942d1a20b90 100644
|
||||
--- a/device/bluetooth/BUILD.gn
|
||||
+++ b/device/bluetooth/BUILD.gn
|
||||
@@ -240,6 +240,7 @@ component("bluetooth") {
|
||||
@@ -136,7 +136,7 @@ index 89e0e91bb24cb1b92abb8670f56328499c0669e0..6b6dd9c74011c1acafb931842d6675ff
|
||||
if (is_ios) {
|
||||
sources += [
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index f1b4cd5055d00df425926e83a3b2e7f32af4c2e6..a80aaa7fde1fd9c70e7038aef4e322f1ec6a307a 100644
|
||||
index 609c60d94cdbf4755f60323734b976b49f03fecb..09a3871bfef3ba7a523ac37a80a4aa86ce2975ae 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -194,6 +194,7 @@ source_set("audio") {
|
||||
@@ -253,7 +253,7 @@ index 20e72272bfd36d8411e7ecb8a83c75d9f95632e4..9784269499bccc19161a613aa1bb3a35
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index 00f83601160eb795067bce9532baeaa078259e68..37e40a1bcf770a060fe7803bafb08274254a3fdf 100644
|
||||
index 34a269ee4d47a2597fd098bc9eabe10685f4fc86..8a96f5abc4e0092bca15dbf6e5098a64d81a3ff7 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -193,6 +193,7 @@ component("gfx") {
|
||||
|
||||
@@ -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 814c7d68ef10f4b0978583ecb6983407b2d57ddf..79336d50231e352f83d3e06f35bacdfac0289f2a 100644
|
||||
index 24563bf259de8735e161ff462711ac2f3b96c738..46e8acf1267ffb24de71c4239121e787f5291fd4 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7680,6 +7680,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -7710,6 +7710,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index 814c7d68ef10f4b0978583ecb6983407b2d57ddf..79336d50231e352f83d3e06f35bacdfa
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 336854b4fe339d7229f309d59984752ad95261cc..ac1fcc365e9bb093b4c45319f1d1f4cb2e79b818 100644
|
||||
index d645d91310408a2f04e0ee92cae9e9b387cdf845..aa75360ee5fc3dc6b4a0c5fcf864c9488635f563 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4156,6 +4156,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4160,6 +4160,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -37,7 +37,7 @@ index 336854b4fe339d7229f309d59984752ad95261cc..ac1fcc365e9bb093b4c45319f1d1f4cb
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -4197,12 +4203,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4201,12 +4207,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 336854b4fe339d7229f309d59984752ad95261cc..ac1fcc365e9bb093b4c45319f1d1f4cb
|
||||
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 c7cc09531bd7b2c67085a7a3d9f98ab060a62ccb..faa0a7cd254b84af686f0c321f4d718f85636770 100644
|
||||
index 12f4a2066a2a31e9852216c0cb3344095c7b0e39..588ca46227c58f9596317d6d4d05d0b3c76cbc06 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -599,6 +599,10 @@ struct CreateNewWindowParams {
|
||||
@@ -593,6 +593,10 @@ struct CreateNewWindowParams {
|
||||
// The navigation initiator's user activation and ad status.
|
||||
blink.mojom.NavigationInitiatorActivationAndAdStatus
|
||||
initiator_activation_and_ad_status;
|
||||
@@ -66,10 +66,10 @@ index c7cc09531bd7b2c67085a7a3d9f98ab060a62ccb..faa0a7cd254b84af686f0c321f4d718f
|
||||
|
||||
// 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 cd77eefb577e610612e5af8cd7b89c064b6b6fe6..789df626f7b0592868c77c2e2ddc35522865be46 100644
|
||||
index bf19525ff2a04cbaccd519de35bb25880a255892..233c048f9afb3f3bcdc1ff2d071730379f4f7e22 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -636,6 +636,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -635,6 +635,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +79,10 @@ index cd77eefb577e610612e5af8cd7b89c064b6b6fe6..789df626f7b0592868c77c2e2ddc3552
|
||||
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 01e7953e9b426c3000b45c8d4546e126135537cc..cf681fbaaa829af15f7e67b454730e2b7103b650 100644
|
||||
index 3a843b83b86f868998ea9c2289874eb89fdec41a..b0534cbc6754f313b798436b39146da59d3fb32c 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -164,6 +164,7 @@ class NetworkService;
|
||||
@@ -165,6 +165,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +90,7 @@ index 01e7953e9b426c3000b45c8d4546e126135537cc..cf681fbaaa829af15f7e67b454730e2b
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1033,6 +1034,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1031,6 +1032,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -148,10 +148,10 @@ index 5da6f93293bc5ddae88c17ac2dd8d7037ba8e8f3..76d699790fb7d92587293b14332f696d
|
||||
// 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 dec52d1114cae6627145ec93e0d2e689d5371650..ba3672c8a22c5316a225ee3fc0468b296d9c9e56 100644
|
||||
index 0a0aa8f85c5c818fffc310f4d05a6886f7d6272b..f45f542fa3131036624686cd33a90097e6400ff5 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6292,6 +6292,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6318,6 +6318,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
blink::GetNavigationInitiatorActivationAndAdStatus(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -189,33 +189,33 @@ index 22254206063abe36739e1c0e7c065223ab6807d2..7f5d89f8dc8b46ac1338e73b03948725
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) override;
|
||||
diff --git a/third_party/blink/public/web/web_window_features.h b/third_party/blink/public/web/web_window_features.h
|
||||
index 19e505a2d434dfd219b12304238e3b654eb8395f..314d1e63c55fae58e9f7ad0ce10045d3133f4882 100644
|
||||
index 4156256596276015ca3205b0f49f69d1ab47208e..271bc153afe3e3bfa98a7baa6ae4f92285d41929 100644
|
||||
--- a/third_party/blink/public/web/web_window_features.h
|
||||
+++ b/third_party/blink/public/web/web_window_features.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -32,6 +32,7 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WINDOW_FEATURES_H_
|
||||
|
||||
#include "third_party/blink/public/common/navigation/impression.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -68,6 +69,8 @@ struct WebWindowFeatures {
|
||||
// Represents the attribution source declared by Attribution Reporting related
|
||||
// window features, if any.
|
||||
absl::optional<Impression> impression;
|
||||
// request should be made. Otherwise, an impression should be set and a
|
||||
// background request should be made to the contained relative URL.
|
||||
WebString attribution_src;
|
||||
+
|
||||
+ String raw_features;
|
||||
};
|
||||
|
||||
} // 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 6e4235ff40d88880e5928cbca2a593264d6da527..814781746df6fd0b2cedc2f3aa77759aa1c7a868 100644
|
||||
index 805528d51c5eef239154be54d4d484db15cb0d4d..2d75600164d736b8d6ecf3855681c4f076b6e181 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2212,6 +2212,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2217,6 +2217,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window, completed_url);
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
+ window_features.raw_features = features;
|
||||
+
|
||||
|
||||
@@ -34,7 +34,7 @@ index 2b935ac09209c1b043aa416f886a84dff742826e..04b586a7fd15bc2e85cb62cd6cefe634
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 66444599384981681a3018b5de516e2242324285..c55e27bfc275ff63282f8d703dcdf723b5b2385d 100644
|
||||
index 071137f6fa403108328e5f42aa47c4c0de0d8ed3..7c5f6f5b6d981df6dfd2dbac9e409b4c5a378a2b 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3209,15 +3209,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
|
||||
@@ -80,10 +80,10 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 51b7658944d39151f5d11eec00650fcb87954e3c..45c002e75972acd3f3da84be7ced75253d403b7f 100644
|
||||
index 996be105cbe5c85d9b350ff4c5042ef8efad84f5..cd758cc379fa8c3ea302801298de7dbe19db59a4 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1837,12 +1837,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1859,12 +1859,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -99,7 +99,7 @@ index 51b7658944d39151f5d11eec00650fcb87954e3c..45c002e75972acd3f3da84be7ced7525
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 83b8260beb59da437ae08a5b62746c40603a1200..3ea5f7c42ef350cc094355154c52220e68e6ceb5 100644
|
||||
index 23a838ba30c6890b66d301c90ece2dd3eafac8c7..f660378323bb9d3004b967689bf3bbb56ace198c 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -862,8 +862,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 1dafd9c9d934e19284279fb24e8488c086b20d4c..2fdbc714c3f0f560820eaec4524b016dea2fa442 100644
|
||||
index a31e2cf63bcd3f9f9b4e5e5b59494feb0e1204d5..dada815b4db9be5aa544967e636ce5ee5a66ee95 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4063,8 +4063,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4067,8 +4067,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
||||
@@ -31,18 +31,18 @@ index 284dd099122df85d2cebf467cdb3a54b45a343eb..bb21ddbd2ee4d2952a4b753a5c553005
|
||||
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
||||
return 100;
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
|
||||
index 9f8f20dfa65068a13ce3b035a7e3ce062d767161..9b45c7276e97253f79f4555ee692687b040afa67 100644
|
||||
index a604df7a5ea6a1f5613acc032a65668364aadf89..93a8bf787bdaa0e4251a41453eb22062646f4bcb 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.h
|
||||
+++ b/components/crash/core/app/crash_reporter_client.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
#define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
+#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "build/build_config.h"
|
||||
@@ -151,6 +152,19 @@ class CrashReporterClient {
|
||||
@@ -153,6 +154,19 @@ class CrashReporterClient {
|
||||
// that case, |breakpad_enabled| is set to the value enforced by policies.
|
||||
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce
|
||||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index cb05dfa656174c132157a1ca283da2dad50c2423..fe38ee99ed053f41680a413883739cf7b359cf6a 100644
|
||||
index 9e53989c27763d082dabbaee2149206906977d10..7f6698c75db98e0a239a9144c73362f5ec2b38bd 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 66c8dda8af5605fb270011bd58c7bed59fe71fcf..383c6dcfe93753f6b84c18b6db2fd4c6fe453b23 100644
|
||||
index 2e3a87b7694f105a684ac2500ae5fb6861eee668..8ffcc8086b9b414240ced42e0219c3d59c5ad417 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -527,7 +527,11 @@
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 6dab72c3c7471fe567a39e988a75b6b97a4da702..d164a86023ceb2718dfefce23d0a9fc910150f0e 100644
|
||||
index f6c710215f04b6639089c9d19824e3049f909c31..0d66b297f64af9f3bc2d4aab0e7a285fff9507cc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
|
||||
@@ -19,7 +19,7 @@ index d52fc15106eb3a834f1008846df6cb954db17250..b2e8e4127d73d1c8f0f3698fe9c7f37a
|
||||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 5de1045439dca219331968dcac3c721907e20c35..8edbbbea1afcae8a32d18d23afa706224bf58b14 100644
|
||||
index 5603bd95d19197ca28a25a6539b0b18a240ef73a..a9c8acdea0b2507f4f98f31c5265650a1cf6bc54 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1123,8 +1123,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index a985d4a9b1f005c965fc0ec9076e9648bc1ff7c3..974b8562354665301ba2f44ae79a3d69b93960fb 100644
|
||||
index 1776f32fde50f96c8aeaa26044791a9dd6c5f821..60b76e813b41700c4ddb5594d951ffbf4b352658 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1434,6 +1434,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1454,6 +1454,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ index 9812aef784d8aa1e57a91b4adfeb25befdc57e2c..a16320c306b937a36162b9a34f7b66c0
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 0d2ff1f52aa217aef66e6b9c10bbb119f9f622e3..28cc52d5ec9b2fd12361c24b07c78c90d1bb3099 100644
|
||||
index 246545e11f663d07c1095d3ffea87e926b69dfbb..81b3e4737c7407c35b5fc71a14eda91df3d956eb 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1103,6 +1103,9 @@ interface NetworkContext {
|
||||
@@ -1114,6 +1114,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
|
||||
whole bunch more useful!
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
index b38bbd1d14f6a0eb10412858fb4dc7f714aa3ede..5526dec4f134b265f5de5ff6820fe9c5119a3ed9 100644
|
||||
index 515143a8408ff29e39f556a32439738b1f38a1a6..1f3b1e84ffa3fa874118b69652c6faf1253dda12 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
@@ -174,6 +174,7 @@ void MessagePort::close() {
|
||||
@@ -175,6 +175,7 @@ void MessagePort::close() {
|
||||
Entangle(pipe.TakePort0());
|
||||
}
|
||||
closed_ = true;
|
||||
|
||||
@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 835fa36e64e2cb350f3f09798b0040b234f7c0ee..f9a754acab125bc50660e9c3763b36930ea7fe1d 100644
|
||||
index 972b8416c2d6d6bc412567675ba8bb61ba7bec70..a102e864239ab8ac67814c38cedf2e742e05eeeb 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -144,6 +144,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
@@ -26,7 +26,7 @@ index 835fa36e64e2cb350f3f09798b0040b234f7c0ee..f9a754acab125bc50660e9c3763b3693
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 7b361eb310ec1cf8edc7f53e5cc9ba250041841b..cb65bec8f3a9135bdfd0105087676713cb945a95 100644
|
||||
index 054fc3f605fd4656023125592d04c489be568ee4..fcc180ef6d3683aed291d2ebf17bbc45c1773942 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -410,6 +410,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
|
||||
@@ -183,10 +183,10 @@ index 4d4c17b8fe687e01f7403335c88453998259d647..22c1e5fd0c6f16a101b2578675704f18
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index 17653e54563ac243ca18a85b3f38a7d6c24adf38..40eed26c8311352f71532919a28525936733bfb8 100644
|
||||
index 3459f3a9f67efdfbc45a069ab1fc3b4ce8b33237..37f2ec9cfbc855445d9cad37ab0538a7bde51efa 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -106,11 +106,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
@@ -146,11 +146,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
return process_->GetData();
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ index 17653e54563ac243ca18a85b3f38a7d6c24adf38..40eed26c8311352f71532919a2852593
|
||||
|
||||
bool UtilityProcessHost::Start() {
|
||||
return StartProcess();
|
||||
@@ -166,6 +168,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
@@ -206,6 +208,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
}
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
@@ -227,9 +227,9 @@ index 17653e54563ac243ca18a85b3f38a7d6c24adf38..40eed26c8311352f71532919a2852593
|
||||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -355,9 +375,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload());
|
||||
#endif // BUILDFLAG(IS_POSIX)
|
||||
@@ -406,9 +426,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+ file_data_->stdout_handle = std::move(stdout_handle_);
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
|
||||
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f250dce2397f67cce8b5ef6000da69a782b159ff..4f802a4ef61778b4239d2b413fdeda7c15e589f0 100644
|
||||
index 2f4e349c1f0767638446e48a4d222fa22027d0bb..ec97c722aa1cb089c8060300e5368a6224107612 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3584,7 +3584,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -3588,7 +3588,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
|
||||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 8edbbbea1afcae8a32d18d23afa706224bf58b14..66444599384981681a3018b5de516e2242324285 100644
|
||||
index a9c8acdea0b2507f4f98f31c5265650a1cf6bc54..071137f6fa403108328e5f42aa47c4c0de0d8ed3 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3782,6 +3782,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
@@ -3784,6 +3784,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
|
||||
min_window_size = delegate_->DIPToScreenSize(min_window_size);
|
||||
max_window_size = delegate_->DIPToScreenSize(max_window_size);
|
||||
|
||||
@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index bdfcdf4f7b3d22c94db220eec864a884b07f6c60..94a8ace08ab2cbc445030e7bac97d2ffa67a1719 100644
|
||||
index 0d6a0433137a3598ff2bb102296d5f39d7b53298..1407049bc11a8f171f9cf6fe4c8567a0b80ad411 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -7369,10 +7369,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -7370,10 +7370,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
if (IsForMhtmlSubframe())
|
||||
return origin_with_debug_info;
|
||||
|
||||
@@ -37,10 +37,10 @@ index bdfcdf4f7b3d22c94db220eec864a884b07f6c60..94a8ace08ab2cbc445030e7bac97d2ff
|
||||
}
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
index f30708c035d815a7f1e184853c73a3e4be91f929..61e8e79df49ad881d5f20430a7d01031ea657e83 100644
|
||||
index c65f258cf2b012777c816727df01cdda444ce365..3f99ead141cb7b632d66a5b56bc4529a550cde1b 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
@@ -2901,6 +2901,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -2894,6 +2894,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// last committed document.
|
||||
CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
|
||||
|
||||
@@ -55,10 +55,10 @@ index f30708c035d815a7f1e184853c73a3e4be91f929..61e8e79df49ad881d5f20430a7d01031
|
||||
+ bool is_pdf,
|
||||
+ bool is_sandboxed);
|
||||
+
|
||||
// Sets a ResourceCache in the renderer. `remote` must have the same process
|
||||
// Sets a ResourceCache in the renderer. `this` must be active and there must
|
||||
// be no pending navigation. `remote` must have the same and process
|
||||
// isolation policy.
|
||||
// TODO(https://crbug.com/1414262): Add checks to ensure the preconditions.
|
||||
@@ -3241,17 +3252,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -3234,17 +3245,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// relevant.
|
||||
void ResetWaitingState();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
||||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 7c29db598d073a42274193e274f8314b6080286d..f9d96533107004cf61ae657c530f96f2f142768f 100644
|
||||
index b43205b4dea3ab0201085cd4d63c6b3a4fa78238..268aebd9406b3d0e927d2a61df18bfec84a46d5f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1872,7 +1872,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1865,7 +1865,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// IncrementCapturerCount() is destructed.
|
||||
void DecrementCapturerCount(bool stay_hidden,
|
||||
bool stay_awake,
|
||||
@@ -21,10 +21,10 @@ index 7c29db598d073a42274193e274f8314b6080286d..f9d96533107004cf61ae657c530f96f2
|
||||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||
// state into account.
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 53795f61ac676ee1104ae4dc138c42d7315a40aa..21460cb94dc0f8f65438c2e26ff225acb51d5a39 100644
|
||||
index 86cb0de1e87a444bdd8d00bc2a981a8abbb94234..33d3af13ec5c243828412671a198070d09ad895d 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -703,6 +703,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -702,6 +702,10 @@ class WebContents : public PageNavigator,
|
||||
bool stay_awake,
|
||||
bool is_activity = true) = 0;
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ index 2ca4e42342ff6bf3f2ad104208944e36d572aa3c..7421cc779873b580d6f5a109d57ff744
|
||||
// RenderFrameMetadataProvider::Observer implementation.
|
||||
void OnRenderFrameMetadataChangedBeforeActivation(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 4f802a4ef61778b4239d2b413fdeda7c15e589f0..096dd1e674c6141168ca18fb54ebdb4fbe601be7 100644
|
||||
index ec97c722aa1cb089c8060300e5368a6224107612..66305cdecc3a4e4f78663e02e9bd41e313014b62 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -8090,7 +8090,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -8094,7 +8094,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -18,7 +18,7 @@ or resizing, but Electron does not seem to run into that issue
|
||||
for opaque frameless windows even with that block commented out.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index c55e27bfc275ff63282f8d703dcdf723b5b2385d..ba915088fa641ab7948ecd49fcbb53c30348c3ff 100644
|
||||
index 7c5f6f5b6d981df6dfd2dbac9e409b4c5a378a2b..aaa0d52e1baae405a75af29ab3741a3a0895dbe0 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1847,7 +1847,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
|
||||
@@ -8,10 +8,10 @@ v8::Value instead of base::Value.
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
|
||||
|
||||
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
||||
index 6805d2d5638fa5dec698a4b674d70e6262301251..e76de2f29fa6718e79745bc5cede3c6cf858a325 100644
|
||||
index e9371fb6de28abf0cc0d35cf144427b65fe7dc04..892c1bbae90725a97db6dbcb82e732303f20199f 100644
|
||||
--- a/extensions/renderer/script_injection.cc
|
||||
+++ b/extensions/renderer/script_injection.cc
|
||||
@@ -273,6 +273,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
@@ -275,6 +275,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
blink::mojom::LoadEventBlockingOption::kBlock,
|
||||
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
|
||||
|
||||
#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 8b2c78985cf718e06244c73b0961a69d3a0f8ac6..7410957520f2952b0744a97b024aec68e21e67f8 100644
|
||||
index b1bb027294305c7cc10018d12ace9df80dca1698..786f45837ca5ad8416af52d160a726148a2fc43b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -2698,6 +2698,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2692,6 +2692,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -75,7 +75,7 @@ index 8b2c78985cf718e06244c73b0961a69d3a0f8ac6..7410957520f2952b0744a97b024aec68
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -2728,7 +2729,8 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2722,7 +2723,8 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
ToScriptState(DomWindow(), *world), std::move(script_sources),
|
||||
execute_script_policy, user_gesture, evaluation_timing, blocking_option,
|
||||
@@ -86,7 +86,7 @@ index 8b2c78985cf718e06244c73b0961a69d3a0f8ac6..7410957520f2952b0744a97b024aec68
|
||||
|
||||
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 3d011d6e0e0f17f4af65fa94661cabdf2aa296ba..6260e1db40171c8a62317954ab7874a21dbe4774 100644
|
||||
index 5a127bb9126a9f8cd05439c7fb81afe3e1fa826c..57e32dd1ad67aadbaf1b06c5555388d20eda8304 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
@@ -781,6 +781,7 @@ class CORE_EXPORT LocalFrame final
|
||||
@@ -205,7 +205,7 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
|
||||
const mojom::blink::UserActivationOption user_activation_option_;
|
||||
const mojom::blink::LoadEventBlockingOption blocking_option_;
|
||||
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 23e5e04eda35891f7f97816dd0976cd234259cf7..fbd913726522f29950fede45de9fc79997f3b2a0 100644
|
||||
index 205cb909380cb4e4575bf34a73b7f841f2cebd13..c2b4b58dd2191a8f6a5c8f2dc74e4b9bfd68a508 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
|
||||
@@ -1148,14 +1148,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
|
||||
@@ -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 e66e0f659b693f86f0d7cc8751b82fd772e8fc17..e89bcb5c5c105d7dfceb84b0c3095af69ac21c15 100644
|
||||
index abd38c92d0f00dec0c52569b7db627917e457ccf..3943ead8fbdb241fc6e299f34a376d3aadfebd4e 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -3721,6 +3721,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3763,6 +3763,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index e66e0f659b693f86f0d7cc8751b82fd772e8fc17..e89bcb5c5c105d7dfceb84b0c3095af6
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index cf681fbaaa829af15f7e67b454730e2b7103b650..d061985388a13ba5f0f6a4806e918da7ce9a371a 100644
|
||||
index b0534cbc6754f313b798436b39146da59d3fb32c..9adb63bec130fb279889eff5b5a1cf952cd97d28 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -276,6 +276,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 65cb5b294f87523d46acecf489b82e6978056123..2d4837529dfa2a98cb7687609e60007c787b5295 100644
|
||||
index d672211e6f5cc53838bef3f446fca4c7311f4f4a..265b149f98ad12e34e18219b7491e108bc5fcc18 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1111,6 +1111,11 @@
|
||||
|
||||
@@ -18,7 +18,7 @@ index 355067ea178bee1466f9df5a3ed146e9f09f0768..1b385d12692deece9e10722fc70215e8
|
||||
# on GTK.
|
||||
"//examples:peerconnection_client",
|
||||
diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn
|
||||
index 390f07735e946e1f6c2711cbe36549af69320ac3..af74a924e2fb1e401a796793cb7cbabfcf411620 100644
|
||||
index e537f1eb15458a7abfd68169c00215776325e2b9..efe6a94b36b49c79dcefc77ef4289592287ff57f 100644
|
||||
--- a/ui/ozone/platform/x11/BUILD.gn
|
||||
+++ b/ui/ozone/platform/x11/BUILD.gn
|
||||
@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
|
||||
@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
||||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 85d04bdfe21465fd5860ee3a2eeb850cc0b8490a..eb513199556f9f13819fb4e20617182195f3e748 100755
|
||||
index 10eee9109c0acfe5849a72f87dd159ee7eda7627..28a24c24d2c20dbecb3ffa1524536607c501e54a 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -302,6 +302,8 @@ def GetDefaultHostOs():
|
||||
|
||||
@@ -137,7 +137,7 @@ index b9f62726f3808636bdb513ad10d89277b7837b82..eada168aff54aebf84e80a2df5363fe7
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
|
||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
index cfe208403514b55abc6d5b5695882ac50e08db8a..654e5f560c7dccd7bd4ec36a821a7478e3289a61 100644
|
||||
index 0b52fe6bd877347ac79a780aefc3c5c4b382f80e..5313bf169fdd6f86433db0fefe704f52011da861 100644
|
||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
@@ -31,19 +31,23 @@
|
||||
|
||||
@@ -160,7 +160,7 @@ index efca18c2a229b5d5afdcf5ac9c3057e0294bedd3..7a589e826f5c221259ac82ddfeba5985
|
||||
// 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 d616c812f099505783ad7aed5e0ebfe7d15ea553..66c8dda8af5605fb270011bd58c7bed59fe71fcf 100644
|
||||
index a7cbd153f799d8e6da61fb255c3d1d70c18fa514..2e3a87b7694f105a684ac2500ae5fb6861eee668 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -254,8 +254,10 @@
|
||||
@@ -174,7 +174,7 @@ index d616c812f099505783ad7aed5e0ebfe7d15ea553..66c8dda8af5605fb270011bd58c7bed5
|
||||
|
||||
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
|
||||
// pointers. `ns_view_` gets reinitialized later in this method.
|
||||
@@ -1568,8 +1570,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1567,8 +1569,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -185,7 +185,7 @@ index d616c812f099505783ad7aed5e0ebfe7d15ea553..66c8dda8af5605fb270011bd58c7bed5
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1613,9 +1617,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1612,9 +1616,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -197,7 +197,7 @@ index d616c812f099505783ad7aed5e0ebfe7d15ea553..66c8dda8af5605fb270011bd58c7bed5
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2117,12 +2123,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2116,12 +2122,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
|
||||
@@ -148,7 +148,7 @@ index 2c5387fbdcac4b33df770fcd37b050121d0b9b38..a4c2867b4bb6c2c2dcd6565873ccccd9
|
||||
|
||||
base::WeakPtr<BluetoothLowEnergyAdapterApple>
|
||||
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
|
||||
index f892054d85a0acb6cff3ac88214c9402caf4341a..e361a333d6a11e945dc9d2fd4a7651d5a78d2986 100644
|
||||
index 2f7b9f4fb591f92fc570a271cf7e557f0dce00f7..209d356ea8562f5af4d64c9a7699a7c4f67526e2 100644
|
||||
--- a/media/audio/mac/audio_manager_mac.cc
|
||||
+++ b/media/audio/mac/audio_manager_mac.cc
|
||||
@@ -969,7 +969,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
|
||||
|
||||
@@ -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 2800a880bbc12cc4fa2c1b21c2ae47f55800f4e9..a985d4a9b1f005c965fc0ec9076e9648bc1ff7c3 100644
|
||||
index 069dc5d5848ebcf2812fe74f55b577c65496ae2f..1776f32fde50f96c8aeaa26044791a9dd6c5f821 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -138,6 +138,11 @@
|
||||
@@ -22,7 +22,7 @@ index 2800a880bbc12cc4fa2c1b21c2ae47f55800f4e9..a985d4a9b1f005c965fc0ec9076e9648
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
|
||||
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
|
||||
@@ -418,6 +423,91 @@ bool GetFullDataFilePath(
|
||||
@@ -430,6 +435,99 @@ bool GetFullDataFilePath(
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -85,6 +85,14 @@ index 2800a880bbc12cc4fa2c1b21c2ae47f55800f4e9..a985d4a9b1f005c965fc0ec9076e9648
|
||||
+ upstream_->SetConfig(config);
|
||||
+ }
|
||||
+
|
||||
+ void AddObserver(CertVerifier::Observer* observer) override {
|
||||
+ upstream_->AddObserver(observer);
|
||||
+ }
|
||||
+
|
||||
+ void RemoveObserver(CertVerifier::Observer* observer) override {
|
||||
+ upstream_->RemoveObserver(observer);
|
||||
+ }
|
||||
+
|
||||
+ void OnRequestFinished(const RequestParams& params,
|
||||
+ net::CompletionOnceCallback callback,
|
||||
+ net::CertVerifyResult* verify_result,
|
||||
@@ -114,7 +122,7 @@ index 2800a880bbc12cc4fa2c1b21c2ae47f55800f4e9..a985d4a9b1f005c965fc0ec9076e9648
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -718,6 +808,13 @@ void NetworkContext::SetClient(
|
||||
@@ -730,6 +828,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -128,7 +136,7 @@ index 2800a880bbc12cc4fa2c1b21c2ae47f55800f4e9..a985d4a9b1f005c965fc0ec9076e9648
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2237,6 +2334,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2251,6 +2356,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -169,10 +177,10 @@ index 621217cd962c9d9452ee77fc791d450fd508f0d1..9812aef784d8aa1e57a91b4adfeb25be
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
// Map values set to non-null only if that HostResolver has its own private
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index f32ad0616a72ff96fefc0540ec9ccefe59f1e228..0d2ff1f52aa217aef66e6b9c10bbb119f9f622e3 100644
|
||||
index 6bfc03fd0022abb0d7c502f61badbe18c79ef252..246545e11f663d07c1095d3ffea87e926b69dfbb 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -293,6 +293,17 @@ struct NetworkContextFilePaths {
|
||||
@@ -297,6 +297,17 @@ struct NetworkContextFilePaths {
|
||||
bool trigger_migration = false;
|
||||
};
|
||||
|
||||
@@ -190,7 +198,7 @@ index f32ad0616a72ff96fefc0540ec9ccefe59f1e228..0d2ff1f52aa217aef66e6b9c10bbb119
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -837,6 +848,9 @@ interface NetworkContext {
|
||||
@@ -848,6 +859,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
||||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
|
||||
index 52320d02883b51f40a0f21b19245303e32b62336..8b946da457a468c14cc57ff46e019558ef230304 100644
|
||||
index 015a88ea44e7eb60c89680e032f43b5e16d6daa1..9302b3f44e0797e3453e27ae204924cf2fa3b2b0 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -349,6 +349,10 @@
|
||||
@@ -355,6 +355,10 @@
|
||||
E_CPONLY(kColorScrollbarThumbInactive) \
|
||||
E_CPONLY(kColorScrollbarThumbPressed) \
|
||||
E_CPONLY(kColorScrollbarTrack) \
|
||||
@@ -22,7 +22,7 @@ index 52320d02883b51f40a0f21b19245303e32b62336..8b946da457a468c14cc57ff46e019558
|
||||
E_CPONLY(kColorSeparator) \
|
||||
E_CPONLY(kColorShadowBase) \
|
||||
E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \
|
||||
@@ -420,6 +424,7 @@
|
||||
@@ -428,6 +432,7 @@
|
||||
E_CPONLY(kColorTreeNodeForeground) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
|
||||
@@ -31,10 +31,10 @@ index 52320d02883b51f40a0f21b19245303e32b62336..8b946da457a468c14cc57ff46e019558
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
|
||||
index 59a9de51f69245553b3868c3f54078bd0b92d5f7..3189ea61033f1fef6006ef59768b84f13e910a90 100644
|
||||
index e52dd23cef1ea6cc2b61f51650b94de382683cc0..8b103d7d5a6ed860cb76d3ca7e23bb2e9d835993 100644
|
||||
--- a/ui/color/ui_color_mixer.cc
|
||||
+++ b/ui/color/ui_color_mixer.cc
|
||||
@@ -203,6 +203,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -206,6 +206,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
: SkColorSetA(SK_ColorBLACK, 0x80)};
|
||||
mixer[kColorScrollbarTrack] = {dark_mode ? SkColorSetRGB(0x42, 0x42, 0x42)
|
||||
: SkColorSetRGB(0xF1, 0xF1, 0xF1)};
|
||||
@@ -52,7 +52,7 @@ index 59a9de51f69245553b3868c3f54078bd0b92d5f7..3189ea61033f1fef6006ef59768b84f1
|
||||
mixer[kColorSeparator] = {kColorMidground};
|
||||
mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800};
|
||||
mixer[kColorShadowValueAmbientShadowElevationThree] =
|
||||
@@ -298,6 +309,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -303,6 +314,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground};
|
||||
mixer[kColorTreeNodeForegroundSelectedUnfocused] = {
|
||||
kColorTreeNodeForegroundSelectedFocused};
|
||||
|
||||
@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
|
||||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index fb14019e74fa80a2d4479cdf04e99702d66591c7..4281492ef2eed313ce0500573fbbab37c0972575 100644
|
||||
index 82b4978f1b4610650a15d7ecb3063de0e1f13183..972be1b245da8b82af4e475704efd6a971166451 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -978,7 +978,6 @@ if (is_win) {
|
||||
@@ -78,7 +78,7 @@ index b496ff49232f449fd6cea9dc1927b833c049497b..4c12ca65c1f800ddbbb792716f09f63f
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e54513cd0c 100644
|
||||
index 09631359ec7b2084641c729cff68401d734d994c..899c895f8f1e3883b80771e21290bbbe0f63f12e 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
@@ -249,11 +249,27 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
+#endif
|
||||
+#endif // Printing is always enabled.
|
||||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -654,7 +690,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -634,6 +670,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
+#if 0 // Printing is always enabled.
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
|
||||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
@@ -648,6 +685,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+#endif // Printing is always enabled.
|
||||
|
||||
mojom::PrintPagesParamsPtr settings = mojom::PrintPagesParams::New();
|
||||
settings->pages = GetPageRangesFromJobSettings(job_settings);
|
||||
@@ -669,7 +707,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -262,7 +278,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -670,14 +706,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -685,14 +723,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
|
||||
@@ -279,7 +295,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -715,6 +751,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -730,6 +768,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
@@ -287,7 +303,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
// `PrintingFailed()` can occur because asynchronous compositing results
|
||||
// don't complete until after a print job has already failed and been
|
||||
// destroyed. In such cases the error notification to the user will
|
||||
@@ -724,7 +761,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -739,7 +778,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
@@ -296,7 +312,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -736,15 +773,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
@@ -751,15 +790,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
@@ -321,7 +337,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -796,7 +842,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -811,7 +859,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
// Printing is done, we don't need it anymore.
|
||||
// print_job_->is_job_pending() may still be true, depending on the order
|
||||
// of object registration.
|
||||
@@ -335,7 +351,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -805,9 +856,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -820,9 +873,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
@@ -347,7 +363,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -817,7 +869,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -832,7 +886,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
@@ -356,7 +372,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -865,7 +917,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -880,7 +934,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -368,7 +384,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -886,7 +941,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -901,7 +958,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
@@ -377,7 +393,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -948,6 +1003,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -963,6 +1020,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -389,7 +405,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -955,7 +1015,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -970,7 +1032,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
@@ -398,7 +414,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -997,7 +1057,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1012,7 +1074,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -407,7 +423,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1105,7 +1165,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
@@ -1120,7 +1182,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -416,7 +432,7 @@ index 7df5210a39cd01868709e994dba823d022474aa0..e6080ba8cfb2b99e48a8f6de25c339e5
|
||||
|
||||
for (auto& observer : GetObservers())
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -1153,7 +1213,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
@@ -1168,7 +1230,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
bool allowed) {
|
||||
if (!allowed || !printing_rfh_ || IsCrashed() ||
|
||||
!printing_rfh_->IsRenderFrameLive()) {
|
||||
@@ -500,10 +516,10 @@ index 5aec0843d4882155d109f9d2d639e4f52f0e5bd2..2bdfbb8f020814b13efca34d13d570dc
|
||||
// Indication that the job is getting canceled.
|
||||
bool canceling_job_ = false;
|
||||
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
|
||||
index 7f77a94ddcdbc8598d3690a8fe53325e91cf143a..4e22d889daaebc50b2e910fb53ba578422470c8f 100644
|
||||
index 53e3de608b6770ce096603e8e0e8c28e272c2435..613957730f0c09eceae076139311affb6154873e 100644
|
||||
--- a/chrome/browser/printing/printer_query.cc
|
||||
+++ b/chrome/browser/printing/printer_query.cc
|
||||
@@ -306,17 +306,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
|
||||
@@ -338,17 +338,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
|
||||
#endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
|
||||
}
|
||||
|
||||
@@ -579,10 +595,10 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3
|
||||
mojom::PrintFailureReason reason) override;
|
||||
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index c440ebb5c43d7d6bd6aa1a32aad77980644f9f3e..6a1872f69998fb7dbcef048eb580fdf908c6f8af 100644
|
||||
index 82f44b6c90f292772b56253a99578394b5cc2881..91ee0c3d66c33adee346060a0ecd931d3dc282a2 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -288,7 +288,7 @@ union PrintWithParamsResult {
|
||||
@@ -292,7 +292,7 @@ union PrintWithParamsResult {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
@@ -591,7 +607,7 @@ index c440ebb5c43d7d6bd6aa1a32aad77980644f9f3e..6a1872f69998fb7dbcef048eb580fdf9
|
||||
|
||||
// Requests the frame to be printed with specified parameters. This is used
|
||||
// to programmatically produce PDF by request from the browser (e.g. over
|
||||
@@ -380,7 +380,10 @@ interface PrintManagerHost {
|
||||
@@ -384,7 +384,10 @@ interface PrintManagerHost {
|
||||
// UI to the user to select the final print settings. If the user cancels or
|
||||
// an error occurs, return null.
|
||||
[Sync]
|
||||
@@ -604,7 +620,7 @@ index c440ebb5c43d7d6bd6aa1a32aad77980644f9f3e..6a1872f69998fb7dbcef048eb580fdf9
|
||||
// Tells the browser printing failed.
|
||||
PrintingFailed(int32 cookie, PrintFailureReason reason);
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 3e98d89aa80f0c2907930c1ee6c4f65de6d9e3ee..f7ea78767b8f3b0bb28aa6fa942b0ae05ea84599 100644
|
||||
index f1e72946e69e8e12d0436366587648b683d9f4f8..2c7db9c160ac200a2abf671c9b01a24acba4207a 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
@@ -709,7 +725,7 @@ index 3e98d89aa80f0c2907930c1ee6c4f65de6d9e3ee..f7ea78767b8f3b0bb28aa6fa942b0ae0
|
||||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2402,35 +2417,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2401,35 +2416,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,7 +783,7 @@ index 3e98d89aa80f0c2907930c1ee6c4f65de6d9e3ee..f7ea78767b8f3b0bb28aa6fa942b0ae0
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2534,7 +2561,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2533,7 +2560,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
@@ -818,10 +834,10 @@ index 146fbcb2e6bd4348110ecc3220d6ac0ac59babf3..eecc3118033ef7fe1f17aba48cd19b17
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 0acd4095c9fefff8b00f1a1c889eafa3c6807c12..3b1d9b1a41903d57e65517a046f30b11873b8b73 100644
|
||||
index 8f8eb52718f3f91779158bd203ad0e2dfa0e143d..6b988eeae6411649bc35321dd22805a5c5439fb5 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2850,8 +2850,9 @@ source_set("browser") {
|
||||
@@ -2852,8 +2852,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index d164a86023ceb2718dfefce23d0a9fc910150f0e..a6c12048023a42192894f46efd90ff197f80e1fa 100644
|
||||
index 0d66b297f64af9f3bc2d4aab0e7a285fff9507cc..bc4e729b4ef82f9b995e24f3764ad301c8efa183 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2046,6 +2046,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -2055,6 +2055,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(cursor);
|
||||
@@ -43,10 +43,10 @@ index d164a86023ceb2718dfefce23d0a9fc910150f0e..a6c12048023a42192894f46efd90ff19
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ac1fcc365e9bb093b4c45319f1d1f4cb2e79b818..1dafd9c9d934e19284279fb24e8488c086b20d4c 100644
|
||||
index aa75360ee5fc3dc6b4a0c5fcf864c9488635f563..a31e2cf63bcd3f9f9b4e5e5b59494feb0e1204d5 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4748,6 +4748,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4752,6 +4752,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ index ac1fcc365e9bb093b4c45319f1d1f4cb2e79b818..1dafd9c9d934e19284279fb24e8488c0
|
||||
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 ef2b993557845e3599b6e2f06080921cb8adb02a..7c29db598d073a42274193e274f8314b6080286d 100644
|
||||
index cebf67d16dff164ee75677200824e50fdcdbbe85..b43205b4dea3ab0201085cd4d63c6b3a4fa78238 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -973,6 +973,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -971,6 +971,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 6f3cb93b972c0d51f03eb361e99d5a078171878e..7c3a9357e6155e841215fd73ce9b71cbd688b676 100644
|
||||
index aa1284baec17bb01828afd0c61735ed29ae8d851..50a1715278cb1bbc25bd2270860b41229e884000 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1577,7 +1577,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1585,7 +1585,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 6f3cb93b972c0d51f03eb361e99d5a078171878e..7c3a9357e6155e841215fd73ce9b71cb
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1606,6 +1606,12 @@ if (!is_android) {
|
||||
@@ -1614,6 +1614,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Wed, 8 Mar 2023 14:10:53 -0600
|
||||
Subject: Revert "Roll clang+rust llvmorg-16-init-17653-g39da55e8-3 :
|
||||
llvmorg-17-init-2082-g6d4a674a-1 / [skipping Rust]"
|
||||
|
||||
This reverts commit eb840ac593ad7af941acf510ea6ce84c48bde748.
|
||||
|
||||
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
|
||||
index d32d7d0e9dd960cde356481d208672d97dac0655..69bffc4c243a0ab31cd1c3877b7001ea6622a052 100644
|
||||
--- a/build/toolchain/toolchain.gni
|
||||
+++ b/build/toolchain/toolchain.gni
|
||||
@@ -38,7 +38,12 @@ if (generate_linker_map) {
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
- clang_version = "17"
|
||||
+ if (llvm_force_head_revision) {
|
||||
+ clang_version = "17"
|
||||
+ } else {
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ clang_version = "16"
|
||||
+ }
|
||||
}
|
||||
|
||||
# Extension for shared library files (including leading dot).
|
||||
diff --git a/tools/clang/scripts/build.py b/tools/clang/scripts/build.py
|
||||
index 2dc93235a96d610b0bdfa9cad2c4be36df18b96f..392eb396c124a2e4179522d3f8d08ad0bbd6df6d 100755
|
||||
--- a/tools/clang/scripts/build.py
|
||||
+++ b/tools/clang/scripts/build.py
|
||||
@@ -595,6 +595,15 @@ def main():
|
||||
|
||||
global CLANG_REVISION, PACKAGE_VERSION, LLVM_BUILD_DIR
|
||||
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ if args.llvm_force_head_revision:
|
||||
+ global RELEASE_VERSION
|
||||
+ RELEASE_VERSION = '17'
|
||||
+ old_lib_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', '16.0.0')
|
||||
+ if (os.path.isdir(old_lib_dir)):
|
||||
+ print('Removing old lib dir: ', old_lib_dir)
|
||||
+ RmTree(old_lib_dir)
|
||||
+
|
||||
if (args.pgo or args.thinlto) and not args.bootstrap:
|
||||
print('--pgo/--thinlto requires --bootstrap')
|
||||
return 1
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index eb513199556f9f13819fb4e20617182195f3e748..34ea16b0401205397d8bc78a3ef8f1d6fc573b67 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -35,11 +35,12 @@ import zlib
|
||||
# https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang.md
|
||||
# Reverting problematic clang rolls is safe, though.
|
||||
# This is the output of `git describe` and is usable as a commit-ish.
|
||||
-CLANG_REVISION = 'llvmorg-17-init-4759-g547e3456'
|
||||
-CLANG_SUB_REVISION = 1
|
||||
+CLANG_REVISION = 'llvmorg-16-init-17653-g39da55e8'
|
||||
+CLANG_SUB_REVISION = 3
|
||||
|
||||
PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
|
||||
-RELEASE_VERSION = '17'
|
||||
+RELEASE_VERSION = '16'
|
||||
+# TODO(crbug.com/1410101): Bump to 17 in next Clang roll.
|
||||
|
||||
CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE',
|
||||
'https://commondatastorage.googleapis.com/chromium-browser-clang')
|
||||
@@ -332,6 +333,11 @@ def main():
|
||||
help='Verify that clang has the passed-in version.')
|
||||
args = parser.parse_args()
|
||||
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ if args.llvm_force_head_revision:
|
||||
+ global RELEASE_VERSION
|
||||
+ RELEASE_VERSION = '17'
|
||||
+
|
||||
if args.verify_version and args.verify_version != RELEASE_VERSION:
|
||||
print('RELEASE_VERSION is %s but --verify-version argument was %s.' % (
|
||||
RELEASE_VERSION, args.verify_version))
|
||||
@@ -0,0 +1,240 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: David Sanders <dsanders11@ucsbalum.com>
|
||||
Date: Sun, 2 Apr 2023 05:52:30 -0700
|
||||
Subject: Revert "[X11] Keep WindowCache alive for a time interval"
|
||||
|
||||
This reverts commit bbc20a9c1b91ac6d6035408748091369cc96d4d7.
|
||||
|
||||
While intended as a performance improvement, the commit breaks
|
||||
Views menus on X11 after certain window events such as resizing,
|
||||
or maximizing and unmaximizing.
|
||||
|
||||
The patch can be removed once the upstream issue is fixed. That
|
||||
was reported in https://crbug.com/1429935.
|
||||
|
||||
diff --git a/ui/base/x/x11_whole_screen_move_loop.cc b/ui/base/x/x11_whole_screen_move_loop.cc
|
||||
index 08e1c09749c5c39d99deec75c1a914c43936a6a5..ccd4785415a743a9519e750d5f0e334632058654 100644
|
||||
--- a/ui/base/x/x11_whole_screen_move_loop.cc
|
||||
+++ b/ui/base/x/x11_whole_screen_move_loop.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "ui/events/x/x11_event_translation.h"
|
||||
#include "ui/gfx/x/connection.h"
|
||||
#include "ui/gfx/x/keysyms/keysyms.h"
|
||||
+#include "ui/gfx/x/window_cache.h"
|
||||
#include "ui/gfx/x/x11_window_event_manager.h"
|
||||
#include "ui/gfx/x/xproto.h"
|
||||
|
||||
@@ -150,6 +151,10 @@ bool X11WholeScreenMoveLoop::RunMoveLoop(
|
||||
auto* connection = x11::Connection::Get();
|
||||
CreateDragInputWindow(connection);
|
||||
|
||||
+ // Keep a window cache alive for the duration of the drag so that the drop
|
||||
+ // target under the drag window can be quickly determined.
|
||||
+ x11::WindowCache cache(connection, connection->default_root(), true);
|
||||
+
|
||||
// Only grab mouse capture of |grab_input_window_| if |can_grab_pointer| is
|
||||
// true aka the source that initiated the move loop doesn't have explicit
|
||||
// grab.
|
||||
diff --git a/ui/gfx/x/window_cache.cc b/ui/gfx/x/window_cache.cc
|
||||
index 9c603366a657954b4be44d0a30fcf428265f95e7..03885b55354c37e04bc016b509ac2ae8bd6191c2 100644
|
||||
--- a/ui/gfx/x/window_cache.cc
|
||||
+++ b/ui/gfx/x/window_cache.cc
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "base/notreached.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/run_loop.h"
|
||||
-#include "base/task/single_thread_task_runner.h"
|
||||
-#include "base/time/time.h"
|
||||
#include "ui/gfx/geometry/insets.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/geometry/vector2d.h"
|
||||
@@ -24,23 +22,19 @@
|
||||
|
||||
namespace x11 {
|
||||
|
||||
-const base::TimeDelta kDestroyTimerInterval = base::Seconds(3);
|
||||
-
|
||||
Window GetWindowAtPoint(const gfx::Point& point_px,
|
||||
const base::flat_set<Window>* ignore) {
|
||||
auto* connection = Connection::Get();
|
||||
Window root = connection->default_root();
|
||||
|
||||
- if (!WindowCache::instance()) {
|
||||
- auto instance =
|
||||
- std::make_unique<WindowCache>(connection, connection->default_root());
|
||||
- auto* cache = instance.get();
|
||||
- cache->BeginDestroyTimer(std::move(instance));
|
||||
+ if (auto* instance = WindowCache::instance()) {
|
||||
+ instance->WaitUntilReady();
|
||||
+ return instance->GetWindowAtPoint(point_px, root, ignore);
|
||||
}
|
||||
|
||||
- auto* instance = WindowCache::instance();
|
||||
- instance->WaitUntilReady();
|
||||
- return instance->GetWindowAtPoint(point_px, root, ignore);
|
||||
+ WindowCache cache(connection, connection->default_root(), false);
|
||||
+ cache.WaitUntilReady();
|
||||
+ return cache.GetWindowAtPoint(point_px, root, ignore);
|
||||
}
|
||||
|
||||
ScopedShapeEventSelector::ScopedShapeEventSelector(Connection* connection,
|
||||
@@ -62,21 +56,24 @@ WindowCache::WindowInfo::~WindowInfo() = default;
|
||||
// static
|
||||
WindowCache* WindowCache::instance_ = nullptr;
|
||||
|
||||
-WindowCache::WindowCache(Connection* connection, Window root)
|
||||
+WindowCache::WindowCache(Connection* connection, Window root, bool track_events)
|
||||
: connection_(connection),
|
||||
root_(root),
|
||||
+ track_events_(track_events),
|
||||
gtk_frame_extents_(GetAtom("_GTK_FRAME_EXTENTS")) {
|
||||
DCHECK(!instance_) << "Only one WindowCache should be active at a time";
|
||||
instance_ = this;
|
||||
|
||||
connection_->AddEventObserver(this);
|
||||
|
||||
- // We select for SubstructureNotify events on all windows (to receive
|
||||
- // CreateNotify events), which will cause events to be sent for all child
|
||||
- // windows. This means we need to additionally select for StructureNotify
|
||||
- // changes for the root window.
|
||||
- root_events_ =
|
||||
- std::make_unique<XScopedEventSelector>(root_, EventMask::StructureNotify);
|
||||
+ if (track_events_) {
|
||||
+ // We select for SubstructureNotify events on all windows (to receive
|
||||
+ // CreateNotify events), which will cause events to be sent for all child
|
||||
+ // windows. This means we need to additionally select for StructureNotify
|
||||
+ // changes for the root window.
|
||||
+ root_events_ = std::make_unique<XScopedEventSelector>(
|
||||
+ root_, EventMask::StructureNotify);
|
||||
+ }
|
||||
AddWindow(root_, Window::None);
|
||||
}
|
||||
|
||||
@@ -106,16 +103,6 @@ void WindowCache::WaitUntilReady() {
|
||||
last_processed_event_ = events[event - 1].sequence();
|
||||
}
|
||||
|
||||
-void WindowCache::BeginDestroyTimer(std::unique_ptr<WindowCache> self) {
|
||||
- DCHECK_EQ(this, self.get());
|
||||
- delete_when_destroy_timer_fires_ = false;
|
||||
- base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask(
|
||||
- FROM_HERE,
|
||||
- base::BindOnce(&WindowCache::OnDestroyTimerExpired,
|
||||
- base::Unretained(this), std::move(self)),
|
||||
- kDestroyTimerInterval);
|
||||
-}
|
||||
-
|
||||
void WindowCache::SyncForTest() {
|
||||
do {
|
||||
// Perform a blocking sync to prevent spinning while waiting for replies.
|
||||
@@ -127,7 +114,6 @@ void WindowCache::SyncForTest() {
|
||||
Window WindowCache::GetWindowAtPoint(gfx::Point point_px,
|
||||
Window window,
|
||||
const base::flat_set<Window>* ignore) {
|
||||
- delete_when_destroy_timer_fires_ = true;
|
||||
if (ignore && ignore->contains(window))
|
||||
return Window::None;
|
||||
auto* info = GetInfo(window);
|
||||
@@ -265,10 +251,12 @@ void WindowCache::AddWindow(Window window, Window parent) {
|
||||
return;
|
||||
WindowInfo& info = windows_[window];
|
||||
info.parent = parent;
|
||||
- // Events must be selected before getting the initial window info to
|
||||
- // prevent race conditions.
|
||||
- info.events = std::make_unique<XScopedEventSelector>(
|
||||
- window, EventMask::SubstructureNotify | EventMask::PropertyChange);
|
||||
+ if (track_events_) {
|
||||
+ // Events must be selected before getting the initial window info to
|
||||
+ // prevent race conditions.
|
||||
+ info.events = std::make_unique<XScopedEventSelector>(
|
||||
+ window, EventMask::SubstructureNotify | EventMask::PropertyChange);
|
||||
+ }
|
||||
|
||||
AddRequest(connection_->GetWindowAttributes(window),
|
||||
&WindowCache::OnGetWindowAttributesResponse, window);
|
||||
@@ -282,8 +270,10 @@ void WindowCache::AddWindow(Window window, Window parent) {
|
||||
|
||||
auto& shape = connection_->shape();
|
||||
if (shape.present()) {
|
||||
- info.shape_events =
|
||||
- std::make_unique<ScopedShapeEventSelector>(connection_, window);
|
||||
+ if (track_events_) {
|
||||
+ info.shape_events =
|
||||
+ std::make_unique<ScopedShapeEventSelector>(connection_, window);
|
||||
+ }
|
||||
|
||||
for (auto kind : {Shape::Sk::Bounding, Shape::Sk::Input}) {
|
||||
AddRequest(shape.GetRectangles(window, kind),
|
||||
@@ -391,11 +381,4 @@ void WindowCache::OnGetRectanglesResponse(
|
||||
}
|
||||
}
|
||||
|
||||
-void WindowCache::OnDestroyTimerExpired(std::unique_ptr<WindowCache> self) {
|
||||
- if (!delete_when_destroy_timer_fires_)
|
||||
- return; // destroy `this`
|
||||
-
|
||||
- BeginDestroyTimer(std::move(self));
|
||||
-}
|
||||
-
|
||||
} // namespace x11
|
||||
diff --git a/ui/gfx/x/window_cache.h b/ui/gfx/x/window_cache.h
|
||||
index f241d6c23855fad478813ff3029fa6a17d084d34..ebc05d311ed3719be98180086baae8230ec9c58e 100644
|
||||
--- a/ui/gfx/x/window_cache.h
|
||||
+++ b/ui/gfx/x/window_cache.h
|
||||
@@ -78,7 +78,7 @@ class COMPONENT_EXPORT(X11) WindowCache : public EventObserver {
|
||||
// If `track_events` is true, the WindowCache will keep the cache state synced
|
||||
// with the server's state over time. It may be set to false if the cache is
|
||||
// short-lived, if only a single GetWindowAtPoint call is made.
|
||||
- WindowCache(Connection* connection, Window root);
|
||||
+ WindowCache(Connection* connection, Window root, bool track_events);
|
||||
WindowCache(const WindowCache&) = delete;
|
||||
WindowCache& operator=(const WindowCache&) = delete;
|
||||
~WindowCache() override;
|
||||
@@ -92,10 +92,6 @@ class COMPONENT_EXPORT(X11) WindowCache : public EventObserver {
|
||||
// Blocks until all outstanding requests are processed.
|
||||
void WaitUntilReady();
|
||||
|
||||
- // Destroys |self| if no calls to GetWindowAtPoint() are made within
|
||||
- // a time window.
|
||||
- void BeginDestroyTimer(std::unique_ptr<WindowCache> self);
|
||||
-
|
||||
void SyncForTest();
|
||||
|
||||
const std::unordered_map<Window, WindowInfo>& windows() const {
|
||||
@@ -147,12 +143,11 @@ class COMPONENT_EXPORT(X11) WindowCache : public EventObserver {
|
||||
Shape::Sk kind,
|
||||
Shape::GetRectanglesResponse response);
|
||||
|
||||
- void OnDestroyTimerExpired(std::unique_ptr<WindowCache> self);
|
||||
-
|
||||
static WindowCache* instance_;
|
||||
|
||||
const raw_ptr<Connection> connection_;
|
||||
const Window root_;
|
||||
+ const bool track_events_;
|
||||
const Atom gtk_frame_extents_;
|
||||
std::unique_ptr<XScopedEventSelector> root_events_;
|
||||
|
||||
@@ -164,9 +159,6 @@ class COMPONENT_EXPORT(X11) WindowCache : public EventObserver {
|
||||
// processed in order.
|
||||
absl::optional<uint32_t> last_processed_event_;
|
||||
|
||||
- // True iff GetWindowAtPoint() was called since the last timer interval.
|
||||
- bool delete_when_destroy_timer_fires_ = false;
|
||||
-
|
||||
// Although only one instance of WindowCache may be created at a time, the
|
||||
// instance will be created and destroyed as needed, so WeakPtrs are still
|
||||
// necessary.
|
||||
diff --git a/ui/gfx/x/window_cache_unittest.cc b/ui/gfx/x/window_cache_unittest.cc
|
||||
index 2199ddac2577a33ff7a42f3d3752613cef00dd32..af0a2d3737c132b596096514b5ca4f572d6c9d64 100644
|
||||
--- a/ui/gfx/x/window_cache_unittest.cc
|
||||
+++ b/ui/gfx/x/window_cache_unittest.cc
|
||||
@@ -21,7 +21,7 @@ class WindowCacheTest : public testing::Test {
|
||||
protected:
|
||||
void ResetCache() {
|
||||
cache_.reset();
|
||||
- cache_ = std::make_unique<WindowCache>(connection_, root_);
|
||||
+ cache_ = std::make_unique<WindowCache>(connection_, root_, true);
|
||||
cache_->SyncForTest();
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ 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 2fdbc714c3f0f560820eaec4524b016dea2fa442..f250dce2397f67cce8b5ef6000da69a782b159ff 100644
|
||||
index dada815b4db9be5aa544967e636ce5ee5a66ee95..2f4e349c1f0767638446e48a4d222fa22027d0bb 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3202,6 +3202,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3206,6 +3206,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index 2fdbc714c3f0f560820eaec4524b016dea2fa442..f250dce2397f67cce8b5ef6000da69a7
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3212,6 +3219,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3216,6 +3223,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ index 2fdbc714c3f0f560820eaec4524b016dea2fa442..f250dce2397f67cce8b5ef6000da69a7
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index f020af02d53a493a7e8d6d234c0c6e4fb84a73b9..53795f61ac676ee1104ae4dc138c42d7315a40aa 100644
|
||||
index 8baf744895c941df36d770ad17fca925a1dfd45f..86cb0de1e87a444bdd8d00bc2a981a8abbb94234 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -96,10 +96,13 @@ class BrowserContext;
|
||||
|
||||
@@ -14,10 +14,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 79336d50231e352f83d3e06f35bacdfac0289f2a..150f03df689d44d627fbe8366bc997a5cdfedba5 100644
|
||||
index 46e8acf1267ffb24de71c4239121e787f5291fd4..02c97ca28910ae663d6a23b40773c7f70fefec9d 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -6911,6 +6911,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -6933,6 +6933,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ index b22591ee606ef449817aef1f9bd5ff0c024d1c05..a14c0e0a381ae838d44d4c7f2cc252c2
|
||||
import '../../ui/legacy/components/source_frame/source_frame-meta.js';
|
||||
import '../../panels/console_counters/console_counters-meta.js';
|
||||
diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn
|
||||
index fe5d16d9935cad8e78a050d8db10bb6b7b355eee..fd21618411a388c53a2a508663fb9349a51a6a58 100644
|
||||
index 95f598ae7f4c01012d61e78bb83887fca5ca50ab..35e963c4289b538561b78c5e84d0d411e4da43ba 100644
|
||||
--- a/front_end/ui/legacy/BUILD.gn
|
||||
+++ b/front_end/ui/legacy/BUILD.gn
|
||||
@@ -183,5 +183,6 @@ devtools_entrypoint("legacy") {
|
||||
@@ -184,5 +184,6 @@ devtools_entrypoint("legacy") {
|
||||
visibility = [
|
||||
"../..:legacy_entrypoints",
|
||||
"../../legacy_test_runner/*",
|
||||
|
||||
@@ -30,7 +30,7 @@ index a994221445471b92d12ed9cb3bef9ffb70670ab6..d6c6fd9c257cb51ba387c4b4d07a24ff
|
||||
Mutex::ScopedLock lock(node::per_process::cli_options_mutex);
|
||||
if (per_process::cli_options->get_per_isolate_options()
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 6ff7527d4fe4d126bda80615ffed75f77f700b86..5a849f047feca5d4d101c21c125e1c0500150077 100644
|
||||
index 03f55b0a1853c055eb6c709a8e7916c2a95672d3..47ac8c24ef5e26822f694b583767e850fc5f7d96 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -463,6 +463,8 @@ struct IsolateSettings {
|
||||
|
||||
@@ -1220,10 +1220,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
|
||||
+}
|
||||
diff --git a/filenames.json b/filenames.json
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3a600cbf16506cbf94919139b266b72d31e054c4
|
||||
index 0000000000000000000000000000000000000000..71173dd5c0958d473972dfb397f230df6309b413
|
||||
--- /dev/null
|
||||
+++ b/filenames.json
|
||||
@@ -0,0 +1,658 @@
|
||||
@@ -0,0 +1,659 @@
|
||||
+// This file is automatically generated by generate_gn_filenames_json.py
|
||||
+// DO NOT EDIT
|
||||
+{
|
||||
@@ -1286,6 +1286,7 @@ index 0000000000000000000000000000000000000000..3a600cbf16506cbf94919139b266b72d
|
||||
+ "//v8/include/v8-regexp.h",
|
||||
+ "//v8/include/v8-script.h",
|
||||
+ "//v8/include/v8-snapshot.h",
|
||||
+ "//v8/include/v8-source-location.h",
|
||||
+ "//v8/include/v8-statistics.h",
|
||||
+ "//v8/include/v8-template.h",
|
||||
+ "//v8/include/v8-traced-handle.h",
|
||||
@@ -2256,10 +2257,10 @@ index 0000000000000000000000000000000000000000..2a92eccfa582df361f2a889c0d9b32c1
|
||||
+
|
||||
+ out_file.writelines(new_contents)
|
||||
diff --git a/tools/install.py b/tools/install.py
|
||||
index 9d5f4a48bca2c926b3ffb3c51c070222d4f7ce7b..411bd956ce0d3ff47ba1c48ae932e2d21b78047a 100755
|
||||
index 9d5f4a48bca2c926b3ffb3c51c070222d4f7ce7b..c9ea9f67d3ccb213db3a5d149f0458987e855c08 100755
|
||||
--- a/tools/install.py
|
||||
+++ b/tools/install.py
|
||||
@@ -202,60 +202,73 @@ def files(action):
|
||||
@@ -202,60 +202,74 @@ def files(action):
|
||||
def headers(action):
|
||||
def wanted_v8_headers(files_arg, dest):
|
||||
v8_headers = [
|
||||
@@ -2363,6 +2364,7 @@ index 9d5f4a48bca2c926b3ffb3c51c070222d4f7ce7b..411bd956ce0d3ff47ba1c48ae932e2d2
|
||||
+ '../../v8/include/v8-regexp.h',
|
||||
+ '../../v8/include/v8-script.h',
|
||||
+ '../../v8/include/v8-snapshot.h',
|
||||
+ '../../v8/include/v8-source-location.h',
|
||||
+ '../../v8/include/v8-statistics.h',
|
||||
+ '../../v8/include/v8-template.h',
|
||||
+ '../../v8/include/v8-traced-handle.h',
|
||||
@@ -2386,7 +2388,7 @@ index 9d5f4a48bca2c926b3ffb3c51c070222d4f7ce7b..411bd956ce0d3ff47ba1c48ae932e2d2
|
||||
files_arg = [name for name in files_arg if name in v8_headers]
|
||||
action(files_arg, dest)
|
||||
|
||||
@@ -282,7 +295,7 @@ def headers(action):
|
||||
@@ -282,7 +296,7 @@ def headers(action):
|
||||
if sys.platform.startswith('aix'):
|
||||
action(['out/Release/node.exp'], 'include/node/')
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ index bfa20f5fc7a64b30b464327f4086a027e9a23359..f9d849260c3d7b1368d375125ae587ea
|
||||
o['variables']['v8_enable_javascript_promise_hooks'] = 1
|
||||
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 173e0bc669a2fd90e764da72e09003f4c7311fd7..6ff7527d4fe4d126bda80615ffed75f77f700b86 100644
|
||||
index 173e0bc669a2fd90e764da72e09003f4c7311fd7..03f55b0a1853c055eb6c709a8e7916c2a95672d3 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -22,6 +22,12 @@
|
||||
@@ -61,7 +61,7 @@ index 173e0bc669a2fd90e764da72e09003f4c7311fd7..6ff7527d4fe4d126bda80615ffed75f7
|
||||
|
||||
+#ifdef ELECTRON_ENSURE_CONFIG_GYPI
|
||||
+#ifndef USING_ELECTRON_CONFIG_GYPI
|
||||
+#error "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=8.4.0) if you're building modules directly."
|
||||
+#error "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
|
||||
@@ -61,7 +61,7 @@ index 1067dee74c8877d9a3a0da6527c4c37faf9bd15f..b550fd4aa8488c6d721db3dee94cc4ce
|
||||
}
|
||||
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 5a849f047feca5d4d101c21c125e1c0500150077..db9a9c5c54f176ffdfc67e045b970729341eee7f 100644
|
||||
index 47ac8c24ef5e26822f694b583767e850fc5f7d96..f1fb363becf1f1b3b3ef0b2782c6561d29aa7cbd 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -316,7 +316,7 @@ NODE_EXTERN int Start(int argc, char* argv[]);
|
||||
|
||||
@@ -9,10 +9,10 @@ necessary for native modules to load.
|
||||
Also, some fixes relating to mksnapshot on ARM.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 85945116f290306e64b123be618ba8c4daf0ccf5..cedc35c82c88afde901355eba3719f30790bb398 100644
|
||||
index cdbef4ad387b870edcc8aa8f48206a1d2cd8eadd..0463c2f85bf818732bcaf7a4d55a9f3751a79fa4 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -699,7 +699,7 @@ config("internal_config") {
|
||||
@@ -709,7 +709,7 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
@@ -21,7 +21,7 @@ index 85945116f290306e64b123be618ba8c4daf0ccf5..cedc35c82c88afde901355eba3719f30
|
||||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
@@ -6411,7 +6411,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6424,7 +6424,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: dcheck.patch
|
||||
https://github.com/auchenberg/volkswagen
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 81dfbb0abeea4c742afa179f174560aac56699b8..464d51bc4c8cc52c94557dec0db9e881578d849a 100644
|
||||
index 775840c88f6d50176ed9e732bcdae0e5d3e18a1f..db6231fc9e8e1fcfeaa4db138e4404d79a22d8af 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -9885,7 +9885,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
@@ -9886,7 +9886,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
}
|
||||
|
||||
void Isolate::PerformMicrotaskCheckpoint() {
|
||||
|
||||
@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
|
||||
contain any standard C++ library exports (e.g. `std::ostringstream`).
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 8662429ee167e514d3b47a302a171b9c4ab57aee..9b7255e56137dc1eee6c7c54b69e7324ae6fec0a 100644
|
||||
index 3d2ab189b4d9ac9c9d5db0db4d8a9d3e1c919c18..686d0b96902f152c34f0cd92703b1f6a7e3367f0 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -699,6 +699,10 @@ config("internal_config") {
|
||||
@@ -709,6 +709,10 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
|
||||
Needed in order to target mksnapshot for mksnapshot zip.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index cedc35c82c88afde901355eba3719f30790bb398..8662429ee167e514d3b47a302a171b9c4ab57aee 100644
|
||||
index 0463c2f85bf818732bcaf7a4d55a9f3751a79fa4..3d2ab189b4d9ac9c9d5db0db4d8a9d3e1c919c18 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -6423,7 +6423,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6436,7 +6436,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
||||
@@ -64,10 +64,24 @@ if (args.runners !== undefined) {
|
||||
async function main () {
|
||||
if (args.electronVersion) {
|
||||
const versions = await ElectronVersions.create();
|
||||
if (!versions.isVersion(args.electronVersion)) {
|
||||
if (args.electronVersion === 'latest') {
|
||||
args.electronVersion = versions.latest.version;
|
||||
} else if (args.electronVersion.startsWith('latest@')) {
|
||||
const majorVersion = parseInt(args.electronVersion.slice('latest@'.length));
|
||||
const ver = versions.inMajor(majorVersion).slice(-1)[0];
|
||||
if (ver) {
|
||||
args.electronVersion = ver.version;
|
||||
} else {
|
||||
console.log(`${fail} '${majorVersion}' is not a recognized Electron major version`);
|
||||
process.exit(1);
|
||||
}
|
||||
} else if (!versions.isVersion(args.electronVersion)) {
|
||||
console.log(`${fail} '${args.electronVersion}' is not a recognized Electron version`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const versionString = `v${args.electronVersion}`;
|
||||
console.log(`Running against Electron ${versionString.green}`);
|
||||
}
|
||||
|
||||
const [lastSpecHash, lastSpecInstallHash] = loadLastSpecHash();
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
{
|
||||
"bullseye_amd64": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "f631cf53b56adcf0d6231c9dfe72affb25516e85",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "39d343162ed5ed1cf5337e49917321e39eb424c7",
|
||||
"SysrootDir": "debian_bullseye_amd64-sysroot",
|
||||
"Tarball": "debian_bullseye_amd64_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_arm": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "0820cf8eadc2a2e396bacce35c27a7024ace62b1",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "4c378886e1fcab051e99c5e8c4f0b66f2f3fb738",
|
||||
"SysrootDir": "debian_bullseye_arm-sysroot",
|
||||
"Tarball": "debian_bullseye_arm_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_arm64": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "315c3a474cfcd020bc80fc8fb12bac828b542789",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "2354ab6674a0725d0c4f304b47f908eba6e3b8c7",
|
||||
"SysrootDir": "debian_bullseye_arm64-sysroot",
|
||||
"Tarball": "debian_bullseye_arm64_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_armel": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "55a8d4d9edafdbf9dd0d458665c3c287dd3559dc",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "933d6944cabe6bf2f9bc667ca52b258b52cd05e9",
|
||||
"SysrootDir": "debian_bullseye_armel-sysroot",
|
||||
"Tarball": "debian_bullseye_armel_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_i386": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "e26ddcc685b44db49c6fa5ed700961c539cf7e40",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "86c07fcc29a500e6ff24962c811ba82f806df00c",
|
||||
"SysrootDir": "debian_bullseye_i386-sysroot",
|
||||
"Tarball": "debian_bullseye_i386_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_mips": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "fc007fd293519d5c31d1dbf9961f32559603bde7",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "1b44b9ddfd3571acc17036866e0373120fd9aa03",
|
||||
"SysrootDir": "debian_bullseye_mips-sysroot",
|
||||
"Tarball": "debian_bullseye_mips_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_mips64el": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "d73dcddfc3cc7b0c5aa1a24ccda54809ba13983b",
|
||||
"Key": "20230329T085712Z-0",
|
||||
"Sha1Sum": "cd0803ae938dd75247f474feb299bcaa74fa2290",
|
||||
"SysrootDir": "debian_bullseye_mips64el-sysroot",
|
||||
"Tarball": "debian_bullseye_mips64el_sysroot.tar.xz"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
PushNotifications* g_push_notifications = nullptr;
|
||||
|
||||
@@ -55,9 +53,7 @@ const char* PushNotifications::GetTypeName() {
|
||||
return "PushNotifications";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "shell/browser/event_emitter_mixin.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class PushNotifications
|
||||
: public ElectronBrowserClient::Delegate,
|
||||
@@ -57,8 +55,6 @@ class PushNotifications
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PUSH_NOTIFICATIONS_H_
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
v8::Local<v8::Promise> PushNotifications::RegisterForAPNSNotifications(
|
||||
v8::Isolate* isolate) {
|
||||
@@ -57,6 +55,4 @@ void PushNotifications::OnDidReceiveAPNSNotification(
|
||||
Emit("received-apns-notification", user_info);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -115,10 +115,10 @@ v8::Local<v8::Value> ServiceWorkerContext::GetAllRunningWorkerInfo(
|
||||
gin::DataObjectBuilder builder(isolate);
|
||||
const base::flat_map<int64_t, content::ServiceWorkerRunningInfo>& info_map =
|
||||
service_worker_context_->GetRunningServiceWorkerInfos();
|
||||
for (auto iter = info_map.begin(); iter != info_map.end(); ++iter) {
|
||||
for (const auto& iter : info_map) {
|
||||
builder.Set(
|
||||
std::to_string(iter->first),
|
||||
ServiceWorkerRunningInfoToDict(isolate, std::move(iter->second)));
|
||||
std::to_string(iter.first),
|
||||
ServiceWorkerRunningInfoToDict(isolate, std::move(iter.second)));
|
||||
}
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
@@ -106,10 +106,10 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
||||
return;
|
||||
}
|
||||
if (io_handle == IOHandle::STDOUT) {
|
||||
fds_to_remap.push_back(std::make_pair(pipe_fd[1], STDOUT_FILENO));
|
||||
fds_to_remap.emplace_back(pipe_fd[1], STDOUT_FILENO);
|
||||
stdout_read_fd_ = pipe_fd[0];
|
||||
} else if (io_handle == IOHandle::STDERR) {
|
||||
fds_to_remap.push_back(std::make_pair(pipe_fd[1], STDERR_FILENO));
|
||||
fds_to_remap.emplace_back(pipe_fd[1], STDERR_FILENO);
|
||||
stderr_read_fd_ = pipe_fd[0];
|
||||
}
|
||||
#endif
|
||||
@@ -135,9 +135,9 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
||||
return;
|
||||
}
|
||||
if (io_handle == IOHandle::STDOUT) {
|
||||
fds_to_remap.push_back(std::make_pair(devnull, STDOUT_FILENO));
|
||||
fds_to_remap.emplace_back(devnull, STDOUT_FILENO);
|
||||
} else if (io_handle == IOHandle::STDERR) {
|
||||
fds_to_remap.push_back(std::make_pair(devnull, STDERR_FILENO));
|
||||
fds_to_remap.emplace_back(devnull, STDERR_FILENO);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -33,9 +33,7 @@ namespace base {
|
||||
class Process;
|
||||
} // namespace base
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class UtilityProcessWrapper
|
||||
: public gin::Wrappable<UtilityProcessWrapper>,
|
||||
@@ -93,8 +91,6 @@ class UtilityProcessWrapper
|
||||
base::WeakPtrFactory<UtilityProcessWrapper> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_UTILITY_PROCESS_H_
|
||||
|
||||
@@ -497,8 +497,7 @@ scoped_refptr<base::TaskRunner> CreatePrinterHandlerTaskRunner() {
|
||||
#elif BUILDFLAG(IS_WIN)
|
||||
// Windows drivers are likely not thread-safe and need to be accessed on the
|
||||
// UI thread.
|
||||
return content::GetUIThreadTaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::USER_VISIBLE});
|
||||
return content::GetUIThreadTaskRunner({base::TaskPriority::USER_VISIBLE});
|
||||
#else
|
||||
// Be conservative on unsupported platforms.
|
||||
return base::ThreadPool::CreateSingleThreadTaskRunner(kTraits);
|
||||
|
||||
@@ -240,8 +240,8 @@ std::vector<blink::MessagePortChannel> MessagePort::DisentanglePorts(
|
||||
// Passed-in ports passed validity checks, so we can disentangle them.
|
||||
std::vector<blink::MessagePortChannel> channels;
|
||||
channels.reserve(ports.size());
|
||||
for (unsigned i = 0; i < ports.size(); ++i)
|
||||
channels.push_back(ports[i]->Disentangle());
|
||||
for (auto port : ports)
|
||||
channels.push_back(port->Disentangle());
|
||||
return channels;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,12 +78,17 @@ ElectronManagementAPIDelegate::ElectronManagementAPIDelegate() = default;
|
||||
|
||||
ElectronManagementAPIDelegate::~ElectronManagementAPIDelegate() = default;
|
||||
|
||||
void ElectronManagementAPIDelegate::LaunchAppFunctionDelegate(
|
||||
bool ElectronManagementAPIDelegate::LaunchAppFunctionDelegate(
|
||||
const extensions::Extension* extension,
|
||||
content::BrowserContext* context) const {
|
||||
// Note: Chromium looks for an existing profile and determines whether
|
||||
// the user has set a launch preference
|
||||
// See: https://chromium-review.googlesource.com/c/chromium/src/+/4389621
|
||||
// For Electron, this should always return the default (true).
|
||||
// TODO(sentialx): emit event
|
||||
extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_EXTENSION_API,
|
||||
extension->GetType());
|
||||
return true;
|
||||
}
|
||||
|
||||
GURL ElectronManagementAPIDelegate::GetFullLaunchURL(
|
||||
|
||||
@@ -17,7 +17,7 @@ class ElectronManagementAPIDelegate : public extensions::ManagementAPIDelegate {
|
||||
~ElectronManagementAPIDelegate() override;
|
||||
|
||||
// ManagementAPIDelegate.
|
||||
void LaunchAppFunctionDelegate(
|
||||
bool LaunchAppFunctionDelegate(
|
||||
const extensions::Extension* extension,
|
||||
content::BrowserContext* context) const override;
|
||||
GURL GetFullLaunchURL(const extensions::Extension* extension) const override;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
||||
#include "chrome/common/extensions/api/resources_private.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
@@ -30,45 +31,6 @@
|
||||
|
||||
namespace extensions {
|
||||
|
||||
namespace {
|
||||
|
||||
void AddStringsForPdf(base::Value::Dict* dict) {
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
static constexpr webui::LocalizedString kPdfResources[] = {
|
||||
{"passwordDialogTitle", IDS_PDF_PASSWORD_DIALOG_TITLE},
|
||||
{"passwordPrompt", IDS_PDF_NEED_PASSWORD},
|
||||
{"passwordSubmit", IDS_PDF_PASSWORD_SUBMIT},
|
||||
{"thumbnailPageAriaLabel", IDS_PDF_THUMBNAIL_PAGE_ARIA_LABEL},
|
||||
{"passwordInvalid", IDS_PDF_PASSWORD_INVALID},
|
||||
{"pageLoading", IDS_PDF_PAGE_LOADING},
|
||||
{"pageLoadFailed", IDS_PDF_PAGE_LOAD_FAILED},
|
||||
{"errorDialogTitle", IDS_PDF_ERROR_DIALOG_TITLE},
|
||||
{"pageReload", IDS_PDF_PAGE_RELOAD_BUTTON},
|
||||
{"bookmarks", IDS_PDF_BOOKMARKS},
|
||||
{"labelPageNumber", IDS_PDF_LABEL_PAGE_NUMBER},
|
||||
{"tooltipDownload", IDS_PDF_TOOLTIP_DOWNLOAD},
|
||||
{"tooltipPrint", IDS_PDF_TOOLTIP_PRINT},
|
||||
{"tooltipFitToPage", IDS_PDF_TOOLTIP_FIT_PAGE},
|
||||
{"tooltipFitToWidth", IDS_PDF_TOOLTIP_FIT_WIDTH},
|
||||
{"tooltipZoomIn", IDS_PDF_TOOLTIP_ZOOM_IN},
|
||||
{"tooltipZoomOut", IDS_PDF_TOOLTIP_ZOOM_OUT},
|
||||
};
|
||||
for (const auto& resource : kPdfResources)
|
||||
dict->Set(resource.name, l10n_util::GetStringUTF16(resource.id));
|
||||
|
||||
dict->Set("presetZoomFactors", zoom::GetPresetZoomFactorsAsJSON());
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
}
|
||||
|
||||
void AddAdditionalDataForPdf(base::Value::Dict* dict) {
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
dict->Set("pdfAnnotationsEnabled", base::Value(false));
|
||||
dict->Set("printingEnabled", base::Value(true));
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace get_strings = api::resources_private::GetStrings;
|
||||
|
||||
ResourcesPrivateGetStringsFunction::ResourcesPrivateGetStringsFunction() =
|
||||
@@ -86,8 +48,11 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
|
||||
|
||||
switch (component) {
|
||||
case api::resources_private::COMPONENT_PDF:
|
||||
AddStringsForPdf(&dict);
|
||||
AddAdditionalDataForPdf(&dict);
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
pdf_extension_util::AddStrings(
|
||||
pdf_extension_util::PdfViewerContext::kPdfViewer, &dict);
|
||||
pdf_extension_util::AddAdditionalData(true, false, &dict);
|
||||
#endif
|
||||
break;
|
||||
case api::resources_private::COMPONENT_IDENTITY:
|
||||
NOTREACHED();
|
||||
|
||||
@@ -45,13 +45,13 @@ void ElectronRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {}
|
||||
bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
|
||||
const char* os = update_client::UpdateQueryParams::GetOS();
|
||||
if (strcmp(os, "mac") == 0) {
|
||||
info->os = extensions::api::runtime::PLATFORM_OS_MAC;
|
||||
info->os = extensions::api::runtime::PlatformOs::kMac;
|
||||
} else if (strcmp(os, "win") == 0) {
|
||||
info->os = extensions::api::runtime::PLATFORM_OS_WIN;
|
||||
info->os = extensions::api::runtime::PlatformOs::kWin;
|
||||
} else if (strcmp(os, "linux") == 0) {
|
||||
info->os = extensions::api::runtime::PLATFORM_OS_LINUX;
|
||||
info->os = extensions::api::runtime::PlatformOs::kLinux;
|
||||
} else if (strcmp(os, "openbsd") == 0) {
|
||||
info->os = extensions::api::runtime::PLATFORM_OS_OPENBSD;
|
||||
info->os = extensions::api::runtime::PlatformOs::kOpenbsd;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
@@ -59,13 +59,13 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
|
||||
|
||||
const char* arch = update_client::UpdateQueryParams::GetArch();
|
||||
if (strcmp(arch, "arm") == 0) {
|
||||
info->arch = extensions::api::runtime::PLATFORM_ARCH_ARM;
|
||||
info->arch = extensions::api::runtime::PlatformArch::kArm;
|
||||
} else if (strcmp(arch, "arm64") == 0) {
|
||||
info->arch = extensions::api::runtime::PLATFORM_ARCH_ARM64;
|
||||
info->arch = extensions::api::runtime::PlatformArch::kArm64;
|
||||
} else if (strcmp(arch, "x86") == 0) {
|
||||
info->arch = extensions::api::runtime::PLATFORM_ARCH_X86_32;
|
||||
info->arch = extensions::api::runtime::PlatformArch::kX86_32;
|
||||
} else if (strcmp(arch, "x64") == 0) {
|
||||
info->arch = extensions::api::runtime::PLATFORM_ARCH_X86_64;
|
||||
info->arch = extensions::api::runtime::PlatformArch::kX86_64;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
@@ -73,14 +73,14 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
|
||||
|
||||
const char* nacl_arch = update_client::UpdateQueryParams::GetNaclArch();
|
||||
if (strcmp(nacl_arch, "arm") == 0) {
|
||||
info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_ARM;
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm;
|
||||
} else if (strcmp(nacl_arch, "arm64") == 0) {
|
||||
// Use ARM for ARM64 NaCl, as ARM64 NaCl is not available.
|
||||
info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_ARM;
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm;
|
||||
} else if (strcmp(nacl_arch, "x86-32") == 0) {
|
||||
info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_X86_32;
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_32;
|
||||
} else if (strcmp(nacl_arch, "x86-64") == 0) {
|
||||
info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_X86_64;
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_64;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
|
||||
@@ -99,8 +99,8 @@ bool RelaunchAppWithHelper(const base::FilePath& helper,
|
||||
|
||||
base::LaunchOptions options;
|
||||
#if BUILDFLAG(IS_POSIX)
|
||||
options.fds_to_remap.push_back(
|
||||
std::make_pair(pipe_write_fd.get(), internal::kRelauncherSyncFD));
|
||||
options.fds_to_remap.emplace_back(pipe_write_fd.get(),
|
||||
internal::kRelauncherSyncFD);
|
||||
base::Process process = base::LaunchProcess(relaunch_argv, options);
|
||||
#elif BUILDFLAG(IS_WIN)
|
||||
base::Process process = base::LaunchProcess(
|
||||
|
||||
@@ -82,8 +82,8 @@ int LaunchProgram(const StringVector& relauncher_args,
|
||||
|
||||
base::LaunchOptions options;
|
||||
options.new_process_group = true; // detach
|
||||
options.fds_to_remap.push_back(std::make_pair(devnull.get(), STDERR_FILENO));
|
||||
options.fds_to_remap.push_back(std::make_pair(devnull.get(), STDOUT_FILENO));
|
||||
options.fds_to_remap.emplace_back(devnull.get(), STDERR_FILENO);
|
||||
options.fds_to_remap.emplace_back(devnull.get(), STDOUT_FILENO);
|
||||
|
||||
base::Process process = base::LaunchProcess(argv, options);
|
||||
return process.IsValid() ? 0 : 1;
|
||||
|
||||
@@ -25,7 +25,6 @@ int ScopedDisableResize::disable_resize_ = 0;
|
||||
- (int64_t)_resizeDirectionForMouseLocation:(CGPoint)location;
|
||||
@end
|
||||
|
||||
#if IS_MAS_BUILD()
|
||||
// See components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@interface NSView (CRFrameViewAdditions)
|
||||
- (void)cr_mouseDownOnFrameView:(NSEvent*)event;
|
||||
@@ -40,10 +39,10 @@ MouseDownImpl g_nsnextstepframe_mousedown;
|
||||
|
||||
// This class is never instantiated, it's just a container for our swizzled
|
||||
// mouseDown method.
|
||||
@interface SwizzledMouseDownHolderClass : NSView
|
||||
@interface SwizzledMethodsClass : NSView
|
||||
@end
|
||||
|
||||
@implementation SwizzledMouseDownHolderClass
|
||||
@implementation SwizzledMethodsClass
|
||||
- (void)swiz_nsthemeframe_mouseDown:(NSEvent*)event {
|
||||
if ([self.window respondsToSelector:@selector(shell)]) {
|
||||
electron::NativeWindowMac* shell =
|
||||
@@ -64,22 +63,53 @@ MouseDownImpl g_nsnextstepframe_mousedown;
|
||||
g_nsnextstepframe_mousedown(self, @selector(mouseDown:), event);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)swiz_nsview_swipeWithEvent:(NSEvent*)event {
|
||||
if ([self.window respondsToSelector:@selector(shell)]) {
|
||||
electron::NativeWindowMac* shell =
|
||||
(electron::NativeWindowMac*)[(id)self.window shell];
|
||||
if (shell) {
|
||||
if (event.deltaY == 1.0) {
|
||||
shell->NotifyWindowSwipe("up");
|
||||
} else if (event.deltaX == -1.0) {
|
||||
shell->NotifyWindowSwipe("right");
|
||||
} else if (event.deltaY == -1.0) {
|
||||
shell->NotifyWindowSwipe("down");
|
||||
} else if (event.deltaX == 1.0) {
|
||||
shell->NotifyWindowSwipe("left");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
namespace {
|
||||
#if IS_MAS_BUILD()
|
||||
void SwizzleMouseDown(NSView* frame_view,
|
||||
SEL swiz_selector,
|
||||
MouseDownImpl* orig_impl) {
|
||||
Method original_mousedown =
|
||||
class_getInstanceMethod([frame_view class], @selector(mouseDown:));
|
||||
*orig_impl = (MouseDownImpl)method_getImplementation(original_mousedown);
|
||||
Method new_mousedown = class_getInstanceMethod(
|
||||
[SwizzledMouseDownHolderClass class], swiz_selector);
|
||||
Method new_mousedown =
|
||||
class_getInstanceMethod([SwizzledMethodsClass class], swiz_selector);
|
||||
method_setImplementation(original_mousedown,
|
||||
method_getImplementation(new_mousedown));
|
||||
}
|
||||
#else
|
||||
// components/remote_cocoa/app_shim/bridged_content_view.h overrides
|
||||
// swipeWithEvent, so we can't just override the implementation
|
||||
// in ElectronNSWindow like we do with for ex. rotateWithEvent.
|
||||
void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) {
|
||||
Method original_swipe_with_event =
|
||||
class_getInstanceMethod([view class], @selector(swipeWithEvent:));
|
||||
Method new_swipe_with_event =
|
||||
class_getInstanceMethod([SwizzledMethodsClass class], swiz_selector);
|
||||
method_setImplementation(original_swipe_with_event,
|
||||
method_getImplementation(new_swipe_with_event));
|
||||
}
|
||||
#endif
|
||||
} // namespace
|
||||
#endif // IS_MAS_BUILD
|
||||
|
||||
@implementation ElectronNSWindow
|
||||
|
||||
@@ -125,8 +155,10 @@ void SwizzleMouseDown(NSView* frame_view,
|
||||
&g_nsnextstepframe_mousedown);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NSView* view = [[self contentView] superview];
|
||||
SwizzleSwipeWithEvent(view, @selector(swiz_nsview_swipeWithEvent:));
|
||||
#endif // IS_MAS_BUILD
|
||||
|
||||
shell_ = shell;
|
||||
}
|
||||
return self;
|
||||
@@ -156,18 +188,6 @@ void SwizzleMouseDown(NSView* frame_view,
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
- (void)swipeWithEvent:(NSEvent*)event {
|
||||
if (event.deltaY == 1.0) {
|
||||
shell_->NotifyWindowSwipe("up");
|
||||
} else if (event.deltaX == -1.0) {
|
||||
shell_->NotifyWindowSwipe("right");
|
||||
} else if (event.deltaY == -1.0) {
|
||||
shell_->NotifyWindowSwipe("down");
|
||||
} else if (event.deltaX == 1.0) {
|
||||
shell_->NotifyWindowSwipe("left");
|
||||
}
|
||||
}
|
||||
|
||||
- (void)rotateWithEvent:(NSEvent*)event {
|
||||
shell_->NotifyWindowRotateGesture(event.rotation);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
#include "shell/browser/ui/gtk/menu_util.h"
|
||||
#include "ui/base/models/menu_model.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace gtkui {
|
||||
namespace electron::gtkui {
|
||||
|
||||
MenuGtk::MenuGtk(ui::MenuModel* model)
|
||||
: menu_model_(model), gtk_menu_(TakeGObject(gtk_menu_new())) {
|
||||
@@ -65,6 +63,4 @@ void MenuGtk::OnMenuItemActivated(GtkWidget* menu_item) {
|
||||
ExecuteCommand(model, id);
|
||||
}
|
||||
|
||||
} // namespace gtkui
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::gtkui
|
||||
|
||||
@@ -17,9 +17,7 @@ namespace ui {
|
||||
class MenuModel;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace gtkui {
|
||||
namespace electron::gtkui {
|
||||
|
||||
class MenuGtk {
|
||||
public:
|
||||
@@ -41,8 +39,6 @@ class MenuGtk {
|
||||
bool block_activation_ = false;
|
||||
};
|
||||
|
||||
} // namespace gtkui
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::gtkui
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "base/win/win_util.h"
|
||||
#include "base/win/windows_types.h"
|
||||
#include "base/win/wrapped_window_proc.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "shell/browser/ui/win/notify_icon.h"
|
||||
#include "ui/events/event_constants.h"
|
||||
#include "ui/events/win/system_event_state_lookup.h"
|
||||
|
||||
@@ -578,8 +578,7 @@ bool Converter<scoped_refptr<network::ResourceRequestBody>>::FromV8(
|
||||
return false;
|
||||
base::Value::List& list = list_value.GetList();
|
||||
*out = base::MakeRefCounted<network::ResourceRequestBody>();
|
||||
for (size_t i = 0; i < list.size(); ++i) {
|
||||
base::Value& dict_value = list[i];
|
||||
for (base::Value& dict_value : list) {
|
||||
if (!dict_value.is_dict())
|
||||
return false;
|
||||
base::Value::Dict& dict = dict_value.GetDict();
|
||||
|
||||
@@ -19,7 +19,7 @@ void ObjectCache::CacheProxiedObject(v8::Local<v8::Value> from,
|
||||
auto obj = from.As<v8::Object>();
|
||||
int hash = obj->GetIdentityHash();
|
||||
|
||||
proxy_map_[hash].push_front(std::make_pair(from, proxy_value));
|
||||
proxy_map_[hash].emplace_front(from, proxy_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,10 +241,29 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
global_destination_context.IsEmpty())
|
||||
return;
|
||||
context_bridge::ObjectCache object_cache;
|
||||
auto val =
|
||||
PassValueToOtherContext(global_source_context.Get(isolate),
|
||||
global_destination_context.Get(isolate),
|
||||
result, &object_cache, false, 0);
|
||||
v8::MaybeLocal<v8::Value> val;
|
||||
{
|
||||
v8::TryCatch try_catch(isolate);
|
||||
val = PassValueToOtherContext(
|
||||
global_source_context.Get(isolate),
|
||||
global_destination_context.Get(isolate), result, &object_cache,
|
||||
false, 0, BridgeErrorTarget::kDestination);
|
||||
if (try_catch.HasCaught()) {
|
||||
if (try_catch.Message().IsEmpty()) {
|
||||
proxied_promise->RejectWithErrorMessage(
|
||||
"An error was thrown while sending a promise result over "
|
||||
"the context bridge but it was not actually an Error "
|
||||
"object. This normally means that a promise was resolved "
|
||||
"with a value that is not supported by the Context "
|
||||
"Bridge.");
|
||||
} else {
|
||||
proxied_promise->Reject(
|
||||
v8::Exception::Error(try_catch.Message()->Get()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
DCHECK(!val.IsEmpty());
|
||||
if (!val.IsEmpty())
|
||||
proxied_promise->Resolve(val.ToLocalChecked());
|
||||
},
|
||||
@@ -268,10 +287,28 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
global_destination_context.IsEmpty())
|
||||
return;
|
||||
context_bridge::ObjectCache object_cache;
|
||||
auto val =
|
||||
PassValueToOtherContext(global_source_context.Get(isolate),
|
||||
global_destination_context.Get(isolate),
|
||||
result, &object_cache, false, 0);
|
||||
v8::MaybeLocal<v8::Value> val;
|
||||
{
|
||||
v8::TryCatch try_catch(isolate);
|
||||
val = PassValueToOtherContext(
|
||||
global_source_context.Get(isolate),
|
||||
global_destination_context.Get(isolate), result, &object_cache,
|
||||
false, 0, BridgeErrorTarget::kDestination);
|
||||
if (try_catch.HasCaught()) {
|
||||
if (try_catch.Message().IsEmpty()) {
|
||||
proxied_promise->RejectWithErrorMessage(
|
||||
"An error was thrown while sending a promise rejection "
|
||||
"over the context bridge but it was not actually an Error "
|
||||
"object. This normally means that a promise was rejected "
|
||||
"with a value that is not supported by the Context "
|
||||
"Bridge.");
|
||||
} else {
|
||||
proxied_promise->Reject(
|
||||
v8::Exception::Error(try_catch.Message()->Get()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!val.IsEmpty())
|
||||
proxied_promise->Reject(val.ToLocalChecked());
|
||||
},
|
||||
@@ -324,7 +361,7 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
auto value_for_array = PassValueToOtherContext(
|
||||
source_context, destination_context,
|
||||
arr->Get(source_context, i).ToLocalChecked(), object_cache,
|
||||
support_dynamic_properties, recursion_depth + 1);
|
||||
support_dynamic_properties, recursion_depth + 1, error_target);
|
||||
if (value_for_array.IsEmpty())
|
||||
return v8::MaybeLocal<v8::Value>();
|
||||
|
||||
@@ -358,7 +395,7 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
auto object_value = value.As<v8::Object>();
|
||||
auto passed_value = CreateProxyForAPI(
|
||||
object_value, source_context, destination_context, object_cache,
|
||||
support_dynamic_properties, recursion_depth + 1);
|
||||
support_dynamic_properties, recursion_depth + 1, error_target);
|
||||
if (passed_value.IsEmpty())
|
||||
return v8::MaybeLocal<v8::Value>();
|
||||
return v8::MaybeLocal<v8::Value>(passed_value.ToLocalChecked());
|
||||
@@ -372,8 +409,9 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
: destination_context;
|
||||
v8::Context::Scope error_scope(error_context);
|
||||
// V8 serializer will throw an error if required
|
||||
if (!gin::ConvertFromV8(error_context->GetIsolate(), value, &ret))
|
||||
if (!gin::ConvertFromV8(error_context->GetIsolate(), value, &ret)) {
|
||||
return v8::MaybeLocal<v8::Value>();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -420,9 +458,9 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
args.GetRemaining(&original_args);
|
||||
|
||||
for (auto value : original_args) {
|
||||
auto arg =
|
||||
PassValueToOtherContext(calling_context, func_owning_context, value,
|
||||
&object_cache, support_dynamic_properties, 0);
|
||||
auto arg = PassValueToOtherContext(
|
||||
calling_context, func_owning_context, value, &object_cache,
|
||||
support_dynamic_properties, 0, BridgeErrorTarget::kSource);
|
||||
if (arg.IsEmpty())
|
||||
return;
|
||||
proxied_args.push_back(arg.ToLocalChecked());
|
||||
@@ -469,10 +507,50 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
if (maybe_return_value.IsEmpty())
|
||||
return;
|
||||
|
||||
auto ret = PassValueToOtherContext(
|
||||
func_owning_context, calling_context,
|
||||
maybe_return_value.ToLocalChecked(), &object_cache,
|
||||
support_dynamic_properties, 0, BridgeErrorTarget::kDestination);
|
||||
// In the case where we encounted an exception converting the return value
|
||||
// of the function we need to ensure that the exception / thrown value is
|
||||
// safely transferred from the function_owning_context (where it was thrown)
|
||||
// into the calling_context (where it needs to be thrown) To do this we pull
|
||||
// the message off the exception and later re-throw it in the right context.
|
||||
// In some cases the caught thing is not an exception i.e. it's technically
|
||||
// valid to `throw 123`. In these cases to avoid infinite
|
||||
// PassValueToOtherContext recursion we bail early as being unable to send
|
||||
// the value from one context to the other.
|
||||
// TODO(MarshallOfSound): In this case and other cases where the error can't
|
||||
// be sent _across_ worlds we should probably log it globally in some way to
|
||||
// allow easier debugging. This is not trivial though so is left to a
|
||||
// future change.
|
||||
bool did_error_converting_result = false;
|
||||
v8::MaybeLocal<v8::Value> ret;
|
||||
v8::Local<v8::String> exception;
|
||||
{
|
||||
v8::TryCatch try_catch(args.isolate());
|
||||
ret = PassValueToOtherContext(func_owning_context, calling_context,
|
||||
maybe_return_value.ToLocalChecked(),
|
||||
&object_cache, support_dynamic_properties,
|
||||
0, BridgeErrorTarget::kDestination);
|
||||
if (try_catch.HasCaught()) {
|
||||
did_error_converting_result = true;
|
||||
if (!try_catch.Message().IsEmpty()) {
|
||||
exception = try_catch.Message()->Get();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (did_error_converting_result) {
|
||||
v8::Context::Scope calling_context_scope(calling_context);
|
||||
if (exception.IsEmpty()) {
|
||||
const char err_msg[] =
|
||||
"An unknown exception occurred while sending a function return "
|
||||
"value over the context bridge, an error "
|
||||
"occurred but a valid exception was not thrown.";
|
||||
args.isolate()->ThrowException(v8::Exception::Error(
|
||||
gin::StringToV8(args.isolate(), err_msg).As<v8::String>()));
|
||||
} else {
|
||||
args.isolate()->ThrowException(v8::Exception::Error(exception));
|
||||
}
|
||||
return;
|
||||
}
|
||||
DCHECK(!ret.IsEmpty());
|
||||
if (ret.IsEmpty())
|
||||
return;
|
||||
info.GetReturnValue().Set(ret.ToLocalChecked());
|
||||
@@ -485,7 +563,8 @@ v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
||||
const v8::Local<v8::Context>& destination_context,
|
||||
context_bridge::ObjectCache* object_cache,
|
||||
bool support_dynamic_properties,
|
||||
int recursion_depth) {
|
||||
int recursion_depth,
|
||||
BridgeErrorTarget error_target) {
|
||||
gin_helper::Dictionary api(source_context->GetIsolate(), api_object);
|
||||
|
||||
{
|
||||
@@ -526,14 +605,16 @@ v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
||||
if (!getter.IsEmpty()) {
|
||||
if (!PassValueToOtherContext(source_context, destination_context,
|
||||
getter, object_cache,
|
||||
support_dynamic_properties, 1)
|
||||
support_dynamic_properties, 1,
|
||||
error_target)
|
||||
.ToLocal(&getter_proxy))
|
||||
continue;
|
||||
}
|
||||
if (!setter.IsEmpty()) {
|
||||
if (!PassValueToOtherContext(source_context, destination_context,
|
||||
setter, object_cache,
|
||||
support_dynamic_properties, 1)
|
||||
support_dynamic_properties, 1,
|
||||
error_target)
|
||||
.ToLocal(&setter_proxy))
|
||||
continue;
|
||||
}
|
||||
@@ -551,7 +632,7 @@ v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
||||
|
||||
auto passed_value = PassValueToOtherContext(
|
||||
source_context, destination_context, value, object_cache,
|
||||
support_dynamic_properties, recursion_depth + 1);
|
||||
support_dynamic_properties, recursion_depth + 1, error_target);
|
||||
if (passed_value.IsEmpty())
|
||||
return v8::MaybeLocal<v8::Object>();
|
||||
proxy.Set(key, passed_value.ToLocalChecked());
|
||||
@@ -597,9 +678,9 @@ void ExposeAPIInWorld(v8::Isolate* isolate,
|
||||
context_bridge::ObjectCache object_cache;
|
||||
v8::Context::Scope target_context_scope(target_context);
|
||||
|
||||
v8::MaybeLocal<v8::Value> maybe_proxy =
|
||||
PassValueToOtherContext(electron_isolated_context, target_context, api,
|
||||
&object_cache, false, 0);
|
||||
v8::MaybeLocal<v8::Value> maybe_proxy = PassValueToOtherContext(
|
||||
electron_isolated_context, target_context, api, &object_cache, false, 0,
|
||||
BridgeErrorTarget::kSource);
|
||||
if (maybe_proxy.IsEmpty())
|
||||
return;
|
||||
auto proxy = maybe_proxy.ToLocalChecked();
|
||||
@@ -649,7 +730,7 @@ void OverrideGlobalValueFromIsolatedWorld(
|
||||
context_bridge::ObjectCache object_cache;
|
||||
v8::MaybeLocal<v8::Value> maybe_proxy = PassValueToOtherContext(
|
||||
value->GetCreationContextChecked(), main_context, value, &object_cache,
|
||||
support_dynamic_properties, 1);
|
||||
support_dynamic_properties, 1, BridgeErrorTarget::kSource);
|
||||
DCHECK(!maybe_proxy.IsEmpty());
|
||||
auto proxy = maybe_proxy.ToLocalChecked();
|
||||
|
||||
@@ -685,14 +766,14 @@ bool OverrideGlobalPropertyFromIsolatedWorld(
|
||||
if (!getter->IsNullOrUndefined()) {
|
||||
v8::MaybeLocal<v8::Value> maybe_getter_proxy = PassValueToOtherContext(
|
||||
getter->GetCreationContextChecked(), main_context, getter,
|
||||
&object_cache, false, 1);
|
||||
&object_cache, false, 1, BridgeErrorTarget::kSource);
|
||||
DCHECK(!maybe_getter_proxy.IsEmpty());
|
||||
getter_proxy = maybe_getter_proxy.ToLocalChecked();
|
||||
}
|
||||
if (!setter->IsNullOrUndefined() && setter->IsObject()) {
|
||||
v8::MaybeLocal<v8::Value> maybe_setter_proxy = PassValueToOtherContext(
|
||||
getter->GetCreationContextChecked(), main_context, setter,
|
||||
&object_cache, false, 1);
|
||||
&object_cache, false, 1, BridgeErrorTarget::kSource);
|
||||
DCHECK(!maybe_setter_proxy.IsEmpty());
|
||||
setter_proxy = maybe_setter_proxy.ToLocalChecked();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
context_bridge::ObjectCache* object_cache,
|
||||
bool support_dynamic_properties,
|
||||
int recursion_depth,
|
||||
BridgeErrorTarget error_target = BridgeErrorTarget::kSource);
|
||||
BridgeErrorTarget error_target);
|
||||
|
||||
v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
||||
const v8::Local<v8::Object>& api_object,
|
||||
@@ -47,7 +47,8 @@ v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
||||
const v8::Local<v8::Context>& destination_context,
|
||||
context_bridge::ObjectCache* object_cache,
|
||||
bool support_dynamic_properties,
|
||||
int recursion_depth);
|
||||
int recursion_depth,
|
||||
BridgeErrorTarget error_target);
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class ScriptExecutionCallback {
|
||||
context_bridge::ObjectCache object_cache;
|
||||
maybe_result = PassValueToOtherContext(
|
||||
result->GetCreationContextChecked(), promise_.GetContext(), result,
|
||||
&object_cache, false, 0);
|
||||
&object_cache, false, 0, BridgeErrorTarget::kSource);
|
||||
if (maybe_result.IsEmpty() || try_catch.HasCaught()) {
|
||||
success = false;
|
||||
}
|
||||
|
||||
@@ -608,7 +608,8 @@ void RendererClientBase::SetupMainWorldOverrides(
|
||||
if (global.GetHidden("guestViewInternal", &guest_view_internal)) {
|
||||
api::context_bridge::ObjectCache object_cache;
|
||||
auto result = api::PassValueToOtherContext(
|
||||
source_context, context, guest_view_internal, &object_cache, false, 0);
|
||||
source_context, context, guest_view_internal, &object_cache, false, 0,
|
||||
api::BridgeErrorTarget::kSource);
|
||||
if (!result.IsEmpty()) {
|
||||
isolated_api.Set("guestViewInternal", result.ToLocalChecked());
|
||||
}
|
||||
|
||||
@@ -806,10 +806,29 @@ describe('contextBridge', () => {
|
||||
throwNotClonable: () => {
|
||||
return Object(Symbol('foo'));
|
||||
},
|
||||
argumentConvert: () => {}
|
||||
throwNotClonableNestedArray: () => {
|
||||
return [Object(Symbol('foo'))];
|
||||
},
|
||||
throwNotClonableNestedObject: () => {
|
||||
return {
|
||||
bad: Object(Symbol('foo'))
|
||||
};
|
||||
},
|
||||
throwDynamic: () => {
|
||||
return {
|
||||
get bad () {
|
||||
throw new Error('damm');
|
||||
}
|
||||
};
|
||||
},
|
||||
argumentConvert: () => {},
|
||||
rejectNotClonable: async () => {
|
||||
throw Object(Symbol('foo'));
|
||||
},
|
||||
resolveNotClonable: async () => Object(Symbol('foo'))
|
||||
});
|
||||
});
|
||||
const result = await callWithBindings((root: any) => {
|
||||
const result = await callWithBindings(async (root: any) => {
|
||||
const getError = (fn: Function) => {
|
||||
try {
|
||||
fn();
|
||||
@@ -818,13 +837,26 @@ describe('contextBridge', () => {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const getAsyncError = async (fn: Function) => {
|
||||
try {
|
||||
await fn();
|
||||
} catch (e) {
|
||||
return e;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const normalIsError = Object.getPrototypeOf(getError(root.example.throwNormal)) === Error.prototype;
|
||||
const weirdIsError = Object.getPrototypeOf(getError(root.example.throwWeird)) === Error.prototype;
|
||||
const notClonableIsError = Object.getPrototypeOf(getError(root.example.throwNotClonable)) === Error.prototype;
|
||||
const notClonableNestedArrayIsError = Object.getPrototypeOf(getError(root.example.throwNotClonableNestedArray)) === Error.prototype;
|
||||
const notClonableNestedObjectIsError = Object.getPrototypeOf(getError(root.example.throwNotClonableNestedObject)) === Error.prototype;
|
||||
const dynamicIsError = Object.getPrototypeOf(getError(root.example.throwDynamic)) === Error.prototype;
|
||||
const argumentConvertIsError = Object.getPrototypeOf(getError(() => root.example.argumentConvert(Object(Symbol('test'))))) === Error.prototype;
|
||||
return [normalIsError, weirdIsError, notClonableIsError, argumentConvertIsError];
|
||||
const rejectNotClonableIsError = Object.getPrototypeOf(await getAsyncError(root.example.rejectNotClonable)) === Error.prototype;
|
||||
const resolveNotClonableIsError = Object.getPrototypeOf(await getAsyncError(root.example.resolveNotClonable)) === Error.prototype;
|
||||
return [normalIsError, weirdIsError, notClonableIsError, notClonableNestedArrayIsError, notClonableNestedObjectIsError, dynamicIsError, argumentConvertIsError, rejectNotClonableIsError, resolveNotClonableIsError];
|
||||
});
|
||||
expect(result).to.deep.equal([true, true, true, true], 'should all be errors in the current context');
|
||||
expect(result).to.deep.equal([true, true, true, true, true, true, true, true, true], 'should all be errors in the current context');
|
||||
});
|
||||
|
||||
it('should not leak prototypes', async () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as cp from 'child_process';
|
||||
import * as path from 'path';
|
||||
import { expect } from 'chai';
|
||||
import { assert, expect } from 'chai';
|
||||
import { BrowserWindow, Menu, MenuItem } from 'electron/main';
|
||||
import { sortMenuItems } from '../lib/browser/api/menu-utils';
|
||||
import { ifit } from './lib/spec-helpers';
|
||||
@@ -878,6 +878,46 @@ describe('Menu module', function () {
|
||||
throw new Error('Menu is garbage-collected while popuping');
|
||||
}
|
||||
});
|
||||
|
||||
// https://github.com/electron/electron/issues/35724
|
||||
// Maximizing window is enough to trigger the bug
|
||||
// FIXME(dsanders11): Test always passes on CI, even pre-fix
|
||||
ifit(process.platform === 'linux' && !process.env.CI)('does not trigger issue #35724', (done) => {
|
||||
const showAndCloseMenu = async () => {
|
||||
await setTimeout(1000);
|
||||
menu.popup({ window: w, x: 50, y: 50 });
|
||||
await setTimeout(500);
|
||||
const closed = once(menu, 'menu-will-close');
|
||||
menu.closePopup();
|
||||
await closed;
|
||||
};
|
||||
|
||||
const failOnEvent = () => { done(new Error('Menu closed prematurely')); };
|
||||
|
||||
assert(!w.isVisible());
|
||||
w.on('show', async () => {
|
||||
assert(!w.isMaximized());
|
||||
// Show the menu once, then maximize window
|
||||
await showAndCloseMenu();
|
||||
// NOTE - 'maximize' event never fires on CI for Linux
|
||||
const maximized = once(w, 'maximize');
|
||||
w.maximize();
|
||||
await maximized;
|
||||
|
||||
// Bug only seems to trigger programmatically after showing the menu once more
|
||||
await showAndCloseMenu();
|
||||
|
||||
// Now ensure the menu stays open until we close it
|
||||
await setTimeout(500);
|
||||
menu.once('menu-will-close', failOnEvent);
|
||||
menu.popup({ window: w, x: 50, y: 50 });
|
||||
await setTimeout(1500);
|
||||
menu.off('menu-will-close', failOnEvent);
|
||||
menu.once('menu-will-close', () => done());
|
||||
menu.closePopup();
|
||||
});
|
||||
w.show();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Menu.setApplicationMenu', () => {
|
||||
|
||||
@@ -695,7 +695,6 @@ describe('session module', () => {
|
||||
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { session: ses } });
|
||||
await expect(w.loadURL(serverUrl)).to.eventually.be.rejectedWith(/ERR_FAILED/);
|
||||
expect(w.webContents.getTitle()).to.equal(serverUrl);
|
||||
expect(validate!).not.to.be.undefined();
|
||||
validate!();
|
||||
});
|
||||
@@ -713,7 +712,6 @@ describe('session module', () => {
|
||||
await expect(w.loadURL(serverUrl), 'first load').to.eventually.be.rejectedWith(/ERR_FAILED/);
|
||||
await once(w.webContents, 'did-stop-loading');
|
||||
await expect(w.loadURL(serverUrl + '/test'), 'second load').to.eventually.be.rejectedWith(/ERR_FAILED/);
|
||||
expect(w.webContents.getTitle()).to.equal(serverUrl + '/test');
|
||||
expect(numVerificationRequests).to.equal(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user