chore: bump chromium to 99.0.4767.0 (main) (#31986)

* chore: bump chromium in DEPS to 98.0.4726.0

* 3292117: Remove unneeded base/compiler_specific.h includes in //chrome.

https://chromium-review.googlesource.com/c/chromium/src/+/3292117

* 3289198: Enables calculating line, word and sentence boundaries on the browser

https://chromium-review.googlesource.com/c/chromium/src/+/3289198

* 3276176: Remove expired gdi-text-printing flag and associated code.

https://chromium-review.googlesource.com/c/chromium/src/+/3276176

* 3240963: content: allow embedder to prevent locking scheme registry

https://chromium-review.googlesource.com/c/chromium/src/+/3240963

* 3269899: Rename WebContentsImpl::GetFrameTree to GetPrimaryFrameTree

https://chromium-review.googlesource.com/c/chromium/src/+/3269899

* chore: fixup patch indices

* 3276279: Enable -Wshadow by default for the "chromium code" config.

https://chromium-review.googlesource.com/c/chromium/src/+/3276279

* 3279737: appcache: Remove WebPreference/WebSetting

https://chromium-review.googlesource.com/c/chromium/src/+/3279737

* 3275564: [api] Advance API deprecation for APIs last marked in v9.6

https://chromium-review.googlesource.com/c/v8/v8/+/3275564

* 3261873: Clean up WebScriptSource constructors

https://chromium-review.googlesource.com/c/chromium/src/+/3261873

* 3279346: appcache: Remove ConsoleMessage appcache field

https://chromium-review.googlesource.com/c/chromium/src/+/3279346

* 3264212: Move legacy file loading to legacy_test_runner

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264212

Both Persistence and UI have been removed from globals, but the issues they
seemed to be patching are no longer reproducible from what I can tell, and
so we can just delete these and re-evaluate if something surfaces.

* 3290415: x11: remove the USE_X11 define.

https://chromium-review.googlesource.com/c/chromium/src/+/3290415

* chore: bump Chromium to 98.0.4728.0

* 3179530: Defer system calls in PrintingContext for OOP printing

https://chromium-review.googlesource.com/c/chromium/src/+/3179530

* 3299445: Consolidate is_win conditionals in chrome/test/BUILD.gn.

https://chromium-review.googlesource.com/c/chromium/src/+/3299445

* chore: update patch indices

* 3223975: Break PrintJobWorker OOP logic into separate class

https://chromium-review.googlesource.com/c/chromium/src/+/3223975

* chore: bump chromium in DEPS to 98.0.4730.0

* 3279001: Remove support for font-family: -webkit-pictograph

https://chromium-review.googlesource.com/c/chromium/src/+/3279001

* chore: fixup patch indices

* chore: bump chromium in DEPS to 98.0.4732.0

* chore: update patches

* chore: bump chromium in DEPS to 98.0.4734.0

* chore: bump chromium in DEPS to 98.0.4736.0

* chore: update patches

* chore: update printing patch for miracle ptr

* chore: add noexcept to fix clang error

* chore: bump chromium in DEPS to 98.0.4738.0

* chore: update patches

* chore: bump chromium in DEPS to 98.0.4740.0

* chore: bump chromium in DEPS to 98.0.4742.0

* chore: bump chromium in DEPS to 98.0.4744.0

* chore: bump chromium in DEPS to 98.0.4746.0

* chore: bump chromium in DEPS to 98.0.4748.0

* chore: bump chromium in DEPS to 98.0.4750.0

* chore: update patches

* 3293841: Remove File Handling permissions code

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3293841

* chore: update patches

3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700

* 3289260: [CodeHealth]: Remove uses of Notification Service

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3289260

* 3301600: Disable scripted print in fenced frames

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3301600

* chore: add missing thread_restrictions headers

* 3305132: Rewrite most `Foo* field_` pointer fields to `raw_ptr<Foo> field_`.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3305132

* fix: add ppapi_sandbox header for linux

3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700

* chore: manually bump chromium in DEPS to 98.0.4757.0

* chore: update patches

* 3321044: Remove DictionaryValue::Clear()
 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3321044

* chore: update printing.patch
Refs:
- 3304556: [code health] Remove notification observation from PrintJob. | https://chromium-review.googlesource.com/c/chromium/src/+/3304556
- 3305095: [code health] Remove NotificationService from PrintViewManagerBase. | https://chromium-review.googlesource.com/c/chromium/src/+/3305095

* build: add v8-embedder-state headers to GN patch

* chore: bump chromium in DEPS to 99.0.4767.0

* chore: update patches

* chore: rename CookiePartitionKeychain

...to CookiePartitionKeyCollection

* chore: update video consumers

* refactor: use newer base::Value API

* 3232598: Convert net::DnsOverHttpsServerConfig into a class | https://chromium-review.googlesource.com/c/chromium/src/+/3232598

* 3327865: Remove the default WebContentsUserData ctor. | https://chromium-review.googlesource.com/c/chromium/src/+/3327865

* 3302814: DevTools: Add getPreference binding | https://chromium-review.googlesource.com/c/chromium/src/+/3302814

* 3301474: [tq][runtime] Use build flags for JS context promise hooks | https://chromium-review.googlesource.com/c/v8/v8/+/3301474

* oops 😵‍💫

* 3272411: Reland "base/allocator: Enable PartitionAlloc-Everywhere on macOS" | https://chromium-review.googlesource.com/c/chromium/src/+/3272411

build: turn PartitionAlloc back off on mac for now

* fix: WCO method got renamed

* 3344749: Revert "Stop using NSRunLoop in renderer process"

https://chromium-review.googlesource.com/c/chromium/src/+/3344749

* 3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues.

https://chromium-review.googlesource.com/c/chromium/src/+/3288746

* Revert "3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues."

This reverts commit 5cc69f102e43ca72ac9ef45063711bcc7d849740.

* chore: disable serial device enumerator sequence dcheck

* fix: comment out line in DeviceService dtor

* fixup! 3279001: Remove support for font-family: -webkit-pictograph

* fixup! 3279346: appcache: Remove ConsoleMessage appcache field

* chore: update patches after rebase

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
electron-roller[bot] 2022-01-10 17:31:39 -05:00 коммит произвёл GitHub
Родитель 483808a8cf
Коммит b0f315a637
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
134 изменённых файлов: 985 добавлений и 947 удалений

Просмотреть файл

@ -556,6 +556,7 @@ source_set("electron_lib") {
defines += [
# Disable warnings for g_settings_list_schemas.
"GLIB_DISABLE_DEPRECATION_WARNINGS",
"USE_X11=1",
]
sources += [

2
DEPS
Просмотреть файл

@ -15,7 +15,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'98.0.4706.0',
'99.0.4767.0',
'node_version':
'v16.13.1',
'nan_version':

Просмотреть файл

@ -14,6 +14,9 @@ v8_enable_snapshot_native_code_counters = false
# TODO(codebytere): remove when Node.js handles https://chromium-review.googlesource.com/c/v8/v8/+/3211575
v8_scriptormodule_legacy_lifetime = true
# we use this api
v8_enable_javascript_promise_hooks = true
enable_cdm_host_verification = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"

Просмотреть файл

@ -199,12 +199,16 @@ static_library("chrome") {
if (enable_basic_printing) {
sources += [
"//chrome/browser/bad_message.cc",
"//chrome/browser/bad_message.h",
"//chrome/browser/printing/print_job.cc",
"//chrome/browser/printing/print_job.h",
"//chrome/browser/printing/print_job_manager.cc",
"//chrome/browser/printing/print_job_manager.h",
"//chrome/browser/printing/print_job_worker.cc",
"//chrome/browser/printing/print_job_worker.h",
"//chrome/browser/printing/print_job_worker_oop.cc",
"//chrome/browser/printing/print_job_worker_oop.h",
"//chrome/browser/printing/print_view_manager_base.cc",
"//chrome/browser/printing/print_view_manager_base.h",
"//chrome/browser/printing/printer_query.cc",

Просмотреть файл

@ -39,7 +39,7 @@ Returns:
* `messageDetails` Object - Information about the console message
* `message` string - The actual console message
* `versionId` number - The version ID of the service worker that sent the log message
* `source` string - The type of source for this message. Can be `javascript`, `xml`, `network`, `console-api`, `storage`, `app-cache`, `rendering`, `security`, `deprecation`, `worker`, `violation`, `intervention`, `recommendation` or `other`.
* `source` string - The type of source for this message. Can be `javascript`, `xml`, `network`, `console-api`, `storage`, `rendering`, `security`, `deprecation`, `worker`, `violation`, `intervention`, `recommendation` or `other`.
* `level` number - The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and `error`.
* `sourceUrl` string - The URL the message came from
* `lineNumber` number - The line number of the source that triggered this console message

Просмотреть файл

@ -2,4 +2,3 @@
* `code` string
* `url` string (optional)
* `startLine` Integer (optional) - Default is 1.

Просмотреть файл

@ -8,40 +8,24 @@ const { contextIsolationEnabled } = internalContextBridge;
/* Corrects for some Inspector adaptations needed in Electron.
* 1) Use menu API to show context menu.
* 2) Correct for Chromium returning undefined for filesystem.
* 3) Use dialog API to override file chooser dialog.
*/
window.onload = function () {
if (contextIsolationEnabled) {
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'InspectorFrontendHost', 'showContextMenuAtPoint'
], createMenu);
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'Persistence', 'FileSystemWorkspaceBinding', 'completeURL'
], completeURL);
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'UI', 'createFileSelectorElement'
], createFileSelectorElement);
} else {
window.InspectorFrontendHost!.showContextMenuAtPoint = createMenu;
window.Persistence!.FileSystemWorkspaceBinding.completeURL = completeURL;
window.UI!.createFileSelectorElement = createFileSelectorElement;
}
};
// Extra / is needed as a result of MacOS requiring absolute paths
function completeURL (project: string, path: string) {
project = 'file:///';
return `${project}${path}`;
}
// The DOM implementation expects (message?: string) => boolean
window.confirm = function (message?: string, title?: string) {
return ipcRendererUtils.invokeSync(IPC_MESSAGES.INSPECTOR_CONFIRM, message, title) as boolean;
};
const useEditMenuItems = function (x: number, y: number, items: ContextMenuItem[]) {
return items.length === 0 && document.elementsFromPoint(x, y).some(function (element) {
return items.length === 0 && document.elementsFromPoint(x, y).some(element => {
return element.nodeName === 'INPUT' ||
element.nodeName === 'TEXTAREA' ||
(element as HTMLElement).isContentEditable;
@ -58,22 +42,3 @@ const createMenu = function (x: number, y: number, items: ContextMenuItem[]) {
webFrame.executeJavaScript('window.DevToolsAPI.contextMenuCleared()');
});
};
const showFileChooserDialog = function (callback: (blob: File) => void) {
ipcRendererInternal.invoke<[ string, any ]>(IPC_MESSAGES.INSPECTOR_SELECT_FILE).then(([path, data]) => {
if (path && data) {
callback(dataToHtml5FileObject(path, data));
}
});
};
const dataToHtml5FileObject = function (path: string, data: any) {
return new File([data], path);
};
const createFileSelectorElement = function (this: any, callback: () => void) {
const fileSelectorElement = document.createElement('span');
fileSelectorElement.style.display = 'none';
fileSelectorElement.click = showFileChooserDialog.bind(this, callback);
return fileSelectorElement;
};

Просмотреть файл

@ -58,10 +58,10 @@ index 852b76bea69988e0b3ac76a17b603128f239dde0..d443f4dc2daea0b7aa86ae75d31d995f
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
index 09d72ec2c343f23409d35eca804a02e3290c86f1..1bea1a88b265312d700729ad2828f0b5d9f2d84f 100644
index 2458847e5640fe955a9971aa77c27251e5091db5..a0b3ac5f6b55921a542f27108beca93d6372c6fc 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -436,6 +436,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
@@ -448,6 +448,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
// EVP_aes_128_cfb128 is only available in decrepit.
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);

Просмотреть файл

@ -64,7 +64,6 @@ allow_disabling_blink_scheduler_throttling_per_renderview.patch
hack_plugin_response_interceptor_to_point_to_electron.patch
feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
feat_enable_offscreen_rendering_with_viz_compositor.patch
delay_lock_the_protocol_scheme_registry.patch
gpu_notify_when_dxdiag_request_fails.patch
feat_allow_embedders_to_add_observers_on_created_hunspell.patch
feat_add_onclose_to_messageport.patch
@ -110,4 +109,7 @@ mas_gate_private_enterprise_APIs.patch
load_v8_snapshot_in_browser_process.patch
fix_patch_out_permissions_checks_in_exclusive_access.patch
fix_aspect_ratio_with_max_size.patch
build_disable_partitionalloc_on_mac.patch
revert_stop_using_nsrunloop_in_renderer_process.patch
fix_dont_delete_SerialPortManager_on_main_thread.patch
feat_add_data_transfer_to_requestsingleinstancelock.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 a28a1fe24ac95191fa2f88d7df388b6ea7885d57..988ab894b756147ddae072c4d11c5d8d07b46563 100644
index cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b706073213fa0846e 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -236,6 +236,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -237,6 +237,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
@ -24,7 +24,7 @@ index a28a1fe24ac95191fa2f88d7df388b6ea7885d57..988ab894b756147ddae072c4d11c5d8d
// 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
@@ -342,7 +346,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -343,7 +347,6 @@ int GpuMain(MainFunctionParams parameters) {
GpuProcess gpu_process(io_thread_priority);
#endif
@ -33,10 +33,10 @@ index a28a1fe24ac95191fa2f88d7df388b6ea7885d57..988ab894b756147ddae072c4d11c5d8d
client->PostIOThreadCreated(gpu_process.io_task_runner());
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index cb7774f89cb0a5537630208dc784c63a4b5a6f34..9baf51f1c5bfcd809d3bba47f96c2772158a51ac 100644
index 04274b751b498456fc4b269bfbc6399b4f27d3ed..2fb98baf0df4e191e5e18fd7055cc2d92a2156df 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -28,6 +28,10 @@ class CONTENT_EXPORT ContentGpuClient {
@@ -29,6 +29,10 @@ class CONTENT_EXPORT ContentGpuClient {
public:
virtual ~ContentGpuClient() {}

Просмотреть файл

@ -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 316b6730c255e5fafb7fb86ee4f780a28368d771..9601b3b9c5d5da9c9051aa234d2eaa932ef983ee 100644
index f6d262f1bf7aa77c2a63f4a4c3351be0fe2ab3fd..52db2e1948fd7752b88d5a692748053491594c2d 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -130,6 +130,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -129,6 +129,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 316b6730c255e5fafb7fb86ee4f780a28368d771..9601b3b9c5d5da9c9051aa234d2eaa93
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 454b8a57e6654a07c5ba4798c21a2792730a4de5..b517bd4337fcda3b167388962657344388f0b74d 100644
index 584ae29be139c9be347e4fa9f920a2cc84baf00a..c7a5f0916cf8ba6db6fa85537c140024a92ff24d 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4499,6 +4499,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4515,6 +4515,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@ -40,10 +40,10 @@ index 454b8a57e6654a07c5ba4798c21a2792730a4de5..b517bd4337fcda3b1673889626573443
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index ed716709fbee0e81af2f9ad19c7bcce021c65926..ee3d1865aebc2c11400e72534322818319ee900d 100644
index 1b582c1736db20dab712ee7875f37c2140bd7d45..efab4f51e56e6e179fb832b1cf47d7f4a348e6c7 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -600,6 +600,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@ -67,10 +67,10 @@ index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd2121
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index c53d1af1946d9caefc3682c5caff3b6ccb2a0804..91b908d884d65767b9fc54e6711590edff952bcd 100644
index 29e255dc75a1d54211dc6059801d3c16b7cefdca..044195c7d77be5ff4abe9d2a71ddbbf2076b2efd 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -213,6 +213,7 @@ void LocalWindowProxy::Initialize() {
@@ -214,6 +214,7 @@ void LocalWindowProxy::Initialize() {
}
InstallConditionalFeatures();
@ -92,7 +92,7 @@ index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608c
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 a07cd4deeb88c768f27844feafaaa56b2f0e2692..aef718592fdf298493e8e52950f0858a8666bd1c 100644
index 0922aaf1a5f076ed4544b6870ac3674b023c428b..ff8ccf56eaafe36fe4de08a448789b13033e8604 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
@@ -274,6 +274,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@ -110,7 +110,7 @@ index a07cd4deeb88c768f27844feafaaa56b2f0e2692..aef718592fdf298493e8e52950f0858a
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 5c89861a1e3e37b3b54d73e4b6ec1c2b34c491b2..a566fc7156c8440c5a3337103db4120b62fff5dd 100644
index 59dd5662dccea2e570b93e7bbdc59fded301979c..30d7bafbf5877d71868fbdec9abbcacacd4b72a8 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
@@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@ -123,7 +123,7 @@ index 5c89861a1e3e37b3b54d73e4b6ec1c2b34c491b2..a566fc7156c8440c5a3337103db4120b
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 9ec5c2d4be13572e4060c03a822cb792329e1c94..b9c8c4f3b7d4c98cf6411c4bbb9ef96f3db55328 100644
index 42f30c871534bf7037c13d71802443baa20eb850..552909b44f47d64a260b9cd39ea42dac41e31603 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -356,6 +356,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

Просмотреть файл

@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 621a961ba0d44394782d62c921904fed32ddf8a4..58e9d84c2260e7469c8e1c166edfef22de5931a1 100644
index 2d918fcf473d6ce399dde0413da0b1d7444c32c0..29f53b668d6c8f50d901bf214d19ae08d765944d 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -633,6 +633,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@ -22,10 +22,10 @@ index 621a961ba0d44394782d62c921904fed32ddf8a4..58e9d84c2260e7469c8e1c166edfef22
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index ea72307c8ac24f7a32b0345c7fd94527efd67942..f1b2ba8682ec189f0b924eaa9cfa17fb28124fc1 100644
index c2d024d09dda8b221cc588e784cb2d31c273d0ff..c0fd9c5400acf32c89a477797c4d9c45662fb14c 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl
bool IsRenderViewLive() override;
void WriteIntoTrace(perfetto::TracedValue context) override;
@ -73,7 +73,7 @@ index b7c6ba65551acd31c96be06c3d7595f28b6855b0..21ce5fe263f8a47281b21c45c7bda9ef
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index a0f9f0be545f7511a8d1e9536eda3c5b3a10a1d9..66ae09f0965bd4470284124f92e18b490973f737 100644
index 14d4a00293ab0b11e733676844ce483992d6cd8e..c6c2dbb9dddd1eaa21e8c7b276d871a3898463fa 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -368,6 +368,7 @@ class WebView {
@ -85,10 +85,10 @@ index a0f9f0be545f7511a8d1e9536eda3c5b3a10a1d9..66ae09f0965bd4470284124f92e18b49
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 72ec80d7ccd7581b82a461cebca2892519c440a1..dcc985cf532f098ff5aeb649a30db314030c5a02 100644
index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406ab36003d5 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3661,6 +3661,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3662,6 +3662,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@ -102,7 +102,7 @@ index 72ec80d7ccd7581b82a461cebca2892519c440a1..dcc985cf532f098ff5aeb649a30db314
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3672,7 +3679,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3673,7 +3680,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@ -113,10 +113,10 @@ index 72ec80d7ccd7581b82a461cebca2892519c440a1..dcc985cf532f098ff5aeb649a30db314
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 46bd70aa401cfae46321bae47f89a3ea6a75bac3..633f7a1d623e94c05dcc29e569c32a37aeb64b84 100644
index cce6788b0a529ffb4d6330237c50c8f9a1b2093a..83c95f9867cbf52646a9b093706b05d8d99ce3b6 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -418,6 +418,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -420,6 +420,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@ -124,7 +124,7 @@ index 46bd70aa401cfae46321bae47f89a3ea6a75bac3..633f7a1d623e94c05dcc29e569c32a37
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -854,6 +855,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -856,6 +857,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

Просмотреть файл

@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on
process-level command line switches, as before.
diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc
index db2d0536ed7a8143a60cebf1c5d7fee1acf4d10d..0cad8646e8b733a3a2d4b1076fdb0276bcd5b7bf 100644
index 6356025f24855b789b0fdb492ca61232bc6d8000..7eab027f4af2a10c77a8754f6faf06a67b2edce0 100644
--- a/third_party/blink/common/web_preferences/web_preferences.cc
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
@@ -145,6 +145,20 @@ WebPreferences::WebPreferences()
@@ -144,6 +144,20 @@ WebPreferences::WebPreferences()
fake_no_alloc_direct_call_for_testing_enabled(false),
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
record_whole_document(false),
@ -33,13 +33,13 @@ index db2d0536ed7a8143a60cebf1c5d7fee1acf4d10d..0cad8646e8b733a3a2d4b1076fdb0276
accelerated_video_decode_enabled(false),
animation_policy(
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index e9f2e215ee1220c66549112982df04201c68fe1a..e9118530b395dbb13180365521dcf03d9ca211e5 100644
index 98391c17bc6c3371919966e9caf09efbcc94cec6..c2d3457f17a076e238dc851b5c61a9ed0efb3a19 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -23,6 +23,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -22,6 +22,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
!data.ReadSansSerifFontFamilyMap(&out->sans_serif_font_family_map) ||
!data.ReadCursiveFontFamilyMap(&out->cursive_font_family_map) ||
!data.ReadFantasyFontFamilyMap(&out->fantasy_font_family_map) ||
!data.ReadPictographFontFamilyMap(&out->pictograph_font_family_map) ||
+ // Begin Electron-specific WebPreferences.
+ !data.ReadPreloads(&out->preloads) ||
+ !data.ReadPreload(&out->preload) ||
@ -47,7 +47,7 @@ index e9f2e215ee1220c66549112982df04201c68fe1a..e9118530b395dbb13180365521dcf03d
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
&out->lazy_frame_loading_distance_thresholds_px) ||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
@@ -158,6 +162,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -156,6 +160,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
data.fake_no_alloc_direct_call_for_testing_enabled();
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
@ -68,7 +68,7 @@ index e9f2e215ee1220c66549112982df04201c68fe1a..e9118530b395dbb13180365521dcf03d
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 0d74719b2f8fb91f094772fab96a880cc8787c77..23126786a738c3fe83f7064bf8b597794d871ac5 100644
index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3bc711a755 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -10,6 +10,7 @@
@ -79,7 +79,7 @@ index 0d74719b2f8fb91f094772fab96a880cc8787c77..23126786a738c3fe83f7064bf8b59779
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
@@ -163,6 +164,22 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -161,6 +162,22 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
@ -103,7 +103,7 @@ index 0d74719b2f8fb91f094772fab96a880cc8787c77..23126786a738c3fe83f7064bf8b59779
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index e0084598921ddcb0cf2aeb33875f05da0b5457e9..bcda6f35ad74b2b8aa9d439155048aab7bd02b21 100644
index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c28168c3a 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@
@ -114,7 +114,7 @@ index e0084598921ddcb0cf2aeb33875f05da0b5457e9..bcda6f35ad74b2b8aa9d439155048aab
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -456,6 +457,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -446,6 +447,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
}
@ -176,7 +176,7 @@ index e0084598921ddcb0cf2aeb33875f05da0b5457e9..bcda6f35ad74b2b8aa9d439155048aab
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index af5ba07466b95ab61befdd3994d731ed8f7ef0a6..5ffa7ef2334da800267af3947e68477bf82f3526 100644
index 1f0ca7565e7df7bb535bb8c779929f6202273471..69c5932f498d2849847ddcc3605f45df3acc596d 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
@ -187,7 +187,7 @@ index af5ba07466b95ab61befdd3994d731ed8f7ef0a6..5ffa7ef2334da800267af3947e68477b
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -215,6 +216,22 @@ struct WebPreferences {
@@ -213,6 +214,22 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;

Просмотреть файл

@ -47,7 +47,7 @@ index 746dffb1defec9d776f681d41325a65b02cbdd0f..05a7f20f10e3ff514aa3b3b5386980dd
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index a53a4f29aaa9090b1948c8d44830f17087644a3c..cad1b66ea66f1d1f27520766cc067839a41812f3 100644
index bd2ebaf9f84946c708eba13c18869afadd2fdbb0..880d6f12ad188c5f8abf037b3b8d27fcf1fc2cb6 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -49,6 +49,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {

Просмотреть файл

@ -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 8beb23a24aadb513a4a3f3d7e55c32920e7ad2d2..7ea74db0ca971c091bcaa7bb85e06b3c22e73e9d 100644
index 1b022bf6b37982e6321120951de5d8dcc10ecf6a..5cd7cf680244383e466106801103871b3bba8796 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -122,14 +122,6 @@ bool Frame::Detach(FrameDetachType type) {
@ -49,10 +49,10 @@ index 8beb23a24aadb513a4a3f3d7e55c32920e7ad2d2..7ea74db0ca971c091bcaa7bb85e06b3c
// 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 f793047b910ea2509832bd3ea9f305fc637890ce..6b110a7b4b2e4db596fe9cd6777a372760180fc2 100644
index fc47c47cc197a674d97e77e35a904d3bfb481891..bc1444a76d72f1f40966ddac21e689a4a5995125 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -582,10 +582,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -533,10 +533,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@ -63,7 +63,7 @@ index f793047b910ea2509832bd3ea9f305fc637890ce..6b110a7b4b2e4db596fe9cd6777a3727
if (!Client())
return false;
@@ -635,6 +631,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -582,6 +578,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

Просмотреть файл

@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index 68654482b9133cfd6e1e8b94fb5781f62fd44145..81f8bb74fae4d4f039dd41980bf2549c2b667aee 100644
index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8f3c9ccc10f8204c21d1f28444eef77724255aa9 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -47,6 +47,19 @@ config("no_asm_config") {

Просмотреть файл

@ -13,10 +13,10 @@ on linux. If removing this patch doesn't cause a compile failure, it's
fine to delete!
diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h
index 317352550f3bd4a154715046a4a16322f9e71054..906784e5eb8040677b45f6664af6fbed14780285 100644
index c0771b00922c1f21ec9dba726c5c7cd51c267d69..d731c7bf168c4b8df0a46da40c9164b4ac6239f3 100644
--- a/components/crash/core/common/crash_key.h
+++ b/components/crash/core/common/crash_key.h
@@ -218,6 +218,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl {
@@ -219,6 +219,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl {
crashpad_key_.Set(value);
}

Просмотреть файл

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: clavin <cwatford@slack-corp.com>
Date: Tue, 21 Dec 2021 10:17:37 -0700
Subject: build: disable PartitionAlloc on mac
PartitionAlloc on mac requires some restructuring in Electron as well as considerations about the mas build. In the mean time, disabling it should be fine.
This patch can be removed once the mac app runs safely with PartitionAlloc on (i.e. removing dependency to //base in the main app) & the situation with mas is figured out.
diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni
index 7d579d6e2297c047415eeeb641c70871b5c3f80d..e6edb52dd15af0f369160696fb2a34b0f80680a4 100644
--- a/base/allocator/allocator.gni
+++ b/base/allocator/allocator.gni
@@ -18,7 +18,7 @@ _is_using_sanitizers = is_asan || is_hwasan || is_lsan || is_tsan || is_msan
# - Windows: debug CRT is not compatible, see below.
_disable_partition_alloc = is_component_build || (is_win && is_debug)
_is_partition_alloc_platform =
- is_android || is_win || is_mac || is_linux || is_chromeos
+ is_android || is_win || is_linux || is_chromeos
# The debug CRT on Windows has some debug features that are incompatible with
# the shim. NaCl in particular does seem to link some binaries statically

Просмотреть файл

@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index fd0b9634796e782c873b5fcb97c84ab52f19cf98..73450e005e068a74559caedb407422f4dfdf5010 100644
index 33e8d4f5b27532d015d8cd4dbe7d2550916eb436..76945ae5d23af853d920810cbcb248c0daf2f544 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -171,11 +171,16 @@ if (!is_android && !is_mac) {
@@ -170,11 +170,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
@ -33,10 +33,10 @@ index fd0b9634796e782c873b5fcb97c84ab52f19cf98..73450e005e068a74559caedb407422f4
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index ed472a9ef8116c028d0e54413ac0ef256ceaeddc..323a8110255583d351c34a3085f94c93d25b1f13 100644
index 8f418d78b7ac7a23d80f44e23d430febe641cf0a..dc378e799bad709709f339864fdf63e6d9a6cb69 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4500,7 +4500,7 @@ static_library("browser") {
@@ -4528,7 +4528,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@ -46,31 +46,29 @@ index ed472a9ef8116c028d0e54413ac0ef256ceaeddc..323a8110255583d351c34a3085f94c93
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index a1f91069b5ac79c28a5c518b1a0deac594ba9e4d..78c7e857b41aef954035e9f34137f6f50a8098b5 100644
index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f3b3f9532 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -5572,7 +5572,6 @@ test("unit_tests") {
assert(toolkit_views)
sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
deps += [
- "//chrome:packed_resources_integrity",
"//chrome/browser:chrome_process_finder",
"//chrome/browser/safe_browsing/chrome_cleaner",
"//chrome/browser/safe_browsing/chrome_cleaner:public",
@@ -5585,6 +5584,12 @@ test("unit_tests") {
"//components/chrome_cleaner/public/proto",
"//ui/events/devices:test_support",
]
+
+ if (!is_electron_build) {
+ deps += [
+ "//chrome:packed_resources_integrity",
+ ]
+ }
}
@@ -5531,7 +5531,6 @@ test("unit_tests") {
# TODO(crbug.com/931218): Ninja cannot handle certain characters appearing
@@ -6172,7 +6177,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
- "//chrome:packed_resources_integrity",
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/browser:chrome_process_finder",
@@ -5554,6 +5553,10 @@ test("unit_tests") {
"//ui/resources",
]
+ if (!is_electron_build) {
+ deps += [ "//chrome:packed_resources_integrity" ]
+ }
+
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -6245,7 +6248,6 @@ test("unit_tests") {
}
deps += [
@ -78,13 +76,15 @@ index a1f91069b5ac79c28a5c518b1a0deac594ba9e4d..78c7e857b41aef954035e9f34137f6f5
"//chrome/browser:cart_db_content_proto",
"//chrome/browser:coupon_db_content_proto",
"//chrome/browser/media/router:test_support",
@@ -6213,6 +6217,9 @@ test("unit_tests") {
@@ -6286,6 +6288,11 @@ test("unit_tests") {
"//ui/native_theme:test_support",
"//ui/webui/resources/js/browser_command:mojo_bindings",
]
+
+ if (!is_electron_build) {
+ deps += [ "//chrome:packed_resources_integrity_hash" ]
+ }
if (is_win) {
deps += [ "//components/chrome_cleaner/public/proto:test_only_proto" ]
}
+
if (is_chromeos_ash) {
deps += [
"//ash/assistant/model",

Просмотреть файл

@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
rebuild the entire tree.
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 034999175e30316e488404aa5392f38792d8bdde..6318596aadee7e0640692381e9e15372b9f07c1d 100644
index fcc7e12834733fa0927c35708de9665db4c59eba..faac97db5a2c86f1fcc89c3c045ef74b7b2b878a 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

Просмотреть файл

@ -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 8bd530c3cbd735661e9227b28ed223dece073733..fca309296af6f470882b57ae75d9b410c9ef9f12 100644
index 38b4d4da5ea013118d8464d82fd84a551a36a80f..165d6b8eb5cb0ce949c71c1707687960c49a4ebb 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -6565,6 +6565,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -6602,6 +6602,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 8bd530c3cbd735661e9227b28ed223dece073733..fca309296af6f470882b57ae75d9b410
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 435dc1aceda15f0df94db6e53d5bdb1e271574da..48565d6590787f8370fdfacadf15fd024f69c906 100644
index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb390654207f6d18f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3838,6 +3838,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3864,6 +3864,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@ -39,7 +39,7 @@ index 435dc1aceda15f0df94db6e53d5bdb1e271574da..48565d6590787f8370fdfacadf15fd02
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_id, session_storage_namespace);
@@ -3880,12 +3888,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3906,12 +3914,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -68,10 +68,10 @@ index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07b
// 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 d2b11abc31df2e422a2bdfc0e95edeab42edbe7f..b7ae982c2d6d89e18f238e0e7fc789a38fc641cf 100644
index f26ff2199c9f72adfcea9df0db0dc9f0eb70a127..8bbca0ed64bdfc892b3f2e21f0f88fe14344459d 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -565,6 +565,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -570,6 +570,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -81,7 +81,7 @@ index d2b11abc31df2e422a2bdfc0e95edeab42edbe7f..b7ae982c2d6d89e18f238e0e7fc789a3
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 a2d3182cdc1c06cbe59bbcb68240ac4b0f6ebe17..a1da3d41be9131d1d2ddd0e737aaca7055d71af0 100644
index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09fcacd0d0 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -169,6 +169,7 @@ class NetworkService;
@ -92,7 +92,7 @@ index a2d3182cdc1c06cbe59bbcb68240ac4b0f6ebe17..a1da3d41be9131d1d2ddd0e737aaca70
} // namespace network
namespace sandbox {
@@ -933,6 +934,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -940,6 +941,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -102,7 +102,7 @@ index a2d3182cdc1c06cbe59bbcb68240ac4b0f6ebe17..a1da3d41be9131d1d2ddd0e737aaca70
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 894000be94f47c050bf43d61d9a3de5284e315e4..ee9180697d569900ec9d7eb1143903c0268cb1e8 100644
index 2c87b891defb55771fd7686cb88971cd158c801f..a583c64b44b7add0b46ce25b4112563dd1b7e7b1 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -27,6 +27,17 @@ namespace content {
@ -124,7 +124,7 @@ index 894000be94f47c050bf43d61d9a3de5284e315e4..ee9180697d569900ec9d7eb1143903c0
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 177bc1230a1aebd367dca42e92b63fb8be482805..f82d5c524ebf331c37280f0a93a5d3dc292236eb 100644
index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362fabfcf11 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -16,6 +16,7 @@
@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc
} // 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 22921b47b10cc9eba71a617f1c37a3b1d1a1de65..7be213ab2a2f23dca7477963aafc666396512e04 100644
index 324322b9c1096cfd201ac33b279dcbd5a1d56e5d..e1ad20b728028c0ec9de4290afdef17e61df2c85 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2039,6 +2039,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2070,6 +2070,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, incumbent_window);

Просмотреть файл

@ -9,10 +9,10 @@ we're running with contextIsolation enabled, we should be falling back
to Blink's logic. This will be upstreamed in some form.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 5add377ff9db79829387d875d13ddc3c7668e8e5..d8ba2aff2c930d7aa8124d83ed73fe32e7a8a210 100644
index 656c09327f0b88a6bdcd2753018fc12d5e931cb8..f787e4e35ea86c68dbf1423a376c75857d3b5b2a 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -454,8 +454,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
@@ -457,8 +457,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
return {true, std::move(stringified_source)};
}

Просмотреть файл

@ -35,10 +35,10 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..4d996e3821410b2325ef85499f8c307c
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
index 2ffd44a4273bf86e4cd642c1dd19178176fe1f73..d164a652c741529050b6ffb4e7c070d3c7ec1237 100644
index 27452df45433e4aeb7b9008f8e5b91dd4b5f50db..5c6f9936e6d3d2647d7efbc70efda8551c5516c7 100644
--- a/chrome/browser/media/offscreen_tab.cc
+++ b/chrome/browser/media/offscreen_tab.cc
@@ -284,8 +284,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
@@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -49,10 +49,10 @@ index 2ffd44a4273bf86e4cd642c1dd19178176fe1f73..d164a652c741529050b6ffb4e7c070d3
// uses this to spawn new windows/tabs, which is also not allowed for
// offscreen tabs.
diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h
index 3de99e26d62546eb2c3b677e1d61da1edeaa9fd6..5130fd65bb088f76aba2bbbb6855a43f913210ed 100644
index 88b68339823142f9b2b2d4730d6ebc1033ac86a3..e2d53e1b233adced355be667d006d5d2ba3d5110 100644
--- a/chrome/browser/media/offscreen_tab.h
+++ b/chrome/browser/media/offscreen_tab.h
@@ -106,8 +106,7 @@ class OffscreenTab final : public ProfileObserver,
@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -94,10 +94,10 @@ index fd2bccf8f718683b55646ef200aaacc2df6ac485..b62b61fbcf4b8f1eff26546c5da020f8
content::WebContents* source,
const content::OpenURLParams& params) override;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index df265a5caaef54f69ffc37283b08303d869d8d79..4a11c711471a415c237819ea34921d4296b272fa 100644
index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e29191d8f 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -72,8 +72,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -71,8 +71,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -108,10 +108,10 @@ index df265a5caaef54f69ffc37283b08303d869d8d79..4a11c711471a415c237819ea34921d42
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index d8f3035f494a0fb53499bca9a8204d65a29fe16d..3b64725e182870bf2962ead1092e5c6de00e282c 100644
index da521ddb3d244d264f11f42a86dce97ba84fac55..bc4b2a73fe790fb59eac87d4487a831ccea6f6a2 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1766,12 +1766,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1762,12 +1762,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -127,10 +127,10 @@ index d8f3035f494a0fb53499bca9a8204d65a29fe16d..3b64725e182870bf2962ead1092e5c6d
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 1feded0d4e23dcb966674a0192984b98f55b6d15..729447dab43268490e2359d41ab3b9af31f44919 100644
index 10e4e2021cb39f2384f81d7ed8783e85286fa37b..4e98b6a5b51d41631b2f0a4601359b396e9c58b2 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -809,8 +809,7 @@ class Browser : public TabStripModelObserver,
@@ -810,8 +810,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -141,7 +141,7 @@ index 1feded0d4e23dcb966674a0192984b98f55b6d15..729447dab43268490e2359d41ab3b9af
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
index db19e1847d2ad43379c5cd5ef2312a70aced47ae..2358e97bafcf16c36e21f6c4f493facf4d528505 100644
index 27b0f262235a58d546358ea12d7d7ea05f250c15..4f3cb2d63313703c98fd2149c07c60c95f263cdb 100644
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
@@ -202,8 +202,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
@ -155,10 +155,10 @@ index db19e1847d2ad43379c5cd5ef2312a70aced47ae..2358e97bafcf16c36e21f6c4f493facf
// uses this to spawn new windows/tabs, which is also not allowed for
// local presentations.
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
index eda511525a39912422efd3bc7a3917adf2af773a..1c78a06e5ec2338663951ab49f690c7cc1ad606b 100644
index b6833e34c5840a4d3a545d1c4a44b2b08d7fc9ea..5ebc16a3545a73e58516cb0fbdddca43e789fd24 100644
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
@@ -104,8 +104,7 @@ class PresentationReceiverWindowController final
@@ -105,8 +105,7 @@ class PresentationReceiverWindowController final
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -167,7 +167,7 @@ index eda511525a39912422efd3bc7a3917adf2af773a..1c78a06e5ec2338663951ab49f690c7c
+ const content::mojom::CreateNewWindowParams& params) override;
// The profile used for the presentation.
Profile* otr_profile_;
raw_ptr<Profile> otr_profile_;
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index 1aec422b4c83b823c92d76847366fe0d4d04cd00..ea8354f49b14631cf8671decc1ee96beb18d9561 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@ -218,10 +218,10 @@ index 53fad64f87a952fd0d7398958288ecde259b57bf..26f64dabcbee575034e97ada29c7de48
return true;
}
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h
index 75eff96958b086ebfe7f99adf0d986213074c45b..ae1f59db9569cd65a5ae92a37af19f9e47eee0aa 100644
index c1926fc79e9982739d17f4b971f5e7296afd0cf8..31f036c9d224f7e03d7fe38861db45b8d11a07b8 100644
--- a/components/offline_pages/content/background_loader/background_loader_contents.h
+++ b/components/offline_pages/content/background_loader/background_loader_contents.h
@@ -64,8 +64,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
@@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -232,10 +232,10 @@ index 75eff96958b086ebfe7f99adf0d986213074c45b..ae1f59db9569cd65a5ae92a37af19f9e
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 0577d16d66bdaef6f4044d1737e9cf4cde811520..956c5024919bc18f4aea07c77ead5ff2ad49730a 100644
index 3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8..676c77b2ac7be7445d92db3fcfc94b5ec4915696 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3786,8 +3786,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3812,8 +3812,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@ -246,7 +246,7 @@ index 0577d16d66bdaef6f4044d1737e9cf4cde811520..956c5024919bc18f4aea07c77ead5ff2
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index ee9180697d569900ec9d7eb1143903c0268cb1e8..088bda2f2cd70e5757bcda020a6d36ec44df9069 100644
index a583c64b44b7add0b46ce25b4112563dd1b7e7b1..2af9f098d59e3b93949a33dae5a8e4b70f15937c 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@ -260,7 +260,7 @@ index ee9180697d569900ec9d7eb1143903c0268cb1e8..088bda2f2cd70e5757bcda020a6d36ec
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index f82d5c524ebf331c37280f0a93a5d3dc292236eb..3874394f67f30d44ee8278c943c01ecf4a40759b 100644
index b0f14ef097c9178aa25bf04d19fff362fabfcf11..590d52000e30c00a06e192d9fd1faafd4173595f 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@ -330,10 +330,10 @@ index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
index 9df6df01521882ef6f4f6530d226688836d56fa3..17f3becfb5eb671d330f56db1138e95d6e2d8b50 100644
index 7d9e445c8b2c727787854aa6e296f2e3784942fb..c82b0b86ab93aceb0d8c0bd5562e72d823166010 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -398,8 +398,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -401,8 +401,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -344,10 +344,10 @@ index 9df6df01521882ef6f4f6530d226688836d56fa3..17f3becfb5eb671d330f56db1138e95d
// can catch bad client behavior while not interfering with normal operation.
constexpr size_t kMaxPendingWebContentsCount = 10;
diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
index a4a15d369e2ed6365deb6476fd5de094e0564be0..f6489a21a2da3b6e6e423c4cf6f7b8ebe2241d5c 100644
index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf382a05ec 100644
--- a/fuchsia/engine/browser/frame_impl.h
+++ b/fuchsia/engine/browser/frame_impl.h
@@ -289,8 +289,7 @@ class FrameImpl : public fuchsia::web::Frame,
@@ -290,8 +290,7 @@ class FrameImpl : public fuchsia::web::Frame,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -358,10 +358,10 @@ index a4a15d369e2ed6365deb6476fd5de094e0564be0..f6489a21a2da3b6e6e423c4cf6f7b8eb
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index f3ce895c96d96ad54fad96bdbabe7d11845e6a53..2442a75d089600c61eff711294332bbfffe368fc 100644
index 6fa4fa667839531f3ca6ca80f8bf17e135739688..65ad95abf4459a342194ea0d970d6b268024d87f 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -176,8 +176,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -177,8 +177,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -372,7 +372,7 @@ index f3ce895c96d96ad54fad96bdbabe7d11845e6a53..2442a75d089600c61eff711294332bbf
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index e4c42c2fcf932ae2a13abadf3f6bbd494d4c972c..12ec122ccf9becd9bc6514b842612bc8a63edabf 100644
index 1c3eebdc2cc3f5d8f110562eb3e18a1f45521c4f..11b7b0c6617c40c766d64cd0d4e60d22e569bfb1 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -426,8 +426,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@ -386,10 +386,10 @@ index e4c42c2fcf932ae2a13abadf3f6bbd494d4c972c..12ec122ccf9becd9bc6514b842612bc8
return delegate_->HandleShouldOverrideWebContentsCreation();
return false;
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index c4997454ffe3b642272b2a7a0a89cffc1b5bca89..d1ac4ccb15c5249d945d4847281dd9b3193a4b2e 100644
index eb5c113cab56f28d3bca3ac722c6e2b1ed3b50e8..26263aec5b8e401d3fd79b898651b9635daa36d8 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -154,8 +154,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

Просмотреть файл

@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
Electrons grit header instead of Chromes
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 56b6302adfe69b562506043ef5c8c543e8609620..ed472a9ef8116c028d0e54413ac0ef256ceaeddc 100644
index 3210670738694953fdd65b1d0c2ca30d7c29d8c9..8f418d78b7ac7a23d80f44e23d430febe641cf0a 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -6929,6 +6929,7 @@ static_library("browser") {
@@ -7016,6 +7016,7 @@ static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@ -32,10 +32,10 @@ index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581cc
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
index e2f54334ed199b0cb4658c1b1c956dd8bc8b2bf0..0241849170f6d589d011c28127abfd9bc830e5e5 100644
index 777634b4f93467051ea9e9e9fe448204a9c28cf1..11454e9e7cd06717033631cc4627c3d061301863 100644
--- a/components/language/core/browser/BUILD.gn
+++ b/components/language/core/browser/BUILD.gn
@@ -28,6 +28,7 @@ static_library("browser") {
@@ -30,6 +30,7 @@ static_library("browser") {
"//components/pref_registry",
"//components/prefs",
"//components/strings",
@ -44,10 +44,10 @@ index e2f54334ed199b0cb4658c1b1c956dd8bc8b2bf0..0241849170f6d589d011c28127abfd9b
]
}
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index e60cd8642a901b6f187eecb0b130c1a3a4516865..e77301f02ed8e40b8a2880cc53ddfc71300620d4 100644
index 0c34853eba1243519f10bfd5e4dfa5d479a97bcc..99632534a06c11b9e8cb000151fb28e64a5ca0c7 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -23,7 +23,7 @@
@@ -22,7 +22,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

Просмотреть файл

@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index aac62ca6dc5054c62b01e7369ee8e1eb38345672..f19a358036e28da1948ec0db64743f94e021fe7c 100644
index 2bead927915b87261c7c4f953e73a887751ec81a..bff0fce048ea59696fec56eec40e8cd3682e821f 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -17,7 +17,9 @@
@ -20,7 +20,7 @@ index aac62ca6dc5054c62b01e7369ee8e1eb38345672..f19a358036e28da1948ec0db64743f94
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -265,12 +267,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
@@ -200,12 +202,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
// Returns persistent-license session support.
EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {

Просмотреть файл

@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the
failing checks and allow the rest of the target to have them enabled.
diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
index 0c38abb81e76ba17d60b92c362bd042d203ca212..34fb38913071dd24e94d317ab7d73f86a047818e 100644
index cb6b39ee5cf75fec6cf015072eb1f5be08dcf7c4..269cde5100ff1380a9429e7aad1018b50cc01957 100644
--- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
+++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
@@ -432,7 +432,7 @@ void MobileFriendlinessChecker::ComputeSmallTextRatio(

Просмотреть файл

@ -1,109 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andy Locascio <andy@slack-corp.com>
Date: Tue, 18 Feb 2020 14:35:04 -0800
Subject: content: allow embedder to prevent locking scheme registry
The //content layer requires all schemes to be registered during startup,
because Add*Scheme aren't threadsafe. However, Electron exposes the option to
register additional schemes via JavaScript in the main process before the app
is ready, but after the //content layer has already locked the registry.
This allows embedders to optionally keep the scheme registry unlocked, and it
is their responsibility to ensure that it is not accessed in a way that would
cause potential thread-safety issues.
Previously upstreamed patch: https://chromium-review.googlesource.com/c/chromium/src/+/1637040
This change was lost during upstream refactor in
https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
re-submitting the patch.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 558fabf35abea86883bdcfe4a600ba72f24bd9dc..d19cd4006e88dc165a6e5fbbe8f1d96547d136f3 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -787,7 +787,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
}
#endif
- RegisterContentSchemes();
+ RegisterContentSchemes(delegate_->ShouldLockSchemeRegistry());
ContentClientInitializer::Set(process_type, delegate_);
#if !defined(OS_ANDROID)
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
index 5fcc7c6c1e27f36f86e972cebbd1808d37ea5b88..bff53783935950facb6cf896d4e906c5f05fe9a8 100644
--- a/content/common/url_schemes.cc
+++ b/content/common/url_schemes.cc
@@ -49,7 +49,7 @@ std::vector<std::string>& GetMutableServiceWorkerSchemes() {
} // namespace
-void RegisterContentSchemes() {
+void RegisterContentSchemes(bool should_lock_registry) {
// On Android and in tests, schemes may have been registered already.
if (g_registered_url_schemes)
return;
@@ -109,7 +109,8 @@ void RegisterContentSchemes() {
// threadsafe so must be called when GURL isn't used on any other thread. This
// is really easy to mess up, so we say that all calls to Add*Scheme in Chrome
// must be inside this function.
- url::LockSchemeRegistries();
+ if (should_lock_registry)
+ url::LockSchemeRegistries();
// Combine the default savable schemes with the additional ones given.
GetMutableSavableSchemes().assign(std::begin(kDefaultSavableSchemes),
diff --git a/content/common/url_schemes.h b/content/common/url_schemes.h
index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f889977bee 100644
--- a/content/common/url_schemes.h
+++ b/content/common/url_schemes.h
@@ -16,7 +16,7 @@ namespace content {
// parsed as "standard" or "referrer" with the src/url/ library, then locks the
// sets of schemes down. The embedder can add additional schemes by
// overriding the ContentClient::AddAdditionalSchemes method.
-CONTENT_EXPORT void RegisterContentSchemes();
+CONTENT_EXPORT void RegisterContentSchemes(bool should_lock_registry = true);
// Re-initializes schemes for tests.
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index d076ab515732941a8403c7756272afddcb298f6b..4f3c2d8d4520e6f25d3d79e00d6af03bc842cc38 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -42,6 +42,10 @@ bool ContentMainDelegate::ShouldHandleConsoleControlEvents() {
}
#endif
+bool ContentMainDelegate::ShouldLockSchemeRegistry() {
+ return true;
+}
+
bool ContentMainDelegate::ShouldCreateFeatureList() {
return true;
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index f8f9a6d4316e0eb19585479aab20b441adb391ef..4b35355cf73c1a19587e1954839577df36e6e1d9 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -73,6 +73,20 @@ class CONTENT_EXPORT ContentMainDelegate {
// returning initialization error code. Default behavior is CHECK(false).
virtual int TerminateForFatalInitializationError();
+ // Allows the embedder to prevent locking the scheme registry. The scheme
+ // registry is the list of URL schemes we recognize, with some additional
+ // information about each scheme such as whether it expects a host. The
+ // scheme registry is not thread-safe, so by default it is locked before any
+ // threads are created to ensure single-threaded access. An embedder can
+ // override this to prevent the scheme registry from being locked during
+ // startup, but if they do so then they are responsible for making sure that
+ // the registry is only accessed in a thread-safe way, and for calling
+ // url::LockSchemeRegistries() when initialization is complete. If possible,
+ // prefer registering additional schemes through
+ // ContentClient::AddAdditionalSchemes over preventing the scheme registry
+ // from being locked.
+ virtual bool ShouldLockSchemeRegistry();
+
// Allows the embedder to perform platform-specific initialization before
// BrowserMain() is invoked (i.e. before BrowserMainRunner, BrowserMainLoop,
// BrowserMainParts, etc. are created).

Просмотреть файл

@ -40,10 +40,10 @@ index 24bd95b79479c21182a0d1a61364e1794f900261..2b2a7494ee9bd88fd5c8ebf50a5e2973
int DesktopMediaListBase::GetSourceCount() const {
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index 98cc4e039ba2b5a467175b15650a7b8ef38e8249..f5aea6a5916b9aa56ee7b81a8de97dc44e04a759 100644
index c56bc6dcc73cf0e0d5e0e64d45436ccac833cd66..69aaecca38ede55ee71310698710e3f17b04abff 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -35,7 +35,7 @@ class DesktopMediaListBase : public DesktopMediaList {
@@ -36,7 +36,7 @@ class DesktopMediaListBase : public DesktopMediaList {
void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
void StartUpdating(DesktopMediaListObserver* observer) override;
@ -53,19 +53,19 @@ index 98cc4e039ba2b5a467175b15650a7b8ef38e8249..f5aea6a5916b9aa56ee7b81a8de97dc4
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..c59706f0e244afa9408a5bfeaf5a51ad10c1f885 100644
index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..ab2dcc4d5fa19790114cae9611aa815e48386bb7 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -16,7 +16,7 @@
#include "base/threading/thread_task_runner_handle.h"
@@ -17,7 +17,7 @@
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/media/webrtc/desktop_media_list.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_features.h"
@@ -94,8 +94,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
@@ -95,8 +95,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
}
#if defined(OS_MAC)
@ -76,7 +76,7 @@ index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..c59706f0e244afa9408a5bfeaf5a51ad
#endif
} // namespace
@@ -427,6 +428,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
@@ -435,6 +436,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
base::Unretained(worker_.get()),
std::move(native_ids), thumbnail_size_));

Просмотреть файл

@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 2cc667cbb6291cb8f57a23d7446ddf5f3f699bb6..38c8d1bf63b3ec2eba7ae8ea8a975a990369e393 100644
index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f7120a266ca9 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -308,6 +308,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
} // namespace
@ -29,7 +29,7 @@ index 2cc667cbb6291cb8f57a23d7446ddf5f3f699bb6..38c8d1bf63b3ec2eba7ae8ea8a975a99
// A scoping class that prevents a window from being able to redraw in response
// to invalidations that may occur within it for the lifetime of the object.
//
@@ -358,6 +362,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
@@ -359,6 +363,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
cancel_unlock_(false),
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
::IsWindow(hwnd_) &&
@ -37,7 +37,7 @@ index 2cc667cbb6291cb8f57a23d7446ddf5f3f699bb6..38c8d1bf63b3ec2eba7ae8ea8a975a99
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -977,6 +982,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}
@ -49,7 +49,7 @@ index 2cc667cbb6291cb8f57a23d7446ddf5f3f699bb6..38c8d1bf63b3ec2eba7ae8ea8a975a99
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 1dce6029dbf81d173be148da4e3f5cb63d0fd4b8..15f1e226b5e160aba38deb4c75fd8b9538a16dab 100644
index 06b1e3552bb144dea11a100039e354c82657dc79..f6691252bd593e83fdda4fac73498df9d1cf3af6 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -205,6 +205,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,

Просмотреть файл

@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 053391edf447c902dbfc2c7115a232671cd3396e..d570e6cd1435787acd4ba0b56420142932955590 100644
index c13c06406ec4abd012082c5bfef02f2692a9bba1..0e82b376f740fcd51a608e4f99fcd7a016eefe5f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1816,6 +1816,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1893,6 +1893,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
gfx::ContentColorUsage content_color_usage) const {
@ -81,10 +81,10 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14e3f0d207 100644
index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b30436703aab 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -86,6 +86,9 @@
@@ -87,6 +87,9 @@
using gpu::gles2::GLES2Interface;
@ -94,7 +94,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
namespace viz {
namespace {
@@ -682,8 +685,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
@@ -684,8 +687,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
SetBlendEnabled(quad->ShouldDrawWithBlending());
@ -106,7 +106,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
// Use the full quad_rect for debug quads to not move the edges based on
// partial swaps.
@@ -1673,7 +1677,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
@@ -1675,7 +1679,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
params->use_color_matrix, tint_gl_composited_content_,
params->apply_shader_based_rounded_corner &&
ShouldApplyRoundedCorner(params->quad)),
@ -116,7 +116,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
}
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
@@ -2146,15 +2151,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
@@ -2148,7 +2153,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@ -126,17 +126,16 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB();
SkColor4f color_f = SkColor4f::FromColor(color);
@@ -2156,7 +2162,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
// Apply color transform if the color space or source and target do not match.
- if (quad_color_space != CurrentRenderPassColorSpace()) {
+ if (PATCH_CS(quad_color_space) != PATCH_CS(CurrentRenderPassColorSpace())) {
if (quad_color_space != CurrentRenderPassColorSpace()) {
const gfx::ColorTransform* color_transform =
- GetColorTransform(quad_color_space, CurrentRenderPassColorSpace());
+ GetColorTransform(PATCH_CS(quad_color_space), PATCH_CS(CurrentRenderPassColorSpace()));
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
color_transform->Transform(&col, 1);
color_f.fR = col.x();
@@ -2376,7 +2382,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
@@ -2378,7 +2384,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
: NON_PREMULTIPLIED_ALPHA,
false, false, tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@ -146,7 +145,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2475,7 +2482,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
@@ -2477,7 +2484,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@ -156,7 +155,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2585,7 +2593,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
@@ -2587,7 +2595,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
// The source color space should never be RGB.
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
@ -166,7 +165,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
@@ -2766,7 +2775,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2768,7 +2777,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@ -176,7 +175,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2837,8 +2847,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2839,8 +2849,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
@ -187,7 +186,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
/*adjust_src_white_level=*/draw_cache_.is_video_frame,
locked_quad.hdr_metadata());
@@ -3691,7 +3701,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
@@ -3693,7 +3703,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& dst_color_space,
bool adjust_src_white_level,
absl::optional<gfx::HDRMetadata> hdr_metadata) {
@ -198,7 +197,7 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
gfx::ColorSpace adjusted_src_color_space = src_color_space;
if (adjust_src_white_level && src_color_space.IsHDR()) {
// TODO(b/183236148): consider using the destination's HDR static metadata
@@ -4074,9 +4086,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
@@ -4076,9 +4088,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
}
@ -211,28 +210,29 @@ index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -4296,8 +4308,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -4298,8 +4310,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
- SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(),
- CurrentRenderPassColorSpace());
+ SetUseProgram(ProgramKey::DebugBorder(), PATCH_CS(gfx::ColorSpace::CreateSRGB()),
+ SetUseProgram(ProgramKey::DebugBorder(),
+ PATCH_CS(gfx::ColorSpace::CreateSRGB()),
+ PATCH_CS(CurrentRenderPassColorSpace()));
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -4486,3 +4498,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
@@ -4488,3 +4501,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
GLRenderer::OverlayTexture::~OverlayTexture() = default;
} // namespace viz
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9d8fa4f02812d7cc05225262f82dfbf1feef6ed1..a7101f41a33f08b0a759e100150b6d9f3f940a22 100644
index ec1ba57d8b0fc42c3c1dc85542f70c595e1eb464..c88cdac173ec22ea5df27a166f9e87ebe0100be4 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -229,6 +229,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
// Command-line switches to propagate to the GPU process.
static const char* const kSwitchNames[] = {
@ -241,10 +241,10 @@ index 9d8fa4f02812d7cc05225262f82dfbf1feef6ed1..a7101f41a33f08b0a759e100150b6d9f
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 43a22eb1ce2f94202f35f8080c881748535cbcd1..fe5c60224a2863489f835a7bbed82eab3a5a18bb 100644
index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689ca8ed66e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -183,6 +183,7 @@
@@ -192,6 +192,7 @@
#include "ui/accessibility/accessibility_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display_switches.h"
@ -252,7 +252,7 @@ index 43a22eb1ce2f94202f35f8080c881748535cbcd1..fe5c60224a2863489f835a7bbed82eab
#include "ui/gl/gl_switches.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -3246,6 +3247,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3288,6 +3289,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
@ -261,7 +261,7 @@ index 43a22eb1ce2f94202f35f8080c881748535cbcd1..fe5c60224a2863489f835a7bbed82eab
sandbox::policy::switches::kDisableSeccompFilterSandbox,
sandbox::policy::switches::kNoSandbox,
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
index 6b97dc4c78fd4664bbcf82308ca27bed88880822..365a15f842a14503ed7667dfb37346e5a59144ac 100644
index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138ef2c9656 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
@@ -4,6 +4,7 @@
@ -280,7 +280,7 @@ index 6b97dc4c78fd4664bbcf82308ca27bed88880822..365a15f842a14503ed7667dfb37346e5
namespace blink {
@@ -143,6 +145,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
@@ -129,6 +131,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
}
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {
@ -289,7 +289,7 @@ index 6b97dc4c78fd4664bbcf82308ca27bed88880822..365a15f842a14503ed7667dfb37346e5
+ return gfx::ColorSpace();
+ }
+
return CanvasColorSpaceToGfxColorSpace(color_space_);
return PredefinedColorSpaceToGfxColorSpace(color_space_);
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@ -358,27 +358,27 @@ index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f570194787
if (__builtin_available(macos 10.12, *)) {
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
index bea10b469ead89de3a090bb6119c9a68e49db5d6..7d9daf8cae37b35c89a25f45fccd9d1a5fa50885 100644
index bea10b469ead89de3a090bb6119c9a68e49db5d6..332f0f7b08605179d9359ef603e70d7fd8426303 100644
--- a/ui/gfx/switches.cc
+++ b/ui/gfx/switches.cc
@@ -10,6 +10,7 @@ namespace switches {
// Scale factor to apply to every animation duration. Must be >= 0.0. This will
@@ -11,6 +11,8 @@ namespace switches {
// only apply to LinearAnimation and its subclasses.
const char kAnimationDurationScale[] = "animation-duration-scale";
+const char kDisableColorCorrectRendering[] = "disable-color-correct-rendering";
+const char kDisableColorCorrectRendering[] = "disable-color-correct-rendering";
+
// Force disables font subpixel positioning. This affects the character glyph
// sharpness, kerning, hinting and layout.
const char kDisableFontSubpixelPositioning[] =
diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
index 2b97abc9a0357972eff127761aa4a3cff5f34dbb..c270ab3885594424d5863a083573735657d85f5d 100644
index 2b97abc9a0357972eff127761aa4a3cff5f34dbb..62be43283095895871221b4175ae26a5af73ec74 100644
--- a/ui/gfx/switches.h
+++ b/ui/gfx/switches.h
@@ -12,6 +12,8 @@
@@ -12,6 +12,7 @@
namespace switches {
GFX_SWITCHES_EXPORT extern const char kAnimationDurationScale[];
+GFX_SWITCHES_EXPORT extern const char kDisableColorCorrectRendering[];
+
GFX_SWITCHES_EXPORT extern const char kDisableFontSubpixelPositioning[];
GFX_SWITCHES_EXPORT extern const char kEnableNativeGpuMemoryBuffers[];
GFX_SWITCHES_EXPORT extern const char kForcePrefersReducedMotion[];

Просмотреть файл

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

Просмотреть файл

@ -6,10 +6,10 @@ 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 31c6ca8c223180086736a1677febc0d4247f5a23..9501ae821c3cd16e53e63e28d717856c9f66efd3 100644
index 367c17952131a789a834eb62000c7ebcc2b3249c..b0820c4411952ee0adf3dd4cbc6abb26c0368373 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -804,6 +804,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -803,6 +803,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@ -20,10 +20,10 @@ index 31c6ca8c223180086736a1677febc0d4247f5a23..9501ae821c3cd16e53e63e28d717856c
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 170e0755756f26c3291ef7269caadfe3ed5dae05..e288fe0ba76dee05ccc6f2339477d7c78ce46540 100644
index da4223e064f945fb7c19742ab01249c5a18238fc..4a88b0197b96c3b4fde090ae63dccb5831fbe10a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -873,6 +873,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -875,6 +875,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void OnLocalSurfaceIdChanged(
const cc::RenderFrameMetadata& metadata) override;
@ -34,10 +34,10 @@ index 170e0755756f26c3291ef7269caadfe3ed5dae05..e288fe0ba76dee05ccc6f2339477d7c7
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index a2c22345475c424bd23af4e8e1e8c087a780fc68..b3f02329ae0398978f8a87299181cb07a4799af4 100644
index d295a11bbb3436fdbbbd85eaeacba941da71be60..bcb84ec6d5cf755f9360ae8bf9fa60dd38790219 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -626,7 +626,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -627,7 +627,7 @@ void RenderWidgetHostViewAura::HideImpl() {
DCHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

Просмотреть файл

@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 812037846402d6b74fb4c20109b50572b58ed6f0..64bd98f4f7b47510f7aefdaa7e1f334142a624c9 100644
index 1462a2248b25aa5ba538e090dd52173ad0670c56..bbceb3be9442077c54cc8a3989e7c745ccfb3474 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1109,6 +1109,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1158,6 +1158,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@ -35,7 +35,7 @@ index 812037846402d6b74fb4c20109b50572b58ed6f0..64bd98f4f7b47510f7aefdaa7e1f3341
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1155,6 +1156,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1204,6 +1205,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

Просмотреть файл

@ -19,10 +19,10 @@ index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5
using PCScan = internal::PCScan;
const auto invocation_mode = flags & PartitionPurgeAggressiveReclaim
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index 16ada1a936d48a293694b854737e96609f53d86b..e0b13569d46fcc785c8db8cddd3babef8d0a9ea6 100644
index dfdd94db5d929b89671b93c991037dac957690c5..02543e37003dd0524f5321d4aa75f9f2f6899f57 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -41,6 +41,7 @@
@@ -42,6 +42,7 @@
#endif
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
@ -30,7 +30,7 @@ index 16ada1a936d48a293694b854737e96609f53d86b..e0b13569d46fcc785c8db8cddd3babef
#include "base/allocator/partition_allocator/starscan/pcscan.h"
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
#endif
@@ -74,7 +75,7 @@ void* ThreadFunc(void* params) {
@@ -75,7 +76,7 @@ void* ThreadFunc(void* params) {
base::DisallowSingleton();
#if !defined(OS_NACL)
@ -39,7 +39,7 @@ index 16ada1a936d48a293694b854737e96609f53d86b..e0b13569d46fcc785c8db8cddd3babef
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
#endif
@@ -100,7 +101,7 @@ void* ThreadFunc(void* params) {
@@ -101,7 +102,7 @@ void* ThreadFunc(void* params) {
PlatformThread::CurrentHandle().platform_handle(),
PlatformThread::CurrentId());
@ -49,10 +49,10 @@ index 16ada1a936d48a293694b854737e96609f53d86b..e0b13569d46fcc785c8db8cddd3babef
#endif
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index d6bd4ffcba213f886a6d2a85784895db89a98b6c..0723b3feca281546aafb8c6f03d94bc560bb781f 100644
index 047114ee7e2ad54cfd6240dda930ee6b5b067947..ba912d601ac12bc1a7c331d0bfc22acbecb86f3a 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -28,6 +28,7 @@
@@ -29,6 +29,7 @@
#include <windows.h>
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
@ -60,7 +60,7 @@ index d6bd4ffcba213f886a6d2a85784895db89a98b6c..0723b3feca281546aafb8c6f03d94bc5
#include "base/allocator/partition_allocator/starscan/pcscan.h"
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
#endif
@@ -104,7 +105,7 @@ DWORD __stdcall ThreadFunc(void* params) {
@@ -105,7 +106,7 @@ DWORD __stdcall ThreadFunc(void* params) {
FALSE,
DUPLICATE_SAME_ACCESS);
@ -69,7 +69,7 @@ index d6bd4ffcba213f886a6d2a85784895db89a98b6c..0723b3feca281546aafb8c6f03d94bc5
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
#endif
@@ -126,7 +127,7 @@ DWORD __stdcall ThreadFunc(void* params) {
@@ -127,7 +128,7 @@ DWORD __stdcall ThreadFunc(void* params) {
PlatformThread::CurrentId());
}

Просмотреть файл

@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index b517bd4337fcda3b167388962657344388f0b74d..64174a0ad860c2b91203cbe48893d248cd404508 100644
index c7a5f0916cf8ba6db6fa85537c140024a92ff24d..54136bae9e3b8a1a36be132323ee86f28bdf0b98 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2388,7 +2388,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
@@ -2404,7 +2404,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
}
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {

Просмотреть файл

@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index ec35385c2d39dc530408a845b816c3d494f07ba4..c816ec18110f9eea23a0e5fa1beef6007df6fc3b 100644
index d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b46f4ec31 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -530,7 +530,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@ -19,10 +19,10 @@ index ec35385c2d39dc530408a845b816c3d494f07ba4..c816ec18110f9eea23a0e5fa1beef600
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 38c8d1bf63b3ec2eba7ae8ea8a975a990369e393..338d3e54444e8c47a683c74d3eab511c7121d49a 100644
index 0b714bac63853fb67f1b5b953c71f7120a266ca9..daa10f36722c6f6f0fbfbf5de3918b966323434a 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -927,8 +927,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
}
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {

Просмотреть файл

@ -21,10 +21,10 @@ index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509
v8::ZoneBackingAllocator* GetZoneBackingAllocator() override;
#endif
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index 94f3fbd7fd28fb7d41dbd4070cac4912fe30e6ca..287231bc5826373c6a1b9b9fb1d05b54def86a7f 100644
index 0ccafbde90f99bbafb180fffa1e94f9a35a16bd7..d28b2116930dc1ed9c0cc64c4b31612a68a3c5ba 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() {
@@ -368,6 +368,10 @@ PageAllocator* V8Platform::GetPageAllocator() {
return g_page_allocator.Pointer();
}

Просмотреть файл

@ -33,10 +33,10 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 6321d35d649a58c91df621a088c23879901ef6aa..701d2f7d5fbe61d77e3267a2262bfba2674e165c 100644
index 13c730e6d8c977e014c28d7eeb2513d1f9b6e47e..8af6961ab0b5f2f26e375b8f9c7555874df06f89 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1302,6 +1302,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1325,6 +1325,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@ -51,10 +51,10 @@ index 6321d35d649a58c91df621a088c23879901ef6aa..701d2f7d5fbe61d77e3267a2262bfba2
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 5535c101c809f23f3adc85b06d42ee34f135da4b..1ff3fc928baa794f4b1562e2c7a030919099c6ec 100644
index 55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d..fcda182b959a3600be62a2b61573ad795d4b0509 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -277,6 +277,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -278,6 +278,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@ -63,10 +63,10 @@ index 5535c101c809f23f3adc85b06d42ee34f135da4b..1ff3fc928baa794f4b1562e2c7a03091
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 64f046dfc5e3eab241547b2dc4b118daef68d7d6..c7928f25882bcb09bedbac044cb6eca63f0c3763 100644
index 647b1e2fc81fb4ee177827d6909c816631009ec3..52ee1744567ee19f1bfa3730427d9a65b5a666f3 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1034,6 +1034,9 @@ interface NetworkContext {
@@ -1044,6 +1044,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

Просмотреть файл

@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index dcc985cf532f098ff5aeb649a30db314030c5a02..388790dd6e6cdba4c1d1d508184e9b0b7ef672df 100644
index d4602eb32f1f14f639df26f866f5406ab36003d5..afae7a75567c7219490f13afe010317c68552ea4 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -157,6 +157,7 @@
@@ -159,6 +159,7 @@
#include "third_party/blink/renderer/core/timing/dom_window_performance.h"
#include "third_party/blink/renderer/core/timing/window_performance.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
@ -23,7 +23,7 @@ index dcc985cf532f098ff5aeb649a30db314030c5a02..388790dd6e6cdba4c1d1d508184e9b0b
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1803,6 +1804,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1793,6 +1794,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if defined(OS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

Просмотреть файл

@ -26,10 +26,10 @@ index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 61dcb2ace529fe0bb30a885b7ae9120dfc8e0c00..95fd72c8dbcd1f60d177fee8f5e7774a9d9d3ff7 100644
index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c9540c387a9d 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
SkColor GetUnprocessedSystemColor(ColorId color_id,
ColorScheme color_scheme) const;
@ -52,7 +52,7 @@ index 61dcb2ace529fe0bb30a885b7ae9120dfc8e0c00..95fd72c8dbcd1f60d177fee8f5e7774a
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -588,6 +604,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -589,6 +605,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool forced_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

Просмотреть файл

@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h
index 274308e54f2b5c6311d68daa162c146113ba669e..e450fe31011620d87219ce28ef37fb5eba7cc348 100644
index 3224b0cc8f4b5196d5e78f031f198cecd0fddf40..b797f446cb876315ff70645564658435445045cd 100644
--- a/third_party/blink/public/platform/media/multi_buffer_data_source.h
+++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h
@@ -34,6 +34,8 @@ namespace blink {

Просмотреть файл

@ -44,10 +44,10 @@ index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a
"https://redirector.gvt1.com/edgedl/chrome/dict/";
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
index 0670254d4962c99aef03e45300e98f4cd28c9449..32e204f5ffbb71a28ff59158096e1114191ddc6a 100644
index a8a1fb3c22b812cc3ff76a4c50853cb60c74c541..27c07b11ca2f56600fe8534170066bb77dd36037 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
@@ -92,6 +92,8 @@ class SpellcheckHunspellDictionary
@@ -93,6 +93,8 @@ class SpellcheckHunspellDictionary
// Tests use this method to set a custom URL for downloading dictionaries.
static void SetDownloadURLForTesting(const GURL url);

Просмотреть файл

@ -42,10 +42,10 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043
const content::NotificationSource& source,
const content::NotificationDetails& details) {
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index 0bf7fbf3ea96248110a6b1a2ed693d4db98ce4f3..b712d7bc2364cec6796db522bd5e32230aa4d366 100644
index 67a7b52ea0e82c9ddc9e0fbdbe677855f60c536e..48bd507b2a23061ee20a02b00b79604077002aed 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -137,6 +137,8 @@ class SpellcheckService : public KeyedService,
@@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService,
// dictionaries available.
bool IsSpellcheckEnabled() const;
@ -54,9 +54,9 @@ index 0bf7fbf3ea96248110a6b1a2ed693d4db98ce4f3..b712d7bc2364cec6796db522bd5e3223
// NotificationProfile implementation.
void Observe(int type,
const content::NotificationSource& source,
@@ -304,6 +306,8 @@ class SpellcheckService : public KeyedService,
@@ -305,6 +307,8 @@ class SpellcheckService : public KeyedService,
// A pointer to the BrowserContext which this service refers to.
content::BrowserContext* context_;
raw_ptr<content::BrowserContext> context_;
+ SpellcheckHunspellDictionary::Observer* hunspell_observer_ = nullptr;
+

Просмотреть файл

@ -81,10 +81,10 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 972d8fcc61b6a4ea972d8faf7dda8d9017f7cb71..7b00ef49451b0666567073f942bdb6fc2166aaf0 100644
index fae4aae8ed31b10fba14c009bb6bf86128747b14..a672c74893f0c9a2774beec98734faf58a17cbf3 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -137,6 +137,8 @@ viz_component("service") {
@@ -139,6 +139,8 @@ viz_component("service") {
"display_embedder/output_surface_provider_impl.h",
"display_embedder/server_shared_bitmap_manager.cc",
"display_embedder/server_shared_bitmap_manager.h",
@ -171,10 +171,10 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
display_client);
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h
index bdb6bf1815551737fb93ae65880dfe186840c7e6..e08d9224cfd13185c59bd7055aa9b7e9c5792aff 100644
index 07f266d8a379c7047f43c824c9062cbb162112f0..c756e1c5b4bda1978d27fd55fba1e4531dbeed8a 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.h
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.h
@@ -65,12 +65,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
@@ -66,12 +66,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
mojom::DisplayClient* display_client,
DisplayCompositorMemoryAndTaskController* gpu_dependency,
const RendererSettings& renderer_settings,
@ -189,8 +189,8 @@ index bdb6bf1815551737fb93ae65880dfe186840c7e6..e08d9224cfd13185c59bd7055aa9b7e9
+ mojom::DisplayClient* display_client,
+ bool offscreen);
GpuServiceImpl* const gpu_service_impl_;
gpu::CommandBufferTaskExecutor* const task_executor_;
const raw_ptr<GpuServiceImpl> gpu_service_impl_;
const raw_ptr<gpu::CommandBufferTaskExecutor> task_executor_;
diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
index 33e12349a951ef533b964d1158f8fa124623e946..fc04bcaffefc277dd1d0cdd766168de017fedca8 100644
--- a/components/viz/service/display_embedder/software_output_device_mac.cc
@ -499,10 +499,10 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index d23ae68f306d6d76beec9784133bd22e2d4dee7a..370460868e7b121a3bb033668927659a2ffe75c9 100644
index 94a087b4beb3b683e90e89282c9fd6bb36825608..6efcb84af529a78e9ebc1234ef4d0c8834270c29 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -47,7 +47,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -49,7 +49,8 @@ RootCompositorFrameSinkImpl::Create(
params->gpu_compositing, params->widget, params->renderer_settings);
auto output_surface = output_surface_provider->CreateOutputSurface(
params->widget, params->gpu_compositing, display_client.get(),
@ -513,10 +513,10 @@ index d23ae68f306d6d76beec9784133bd22e2d4dee7a..370460868e7b121a3bb033668927659a
// Creating output surface failed. The host can send a new request, possibly
// with a different compositing mode.
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index bb929cb9ff381b1186f8df68e952d8f13a24a5d9..33f34eb372a4ab9c81d16dbf14485a63922f958e 100644
index ba0d6ca4e9004a0c8cfc2b99f3e3aaff4c8a756b..3f1c77e14ab6164ee9bb7d4cc3e454125e0d700e 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -382,8 +382,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -383,8 +383,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
compositor_data.display_private.reset();
root_params->display_private =
compositor_data.display_private.BindNewEndpointAndPassReceiver();
@ -569,10 +569,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index c966042cf947ef291241a5a2dddce29e48c7e6c3..4b0ae728e29738e1309ee6c1bdd9408d80074c8f 100644
index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb639c241b 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -80,6 +80,7 @@ class DisplayPrivate;
@@ -81,6 +81,7 @@ class DisplayPrivate;
class ExternalBeginFrameController;
} // namespace mojom
class ContextProvider;
@ -580,7 +580,7 @@ index c966042cf947ef291241a5a2dddce29e48c7e6c3..4b0ae728e29738e1309ee6c1bdd9408d
class HostFrameSinkManager;
class LocalSurfaceId;
class RasterContextProvider;
@@ -136,6 +137,16 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@ -597,7 +597,7 @@ index c966042cf947ef291241a5a2dddce29e48c7e6c3..4b0ae728e29738e1309ee6c1bdd9408d
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -176,6 +187,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -177,6 +188,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -607,17 +607,17 @@ index c966042cf947ef291241a5a2dddce29e48c7e6c3..4b0ae728e29738e1309ee6c1bdd9408d
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -452,6 +466,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -453,6 +467,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
+ CompositorDelegate* delegate_ = nullptr;
+
// The root of the Layer tree drawn by this compositor.
Layer* root_layer_ = nullptr;
raw_ptr<Layer> root_layer_ = nullptr;
diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h
index 64af450ed36a982124c6fcce7056b4058140747a..dcee2ec9de0e759b868b0de2c7106b2cf084c41c 100644
index 232751b32f6d6dee6c913c7020b53ae4b604a552..ba5767a80d13e848b7281f55307f6569a1524ce3 100644
--- a/ui/gfx/ca_layer_params.h
+++ b/ui/gfx/ca_layer_params.h
@@ -6,6 +6,7 @@
@ -628,7 +628,7 @@ index 64af450ed36a982124c6fcce7056b4058140747a..dcee2ec9de0e759b868b0de2c7106b2c
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gfx_export.h"
@@ -41,6 +42,8 @@ struct GFX_EXPORT CALayerParams {
@@ -51,6 +52,8 @@ struct GFX_EXPORT CALayerParams {
gfx::ScopedRefCountedIOSurfaceMachPort io_surface_mach_port;
#endif

Просмотреть файл

@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide
access to these headers for loader clients created on the browser process.
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
index da7f97cf0ec1760302fd31c94df2ee6d835fee55..7391948ccdeafb60fe955289347ab71fda6d533e 100644
index f14c99863eb3f31ebc9ffd30a55f7536585fb561..d1f11d2d13445c9814d2e7227e5e02001377329b 100644
--- a/services/network/public/cpp/resource_request.cc
+++ b/services/network/public/cpp/resource_request.cc
@@ -235,6 +235,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
@@ -234,6 +234,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
do_not_prompt_for_login == request.do_not_prompt_for_login &&
is_main_frame == request.is_main_frame &&
transition_type == request.transition_type &&
@ -29,10 +29,10 @@ index da7f97cf0ec1760302fd31c94df2ee6d835fee55..7391948ccdeafb60fe955289347ab71f
upgrade_if_insecure == request.upgrade_if_insecure &&
is_revalidating == request.is_revalidating &&
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 7119f5b854dcda2409949f3a7486a89996792ff0..861a795b3bfb7c0db53362646e0a7142e9dc4d11 100644
index 7c835d244420afe1c9ab6eac267c8789fb2afb01..564caebc55e1338e7124731d639cd6f01aebf595 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -158,6 +158,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -157,6 +157,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
bool do_not_prompt_for_login = false;
bool is_main_frame = false;
int transition_type = 0;
@ -41,10 +41,10 @@ index 7119f5b854dcda2409949f3a7486a89996792ff0..861a795b3bfb7c0db53362646e0a7142
bool upgrade_if_insecure = false;
bool is_revalidating = false;
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index 2c840cfe47af47fb8fd1b8c0b481645a7d9784fa..372665a9edb1b251bf33d3e6b3854d63bfb65d9d 100644
index 9fefb0ca05e8f461d22b7f9875cc722232ccaed4..9c020bd1272ad2894f0b5af4c504d551b9927af0 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -211,6 +211,7 @@ bool StructTraits<
@@ -210,6 +210,7 @@ bool StructTraits<
out->do_not_prompt_for_login = data.do_not_prompt_for_login();
out->is_main_frame = data.is_main_frame();
out->transition_type = data.transition_type();
@ -53,10 +53,10 @@ index 2c840cfe47af47fb8fd1b8c0b481645a7d9784fa..372665a9edb1b251bf33d3e6b3854d63
out->upgrade_if_insecure = data.upgrade_if_insecure();
out->is_revalidating = data.is_revalidating();
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index d401695c161caa3254015e771e1e6f069b91546a..62b699ce892e9d9516f355ef0ba67d6ff129b69f 100644
index 53b1cd261ec419dd68906186a3da651fe792ede0..5945e6d9749ad2a888edfa0c4b00377a7190881b 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -275,6 +275,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -272,6 +272,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
static int32_t transition_type(const network::ResourceRequest& request) {
return request.transition_type;
}
@ -67,10 +67,10 @@ index d401695c161caa3254015e771e1e6f069b91546a..62b699ce892e9d9516f355ef0ba67d6f
return request.previews_state;
}
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index 58733d931a62a88b7ee71c6a55249d4fcb460793..9af358ad9082d8b704b20542616c236c6ffe3193 100644
index 27477d595fd22dc49329631a0b52ebdaafe1edb1..a4fd22381738648040cd72dce747285f5fcb698a 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -321,6 +321,9 @@ struct URLRequest {
@@ -318,6 +318,9 @@ struct URLRequest {
// about this.
int32 transition_type;
@ -81,7 +81,7 @@ index 58733d931a62a88b7ee71c6a55249d4fcb460793..9af358ad9082d8b704b20542616c236c
// browser decide.
// Note: this is an enum of type PreviewsState.
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
index faa5ed32a9dad5580181b2b88fd19fa0bc33d4bc..47a9bf98dd0e39b7f4389010f62c485d3cc3d76d 100644
index 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed378330aa 100644
--- a/services/network/public/mojom/url_response_head.mojom
+++ b/services/network/public/mojom/url_response_head.mojom
@@ -7,6 +7,7 @@ module network.mojom;
@ -103,10 +103,10 @@ index faa5ed32a9dad5580181b2b88fd19fa0bc33d4bc..47a9bf98dd0e39b7f4389010f62c485d
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 6198a0cb16f655367788a836eb35f29e849b634a..76df460e8939b3d15663b185cc1199523b607f1a 100644
index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f7ef307c7 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -530,6 +530,7 @@ URLLoader::URLLoader(
@@ -532,6 +532,7 @@ URLLoader::URLLoader(
peer_closed_handle_watcher_(FROM_HERE,
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunnerHandle::Get()),
@ -114,7 +114,7 @@ index 6198a0cb16f655367788a836eb35f29e849b634a..76df460e8939b3d15663b185cc119952
devtools_request_id_(request.devtools_request_id),
request_mode_(request.mode),
request_credentials_mode_(request.credentials_mode),
@@ -688,7 +689,7 @@ URLLoader::URLLoader(
@@ -690,7 +691,7 @@ URLLoader::URLLoader(
url_request_->SetRequestHeadersCallback(base::BindRepeating(
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
@ -123,7 +123,7 @@ index 6198a0cb16f655367788a836eb35f29e849b634a..76df460e8939b3d15663b185cc119952
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1333,6 +1334,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1340,6 +1341,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
response_ = network::mojom::URLResponseHead::New();
PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_,
options_, response_.get());
@ -144,10 +144,10 @@ index 6198a0cb16f655367788a836eb35f29e849b634a..76df460e8939b3d15663b185cc119952
// Parse and remove the Trust Tokens response headers, if any are expected,
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index db8d4b29702e913be164d2c6906e4fbd4e6b4bf8..fd06a437e3af855b54f47406a3457bf40b4dc17c 100644
index fcc47a2389c5172e3c674e413baa857183e0f2f8..af952b03ca87c4022400ba93d2e1fb8d3759960a 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -500,6 +500,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -503,6 +503,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

Просмотреть файл

@ -8,10 +8,10 @@ patch and doing further investigation in the future. This patch cannot
be upstreamed.
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
index 15dc1427dd1b021512edca74c6aacf2f9efec8c5..bca164d9d8bd65e717a1549ff7a31bf057717da2 100644
index 8f8fb6486e68b49842eb09d6b624b55cfacf64a5..f0a55dc53604bb78cee9528975660415eb06b72c 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
@@ -320,6 +320,7 @@ Elser::~Elser() {
@@ -321,6 +321,7 @@ Elser::~Elser() {
}
Elser Elser::ElseIf(BoolExpr cond, ResultExpr then_result) const {

Просмотреть файл

@ -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 338d3e54444e8c47a683c74d3eab511c7121d49a..ad394625721fc45ae38f330b0fa98c8673add7ed 100644
index daa10f36722c6f6f0fbfbf5de3918b966323434a..067861bb743ee2f3c1916794d45efb7dd591b230 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3568,6 +3568,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3567,6 +3567,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);

Просмотреть файл

@ -0,0 +1,64 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Wed, 5 Jan 2022 15:01:31 -0500
Subject: fix: dont delete SerialPortManager on the main thread
This patch is neccessary because of the changes made in
https://chromium-review.googlesource.com/c/chromium/src/+/3283743.
Several DCHECKs was firing because AddObserver runs in the WorkerThread but
RemoveObserver runs in the UI thread. Ceasing to delete the
`SerialPortManagerImpl` class on the main thread prevents this problem.
A bit more of explanation from @deepak1556 as to why:
SerialPortManagerImpl which is responsible for holding the mojo connection
between the device service process and client has this following unique
lifetime,
// Threading notes:
// 1. Created on the UI thread.
// 2. Used on the UI thread runner (macOS only), otherwise on a blocking task
// runner.
// 3. Deleted on the same runner on which it is used *except* sometimes
// during shutdown when the runner threadpool is already shutdown.
// See crbug.com/1263149#c20 for details.
An instance of this class is created when the device service is instantiated
https://source.chromium.org/chromium/chromium/src/+/main:services/device/device_service.cc;l=122-135
On windows and linux from the above code you can see that a blocking task
runner is created to perform operations via this manager. DeviceService itself
has a lifetime of being associated with the local storage of a sequence, in
most cases this will be the main thread sequence of the application. Now when
you establish a connection with the device service via
SerialChooserContext::EnsurePortManagerConnection
https://github.com/electron/electron/blob/dd4eae8a3b7f707bcd3d083d553988a29e332189/shell/browser/serial/serial_chooser_context.cc#L206-L207
although the call is original made on the UI thread, it will be bound to the
blocking task runner sequence for windows and linux in the device service end
via https://source.chromium.org/chromium/chromium/src/+/main:services/device/device_service.cc;l=341-349
when binding the receiver. Based on the stack trace of the crash, the
port_manager_ receiver that is bound on a sequence is not destroyed on the same
sequence during shutdown. But that would be weird given
https://source.chromium.org/chromium/chromium/src/+/main:services/device/device_service.cc;l=155-156
which ensures that SerialPortManagerImpl gets destroyed on the bound sequence.
This is where https://chromium-review.googlesource.com/c/chromium/src/+/3283743
gives clarity that the DeleteSoon task never completed because the threadpool
instance was already shutdown by the time device service was being destroyed
leading to a leak and now they instead just synchronously delete the instance
on the main thread sequence which leads to the above DCHECK failure. So tl:dr,
this is not a new bug it was always present due to the lifetime associated with
this service, it just came to light because of the above CL. I am pretty sure
upstream would also hit this DCHECK, so give it a try with content_shell or
chrome and that would help reporting upstream crbug.
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index 1081fb518f896b1ca862f900866e271bb4cc31ad..b68e5bbb276204a4db752f5646c8256497ead18d 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -159,7 +159,7 @@ DeviceService::~DeviceService() {
// naturally sequenced after the last task on
// |serial_port_manager_task_runner_| per ThreadPool shutdown semantics).
// See crbug.com/1263149#c20 for details.
- delete serial_port_manager;
+ // delete serial_port_manager;
}
#endif // defined(IS_SERIAL_ENABLED_PLATFORM)
}

Просмотреть файл

@ -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 350de81e2622a8bc1bce8d9ef958590e0dd8f866..71423089904b59c82ab510ccbf5a4553a990304e 100644
index b693a98ef9e4333b0d1825ee156860a5c2dafcf6..5ca08191deaf9e8af198e12e51b1d58bb5089ffb 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1814,7 +1814,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -1816,7 +1816,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// IncrementCapturerCount() is destructed.
void DecrementCapturerCount(bool stay_hidden,
bool stay_awake,
@ -21,10 +21,10 @@ index 350de81e2622a8bc1bce8d9ef958590e0dd8f866..71423089904b59c82ab510ccbf5a4553
// 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 f7db5d52cc773dff4913d67f10af3e0ec7d98bee..6a59e9ba14dcf2fb8626b3b447cd92e865730978 100644
index d59f80df234872e0e7a89c9283e820a49c30b0e4..c3c97789daba03d288c442526015017adcaf1e88 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -667,6 +667,10 @@ class WebContents : public PageNavigator,
@@ -677,6 +677,10 @@ class WebContents : public PageNavigator,
bool stay_awake,
bool is_activity = true) WARN_UNUSED_RESULT = 0;

Просмотреть файл

@ -14,10 +14,10 @@ but it's not strictly necessary for this API to work to spec.
Profile check has been upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3247196
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 391865de1c6c5765288743178e7fec2c34dde680..271a1cc24d14c187f07cdb56e21fcc2823d1ea70 100644
index cf2a4efc6e99cd53bf0a3a7ae9222578627d3714..171ebbdc16d0fb47054ccc001cf144bb93355c28 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -369,13 +369,9 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -382,13 +382,9 @@ void FullscreenController::EnterFullscreenModeInternal(
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
// from manually entering fullscreen mode and also disables kiosk mode on
// desktop platforms.
@ -33,7 +33,7 @@ index 391865de1c6c5765288743178e7fec2c34dde680..271a1cc24d14c187f07cdb56e21fcc28
#endif
toggled_into_fullscreen_ = true;
@@ -388,6 +384,7 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -401,6 +397,7 @@ void FullscreenController::EnterFullscreenModeInternal(
url = extension_caused_fullscreen_;
}
@ -41,7 +41,7 @@ index 391865de1c6c5765288743178e7fec2c34dde680..271a1cc24d14c187f07cdb56e21fcc28
if (display_id != display::kInvalidDisplayId) {
// Check, but do not prompt, for permission to request a specific screen.
// Sites generally need permission to get the display id in the first place.
@@ -401,6 +398,7 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -414,6 +411,7 @@ void FullscreenController::EnterFullscreenModeInternal(
display_id = display::kInvalidDisplayId;
}
}

Просмотреть файл

@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
to make it usable from Electron by removing Profile references.
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
index 616c74eef1b98aeceda128630b64e270d53c10a4..d04fc255dd4dcfa2bac7b43f99f41eaddaee85fa 100644
index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba135a2d885 100644
--- a/chrome/browser/accessibility/accessibility_ui.cc
+++ b/chrome/browser/accessibility/accessibility_ui.cc
@@ -20,7 +20,10 @@
@ -125,10 +125,10 @@ index 616c74eef1b98aeceda128630b64e270d53c10a4..d04fc255dd4dcfa2bac7b43f99f41ead
+#endif
}
diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h
index 35a907a03cda75be919c6218efdb0295f1e73e57..bff530dcdf7f8f7271da72acbbd4fc5659c4dd5f 100644
index 0f73d3883093f6e49427ac6fe6428e97282a1e03..9041c90d13b07b03cc96e8a03a3821ef54a69a7d 100644
--- a/chrome/browser/accessibility/accessibility_ui.h
+++ b/chrome/browser/accessibility/accessibility_ui.h
@@ -24,6 +24,8 @@ struct AXEventNotificationDetails;
@@ -26,6 +26,8 @@ struct AXEventNotificationDetails;
class WebContents;
} // namespace content
@ -137,7 +137,7 @@ index 35a907a03cda75be919c6218efdb0295f1e73e57..bff530dcdf7f8f7271da72acbbd4fc56
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
@@ -65,6 +67,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
@@ -67,6 +69,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
private:

Просмотреть файл

@ -10,10 +10,10 @@ them should they exist.
This will be upstreamed.
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 7fde07c789c35d103174020f590e177eefbe6f2b..07f10be994fcf7d7845f6c297e17f86f27cc4fe9 100644
index 36f2e09d563a610128305cf4890e2af3bf6f4cdd..85363bd922bf0ab2630e3d5f350de0c58792963a 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -83,6 +83,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
@@ -85,6 +85,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
// Returns true if the orientation was set.
bool SetOrientationIsLandscape(bool landscape);
@ -25,10 +25,10 @@ index 7fde07c789c35d103174020f590e177eefbe6f2b..07f10be994fcf7d7845f6c297e17f86f
// Returns true if duplex mode is set.
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index dd9bb775164ad483cf7cc26be150da0abba2433f..3704d75b9b25e4b8205736666cb8496225672df5 100644
index 9e351c7e80a135adf0ebe011763f5164e51981bb..b9fcb4d2a8c7a22ebc7cd8434636454e7fc2aab6 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -192,7 +192,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -199,7 +199,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
!SetCollateInPrintSettings(settings_->collate()) ||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
!SetOutputColor(static_cast<int>(settings_->color())) ||
@ -38,7 +38,7 @@ index dd9bb775164ad483cf7cc26be150da0abba2433f..3704d75b9b25e4b8205736666cb84962
return OnError();
}
}
@@ -345,6 +346,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -352,6 +353,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
return PMSetCopies(print_settings, copies, false) == noErr;
}
@ -62,7 +62,7 @@ index dd9bb775164ad483cf7cc26be150da0abba2433f..3704d75b9b25e4b8205736666cb84962
PMPrintSettings print_settings =
static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]);
diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
index acb040f998546b0e01be45c28c505bbafcf2c141..1083db84804e5ed8b420d3e8e3da372ff15ec2cf 100644
index a964910a3b7e3bd225a3b8dc35ef9dc57c77248d..9f791d9ba5f0b540f5e3a67f5e1abb318ddb7680 100644
--- a/printing/printing_context_system_dialog_win.cc
+++ b/printing/printing_context_system_dialog_win.cc
@@ -54,14 +54,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(

Просмотреть файл

@ -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 a2537d567b12a247ac333a1750c8be6d2e165cf5..ad18fca64420043bda06449972742cf3ff000b43 100644
index 4864b5301dec83150d3a48a9168e0d7ddef344ad..0e429686a325ef08ce617810c2c5ec4108bec973 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -3084,6 +3084,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -3099,6 +3099,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@ -20,7 +20,7 @@ index a2537d567b12a247ac333a1750c8be6d2e165cf5..ad18fca64420043bda06449972742cf3
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index a1da3d41be9131d1d2ddd0e737aaca7055d71af0..abf86d15b58ecd2d19589991cac3f1bcd2d0c30f 100644
index 253c47f41294155bab9a3b0884e65a09fcacd0d0..ccce9c5de27c863c181e5c54b3f8976106a77c08 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient {

Просмотреть файл

@ -24,10 +24,10 @@ index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf
g_reference_table = reference_table;
}
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index cb1da2cafc275b62b2a8bf2260d97054777e6d30..cb587f852f230f84db1c50ffd6d41cad447e0949 100644
index 78133f9b34327c311c69620af621eba3d7f2cbf9..a965545de342811e468594fab4d792fc5c4daf32 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -99,7 +99,8 @@ class GIN_EXPORT IsolateHolder {
@@ -100,7 +100,8 @@ class GIN_EXPORT IsolateHolder {
static void Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator,
const intptr_t* reference_table = nullptr,
@ -38,10 +38,10 @@ index cb1da2cafc275b62b2a8bf2260d97054777e6d30..cb587f852f230f84db1c50ffd6d41cad
// Returns whether `Initialize` has already been invoked in the process.
// Initialization is a one-way operation (i.e., this method cannot return
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index aa866392fcc011f8e4408e3084697a9edee67a1d..51820fc5cd9bcbc835ae49f2a01f0165401790b6 100644
index f576fc909eed4168130571590e3a80d19ccc3dd8..ff91f59446275d027ac7100c1eb0dcd1051993da 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -333,12 +333,14 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -341,12 +341,14 @@ void SetFlags(IsolateHolder::ScriptMode mode,
// static
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,

Просмотреть файл

@ -28,7 +28,7 @@ index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acb
void GpuDataManagerImpl::UpdateDawnInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 9b850c01ab110467c3b595f4499d1f39e9f21001..7b0a2d2c2e385d4af5226e448b958181f0bd50ce 100644
index bb9a976842b869bf31c46c45686f6f5238841eb2..489619f6d3d4accadb811db287a9ff498f35d8bb 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -124,6 +124,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
@ -40,10 +40,10 @@ index 9b850c01ab110467c3b595f4499d1f39e9f21001..7b0a2d2c2e385d4af5226e448b958181
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 16b1653c8e7dbcd042c17bb4f2c308b7dfd6968b..17fdd083f387d557bff81fc0b0b73b91627ac9e0 100644
index cddf8dfa73ba64b89e37b3ca375d5872d23b995f..06fbfe2b0a9a74a785ba54d495f7813286e81b6b 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1171,6 +1171,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
@@ -1212,6 +1212,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
if (host)
host->ForceShutdown();
}
@ -57,10 +57,10 @@ index 16b1653c8e7dbcd042c17bb4f2c308b7dfd6968b..17fdd083f387d557bff81fc0b0b73b91
void GpuDataManagerImplPrivate::UpdateDawnInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index ce7af71283ad613e18ce05789396c0b74e937798..f4bf867b3a995d58164085b14ef01e0e8d55a37b 100644
index 8ae871aaf3da7b08da79490a87104ce62ca30b4e..ca6405c728187c10b19e86e7848b6f5fe558e601 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -88,6 +88,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
@@ -89,6 +89,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool VulkanRequested() const;
void PostCreateThreads();
void TerminateInfoCollectionGpuProcess();

Просмотреть файл

@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index dda65e37e4db1b9a8dead9e651795d318e9a18e3..722fff74cdc7b0e5f5a74f3fd2262320654d44f8 100644
index f3a209264743ce4f38da3c51ad49a9a9308d39e0..57dbb19552cb8496a2c402cbf20ca7ce39c0dad2 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -892,6 +892,11 @@
@@ -903,6 +903,11 @@
"includes": [4960],
},

Просмотреть файл

@ -6,7 +6,7 @@ Subject: gtk_visibility.patch
Allow electron to depend on GTK in the GN build.
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
index 659002397184ad5017686585c0a5ad641e3312c5..85fdf6513403e7a713444213883fe3e0c101af42 100644
index c7173176472e80d8de4888000e99d45843240785..c3076d8112ec8976a438d1351ad2e404ac64fce7 100644
--- a/build/config/linux/gtk/BUILD.gn
+++ b/build/config/linux/gtk/BUILD.gn
@@ -33,6 +33,7 @@ pkg_config("gtk_internal_config") {

Просмотреть файл

@ -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 9a8bae564d9a71b649e0a7b4d75a72bf1e7d748d..918bc176bb4408b3410babef717575a09cb30c90 100755
index 13e126305548d8681754afdc5bca72e0df22f98c..63fd08c27d6f20295ce50be0685881ec0e645594 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -282,6 +282,8 @@ def main():

Просмотреть файл

@ -42,10 +42,10 @@ index 2bed8f7ce21ab052c0c319775875b9cf008b2636..9aa4536d5c8fb38ac58e41c107b946cf
access_mode_, task_runner);
if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) {
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index cb587f852f230f84db1c50ffd6d41cad447e0949..619982a42c1255c3629da78fd35c82cdcf174b36 100644
index a965545de342811e468594fab4d792fc5c4daf32..94d1d45eb766ee1e2a2910124e46969edf264ae9 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -81,7 +81,8 @@ class GIN_EXPORT IsolateHolder {
@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder {
IsolateType isolate_type,
IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
v8::CreateHistogramCallback create_histogram_callback = nullptr,

Просмотреть файл

@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index d19cd4006e88dc165a6e5fbbe8f1d96547d136f3..ed3a23abbc392ca80d6db86ec6808877bb3f6b0a 100644
index 9b3e3ca0cf6c9052953e0ac82f1622113a8b2d0d..be8aaecf589bb5b8198d44acbf115e456ed76dc1 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -254,11 +254,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

Просмотреть файл

@ -9,10 +9,10 @@ be created for each child process, despite logs being redirected to a
file.
diff --git a/content/app/content_main.cc b/content/app/content_main.cc
index aef30d74fd92480228281e6982df5afc075aa2c6..4710c3797679a5c7049a037cc0b13a0e3996c16a 100644
index 5ad6c026e9d05b3c016adeab1c5eea9883dcac6c..2c94c115514b644c897e9c3896fe2941d42cf132 100644
--- a/content/app/content_main.cc
+++ b/content/app/content_main.cc
@@ -376,8 +376,12 @@ RunContentProcess(ContentMainParams params,
@@ -378,8 +378,12 @@ RunContentProcess(ContentMainParams params,
#if defined(OS_WIN)
// Route stdio to parent console (if any) or create one.

Просмотреть файл

@ -6,7 +6,7 @@ Subject: mas: avoid usage of _CFIsObjC
Removes usage of the _CFIsObjC private API.
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 89818822c348b8df2d3c8ce25cac50bf9fc15a3b..209cdf0a788b7594bb5f9d58abf1690c846bf374 100644
index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0ed37775d1 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -31,12 +31,6 @@

Просмотреть файл

@ -87,7 +87,7 @@ index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28a
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index ca7e571a096f1e91f69a356b0d6d833878d49121..5d6ba8288a0d5e41ba48a643a30cac47f99cadf7 100644
index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a1265072a46ca76 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler;
@ -100,7 +100,7 @@ index ca7e571a096f1e91f69a356b0d6d833878d49121..5d6ba8288a0d5e41ba48a643a30cac47
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -667,10 +669,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
@ -114,10 +114,10 @@ index ca7e571a096f1e91f69a356b0d6d833878d49121..5d6ba8288a0d5e41ba48a643a30cac47
// 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 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d1848ad0a56f 100644
index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab16489665eb29e24 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -252,8 +252,10 @@
@@ -253,8 +253,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@ -128,7 +128,7 @@ index 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d184
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1477,8 +1479,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1484,8 +1486,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@ -139,7 +139,7 @@ index 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d184
return [GetInProcessNSView() window];
}
@@ -1522,9 +1526,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1529,9 +1533,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@ -151,7 +151,7 @@ index 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d184
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2017,12 +2023,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2030,12 +2036,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@ -167,10 +167,10 @@ index 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d184
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 42b4415f1501ae9c6895b325f718b699b486daba..92f6a2a971951fca55f452dd0bcd60b1ad66d29c 100644
index 37151bca8d18a3decc418812b6a9ea76eb0c8f3a..3ac702aede00c3eba77751115d6663f561b43c05 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -314,6 +314,13 @@ component("base") {
@@ -318,6 +318,13 @@ component("base") {
]
}

Просмотреть файл

@ -7,27 +7,26 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
excluded for people who want to submit their apps to the Mac App store.
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
index 393ff52e2ba4835aced71337745de8cadbb32dba..38ed439c10522dedae714ea3b7683150d083a743 100644
index dc33d3674d6c3cf794a401a4c41bd1980ccd9a51..b44a24bcde38e407f93b13e5699323055d4a8a62 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
@@ -295,7 +295,7 @@
return PopulateSize([value sizeValue]);
}
@@ -275,6 +275,7 @@
return PopulateArray((NSArray*)value, indexer);
}
-
+#ifndef MAS_BUILD
// AXTextMarker
if (content::IsAXTextMarker(value)) {
return PopulateTextPosition(content::AXTextMarkerToAXPosition(value),
@@ -306,6 +306,7 @@
if (content::IsAXTextMarkerRange(value)) {
return PopulateTextMarkerRange(value, line_indexer);
}
@@ -284,6 +285,7 @@
// AXTextMarkerRange
if (content::IsAXTextMarkerRange(value))
return PopulateTextMarkerRange(value, indexer);
+#endif
// AXValue
if (CFGetTypeID(value) == AXValueGetTypeID()) {
@@ -425,7 +426,7 @@
return AXNSObjectToBaseValue(value, indexer);
}
@@ -322,7 +324,7 @@
AXMakeConst(affinity));
return set;
}
@ -35,21 +34,21 @@ index 393ff52e2ba4835aced71337745de8cadbb32dba..38ed439c10522dedae714ea3b7683150
+#ifndef MAS_BUILD
base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
id marker_range,
const LineIndexer* line_indexer) const {
@@ -441,7 +442,7 @@
PopulateTextPosition(ax_range.focus()->Clone(), line_indexer));
const AXTreeIndexerMac* indexer) const {
@@ -338,7 +340,7 @@
PopulateTextPosition(ax_range.focus()->Clone(), indexer));
return dict;
}
-
+#endif
base::Value AccessibilityTreeFormatterMac::PopulateArray(
NSArray* node_array,
const LineIndexer* line_indexer) const {
const AXTreeIndexerMac* indexer) const {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
index d03389f1d879b20edada440efad6cc319a275585..b63a6a7e4b269195851b5885a83ee88d8edb6f1c 100644
index 2b05b9e3b9a5f4ad1951fbbbfa34adf129d8f408..0ca278cf6bb0ecc2127f5507941cf592449e2e61 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
@@ -151,12 +151,14 @@ class CONTENT_EXPORT AttributeInvoker final {
@@ -89,12 +89,14 @@ class CONTENT_EXPORT AttributeInvoker final {
const ui::AXPropertyNode&,
bool log_failure = true) const;
@ -65,11 +64,11 @@ index d03389f1d879b20edada440efad6cc319a275585..b63a6a7e4b269195851b5885a83ee88d
gfx::NativeViewAccessible LineIndexToNode(
const std::u16string line_index) const;
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b5351943fa84 100644
index 696d87b7aaf0c9de9c071bd97197192720752010..ebf3935d20ba22ccc0473252a1323be4bd003eec 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
@@ -180,9 +180,11 @@
if (IsBrowserAccessibilityCocoa(target) || IsAXUIElement(target))
@@ -189,9 +189,11 @@
if (IsNSAccessibilityElement(target) || IsAXUIElement(target))
return InvokeForAXElement(target, property_node);
+#ifndef MAS_BUILD
@ -80,23 +79,23 @@ index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b535
if ([target isKindOfClass:[NSArray class]])
return InvokeForArray(target, property_node);
@@ -380,6 +382,7 @@
@@ -389,6 +391,7 @@
property_name == "AXTextMarkerRangeForUIElement") { // UIElement
return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
return OptionalNSObject::NotNullOrError(PropertyNodeToUIElement(arg_node));
}
+#ifndef MAS_BUILD
if (property_name == "AXIndexForTextMarker" ||
property_name == "AXNextWordEndTextMarkerForTextMarker" ||
property_name ==
@@ -391,6 +394,7 @@
return OptionalNSObject::NotNilOrError(
@@ -400,6 +403,7 @@
return OptionalNSObject::NotNullOrError(
PropertyNodeToTextMarkerRange(arg_node));
}
+#endif
return OptionalNSObject::NotApplicable();
}
@@ -403,6 +407,7 @@
@@ -412,6 +416,7 @@
return value;
// NSRange
@ -104,7 +103,7 @@ index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b535
value = PropertyNodeToRange(property_node, false);
if (value)
return value;
@@ -419,6 +424,10 @@
@@ -428,6 +433,10 @@
// TextMarkerRange
return PropertyNodeToTextMarkerRange(property_node, false);
@ -115,7 +114,7 @@ index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b535
}
// NSNumber. Format: integer.
@@ -529,6 +538,7 @@
@@ -538,6 +547,7 @@
return uielement;
}
@ -123,7 +122,7 @@ index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b535
id AttributeInvoker::DictNodeToTextMarker(const AXPropertyNode& dictnode,
bool log_failure) const {
if (!dictnode.IsDict()) {
@@ -618,6 +628,7 @@
@@ -627,6 +637,7 @@
return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker);
}
@ -132,10 +131,10 @@ index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b535
} // namespace a11y
} // namespace content
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index 06a6d289320b4f4256ccc64f7b5567e4c69ed8f8..e6fe435e3ca34c6ac6db42f082a7783b2b3ec031 100644
index 8ba9ceef621eaa8539d2e127ab75c23ab671f2a1..cdcf397f3fb4fb98b48fcd5080edb883eeb9b52e 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -150,7 +150,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -148,7 +148,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@property(nonatomic, readonly) NSNumber* enabled;
// Returns a text marker that points to the last character in the document that
// can be selected with Voiceover.
@ -145,7 +144,7 @@ index 06a6d289320b4f4256ccc64f7b5567e4c69ed8f8..e6fe435e3ca34c6ac6db42f082a7783b
@property(nonatomic, readonly) NSNumber* expanded;
@property(nonatomic, readonly) NSNumber* focused;
@property(nonatomic, readonly) NSNumber* grabbed;
@@ -162,7 +164,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -160,7 +162,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
// Index of a row, column, or tree item.
@property(nonatomic, readonly) NSNumber* index;
@property(nonatomic, readonly) NSNumber* treeItemRowIndex;
@ -155,7 +154,7 @@ index 06a6d289320b4f4256ccc64f7b5567e4c69ed8f8..e6fe435e3ca34c6ac6db42f082a7783b
@property(nonatomic, readonly) NSNumber* isMultiSelectable;
@property(nonatomic, readonly) NSNumber* loaded;
@property(nonatomic, readonly) NSNumber* loadingProgress;
@@ -183,14 +187,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -179,14 +183,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
// The object is selected as a whole.
@property(nonatomic, readonly) NSNumber* selected;
@property(nonatomic, readonly) NSArray* selectedChildren;
@ -175,19 +174,18 @@ index 06a6d289320b4f4256ccc64f7b5567e4c69ed8f8..e6fe435e3ca34c6ac6db42f082a7783b
// is concerned.
@property(nonatomic, readonly) NSString* subrole;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1d1e4b734 100644
index 34fbe096ddcc84b156384f12a23f278c0f94e385..043c9b8113c4f15f0248839a69b7ee76e3da2794 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -195,6 +195,8 @@
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
@"AXLengthForTextMarkerRange";
@@ -188,6 +188,7 @@
+
+#ifndef MAS_BUILD
// Private attributes that can be used for testing text markers, e.g. in dump
// tree tests.
+#ifndef MAS_BUILD
NSString* const
@@ -206,6 +208,7 @@
NSAccessibilityTextMarkerDebugDescriptionParameterizedAttribute =
@"AXTextMarkerDebugDescription";
@@ -197,6 +198,7 @@
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
@ -195,15 +193,15 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
// Other private attributes.
NSString* const NSAccessibilityIdentifierChromeAttribute = @"ChromeAXNodeId";
@@ -230,6 +233,7 @@
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
+#ifndef MAS_BUILD
@@ -224,6 +226,7 @@
// The following are private accessibility APIs required for cursor navigation
// and text selection. VoiceOver started relying on them in Mac OS X 10.11.
// They are public as of the 12.0 SDK.
@@ -464,6 +468,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range,
+#ifndef MAS_BUILD
#if !defined(MAC_OS_VERSION_12_0) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_12_0
using AXTextMarkerRangeRef = CFTypeRef;
@@ -455,6 +458,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range,
AddMisspelledTextAttributes(ax_range, attributed_text);
return attributed_text;
}
@ -211,7 +209,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -740,6 +745,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
@@ -716,6 +720,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
0 == strcmp([value objCType], @encode(NSRange));
}
@ -219,7 +217,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
bool content::IsAXTextMarker(id object) {
if (object == nil)
return false;
@@ -784,6 +790,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
@@ -760,6 +765,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
static_cast<AXTextMarkerRef>(focus_textmarker));
return [static_cast<id>(cf_marker_range) autorelease];
}
@ -227,7 +225,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
@implementation BrowserAccessibilityCocoa
@@ -815,7 +822,9 @@ + (void)initialize {
@@ -784,7 +790,9 @@ + (void)initialize {
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@ -237,7 +235,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -827,8 +836,10 @@ + (void)initialize {
@@ -794,8 +802,10 @@ + (void)initialize {
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@ -248,7 +246,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
{NSAccessibilityLinkedUIElementsAttribute, @"linkedUIElements"},
@@ -849,13 +860,17 @@ + (void)initialize {
@@ -814,13 +824,17 @@ + (void)initialize {
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@ -266,15 +264,14 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1259,6 +1274,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled);
}
@@ -1160,12 +1174,14 @@ - (NSNumber*)enabled {
+#ifndef MAS_BUILD
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
+#ifndef MAS_BUILD
- (id)endTextMarker {
@@ -1267,6 +1283,7 @@ - (id)endTextMarker {
if (![self instanceActive])
return nil;
BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfContent());
}
@ -282,7 +279,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1467,6 +1484,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
@@ -1338,6 +1354,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
return false;
}
@ -290,15 +287,15 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
- (NSNumber*)AXInsertionPointLineNumber {
return [self insertionPointLineNumber];
}
@@ -1496,6 +1514,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1368,6 +1385,7 @@ - (NSNumber*)insertionPointLineNumber {
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
return @(std::distance(lineStarts.begin(), iterator));
}
+#endif
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -1826,8 +1845,12 @@ - (BOOL)shouldExposeTitleUIElement {
@@ -1692,8 +1710,12 @@ - (BOOL)shouldExposeTitleUIElement {
return content::AXTextEdit(newValue, std::u16string(), nil);
}
}
@ -311,7 +308,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
}
// internal
@@ -2157,6 +2180,7 @@ - (NSArray*)selectedChildren {
@@ -1881,6 +1903,7 @@ - (NSArray*)selectedChildren {
return ret;
}
@ -319,17 +316,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
- (NSString*)AXSelectedText {
return [self selectedText];
}
@@ -2205,7 +2229,9 @@ - (NSValue*)selectedTextRange {
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
+#endif
+#ifndef MAS_BUILD
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
@@ -2217,6 +2243,7 @@ - (id)selectedTextMarkerRange {
@@ -1941,6 +1964,7 @@ - (id)selectedTextMarkerRange {
// words correctly.
return CreateTextMarkerRange(ax_range.AsBackwardRange());
}
@ -337,15 +324,14 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
- (NSValue*)size {
if (![self instanceActive])
@@ -2249,6 +2276,7 @@ - (NSString*)sortDirection {
return nil;
}
@@ -1975,12 +1999,14 @@ - (NSString*)sortDirection {
+#ifndef MAS_BUILD
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
+#ifndef MAS_BUILD
- (id)startTextMarker {
@@ -2257,6 +2285,7 @@ - (id)startTextMarker {
if (![self instanceActive])
return nil;
BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfContent());
}
@ -353,7 +339,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
- (NSString*)AXSubrole {
return [self subrole];
@@ -2600,12 +2629,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2308,12 +2334,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedTextContent =
[[[NSMutableAttributedString alloc]
initWithString:base::SysUTF16ToNSString(textContent)] autorelease];
@ -368,7 +354,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
return [attributedTextContent attributedSubstringFromRange:range];
}
@@ -2737,6 +2768,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2448,6 +2476,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return ToBrowserAccessibilityCocoa(cell);
}
@ -376,7 +362,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
if ([attribute
isEqualToString:
NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) {
@@ -3062,6 +3094,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2786,6 +2815,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return CreateTextMarker(root->CreateTextPositionAt(index));
}
@ -384,7 +370,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -3092,6 +3125,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2816,6 +2846,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -392,7 +378,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3211,6 +3245,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2935,6 +2966,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return @(child->GetIndexInParent());
}
@ -400,7 +386,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
return nil;
}
@@ -3761,6 +3796,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
@@ -3453,6 +3485,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
->AsTextSelectionPosition()));
}
}
@ -408,7 +394,7 @@ index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1
if ([attribute
isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) {
BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value);
@@ -3771,6 +3807,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
@@ -3463,6 +3496,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
range.anchor()->AsTextSelectionPosition(),
range.focus()->AsTextSelectionPosition()));
}
@ -526,7 +512,7 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5
}
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 77a020140dd635148fcd8d9b08d8d1f4ed852415..902e77ce90a60c835a9a324decf3d0dd094f1c85 100644
index 3f7dce0281f7b5a540d7b9377ef14a8a6aa9a2fa..11d8419791f3e45d5242081422d452d4fc703833 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -42,6 +42,7 @@
@ -556,7 +542,7 @@ index 77a020140dd635148fcd8d9b08d8d1f4ed852415..902e77ce90a60c835a9a324decf3d0dd
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
low_energy_discovery_manager_(
@@ -355,8 +359,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -365,8 +369,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {

Просмотреть файл

@ -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 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879901ef6aa 100644
index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1f9b6e47e 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -119,6 +119,11 @@
@ -22,7 +22,7 @@ index 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -425,6 +430,79 @@ bool GetFullDataFilePath(
@@ -433,6 +438,79 @@ bool GetFullDataFilePath(
} // namespace
@ -102,7 +102,7 @@ index 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
@@ -651,6 +729,13 @@ void NetworkContext::SetClient(
@@ -659,6 +737,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@ -116,7 +116,7 @@ index 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2106,6 +2191,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2135,6 +2220,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -127,10 +127,10 @@ index 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index e5497a2346da9d2d643885c846acb71bf11408be..5535c101c809f23f3adc85b06d42ee34f135da4b 100644
index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -102,6 +102,7 @@ class DomainReliabilityMonitor;
@@ -103,6 +103,7 @@ class DomainReliabilityMonitor;
namespace network {
class CertVerifierWithTrustAnchors;
@ -138,7 +138,7 @@ index e5497a2346da9d2d643885c846acb71bf11408be..5535c101c809f23f3adc85b06d42ee34
class CookieManager;
class ExpectCTReporter;
class HostResolver;
@@ -216,6 +217,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -217,6 +218,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@ -147,7 +147,7 @@ index e5497a2346da9d2d643885c846acb71bf11408be..5535c101c809f23f3adc85b06d42ee34
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -755,6 +758,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -758,6 +761,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr;
#endif
@ -157,10 +157,10 @@ index e5497a2346da9d2d643885c846acb71bf11408be..5535c101c809f23f3adc85b06d42ee34
// CertNetFetcher is not used by the current platform, or if the actual
// net::CertVerifier is instantiated outside of the network service.
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 502e989d74e8ad5682401c60f845fb21219d9058..64f046dfc5e3eab241547b2dc4b118daef68d7d6 100644
index 8cdb76c6eac2bf3412b55ab1dd0fad0ccb1f954d..647b1e2fc81fb4ee177827d6909c816631009ec3 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -269,6 +269,17 @@ struct NetworkContextFilePaths {
@@ -272,6 +272,17 @@ struct NetworkContextFilePaths {
bool trigger_migration = false;
};
@ -178,7 +178,7 @@ index 502e989d74e8ad5682401c60f845fb21219d9058..64f046dfc5e3eab241547b2dc4b118da
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -777,6 +788,9 @@ interface NetworkContext {
@@ -787,6 +798,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

Просмотреть файл

@ -7,10 +7,10 @@ Pass RenderProcessHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
index a6029901f614006207a0d91bda490e85319f7cb7..b2a6f96f51f232a22ef20ea1521ef80976861859 100644
index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6b45d6b33 100644
--- a/content/browser/notifications/blink_notification_service_impl.cc
+++ b/content/browser/notifications/blink_notification_service_impl.cc
@@ -83,10 +83,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@@ -81,10 +81,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
PlatformNotificationContextImpl* notification_context,
BrowserContext* browser_context,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
@ -23,7 +23,7 @@ index a6029901f614006207a0d91bda490e85319f7cb7..b2a6f96f51f232a22ef20ea1521ef809
browser_context_(browser_context),
service_worker_context_(std::move(service_worker_context)),
origin_(origin),
@@ -149,7 +151,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
@@ -147,7 +149,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
notification_id, std::move(event_listener_remote));
browser_context_->GetPlatformNotificationService()->DisplayNotification(
@ -33,10 +33,10 @@ index a6029901f614006207a0d91bda490e85319f7cb7..b2a6f96f51f232a22ef20ea1521ef809
}
diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
index 98da5ed077b329f4abc911a3f21bfbbe8b8fb069..dea0f129cd9744bd54d15c041f9f02594228eb8f 100644
index cb2b09912dbe426611e944316841ee2a9c2e373f..4d2603c29b2d89fa296b1aad40c2132a9c7498aa 100644
--- a/content/browser/notifications/blink_notification_service_impl.h
+++ b/content/browser/notifications/blink_notification_service_impl.h
@@ -40,6 +40,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
@@ -41,6 +41,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
PlatformNotificationContextImpl* notification_context,
BrowserContext* browser_context,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
@ -44,12 +44,12 @@ index 98da5ed077b329f4abc911a3f21bfbbe8b8fb069..dea0f129cd9744bd54d15c041f9f0259
const url::Origin& origin,
const GURL& document_url,
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
@@ -103,6 +104,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
@@ -101,6 +102,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
// The notification context that owns this service instance.
PlatformNotificationContextImpl* notification_context_;
raw_ptr<PlatformNotificationContextImpl> notification_context_;
+ RenderFrameHost* render_frame_host_;
BrowserContext* browser_context_;
+ raw_ptr<RenderFrameHost> render_frame_host_;
raw_ptr<BrowserContext> browser_context_;
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@ -87,7 +87,7 @@ index 8e23ab272000a1244959bf9164d6880660d4a843..ff89f2bdf07e91029841bab7ce7c7a92
void PlatformNotificationContextImpl::RemoveService(
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index 072881f0d2b47c3ed2b3d7e49da5a49ed5176349..4617e81ac64586001e63c536e9b066ddb77b194a 100644
index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df61181bc55 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -47,6 +47,7 @@ class BrowserContext;
@ -107,10 +107,10 @@ index 072881f0d2b47c3ed2b3d7e49da5a49ed5176349..4617e81ac64586001e63c536e9b066dd
const GURL& document_url,
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 65f04c931878041c335a2f995c1a48a4f7145813..6284092e8744a28f582f42f45154483bc6d1aa5e 100644
index ac1cbdad1eaa7ce7359a611a349b318ea7617f6c..dde9fb6174be8a0da70cf29d5428ef31035a39f7 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2113,7 +2113,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::CreateNotificationService(
document_url = rfh->GetLastCommittedURL();
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@ -153,10 +153,10 @@ index 7397963a36bec7016ae92fbc4bb741825e5fb8d1..d928e1ea629cd69ff188ce53e311786a
const GURL& origin,
const GURL& document_url,
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
index 7baae145754fd4b236c229335e27e5221ef085ed..5b87cc4bbf6c7d17cb790c8927b613150505dc0b 100644
index 45ad11f0fc5f0abebbc05836221528e59da6c26b..a78bde7fbec5f3fe3ed59a6b45265a1a02206764 100644
--- a/content/test/mock_platform_notification_service.h
+++ b/content/test/mock_platform_notification_service.h
@@ -51,6 +51,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
@@ -52,6 +52,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
// PlatformNotificationService implementation.
void DisplayNotification(

Просмотреть файл

@ -215,13 +215,13 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61
return nullptr;
}
diff --git a/chrome/renderer/pepper/pepper_helper.h b/chrome/renderer/pepper/pepper_helper.h
index 7572241033d2fa74604a45702aac22631680a01c..6416917aa000e93109da1dfacf9c47bf0bdbaa80 100644
index 5794ac83e62c7f966920a2692246e7677b297695..01d5a609ad34bb2829bd5714e70930b90c549661 100644
--- a/chrome/renderer/pepper/pepper_helper.h
+++ b/chrome/renderer/pepper/pepper_helper.h
@@ -6,11 +6,13 @@
@@ -5,11 +5,13 @@
#ifndef CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_
#define CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_
#include "base/compiler_specific.h"
+#include "base/component_export.h"
#include "content/public/renderer/render_frame_observer.h"

Просмотреть файл

@ -61,10 +61,10 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
index 75ff4175b80df26667ed2b4d3ba96c5d23aab597..7fa6a713f64c75360c54039563635c2db707d798 100644
index d63256af63e93c7aab4ce348b9d27953d5346c6c..0f708806aa0e4555c288da38e0f9ecd4c89b1c3e 100644
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -15,9 +15,11 @@
@@ -16,9 +16,11 @@
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "chrome/app/vector_icons/vector_icons.h"
@ -76,7 +76,7 @@ index 75ff4175b80df26667ed2b4d3ba96c5d23aab597..7fa6a713f64c75360c54039563635c2d
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
#include "chrome/browser/ui/views/overlay/close_image_button.h"
@@ -28,7 +30,8 @@
@@ -29,7 +31,8 @@
#include "chrome/browser/ui/views/overlay/toggle_camera_button.h"
#include "chrome/browser/ui/views/overlay/toggle_microphone_button.h"
#include "chrome/browser/ui/views/overlay/track_image_button.h"
@ -86,7 +86,7 @@ index 75ff4175b80df26667ed2b4d3ba96c5d23aab597..7fa6a713f64c75360c54039563635c2d
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/picture_in_picture_window_controller.h"
#include "content/public/browser/web_contents.h"
@@ -57,7 +60,7 @@
@@ -58,7 +61,7 @@
#include "ui/aura/window.h"
#endif
@ -95,7 +95,7 @@ index 75ff4175b80df26667ed2b4d3ba96c5d23aab597..7fa6a713f64c75360c54039563635c2d
#include "chrome/browser/shell_integration_win.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
@@ -250,7 +253,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
@@ -251,7 +254,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();

Просмотреть файл

@ -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/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index baf39affec92126a6f998636bf35d1f2563fa47f..18c61ff4b2145881fd396b6e397eb7c4f9468558 100644
index 0de0532d64897c91ce0f72d165976e12e1dec03e..13167ca3f9c0d4895fecd40ab1e2d397c6e85a0b 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -88,6 +88,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
@ -30,18 +30,9 @@ index baf39affec92126a6f998636bf35d1f2563fa47f..18c61ff4b2145881fd396b6e397eb7c4
#endif // defined(OS_WIN)
@@ -380,11 +382,18 @@ void PrintJob::StartPdfToEmfConversion(
// seems to work with the fix for this bug applied.
@@ -355,8 +357,10 @@ void PrintJob::StartPdfToEmfConversion(
const PrintSettings& settings = document()->settings();
bool print_text_with_gdi =
- settings.print_text_with_gdi() && !settings.printer_language_is_xps() &&
+#if defined(OS_WIN)
+ settings.is_modifiable()
+#else
+ settings.print_text_with_gdi()
+#endif
+ && !settings.printer_language_is_xps() &&
base::FeatureList::IsEnabled(::features::kGdiTextPrinting);
+#if 0
PrefService* prefs = GetPrefsForWebContents(worker_->GetWebContents());
@ -50,8 +41,8 @@ index baf39affec92126a6f998636bf35d1f2563fa47f..18c61ff4b2145881fd396b6e397eb7c4
+ bool print_with_reduced_rasterization = PrintWithReducedRasterization(nullptr);
using RenderMode = PdfRenderSettings::Mode;
RenderMode mode;
@@ -479,8 +488,10 @@ void PrintJob::StartPdfToPostScriptConversion(
RenderMode mode = print_with_reduced_rasterization
@@ -446,8 +450,10 @@ void PrintJob::StartPdfToPostScriptConversion(
if (ps_level2) {
mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2;
} else {
@ -63,22 +54,50 @@ index baf39affec92126a6f998636bf35d1f2563fa47f..18c61ff4b2145881fd396b6e397eb7c4
? PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
}
@@ -530,6 +541,10 @@ void PrintJob::OnNotifyPrintJobEvent(const JobEventDetails& event_details) {
@@ -504,6 +510,20 @@ void PrintJob::OnPageDone(PrintedPage* page) {
}
#endif // defined(OS_WIN)
+void PrintJob::OnUserInitCancelled() {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ // Make sure a `Cancel()` is broadcast.
+ auto details = base::MakeRefCounted<JobEventDetails>(JobEventDetails::USER_INIT_CANCELED,
+ 0, nullptr);
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source<PrintJob>(this),
+ content::Details<JobEventDetails>(details.get()));
+
+ for (auto& observer : observers_) {
+ observer.OnUserInitCancelled();
+ }
+}
+
void PrintJob::OnFailed() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
switch (event_details.type()) {
+ case JobEventDetails::USER_INIT_CANCELED: {
+ DCHECK_EQ(event_details.document(), document_.get());
+ break;
+ }
case JobEventDetails::FAILED:
// No need to cancel since the worker already canceled itself.
Stop();
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index c1808c6351951d653255e722513b735bd67ab677..3f78445c2539d10d63da339f137ed5bc37847e24 100644
index e19f62354edb8acad722c6680296b7d2f55f51fe..b5539171655d78634ee89faf3516d23ce5718353 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -242,6 +242,9 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
@@ -53,6 +53,7 @@ class PrintJob : public base::RefCountedThreadSafe<PrintJob> {
public:
virtual void OnDocDone(int job_id, PrintedDocument* document) {}
virtual void OnJobDone() {}
+ virtual void OnUserInitCancelled() {}
virtual void OnFailed() {}
};
@@ -100,6 +101,9 @@ class PrintJob : public base::RefCountedThreadSafe<PrintJob> {
// Called when the document is done printing.
virtual void OnDocDone(int job_id, PrintedDocument* document);
+ // Called if the user cancels the print job.
+ virtual void OnUserInitCancelled();
+
// Called if the document fails to print.
virtual void OnFailed();
@@ -257,6 +261,9 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
public:
// Event type.
enum Type {
@ -89,25 +108,36 @@ index c1808c6351951d653255e722513b735bd67ab677..3f78445c2539d10d63da339f137ed5bc
NEW_DOC,
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 4b508191cf196b6c528eb97fbdd7baef40922e14..ff18b85688b02d776327325e7d67a944ae24da85 100644
index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..b4ab0984765c9711ddacf32f7147108cdfbc5096 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -21,13 +21,13 @@
@@ -20,13 +20,13 @@
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/printing/print_job.h"
-#include "chrome/grit/generated_resources.h"
#include "components/crash/core/common/crash_keys.h"
#include "components/device_event_log/device_event_log.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
+#include "electron/grit/electron_resources.h"
#include "printing/backend/print_backend.h"
#include "printing/buildflags/buildflags.h"
#include "printing/mojom/print.mojom.h"
@@ -301,16 +301,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
@@ -125,6 +125,10 @@ void FailedNotificationCallback(PrintJob* print_job) {
print_job->OnFailed();
}
+void UserInitCancelledNotificationCallback(PrintJob* print_job) {
+ print_job->OnUserInitCancelled();
+}
+
#if defined(OS_WIN)
void PageNotificationCallback(PrintJob* print_job, PrintedPage* page) {
print_job->OnPageDone(page);
@@ -245,16 +249,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
#endif // defined(OS_LINUX) && defined(USE_CUPS)
}
@ -132,25 +162,24 @@ index 4b508191cf196b6c528eb97fbdd7baef40922e14..ff18b85688b02d776327325e7d67a944
}
#if defined(OS_CHROMEOS)
@@ -326,6 +331,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
@@ -270,6 +279,12 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
mojom::ResultCode result) {
+ if (result == mojom::ResultCode::kCanceled) {
+ print_job_->PostTask(
+ FROM_HERE,
+ base::BindOnce(&NotificationCallback, base::RetainedRef(print_job_),
+ JobEventDetails::USER_INIT_CANCELED, 0,
+ base::RetainedRef(document_)));
+ base::BindOnce(&UserInitCancelledNotificationCallback,
+ base::RetainedRef(print_job_.get())));
+ }
std::move(callback).Run(printing_context_->TakeAndResetSettings(), result);
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b532436982e 100644
index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf91d439102 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -28,10 +28,10 @@
@@ -29,10 +29,10 @@
#include "chrome/browser/printing/print_view_manager_common.h"
#include "chrome/browser/printing/printer_query.h"
#include "chrome/browser/profiles/profile.h"
@ -163,7 +192,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
#include "components/prefs/pref_service.h"
#include "components/printing/browser/print_composite_client.h"
#include "components/printing/browser/print_manager_utils.h"
@@ -46,6 +46,7 @@
@@ -47,6 +47,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
@ -171,7 +200,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
#include "mojo/public/cpp/system/buffer.h"
#include "printing/buildflags/buildflags.h"
#include "printing/metafile_skia.h"
@@ -111,6 +112,8 @@ crosapi::mojom::PrintJobPtr PrintJobToMojom(
@@ -110,6 +111,8 @@ crosapi::mojom::PrintJobPtr PrintJobToMojom(int job_id,
#endif
void ShowWarningMessageBox(const std::u16string& message) {
@ -180,7 +209,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
// Runs always on the UI thread.
static bool is_dialog_shown = false;
if (is_dialog_shown)
@@ -119,6 +122,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
@@ -118,6 +121,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
chrome::ShowWarningMessageBox(nullptr, std::u16string(), message);
@ -188,7 +217,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
}
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -238,7 +242,9 @@ void UpdatePrintSettingsReplyOnIO(
@@ -217,7 +221,9 @@ void UpdatePrintSettingsReplyOnIO(
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(printer_query);
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
@ -199,7 +228,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
RenderParamsFromPrintSettings(printer_query->settings(),
params->params.get());
params->params->document_cookie = printer_query->cookie();
@@ -341,12 +347,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
@@ -319,12 +325,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
: PrintManager(web_contents),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
@ -214,7 +243,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -354,7 +362,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
@@ -332,7 +340,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
@ -226,7 +255,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
auto weak_this = weak_ptr_factory_.GetWeakPtr();
DisconnectFromCurrentPrintJob();
if (!weak_this)
@@ -369,7 +380,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
@@ -347,7 +358,13 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
// go in `ReleasePrintJob()`.
SetPrintingRFH(rfh);
@ -234,15 +263,14 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
+ callback_ = std::move(callback);
+
+ if (!callback_.is_null()) {
+ registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
+ content::NotificationService::AllSources());
+ print_job_->AddObserver(*this);
+ }
+
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings));
for (auto& observer : GetObservers())
observer.OnPrintNow(rfh);
@@ -528,9 +546,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
@@ -506,9 +523,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
void PrintViewManagerBase::UpdatePrintingEnabled() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// The Unretained() is safe because ForEachFrame() is synchronous.
@ -255,7 +283,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
}
void PrintViewManagerBase::NavigationStopped() {
@@ -644,12 +662,13 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -622,12 +639,13 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -270,7 +298,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
auto callback_wrapper =
base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply,
@@ -667,18 +686,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -645,18 +663,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -292,15 +320,15 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
content::BrowserContext* context =
web_contents() ? web_contents()->GetBrowserContext() : nullptr;
PrefService* prefs =
@@ -688,6 +709,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -666,6 +686,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
if (value > 0)
job_settings.SetIntKey(kSettingRasterizePdfDpi, value);
}
+#endif
content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
auto callback_wrapper =
@@ -727,7 +749,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
@@ -714,7 +735,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
PrintManager::PrintingFailed(cookie);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@ -308,7 +336,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
#endif
ReleasePrinterQuery();
@@ -742,6 +763,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
@@ -729,6 +749,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
}
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
@ -320,7 +348,7 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
l10n_util::GetStringUTF16(
@@ -752,8 +778,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
@@ -739,8 +764,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
content::RenderFrameHost* render_frame_host,
content::RenderFrameHost::LifecycleState /*old_state*/,
content::RenderFrameHost::LifecycleState new_state) {
@ -331,19 +359,19 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
}
void PrintViewManagerBase::DidStartLoading() {
@@ -828,6 +856,11 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
#endif
break;
}
+ case JobEventDetails::USER_INIT_CANCELED: {
+ printing_cancelled_ = true;
+ ReleasePrintJob();
+ break;
+ }
case JobEventDetails::JOB_DONE:
// Printing is done, we don't need it anymore.
// print_job_->is_job_pending() may still be true, depending on the order
@@ -897,7 +930,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -808,6 +835,11 @@ void PrintViewManagerBase::OnJobDone() {
ReleasePrintJob();
}
+void PrintViewManagerBase::OnUserInitCancelled() {
+ printing_cancelled_ = true;
+ ReleasePrintJob();
+}
+
void PrintViewManagerBase::OnFailed() {
TerminatePrintJob(true);
}
@@ -869,7 +901,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
// Disconnect the current |print_job_|.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@ -355,22 +383,21 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
if (!weak_this)
return false;
@@ -920,8 +956,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -891,8 +926,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
: PrintJob::Source::PRINT_PREVIEW,
/*source_id=*/"");
#endif
- registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- content::Source<PrintJob>(print_job_.get()));
- print_job_->AddObserver(*this);
-
printing_succeeded_ = false;
return true;
}
@@ -973,14 +1007,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -944,14 +977,21 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
+ if (!callback_.is_null()) {
+ registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
+ content::NotificationService::AllSources());
+ print_job_->RemoveObserver(*this);
+
+ std::string cb_str = "";
+ if (!printing_succeeded_)
@ -384,12 +411,12 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
if (rfh)
GetPrintRenderFrame(rfh)->PrintingDone(printing_succeeded_);
- registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- content::Source<PrintJob>(print_job_.get()));
- print_job_->RemoveObserver(*this);
-
// Don't close the worker thread.
print_job_ = nullptr;
}
@@ -1018,7 +1060,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -989,7 +1029,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@ -399,19 +426,19 @@ index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b53
if (!cookie) {
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 850a38f5291fc5707d0882515f41cd37714a447c..9e86f48aca10de0187a6bf70a304d2d41475eb98 100644
index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..1562d6331a9cafd530db42c436e878bac427566d 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -39,6 +39,8 @@ class PrintJob;
@@ -37,6 +37,8 @@ namespace printing {
class PrintQueriesQueue;
class PrinterQuery;
+using CompletionCallback = base::OnceCallback<void(bool, const std::string&)>;
+
// Base class for managing the print commands for a WebContents.
class PrintViewManagerBase : public content::NotificationObserver,
public PrintManager {
@@ -61,7 +63,10 @@ class PrintViewManagerBase : public content::NotificationObserver,
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
public:
@@ -58,7 +60,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
@ -423,9 +450,17 @@ index 850a38f5291fc5707d0882515f41cd37714a447c..9e86f48aca10de0187a6bf70a304d2d4
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in |print_data| with settings specified in
@@ -260,9 +265,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -143,6 +148,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// PrintJob::Observer overrides:
void OnDocDone(int job_id, PrintedDocument* document) override;
void OnJobDone() override;
+ void OnUserInitCancelled() override;
void OnFailed() override;
base::ObserverList<Observer>& GetObservers() { return observers_; }
@@ -252,9 +258,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_ = nullptr;
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
+ // Respond with success of the print job.
+ CompletionCallback callback_;
@ -453,7 +488,7 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..5f2b807fc364131f4c3e6a1646ec522d
// Tells the RenderFrame to switch the CSS to print media type, render every
// requested page using the print preview document's frame/node, and then
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb013e2c24 100644
index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..260b5521dccadf07eba2c67fa3d9c3da80b49104 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -39,6 +39,7 @@
@ -464,7 +499,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
#include "printing/units.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
@@ -1225,7 +1226,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1226,7 +1227,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
if (!weak_this)
return;
@ -474,7 +509,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
if (!weak_this)
return;
@@ -1256,7 +1258,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1257,7 +1259,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@ -483,7 +518,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -1271,7 +1273,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1272,7 +1274,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@ -492,7 +527,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
@@ -1302,7 +1304,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1303,7 +1305,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
}
Print(frame, print_preview_context_.source_node(),
@ -502,7 +537,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
if (!render_frame_gone_)
print_preview_context_.DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1349,6 +1352,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
@@ -1350,6 +1353,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@ -511,7 +546,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
print_preview_context_.OnPrintPreview();
if (print_preview_context_.IsForArc()) {
@@ -1885,7 +1890,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1886,7 +1891,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
return;
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@ -521,7 +556,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
// Check if |this| is still valid.
if (!weak_this)
return;
@@ -1900,7 +1906,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1901,7 +1907,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -532,7 +567,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -1908,7 +1916,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1909,7 +1917,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
uint32_t expected_page_count = 0;
@ -541,7 +576,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -1927,8 +1935,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1928,8 +1936,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@ -558,7 +593,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
// Check if |this| is still valid.
if (!self)
return;
@@ -2176,36 +2191,51 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2177,36 +2192,51 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
}
@ -622,7 +657,7 @@ index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb
notify_browser_of_print_failure_ = false;
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
return false;
@@ -2578,18 +2608,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
@@ -2579,18 +2609,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
}
bool PrintRenderFrameHelper::CheckForCancel() {
@ -684,10 +719,10 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
index cdfb2e0abd17b95bae4e1fd86aaf7364a76be1f6..446ae2060a27d6fa3d9b2f2691243369ad56f440 100644
index f8f0f4bdfbb8db883f883f62f9d6e4b987d7b113..c2505f5e0049dc7ee8783056538ca4c2d0968744 100644
--- a/printing/printing_context.cc
+++ b/printing/printing_context.cc
@@ -116,7 +116,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() {
@@ -120,7 +120,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() {
mojom::ResultCode PrintingContext::UpdatePrintSettings(
base::Value job_settings) {
@ -696,26 +731,26 @@ index cdfb2e0abd17b95bae4e1fd86aaf7364a76be1f6..446ae2060a27d6fa3d9b2f2691243369
std::unique_ptr<PrintSettings> settings =
PrintSettingsFromJobSettings(job_settings);
diff --git a/printing/printing_context.h b/printing/printing_context.h
index b28af89c67f88cc86f4604cd6204ca6231c5908c..cbfeb7234ba26f08ae3cddf6a6dd4014f04c4285 100644
index 7d937e7e3f19df351d410185fc4dc3b7c8937f2e..e87170e6957733f06bcc296bcca3fc331557ed46 100644
--- a/printing/printing_context.h
+++ b/printing/printing_context.h
@@ -143,6 +143,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
@@ -175,6 +175,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
int job_id() const { return job_id_; }
std::unique_ptr<PrintSettings> TakeAndResetSettings();
+ // Reinitializes the settings for object reuse.
+ void ResetSettings();
+
protected:
explicit PrintingContext(Delegate* delegate);
int job_id() const { return job_id_; }
@@ -150,9 +153,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
// implement this method to create an object of their implementation.
static std::unique_ptr<PrintingContext> CreateImpl(Delegate* delegate);
protected:
@@ -185,9 +188,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
static std::unique_ptr<PrintingContext> CreateImpl(Delegate* delegate,
bool skip_system_calls);
- // Reinitializes the settings for object reuse.
- void ResetSettings();
-
// Does bookkeeping when an error occurs.
virtual mojom::ResultCode OnError();
// Determine if system calls should be skipped by this instance.
bool skip_system_calls() const {
#if BUILDFLAG(ENABLE_OOP_PRINTING)

Просмотреть файл

@ -67,10 +67,10 @@ index 583ae4a36a5dae700a8e11767839e4d9a5c6e9b4..2510362a4df21fd57c56ec1f336589cc
}
#endif
diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h
index cc48c2dcb98d49ea3737092e21fdf8a4aa52cb5b..3b82c21a956bebb6bedcbc47a1922eebb9b84f1a 100644
index 89784b4d6eab9938c475abb6b58c3e08e8801371..72ee9a34e63ca9870c1c2f68f4cb1da63870ad3d 100644
--- a/chrome/browser/net/proxy_config_monitor.h
+++ b/chrome/browser/net/proxy_config_monitor.h
@@ -39,11 +39,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
@@ -40,11 +40,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
{
public:
@ -84,12 +84,12 @@ index cc48c2dcb98d49ea3737092e21fdf8a4aa52cb5b..3b82c21a956bebb6bedcbc47a1922eeb
// Creates a ProxyConfigMonitor that gets proxy settings from the
// |local_state|, for use with NetworkContexts not
// associated with a profile. Must be destroyed before |local_state|.
@@ -93,7 +94,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
@@ -94,7 +95,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
#if BUILDFLAG(ENABLE_EXTENSIONS)
mojo::ReceiverSet<network::mojom::ProxyErrorClient> error_receiver_set_;
- Profile* profile_ = nullptr;
+ // Profile* profile_ = nullptr;
- raw_ptr<Profile> profile_ = nullptr;
+ // raw_ptr<Profile> profile_ = nullptr;
#endif
};

Просмотреть файл

@ -30,10 +30,10 @@ index 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c
// 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 9501ae821c3cd16e53e63e28d717856c9f66efd3..c3c7447dd66a339db699f87d7d18464d46aace70 100644
index b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a5537de716fe 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2082,6 +2082,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
@@ -2075,6 +2075,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_)
view_->UpdateCursor(WebCursor(cursor));
@ -43,10 +43,10 @@ index 9501ae821c3cd16e53e63e28d717856c9f66efd3..c3c7447dd66a339db699f87d7d18464d
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 48565d6590787f8370fdfacadf15fd024f69c906..0577d16d66bdaef6f4044d1737e9cf4cde811520 100644
index 131e74e1789632f59086b2bfb390654207f6d18f..3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4395,6 +4395,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -4415,6 +4415,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -59,10 +59,10 @@ index 48565d6590787f8370fdfacadf15fd024f69c906..0577d16d66bdaef6f4044d1737e9cf4c
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 1d39c8676142d0cae765960d5cb0398f493c2af7..350de81e2622a8bc1bce8d9ef958590e0dd8f866 100644
index 1c40c728a99fbcadedab1a8cc67efde90c7b164c..b693a98ef9e4333b0d1825ee156860a5c2dafcf6 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -959,6 +959,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -963,6 +963,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
blink::mojom::FrameVisibility visibility) override;
void SendScreenRects() override;
TextInputManager* GetTextInputManager() override;
@ -71,10 +71,10 @@ index 1d39c8676142d0cae765960d5cb0398f493c2af7..350de81e2622a8bc1bce8d9ef958590e
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index f2cc5890ef582fcca94de4f6d10bce318f1de416..83eb6fb18c46a7b1bbccd7db4a2dfb7f39810b71 100644
index 5df646636e3d78f66a2f5a76fb53bf57a7be8535..5e7b3055b34cfa252f6236b84cb183f9d0f6471d 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -12,6 +12,7 @@
@@ -13,6 +13,7 @@
#include "base/threading/thread_restrictions.h"
#include "components/viz/common/vertical_scroll_direction.h"
#include "content/common/content_export.h"
@ -82,7 +82,7 @@ index f2cc5890ef582fcca94de4f6d10bce318f1de416..83eb6fb18c46a7b1bbccd7db4a2dfb7f
#include "content/public/browser/allow_service_worker_result.h"
#include "content/public/browser/reload_type.h"
#include "content/public/browser/render_frame_host.h"
@@ -489,6 +490,9 @@ class CONTENT_EXPORT WebContentsObserver {
@@ -511,6 +512,9 @@ class CONTENT_EXPORT WebContentsObserver {
// Invoked when the primary main frame changes size.
virtual void PrimaryMainFrameWasResized(bool width_changed) {}

Просмотреть файл

@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 8f29a8a014fff5aa146fc6d6de02d025184e40df..7427d82d6ad78251aaa7c3e2e0f499f7d19d688c 100644
index 0399fd10fffc282a3e2752ddc33d53823dd7b3f4..c04b5e11bc5e0c7746372dadfa49e34232f82507 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -649,6 +649,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@ -24,10 +24,10 @@ index 8f29a8a014fff5aa146fc6d6de02d025184e40df..7427d82d6ad78251aaa7c3e2e0f499f7
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 95775111f6d5f01c0b27524a04c202ed08a65e2e..f4fe0970813bb2232e7594813cd4cc2e7d555372 100644
index e15b08a576e27687801e4ef547bbd299ae60444e..f35cbc8be8a9496eaafbf693680746fc96a13144 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -25,8 +25,10 @@
@@ -26,8 +26,10 @@
#include "content/browser/renderer_host/display_feature.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/browser/renderer_host/visible_time_request_trigger.h"
@ -38,7 +38,7 @@ index 95775111f6d5f01c0b27524a04c202ed08a65e2e..f4fe0970813bb2232e7594813cd4cc2e
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/widget_type.h"
@@ -66,9 +68,11 @@ class CursorManager;
@@ -67,9 +69,11 @@ class CursorManager;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver;
@ -50,7 +50,7 @@ index 95775111f6d5f01c0b27524a04c202ed08a65e2e..f4fe0970813bb2232e7594813cd4cc2e
class WebCursor;
class WebContentsAccessibility;
class DelegatedFrameHost;
@@ -138,6 +142,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -139,6 +143,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Rect& keyboard_rect) override {}
bool IsHTMLFormPopup() const override;
@ -60,7 +60,7 @@ index 95775111f6d5f01c0b27524a04c202ed08a65e2e..f4fe0970813bb2232e7594813cd4cc2e
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -286,6 +293,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -290,6 +297,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

Просмотреть файл

@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
Additionally, disables usage of some private APIs in MAS builds.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f79408818d026fc 100644
index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a45cca2132 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string,
@ -29,7 +29,7 @@ index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f794088
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -573,6 +582,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -609,6 +618,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -39,7 +39,7 @@ index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f794088
return [self acceptsMouseEventsWhenInactive];
}
@@ -649,6 +661,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -685,6 +697,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@ -50,7 +50,7 @@ index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f794088
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -969,6 +985,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1005,6 +1021,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);
@ -61,7 +61,7 @@ index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f794088
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1707,9 +1727,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1749,9 +1769,11 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@ -73,7 +73,7 @@ index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f794088
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1718,7 +1740,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1760,7 +1782,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,

Просмотреть файл

@ -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 b137978b640cd18c6a8566b4c53991e9581ecece..fd0b9634796e782c873b5fcb97c84ab52f19cf98 100644
index 4b2632d89f3f2961975f1437fe9f533a4799894b..33e8d4f5b27532d015d8cd4dbe7d2550916eb436 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1549,7 +1549,7 @@ if (is_chrome_branded && !is_android) {
@@ -1543,7 +1543,7 @@ if (is_chrome_branded && !is_android) {
}
}
@ -64,7 +64,7 @@ index b137978b640cd18c6a8566b4c53991e9581ecece..fd0b9634796e782c873b5fcb97c84ab5
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1577,6 +1577,12 @@ if (!is_android) {
@@ -1571,6 +1571,12 @@ if (!is_android) {
}
}

Просмотреть файл

@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Tue, 4 Jan 2022 11:10:27 +0100
Subject: revert: stop using NSRunLoop in renderer process
https://chromium-review.googlesource.com/c/chromium/src/+/3344749
This can be removed once we update to a DEPS has which
includes 4787f034924d0b05a2e4815a197a8ecf4a9c623c.
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 261e6de9ad03cb017fd2c71e30aef14f51312b60..625c984fc5255fe7ab01f5e38767ada73c21ffec 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -91,7 +91,12 @@ void HandleRendererErrorTestParameters(const base::CommandLine& command_line) {
}
std::unique_ptr<base::MessagePump> CreateMainThreadMessagePump() {
-#if defined(OS_FUCHSIA)
+#if defined(OS_MAC)
+ // As long as scrollbars on Mac are painted with Cocoa, the message pump
+ // needs to be backed by a Foundation-level loop to process NSTimers. See
+ // http://crbug.com/306348#c24 for details.
+ return base::MessagePump::Create(base::MessagePumpType::NS_RUNLOOP);
+#elif defined(OS_FUCHSIA)
// Allow FIDL APIs on renderer main thread.
return base::MessagePump::Create(base::MessagePumpType::IO);
#else

Просмотреть файл

@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 2ea707e9bacf2649eb7ed160b542f664b3996ee3..1e8a71eb6d9342270e4b86a4ec4689924dc436e3 100644
index e59425121af678283a2866ff954d1ea6b389404a..4b118deb8f6ce2233bb43e00755cbc7465646d29 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1308,7 +1308,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1303,7 +1303,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

Просмотреть файл

@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 6284092e8744a28f582f42f45154483bc6d1aa5e..43a22eb1ce2f94202f35f8080c881748535cbcd1 100644
index dde9fb6174be8a0da70cf29d5428ef31035a39f7..e044bc3739ad21c3d9704ddfa56116fae944e57a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1832,9 +1832,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1835,9 +1835,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
cmd_line.get(), IsJitDisabled());
@ -66,10 +66,10 @@ index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99
dynamic_code_can_be_disabled_ = true;
return;
diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
index bf78e0ddcbb2edfa5bf78b6bd9336d59112e5de1..ac335d76b9d19a3c377926408d7b37157174d818 100644
index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515cef8eb87 100644
--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
+++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
@@ -17,6 +17,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate
@@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate
public:
RendererSandboxedProcessLauncherDelegate() = default;
@ -81,7 +81,7 @@ index bf78e0ddcbb2edfa5bf78b6bd9336d59112e5de1..ac335d76b9d19a3c377926408d7b3715
~RendererSandboxedProcessLauncherDelegate() override = default;
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
@@ -28,6 +33,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate
@@ -29,6 +34,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate
#endif // defined(OS_MAC)
sandbox::mojom::Sandbox GetSandboxType() override;

Просмотреть файл

@ -6,7 +6,7 @@ Subject: ui_gtk_public_header.patch
Allow electron to depend on //ui/gtk/gtk_util.h
diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn
index a5b8ab7665f30a94c7406bc2db74568a8d506d5e..247af45b9046695ad757e9f476235e52840dd0dd 100644
index db29cdca6f02fb8ca9dd0f25e13ed902589adc25..6fa1496b4d529ccf7e4e543579462f990aae5ede 100644
--- a/ui/gtk/BUILD.gn
+++ b/ui/gtk/BUILD.gn
@@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") {

Просмотреть файл

@ -5,17 +5,25 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch
Unsandboxed ppapi processes should skip zygote.
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 720921b36b65d0332d0a59df4b26c1f32dd49928..eec1a915daaaa9305a49a7bd117186e59b5ae5f9 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -115,6 +115,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
ZygoteHandle GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
+ if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
+ return nullptr;
+ }
base::CommandLine::StringType plugin_launcher = browser_command_line
.GetSwitchValueNative(switches::kPpapiPluginLauncher);
if (!plugin_launcher.empty())
diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
index 833c20796bd9404e4f5d7ca738fce97143d33fac..f4bc4f94e7eb5014f7c2844d6486fbc1bc88892f 100644
--- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
+++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
@@ -6,6 +6,7 @@
#include "content/public/common/content_switches.h"
#include "sandbox/policy/mojom/sandbox.mojom.h"
+#include "sandbox/policy/switches.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
@@ -62,6 +63,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget(
ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
+ if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
+ return nullptr;
+ }
base::CommandLine::StringType plugin_launcher =
browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher);
if (!plugin_launcher.empty())

Просмотреть файл

@ -9,12 +9,12 @@ 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 956c5024919bc18f4aea07c77ead5ff2ad49730a..dd6118f9c5a5d91759a897c1a978be4b592d6a00 100644
index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b06d561f34 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2961,6 +2961,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
params.main_frame_name);
@@ -2971,6 +2971,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
params.renderer_initiated_creation,
params.main_frame_name, GetOriginalOpener());
+ if (params.view && params.delegate_view) {
+ view_.reset(params.view);
@ -22,10 +22,11 @@ index 956c5024919bc18f4aea07c77ead5ff2ad49730a..dd6118f9c5a5d91759a897c1a978be4b
+ }
+
+ if (!view_) {
+
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2971,6 +2977,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2981,6 +2988,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}
@ -34,10 +35,10 @@ index 956c5024919bc18f4aea07c77ead5ff2ad49730a..dd6118f9c5a5d91759a897c1a978be4b
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 8b7f3c9d5649101c87032bb4f7a4d27bf52912d2..f7db5d52cc773dff4913d67f10af3e0ec7d98bee 100644
index ccbad7b5ea7c26e58d9a8d2208f534ae686364ec..d59f80df234872e0e7a89c9283e820a49c30b0e4 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -90,10 +90,13 @@ class BrowserContext;
@@ -93,10 +93,13 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@ -51,9 +52,9 @@ index 8b7f3c9d5649101c87032bb4f7a4d27bf52912d2..f7db5d52cc773dff4913d67f10af3e0e
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -230,6 +233,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
network::mojom::WebSandboxFlags starting_sandbox_flags;
@@ -234,6 +237,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
+ // Optionally specify the view and delegate view.
+ content::WebContentsView* view = nullptr;

Просмотреть файл

@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index dc7c1ed1dc7697919dfcf500fe86804fbc63b65a..5fe865e5010a9bbee45447bb987c20cb6f4b2c1b 100644
index e8a5b04582da86f6ec0004c32f3b622c7599510e..1f9cd4e4c1d7be6d51b490c4b909e86b0bd2c057 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -878,10 +878,7 @@ bool WebContentsViewAura::IsValidDragTarget(
@@ -880,10 +880,7 @@ bool WebContentsViewAura::IsValidDragTarget(
// TODO(https://crbug.com/1266953): There are some known gaps caused by
// comparing `RenderViewHost` IDs, as `RenderViewHost` ID is not really a
// strong signal for page identity.
@ -24,7 +24,7 @@ index dc7c1ed1dc7697919dfcf500fe86804fbc63b65a..5fe865e5010a9bbee45447bb987c20cb
////////////////////////////////////////////////////////////////////////////////
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 9d2f771327838ff9b63a34e89573a1843eedd77d..a4c3d1951a6def856437cc589c4d20da7d9b39a3 100644
index 6455404fdccab1fffceef4b8d291c137d3a448c4..483b0b5b689da03f0d7e43576fa73275197f5a95 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -385,9 +385,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {

Просмотреть файл

@ -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 fca309296af6f470882b57ae75d9b410c9ef9f12..5f04ae3aff9ac515a6280f4347cddfe76a16cfcb 100644
index 165d6b8eb5cb0ce949c71c1707687960c49a4ebb..35a40c4b493ec4e57bff4d4701c18e55afc5841c 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5969,6 +5969,15 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -6004,6 +6004,15 @@ void RenderFrameHostImpl::EnterFullscreen(
notified_instances.insert(parent_site_instance);
}

Просмотреть файл

@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 0b098038d2f56e30b990a6dc794398b178e9860d..c5d798c73a268a80a23c8d5cac4d88a190ee18f7 100644
index 4352aada84d7fe5abbc2f3320a3a643e838774dc..b6d5fe0a21e9343d82323a9f7c06f9b5891316cc 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -355,6 +355,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@ -26,10 +26,10 @@ index 0b098038d2f56e30b990a6dc794398b178e9860d..c5d798c73a268a80a23c8d5cac4d88a1
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 1b89812ad429734cdc984dee24e0f1b9a040b1e4..0fea1aec4e60e1eb488a9f38f11df3151d294038 100644
index df9f357a597c7d5990058e7c3ab26b32cc4e7252..f72f927bfcd9fe42e49682b12b361ae8a877ace8 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -925,6 +925,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -43,10 +43,10 @@ index 1b89812ad429734cdc984dee24e0f1b9a040b1e4..0fea1aec4e60e1eb488a9f38f11df315
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 9622c5554db8c1c83d05b9a1919f647c8616d6d5..6636f116cdb333ea42ffa877a5326abec6d1e6aa 100644
index cba574c571ded199c70374ffe01bad5f88b5902f..7801b60329802c92e6b6103ccc74d6871584c9b2 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -210,6 +210,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -207,6 +207,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -55,10 +55,10 @@ index 9622c5554db8c1c83d05b9a1919f647c8616d6d5..6636f116cdb333ea42ffa877a5326abe
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 74fd52490d65a20f4809319851c19450598e9c56..6bde55b51424b76448400749d724e8edeb39321b 100644
index f545c18c2e142a46481b1669bb726b60d9815600..14bd8c3436602689e44e3c718388406a7de6b211 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -721,6 +721,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -713,6 +713,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -67,10 +67,10 @@ index 74fd52490d65a20f4809319851c19450598e9c56..6bde55b51424b76448400749d724e8ed
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 2fb7e54f0a19bfcddde96d91034b765695ebe227..c81d3d757adee5dbd192c8fae66e7b5f3b06abd7 100644
index 3d29142e7e9d641d17ad16a8b24bf263f0bd4c73..9f5f07b2865df5ed8dd4a8c01082f4378b5f9ccf 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -721,6 +721,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -730,6 +730,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
nested_runner_->QuitNow();
}

Просмотреть файл

@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
initialized.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index c5d798c73a268a80a23c8d5cac4d88a190ee18f7..cddebeb49b07796ee3434550af629080e6284d0c 100644
index b6d5fe0a21e9343d82323a9f7c06f9b5891316cc..f141ba30ac0cfd1c35fb89dc513b92c5f41f6d74 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -355,6 +355,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@ -35,10 +35,10 @@ index c5d798c73a268a80a23c8d5cac4d88a190ee18f7..cddebeb49b07796ee3434550af629080
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 0fea1aec4e60e1eb488a9f38f11df3151d294038..ac3dc4083c3c1c0630df6df7ef49f53728ea7149 100644
index f72f927bfcd9fe42e49682b12b361ae8a877ace8..73e4853cb335722b2aaf7d98a8ed4b2ff4ece0ab 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -948,6 +948,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -937,6 +937,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@ -52,10 +52,10 @@ index 0fea1aec4e60e1eb488a9f38f11df3151d294038..ac3dc4083c3c1c0630df6df7ef49f537
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 6636f116cdb333ea42ffa877a5326abec6d1e6aa..6659ff18c5cc959c43455e629a1736a0505703c0 100644
index 7801b60329802c92e6b6103ccc74d6871584c9b2..df5c449ac011104cbce52b737729c4f9af2b2f9e 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -210,6 +210,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -207,6 +207,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -65,10 +65,10 @@ index 6636f116cdb333ea42ffa877a5326abec6d1e6aa..6659ff18c5cc959c43455e629a1736a0
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 6bde55b51424b76448400749d724e8edeb39321b..d51e3dfab2ad23efcaaf85aebfbec6353e5c9f78 100644
index 14bd8c3436602689e44e3c718388406a7de6b211..46551fcbb671ae7f6f5528afa7ea62bb199a3dbf 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -721,6 +721,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -713,6 +713,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -78,10 +78,10 @@ index 6bde55b51424b76448400749d724e8edeb39321b..d51e3dfab2ad23efcaaf85aebfbec635
virtual bool AllowScriptExtensionForServiceWorker(
const WebSecurityOrigin& script_origin) {
diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
index 3f9cb07b48e78e54a88c8f532361de3096e55942..b26fc5ba9b68611ca6276a326a6bdb2a2e8ea3f2 100644
index 1efbaf0adb1fd6c0ef332f015d8b09d130e4bd3f..033438ccc8db0ef396922ac23b7f3bd80fcc5cde 100644
--- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
+++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
@@ -258,6 +258,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
@@ -257,6 +257,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
V8PerContextData* per_context_data = script_state_->PerContextData();
ignore_result(per_context_data->ConstructorForType(
global_scope_->GetWrapperTypeInfo()));

Просмотреть файл

@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..d0641c5cbc3c527ce7a73d12118fb42db325be01
index 0000000000000000000000000000000000000000..bd5788caa61305fd9af8f9d7f8f1937a224fda83
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,393 @@
@@ -0,0 +1,394 @@
+import("//electron/build/asar.gni")
+import("//v8/gni/v8.gni")
+
@ -226,6 +226,7 @@ index 0000000000000000000000000000000000000000..d0641c5cbc3c527ce7a73d12118fb42d
+ "-Wno-unused-label",
+ "-Wno-unused-private-field",
+ "-Wno-unused-variable",
+ "-Wno-shadow",
+ ]
+
+ if (v8_enable_i18n_support) {
@ -717,10 +718,10 @@ index 0000000000000000000000000000000000000000..8bfecba74d4d90e9fbf0e2cd301118e4
+}
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..b8deb68cebcf5ac9b831201332edf8c509a7d4c8
index 0000000000000000000000000000000000000000..d6bed57461820ce08391fc424a1f842bd282fa75
--- /dev/null
+++ b/deps/uv/BUILD.gn
@@ -0,0 +1,195 @@
@@ -0,0 +1,196 @@
+config("libuv_config") {
+ include_dirs = [ "include" ]
+
@ -770,6 +771,7 @@ index 0000000000000000000000000000000000000000..b8deb68cebcf5ac9b831201332edf8c5
+ "-Wno-unreachable-code",
+ "-Wno-unreachable-code-return",
+ "-Wno-unused-but-set-variable",
+ "-Wno-shadow",
+ ]
+
+ libs = []
@ -962,10 +964,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..e2aec71226f25645b188c2c6d8f89478a4b06ae5
index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc41054754
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,603 @@
@@ -0,0 +1,604 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@ -994,6 +996,7 @@ index 0000000000000000000000000000000000000000..e2aec71226f25645b188c2c6d8f89478
+ "//v8/include/v8-date.h",
+ "//v8/include/v8-debug.h",
+ "//v8/include/v8-embedder-heap.h",
+ "//v8/include/v8-embedder-state-scope.h",
+ "//v8/include/v8-exception.h",
+ "//v8/include/v8-extension.h",
+ "//v8/include/v8-external.h",
@ -1902,10 +1905,10 @@ index 0000000000000000000000000000000000000000..3088ae4bdf814ae255c9805ebd393b2e
+
+ out_file.writelines(new_contents)
diff --git a/tools/install.py b/tools/install.py
index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..1256a61024e27506ae14405abc37d0a11f83fc64 100755
index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..dd13ad149f1b4cb807ca7aff62e1b15718116855 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -170,17 +170,71 @@ def files(action):
@@ -170,17 +170,72 @@ def files(action):
def headers(action):
def wanted_v8_headers(files_arg, dest):
v8_headers = [
@ -1932,6 +1935,7 @@ index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..1256a61024e27506ae14405abc37d0a1
+ '../../v8/include/v8-date.h',
+ '../../v8/include/v8-debug.h',
+ '../../v8/include/v8-embedder-heap.h',
+ '../../v8/include/v8-embedder-state-scope.h',
+ '../../v8/include/v8-exception.h',
+ '../../v8/include/v8-extension.h',
+ '../../v8/include/v8-external.h',
@ -1987,7 +1991,7 @@ index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..1256a61024e27506ae14405abc37d0a1
files_arg = [name for name in files_arg if name in v8_headers]
action(files_arg, dest)
@@ -201,7 +255,7 @@ def headers(action):
@@ -201,7 +256,7 @@ def headers(action):
if sys.platform.startswith('aix'):
action(['out/Release/node.exp'], 'include/node/')

Просмотреть файл

@ -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 36cf51ba9aa70f4fdfa48b4ba37f30f7a586e832..044cad70679b4f1b6fe58f4a9fd27d2688f7278f 100644
index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e21499294a5f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -585,7 +585,7 @@ config("internal_config") {
@@ -575,7 +575,7 @@ config("internal_config") {
":cppgc_header_features",
]
@ -21,7 +21,7 @@ index 36cf51ba9aa70f4fdfa48b4ba37f30f7a586e832..044cad70679b4f1b6fe58f4a9fd27d26
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -5656,7 +5656,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5660,7 +5660,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index 36cf51ba9aa70f4fdfa48b4ba37f30f7a586e832..044cad70679b4f1b6fe58f4a9fd27d26
deps = [
":v8_libbase",
@@ -5694,6 +5694,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -5698,6 +5698,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

Просмотреть файл

@ -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 fb497bc59b30d4e828951ecd2b33bf82739e0958..97d8bd604d27dfc357ff4f3ff794cf7e12fa5c12 100644
index 880e198be36cdfefb1acc37612c65022551c5d4c..f7e18fabb020827c5c194609db68555c10ac1cc8 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -9072,7 +9072,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -9141,7 +9141,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@ -19,10 +19,10 @@ index fb497bc59b30d4e828951ecd2b33bf82739e0958..97d8bd604d27dfc357ff4f3ff794cf7e
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c3e1fd0ff06b8d3d944e37672237a04012fff46b..a2a1f488672f0f0aae5a2dfd00d79bfb0952dbb9 100644
index cf3f1dce5571353cb90bb5997c489b0f202951f9..f54f60489385a25c5bce4e3d38da19ee9df6ada4 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -6013,9 +6013,9 @@ void Heap::TearDown() {
@@ -6132,9 +6132,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

Просмотреть файл

@ -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 d85634a305d941adb43b2c22a326ddf592e2b9f2..43dd92240713c3cb38ce12bb8251742779d594e2 100644
index 46cff2d17ff0e189b84a180805c008818a20fd3a..de269d03d3376f1fe31809d9c2079860724b731a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -585,6 +585,10 @@ config("internal_config") {
@@ -575,6 +575,10 @@ config("internal_config") {
":cppgc_header_features",
]

Просмотреть файл

@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
diff --git a/src/objects/objects.h b/src/objects/objects.h
index f49f064bf5a45bd322da165286728279db48c5d2..58865f5ca22fd02b2387a5b94fbb2f016282a113 100644
index 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f425c120fa8 100644
--- a/src/objects/objects.h
+++ b/src/objects/objects.h
@@ -879,7 +879,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
@@ -886,7 +886,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
// Utility superclass for stack-allocated objects that must be updated
// on gc. It provides two ways for the gc to update instances, either
// iterating or updating after gc.

Просмотреть файл

@ -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 044cad70679b4f1b6fe58f4a9fd27d2688f7278f..d85634a305d941adb43b2c22a326ddf592e2b9f2 100644
index 623b4d792c04c5d7978fe7c16c92e21499294a5f..46cff2d17ff0e189b84a180805c008818a20fd3a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -5668,7 +5668,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5672,7 +5672,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

Просмотреть файл

@ -9,7 +9,7 @@ higher versions, but native module compiling with this version
will have an issue.
diff --git a/include/v8config.h b/include/v8config.h
index c4d0894e0f96493d55aed8761b1153628e3d651e..75f7db588a6ed674f5799c812b712e3aa4fd2f39 100644
index 1242d4289ceb937e2679408ca7ee734c0c342bf0..50f59293e3fc617ac7b6f964ae091e92391c8a38 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -452,10 +452,13 @@ path. Add it with -I<path> to the command line

Просмотреть файл

@ -18,7 +18,7 @@ This patch can be removed when streams support rab/gsab, or
when support is synchronized across both v8 and node.
diff --git a/src/objects/js-array-buffer.cc b/src/objects/js-array-buffer.cc
index 07b37dd7f5a76c13fe6f8a55fd4a93fa813d81a6..ad0e4610b7f9adc64d996800e5fdb0c6f1a58562 100644
index 57d8773b7be9a04ab0b27ddac9aac1da2254c550..cf3c4ee7422728822e62f25d0092f3c0da07914b 100644
--- a/src/objects/js-array-buffer.cc
+++ b/src/objects/js-array-buffer.cc
@@ -72,9 +72,9 @@ void JSArrayBuffer::Attach(std::shared_ptr<BackingStore> backing_store) {
@ -32,5 +32,5 @@ index 07b37dd7f5a76c13fe6f8a55fd4a93fa813d81a6..ad0e4610b7f9adc64d996800e5fdb0c6
+ // !backing_store->is_wasm_memory() && !backing_store->is_resizable(),
+ // backing_store->byte_length() == backing_store->max_byte_length());
DCHECK(!was_detached());
set_backing_store(backing_store->buffer_start());
if (is_shared() && is_resizable()) {
DCHECK(IsValidBackingStorePointer(backing_store->buffer_start()));
Isolate* isolate = GetIsolate();

Просмотреть файл

@ -15,10 +15,10 @@ This patch can be removed when the upsteam fix is merged, or
when support is added in Node.js
diff --git a/src/heap/factory-base.cc b/src/heap/factory-base.cc
index 89eb0defc2c1f1d2f6f59c3fb107d844e0c7f986..509cc193f339fc2d44ee493c6fe6c17c024b55fb 100644
index ff1056ee57d1fade0e851c08010a81cde64d48b3..1fbf8ecbec0458106afea1b5ba4273ccfb5d80f4 100644
--- a/src/heap/factory-base.cc
+++ b/src/heap/factory-base.cc
@@ -247,7 +247,7 @@ Handle<Script> FactoryBase<Impl>::NewScriptWithId(
@@ -250,7 +250,7 @@ Handle<Script> FactoryBase<Impl>::NewScriptWithId(
// Create and initialize script object.
ReadOnlyRoots roots = read_only_roots();
#ifdef V8_SCRIPTORMODULE_LEGACY_LIFETIME
@ -27,7 +27,7 @@ index 89eb0defc2c1f1d2f6f59c3fb107d844e0c7f986..509cc193f339fc2d44ee493c6fe6c17c
#endif
Handle<Script> script = handle(
NewStructInternal<Script>(SCRIPT_TYPE, AllocationType::kOld), isolate());
@@ -283,8 +283,10 @@ Handle<Script> FactoryBase<Impl>::NewScriptWithId(
@@ -286,8 +286,10 @@ Handle<Script> FactoryBase<Impl>::NewScriptWithId(
}
template <typename Impl>
@ -41,7 +41,7 @@ index 89eb0defc2c1f1d2f6f59c3fb107d844e0c7f986..509cc193f339fc2d44ee493c6fe6c17c
Handle<ArrayList> result = Handle<ArrayList>::cast(fixed_array);
result->SetLength(0);
diff --git a/src/heap/factory-base.h b/src/heap/factory-base.h
index 9e45c00a6c7d3dbc44d8f13383a22a40f757d5a7..23bd405d5d660556e23bff23986013fe3b0c627d 100644
index c3aa816d0ba3079889201dee17d10283fbcaa8fc..2a8eae50c947fb5db8585ddc504e9b83dae09a44 100644
--- a/src/heap/factory-base.h
+++ b/src/heap/factory-base.h
@@ -157,7 +157,8 @@ class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) FactoryBase

Просмотреть файл

@ -12,7 +12,7 @@ By moving some functions out of the the arm64-assembler header file,
this error no longer seems to happen.
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
index 627c7ae0213351d39331750b51c8f0db23ea4c4b..84faca065ac752bc2d992188fd7b93d5801d1cf7 100644
index fd5cd326ecde55e364338bea88f8b9f24b3510ab..e60cca0ee50c4ba3688af5aa081570a62fa37e9b 100644
--- a/src/codegen/arm64/assembler-arm64.cc
+++ b/src/codegen/arm64/assembler-arm64.cc
@@ -3629,6 +3629,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
@ -39,7 +39,7 @@ index 627c7ae0213351d39331750b51c8f0db23ea4c4b..84faca065ac752bc2d992188fd7b93d5
const Operand& operand, FlagsUpdate S, AddSubOp op) {
DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits());
diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h
index dac90f8058c9dd24639ec6e91eda85842788207e..ad773649a5a355a0ca4dade16f9777987719e2b9 100644
index df8fadf1f1bf029b8b5d94ed9f6ec428c05b90bc..4cfc5877b0474e30d0f88a7448361b7682244b04 100644
--- a/src/codegen/arm64/assembler-arm64.h
+++ b/src/codegen/arm64/assembler-arm64.h
@@ -2121,11 +2121,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {

Просмотреть файл

@ -7,10 +7,10 @@ Per https://bugs.chromium.org/p/chromium/issues/detail?id=781618#c6.
To fix this DCHECK firing: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/desktop_capture/linux/x_error_trap.cc;l=35;drc=25ab3228f3e473f2226f219531ec617d2daa175e
diff --git a/modules/desktop_capture/linux/x_error_trap.cc b/modules/desktop_capture/linux/x_error_trap.cc
index 13233d827470d9d42be0333c3080e3d107f86fd5..62efb5b5b5194fc8961a27fe2a1efcd77e385d08 100644
--- a/modules/desktop_capture/linux/x_error_trap.cc
+++ b/modules/desktop_capture/linux/x_error_trap.cc
diff --git a/modules/desktop_capture/linux/x11/x_error_trap.cc b/modules/desktop_capture/linux/x11/x_error_trap.cc
index f31565e24bdba8f77925fe89d3794f3438300778..8f11c68a6a56f036cacc5b5eaf5b191600c47f4f 100644
--- a/modules/desktop_capture/linux/x11/x_error_trap.cc
+++ b/modules/desktop_capture/linux/x11/x_error_trap.cc
@@ -19,8 +19,8 @@ namespace webrtc {
namespace {

Просмотреть файл

@ -281,7 +281,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
if (!electron::CheckCommandLineArguments(arguments.argc, arguments.argv))
return -1;
sandbox::SandboxInterfaceInfo sandbox_info = {0};
sandbox::SandboxInterfaceInfo sandbox_info = {nullptr};
content::InitializeSandboxInfo(&sandbox_info);
electron::ElectronMainDelegate delegate;

Просмотреть файл

@ -33,6 +33,7 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/content_switches.h"
#include "media/audio/audio_manager.h"
#include "net/dns/public/dns_over_https_server_config.h"
#include "net/dns/public/util.h"
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h"
@ -1640,31 +1641,15 @@ void ConfigureHostResolver(v8::Isolate* isolate,
}
std::string server_method;
std::vector<net::DnsOverHttpsServerConfig> dns_over_https_servers;
absl::optional<std::vector<network::mojom::DnsOverHttpsServerPtr>>
servers_mojo;
if (!default_doh_templates.empty() &&
secure_dns_mode != net::SecureDnsMode::kOff) {
for (base::StringPiece server_template :
SplitStringPiece(default_doh_templates, " ", base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY)) {
if (!net::dns_util::IsValidDohTemplate(server_template, &server_method)) {
continue;
if (auto server_config = net::DnsOverHttpsServerConfig::FromString(
std::string(server_template))) {
dns_over_https_servers.push_back(server_config.value());
}
bool use_post = server_method == "POST";
dns_over_https_servers.emplace_back(std::string(server_template),
use_post);
if (!servers_mojo.has_value()) {
servers_mojo = absl::make_optional<
std::vector<network::mojom::DnsOverHttpsServerPtr>>();
}
network::mojom::DnsOverHttpsServerPtr server_mojo =
network::mojom::DnsOverHttpsServer::New();
server_mojo->server_template = std::string(server_template);
server_mojo->use_post = use_post;
servers_mojo->emplace_back(std::move(server_mojo));
}
}
@ -1691,25 +1676,16 @@ void ConfigureHostResolver(v8::Isolate* isolate,
thrower.ThrowTypeError("secureDnsServers must be an array of strings");
return;
}
servers_mojo = absl::nullopt;
dns_over_https_servers.clear();
for (const std::string& server_template : secure_dns_server_strings) {
std::string server_method;
if (!net::dns_util::IsValidDohTemplate(server_template, &server_method)) {
if (auto server_config =
net::DnsOverHttpsServerConfig::FromString(server_template)) {
dns_over_https_servers.push_back(server_config.value());
} else {
thrower.ThrowTypeError(std::string("not a valid DoH template: ") +
server_template);
return;
}
bool use_post = server_method == "POST";
if (!servers_mojo.has_value()) {
servers_mojo = absl::make_optional<
std::vector<network::mojom::DnsOverHttpsServerPtr>>();
}
network::mojom::DnsOverHttpsServerPtr server_mojo =
network::mojom::DnsOverHttpsServer::New();
server_mojo->server_template = std::string(server_template);
server_mojo->use_post = use_post;
servers_mojo->emplace_back(std::move(server_mojo));
}
}
@ -1723,8 +1699,8 @@ void ConfigureHostResolver(v8::Isolate* isolate,
// Configure the stub resolver. This must be done after the system
// NetworkContext is created, but before anything has the chance to use it.
content::GetNetworkService()->ConfigureStubHostResolver(
enable_built_in_resolver, secure_dns_mode, std::move(servers_mojo),
additional_dns_query_types_enabled);
enable_built_in_resolver, secure_dns_mode,
std::move(dns_over_https_servers), additional_dns_query_types_enabled);
}
// static

Просмотреть файл

@ -249,7 +249,7 @@ v8::Local<v8::Promise> Cookies::Get(v8::Isolate* isolate,
options.set_do_not_update_access_time();
manager->GetCookieList(GURL(url), options,
net::CookiePartitionKeychain::Todo(),
net::CookiePartitionKeyCollection::Todo(),
base::BindOnce(&FilterCookieWithStatuses,
std::move(dict), std::move(promise)));
}

Просмотреть файл

@ -39,8 +39,6 @@ std::string MessageSourceToString(
return "console-api";
if (source == blink::mojom::ConsoleMessageSource::kStorage)
return "storage";
if (source == blink::mojom::ConsoleMessageSource::kAppCache)
return "app-cache";
if (source == blink::mojom::ConsoleMessageSource::kRendering)
return "rendering";
if (source == blink::mojom::ConsoleMessageSource::kSecurity)

Просмотреть файл

@ -12,6 +12,7 @@
#include "media/capture/mojom/video_capture_buffer.mojom.h"
#include "media/capture/mojom/video_capture_types.mojom.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom-shared.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/skbitmap_operations.h"
@ -49,10 +50,9 @@ void FrameSubscriber::AttachToHost(content::RenderWidgetHost* host) {
video_capturer_->SetResolutionConstraints(size, size, true);
video_capturer_->SetAutoThrottlingEnabled(false);
video_capturer_->SetMinSizeChangePeriod(base::TimeDelta());
video_capturer_->SetFormat(media::PIXEL_FORMAT_ARGB,
gfx::ColorSpace::CreateREC709());
video_capturer_->SetFormat(media::PIXEL_FORMAT_ARGB);
video_capturer_->SetMinCapturePeriod(base::Seconds(1) / kMaxFrameRate);
video_capturer_->Start(this);
video_capturer_->Start(this, viz::mojom::BufferFormatPreference::kDefault);
}
void FrameSubscriber::DetachFromHost() {
@ -83,11 +83,13 @@ void FrameSubscriber::RenderViewHostChanged(content::RenderViewHost* old_host,
}
void FrameSubscriber::OnFrameCaptured(
base::ReadOnlySharedMemoryRegion data,
::media::mojom::VideoBufferHandlePtr data,
::media::mojom::VideoFrameInfoPtr info,
const gfx::Rect& content_rect,
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
callbacks) {
auto& data_region = data->get_read_only_shmem_region();
gfx::Size size = GetRenderViewSize();
if (size != content_rect.size()) {
video_capturer_->SetResolutionConstraints(size, size, true);
@ -97,11 +99,11 @@ void FrameSubscriber::OnFrameCaptured(
mojo::Remote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
callbacks_remote(std::move(callbacks));
if (!data.IsValid()) {
if (!data_region.IsValid()) {
callbacks_remote->Done();
return;
}
base::ReadOnlySharedMemoryMapping mapping = data.Map();
base::ReadOnlySharedMemoryMapping mapping = data_region.Map();
if (!mapping.IsValid()) {
DLOG(ERROR) << "Shared memory mapping failed.";
return;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше