chore: bump chromium to 120.0.6099.0 (main) (#40316)

* chore: bump chromium in DEPS to 120.0.6086.0

* chore: update patches

* chore: rename FrameSubscriber::OnNewCropVersion()

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

just a simple renaming

* chore: rename ToJsTime() to .InMillisecondsFSinceUnixEpoch()

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

function renamed upstream

* chore: rename ToDoubleT() to .InSecondsFSinceUnixEpoch()

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

function renamed upstream

* chore: rename FromDoubleT() to .FromSecondsSinceUnixEpoch()

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

function renamed upstream

* chore: bump chromium in DEPS to 120.0.6088.2

* chore: update patches

* chore: regen filenames.libcxx.gni

* chore: migrate from (removed upstream) inputFormType to formControlType

* chore: bump chromium in DEPS to 120.0.6089.0

* chore: update allow_disabling_blink_scheduler_throttling_per_renderview.patch

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

manually sync to upstream changes + reduce diff size

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6090.0

* chore: update fix_disabling_background_throttling_in_compositor.patch

no manual changes; patch applied with fuzz 2 (4 lines)

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

* chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

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

do not patch WebContentsImpl::SetWindowShowState() any longer because it has been removed

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6091.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6093.0

* chore: bump chromium in DEPS to 120.0.6095.0

* chore: bump chromium in DEPS to 120.0.6096.0

* chore: bump chromium in DEPS to 120.0.6097.0

* chore: update patches

* chore: update patch after rebase

* 4961495: [document pip] Focus the window when opened manually

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

* [Extensions UserScripts] Store extensions with user scripts in tracker

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

* chore: bump chromium in DEPS to 120.0.6099.0

* chore: update patches

* chore: update filenames.libcxx.gni

* chore: remove trailing space

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
electron-roller[bot] 2023-11-01 10:02:12 -04:00 коммит произвёл GitHub
Родитель 83892ab995
Коммит bc1ba1fe9d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
87 изменённых файлов: 611 добавлений и 424 удалений

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

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'120.0.6078.0',
'120.0.6099.0',
'node_version':
'v18.18.2',
'nan_version':

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

@ -769,9 +769,18 @@ Returns:
word and spellchecker is enabled.
* `frameCharset` string - The character encoding of the frame on which the
menu was invoked.
* `inputFieldType` string - If the context menu was invoked on an input
field, the type of that field. Possible values include `none`, `plainText`,
`password`, `other`.
* `formControlType` string - The source that the context menu was invoked on.
Possible values include `none`, `button-button`, `field-set`,
`input-button`, `input-checkbox`, `input-color`, `input-date`,
`input-datetime-local`, `input-email`, `input-file`, `input-hidden`,
`input-image`, `input-month`, `input-number`, `input-password`, `input-radio`,
`input-range`, `input-reset`, `input-search`, `input-submit`, `input-telephone`,
`input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
`select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
and `text-area`,
* `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
input field, the type of that field. Possible values include `none`,
`plainText`, `password`, `other`.
* `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
* `menuSourceType` string - Input source that invoked the context menu.
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.

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

@ -1098,9 +1098,18 @@ Returns:
word and spellchecker is enabled.
* `frameCharset` string - The character encoding of the frame on which the
menu was invoked.
* `inputFieldType` string - If the context menu was invoked on an input
field, the type of that field. Possible values include `none`, `plainText`,
`password`, `other`.
* `formControlType` string - The source that the context menu was invoked on.
Possible values include `none`, `button-button`, `field-set`,
`input-button`, `input-checkbox`, `input-color`, `input-date`,
`input-datetime-local`, `input-email`, `input-file`, `input-hidden`,
`input-image`, `input-month`, `input-number`, `input-password`, `input-radio`,
`input-range`, `input-reset`, `input-search`, `input-submit`, `input-telephone`,
`input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
`select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
and `text-area`,
* `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
input field, the type of that field. Possible values include `none`,
`plainText`, `password`, `other`.
* `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
* `menuSourceType` string - Input source that invoked the context menu.
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.

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

@ -144,6 +144,12 @@ app.on('renderer-process-crashed', (event, webContents, killed) => { /* ... */ }
app.on('render-process-gone', (event, webContents, details) => { /* ... */ })
```
### Deprecated: `params.inputFormType` property on `context-menu` on `WebContents`
The `inputFormType` property of the params object in the `context-menu`
event from `WebContents` has been deprecated. Use the new `formControlType`
property instead.
### Deprecated: `crashed` event on `WebContents` and `<webview>`
The `crashed` events on `WebContents` and `<webview>` have been deprecated.

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

@ -95,7 +95,9 @@ libcxx_headers = [
"//third_party/libc++/src/include/__algorithm/pstl_generate.h",
"//third_party/libc++/src/include/__algorithm/pstl_is_partitioned.h",
"//third_party/libc++/src/include/__algorithm/pstl_merge.h",
"//third_party/libc++/src/include/__algorithm/pstl_move.h",
"//third_party/libc++/src/include/__algorithm/pstl_replace.h",
"//third_party/libc++/src/include/__algorithm/pstl_rotate_copy.h",
"//third_party/libc++/src/include/__algorithm/pstl_sort.h",
"//third_party/libc++/src/include/__algorithm/pstl_stable_sort.h",
"//third_party/libc++/src/include/__algorithm/pstl_transform.h",
@ -510,6 +512,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__mdspan/extents.h",
"//third_party/libc++/src/include/__mdspan/layout_left.h",
"//third_party/libc++/src/include/__mdspan/layout_right.h",
"//third_party/libc++/src/include/__mdspan/layout_stride.h",
"//third_party/libc++/src/include/__mdspan/mdspan.h",
"//third_party/libc++/src/include/__memory/addressof.h",
"//third_party/libc++/src/include/__memory/align.h",
@ -853,6 +856,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__utility/piecewise_construct.h",
"//third_party/libc++/src/include/__utility/priority_tag.h",
"//third_party/libc++/src/include/__utility/rel_ops.h",
"//third_party/libc++/src/include/__utility/small_buffer.h",
"//third_party/libc++/src/include/__utility/swap.h",
"//third_party/libc++/src/include/__utility/to_underlying.h",
"//third_party/libc++/src/include/__utility/unreachable.h",

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

@ -135,3 +135,4 @@ fix_move_autopipsettingshelper_behind_branding_buildflag.patch
revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch
fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch
feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch
chore_remove_check_is_test_on_script_injection_tracker.patch

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

@ -10,7 +10,7 @@ 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 cf76fbf26d979caeaffd1c9dbbafe1d5ad29c7c6..8ccb090745cc3951fb08767efabdc17d62817f09 100644
index bfb0a24b2a57b4c75f64e0853700174c11df8d48..c9c40aca92fd7e0dde0da62d34120edb8479331a 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -262,6 +262,10 @@ int GpuMain(MainFunctionParams parameters) {
@ -24,7 +24,7 @@ index cf76fbf26d979caeaffd1c9dbbafe1d5ad29c7c6..8ccb090745cc3951fb08767efabdc17d
// 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
@@ -346,7 +350,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -358,7 +362,6 @@ int GpuMain(MainFunctionParams parameters) {
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
const bool dead_on_arrival = !init_success;

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

@ -10,7 +10,7 @@ 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 a4bf5bb618510ef5ef2ab2d05405cfd3688e97af..7a12c0ecb7254fe335c5563f3fd04c629abe065f 100644
index c302f3e672cea9b73591048cf581f3e81078d5cb..eb1d1b0b59e687b996e76c205a8712346089c04b 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -140,6 +140,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@ -23,10 +23,10 @@ index a4bf5bb618510ef5ef2ab2d05405cfd3688e97af..7a12c0ecb7254fe335c5563f3fd04c62
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f19c8b5bff0fe6c5db2ac6b4a7409c7057191d70..2bf28010ea6e986e55f08587304c5991b9beebb3 100644
index 47562a65e99b1bdbeca57f1ba69822df768c0291..104209cc6c8f5e6a6660936b8c6f185a30570237 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4545,6 +4545,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4546,6 +4546,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@ -40,7 +40,7 @@ index f19c8b5bff0fe6c5db2ac6b4a7409c7057191d70..2bf28010ea6e986e55f08587304c5991
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 9ee1c23d93b096d26e3a2afc6ddfcb97aeb73aaf..8e9eec3472c4bbe1455f2026568737a8fbccfa51 100644
index 7a49bed638125a9980475ac6d4c825fcc9481548..7317ca6d2aca2362e6a260c931ec72fc2374fab5 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -614,6 +614,8 @@ class CONTENT_EXPORT RenderFrameImpl
@ -53,10 +53,10 @@ index 9ee1c23d93b096d26e3a2afc6ddfcb97aeb73aaf..8e9eec3472c4bbe1455f2026568737a8
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index e3ae568992d977adaf546cad6e226b913ecb00f7..0b8363c0edd6ca90223248603e622613a157e143 100644
index 714eef7a6809e0efc461cab62cd75d325540f66e..e7189320516d9f8563d7f9b679666781ef8ac995 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -621,6 +621,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -619,6 +619,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@ -79,10 +79,10 @@ index 5030619779b7bcd67923026991bb44d926d81e1a..1eea33740fcdca49e094ad7ad00cfda8
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 34a6f14a480e52fa381a9f652b2b39c8b64e5c4c..207918e8e45cd40d446fd71a4df5b2558f895c8b 100644
index b83ee768ac5622ceb3c0f230cefdd1e46e219985..f034c3e647ee64c81d9684bb73ff999e16ce9a94 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -321,6 +321,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -320,6 +320,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@ -92,10 +92,10 @@ index 34a6f14a480e52fa381a9f652b2b39c8b64e5c4c..207918e8e45cd40d446fd71a4df5b255
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 d8c183fa7e38842907d37e3106f525a8fabba30b..c9d84213368f5094b0d275a9816367e962388f4c 100644
index 5dd3383cfddf4edc050ef5b37e98452f3476d7a9..25942059009f735a1d6b52fc9c1033d26c893306 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
@@ -282,6 +282,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@ -110,7 +110,7 @@ index d8c183fa7e38842907d37e3106f525a8fabba30b..c9d84213368f5094b0d275a9816367e9
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 374811c04935519a73dbdd8eff7dcbdbd20bd230..77339de275ab737d1478c3aa386e7f40377c6dc8 100644
index 2dd6df6727828335ca4462b470df4afd8dd29539..91ee3bf31ba43e650cacd2f781a3a8103d216570 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
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@ -123,7 +123,7 @@ index 374811c04935519a73dbdd8eff7dcbdbd20bd230..77339de275ab737d1478c3aa386e7f40
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 fc063d5aa867e72dc3c5246f1da0bc48be4a331a..adc4d674d244bdea29e22afee90edb5c16521c06 100644
index 8f21b488a00e38ea318f08116cdabe5c9bd5e45a..2a90dc46b331f452bdd525fd043efd2a04adac9b 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -408,6 +408,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

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

@ -6,10 +6,10 @@ 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 5175f4199154bd53c6a73e279cad4e0284b4a0c0..c05b00e9fd01334575535c9768db1976e28ccdc2 100644
index 093bed2d057df4b12ae01b8edc11c7924233b0c5..43a24c45bc5adf1bb6a3eb00c3b3ad64e663522f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -715,6 +715,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -716,6 +716,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@ -34,7 +34,7 @@ index 2d5431caee0b44828ae35a861cda8b15b587123f..5db98459e35767aee91c9b901c10f2f5
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index eb478c177e5bd490778447c1bab81a33ca3972f0..374a1cb2ee2f35cca91da890a3edb2e06e13721d 100644
index 2b7a01cd1e7637031bbd28ba32f332f9f97456f1..9840d0e1308bc6e4589f32f6eac5e27f353895dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -564,8 +564,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@ -63,31 +63,31 @@ index 9979c25ecd57e68331b628a518368635db5c2027..f65bfbbb663a5bb0511ffa389d3163e0
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
index 73c0f64aa84061381a98ba60906835258f881468..41bdf7e231eca4617dbe53737a3925039bf77c4f 100644
index b2204672b2dde14ce91a0c67e8a5b5ebede55aa9..0f9bed79ba572a5fffb4f39e2ffc6f58970ee7cb 100644
--- a/content/test/test_page_broadcast.h
+++ b/content/test/test_page_broadcast.h
@@ -45,6 +45,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
override;
void UpdatePageBrowsingContextGroup(const blink::BrowsingContextGroupInfo&
@@ -47,6 +47,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
browsing_context_group_info) override;
void SetPageAttributionSupport(
network::mojom::AttributionSupport support) override;
+ void SetSchedulerThrottling(bool allowed) override {}
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
};
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index d3877e946b1d65eba5bb45efe786fbcc7925ca6e..73bd5056baf7e4278b7260e550e2b8516be72f20 100644
index 1270218d71d365b3b33188ba803026e9a24f51dc..78fe7a385eb8781787c5288a9eb790df05afa088 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -155,4 +155,7 @@ interface PageBroadcast {
// in `browsing_context_group_info`.
UpdatePageBrowsingContextGroup(
blink.mojom.BrowsingContextGroupInfo browsing_context_group_info);
@@ -162,4 +162,7 @@ interface PageBroadcast {
// supported/unsupported or when attribution is enabled/disabled for
// Android WebView.
SetPageAttributionSupport(network.mojom.AttributionSupport support);
+
+ // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152ea7be16f 100644
index e89d7153d66d15e6e9a2a6980aaec5c671dfd0f3..c77228f8aa6ada81bcafc2622d784bb3f85cca30 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -371,6 +371,7 @@ class BLINK_EXPORT WebView {
@ -99,7 +99,7 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152
// 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 ed24fcdfc8cfe1e6c04482c890655f11ff261f6c..68ef0766a4fe8254f5e632b218b4e879c7b4d1c6 100644
index c8b7feaa65bfb47daa63565b193ff33806f53f88..70953a480dbc71594e292609ebd327c9b1c685af 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2413,6 +2413,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@ -113,56 +113,35 @@ index ed24fcdfc8cfe1e6c04482c890655f11ff261f6c..68ef0766a4fe8254f5e632b218b4e879
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -3894,20 +3898,34 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3903,10 +3907,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
+void WebViewImpl::SetSchedulerThrottling(bool allowed) {
+ DCHECK(GetPage());
+ scheduler_throttling_allowed_ = allowed;
+ GetPage()->GetPageScheduler()->SetPageVisible(allowed ?
+ (GetVisibilityState() == mojom::blink::PageVisibilityState::kVisible) : true);
+ GetPage()->GetPageScheduler()->SetPageVisible(!allowed || GetVisibilityState() == mojom::blink::PageVisibilityState::kVisible);
+}
+
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
DCHECK(GetPage());
- GetPage()->SetVisibilityState(visibility_state, is_initial_state);
- // Do not throttle if the page should be painting.
- GetPage()->GetPageScheduler()->SetPageVisible(
- visibility_state == mojom::blink::PageVisibilityState::kVisible ||
- visibility_state ==
- mojom::blink::PageVisibilityState::kHiddenButPainting);
- // Notify observers of the change.
- if (!is_initial_state) {
- for (auto& observer : observers_)
- observer.OnPageVisibilityChanged(visibility_state);
+
+ // If backgroundThrottling is disabled, the page is always visible.
+ if (!scheduler_throttling_allowed_) {
+ GetPage()->SetVisibilityState(mojom::blink::PageVisibilityState::kVisible, is_initial_state);
+ GetPage()->GetPageScheduler()->SetPageVisible(true);
+ } else {
+ bool is_visible =
+ (visibility_state == mojom::blink::PageVisibilityState::kVisible ||
+ visibility_state ==
+ mojom::blink::PageVisibilityState::kHiddenButPainting);
+ GetPage()->SetVisibilityState(visibility_state, is_initial_state);
+ GetPage()->GetPageScheduler()->SetPageVisible(is_visible);
+ // Notify observers of the change.
+ if (!is_initial_state) {
+ for (auto& observer : observers_)
+ observer.OnPageVisibilityChanged(visibility_state);
+ return;
+ }
}
}
+
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
// Do not throttle if the page should be painting.
bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 76456104656f863d7e5fb816a3e026c00ca8861d..24ba8dbbfc360ab12f28c2452c72c9f78307968c 100644
index dde5e8c51fa5f690d67c077365e11c00edd4ea85..2cff9e7af83ba7ad13aafea1a22bbf7be9829839 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -447,6 +447,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@ -170,7 +149,7 @@ index 76456104656f863d7e5fb816a3e026c00ca8861d..24ba8dbbfc360ab12f28c2452c72c9f7
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -912,6 +913,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -914,6 +915,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

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

@ -49,10 +49,10 @@ index 840cac7b1f4231b8177e1d697e102a18201f41de..40762df275afe2b6f63ea3da44d94475
// 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 89dc95f1ed9b136b7cd51ed3231caceabff817d6..5f394296fb6661ae314286dba9910a62835a159a 100644
index 152fd1307207a5dafce52b71dcb1469c3263165f..6fc9f48d84590f85576be0362c716634c87eff80 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -667,10 +667,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -671,10 +671,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@ -63,7 +63,7 @@ index 89dc95f1ed9b136b7cd51ed3231caceabff817d6..5f394296fb6661ae314286dba9910a62
if (!Client())
return false;
@@ -718,6 +714,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -722,6 +718,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 4e882f729aacf7c63629ce019ef0f0bdc11ca937..5f5ec93ef0dd0e2a916ee08923b6536a5ed019e7 100644
index 321a2dc2eb38dfa57aaaa76ba65279001402b368..8f065573898836a0c7baeda1e0f626afbd55046a 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -53,6 +53,20 @@ config("no_asm_config") {

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

@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 2aefb45c153c433b62706833841ebd9ec62f42e7..a15efa1bbd78b3a42fe24092848dfac74ef83a9a 100644
index c4ed2b8abb249bd85ea3ab6bd8d506e34fda1bc8..d48fb4f0ab45ed41ae087ae0aca4a542496e945a 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -81,6 +81,8 @@
@@ -82,6 +82,8 @@
X("drm") \
X("drmcursor") \
X("dwrite") \

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

@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index dfc645bedf13498abb087f4895f5f316364de069..e17d11e1b15e885d58cb748c22580d84876fe27c 100644
index 0594fc8f8122b5f66457c262890ea93be3a579d8..19f045d14c6072c1b0b8fb6a50bf4cafa563f7cb 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
@ -33,10 +33,10 @@ index dfc645bedf13498abb087f4895f5f316364de069..e17d11e1b15e885d58cb748c22580d84
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 466789a1b089c39418e45faf852449eddca08761..b2e9de27253028d2baa0a8ac9ca3bf6670c89259 100644
index bce36d7ffb408e6bb150afae315c09087c89fc45..6c8ff481d2a89cdeb95f6598de8b716c5f1556a4 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4798,7 +4798,7 @@ static_library("browser") {
@@ -4819,7 +4819,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@ -46,10 +46,10 @@ index 466789a1b089c39418e45faf852449eddca08761..b2e9de27253028d2baa0a8ac9ca3bf66
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index a652d748304391319973c2fc7d71f83fd24630a0..14db4b10c18330af194bfeb23dd964a31c22e81f 100644
index 21f47fbabc1c8af4524642d6ffe0c34fe23db874..beda741d58625b8069785b24a3049e87ba43990d 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6938,7 +6938,6 @@ test("unit_tests") {
@@ -7033,7 +7033,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@ -57,7 +57,7 @@ index a652d748304391319973c2fc7d71f83fd24630a0..14db4b10c18330af194bfeb23dd964a3
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -6959,6 +6958,10 @@ test("unit_tests") {
@@ -7054,6 +7053,10 @@ test("unit_tests") {
"//ui/resources",
]
@ -68,7 +68,7 @@ index a652d748304391319973c2fc7d71f83fd24630a0..14db4b10c18330af194bfeb23dd964a3
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -7947,7 +7950,6 @@ test("unit_tests") {
@@ -8046,7 +8049,6 @@ test("unit_tests") {
}
deps += [
@ -76,7 +76,7 @@ index a652d748304391319973c2fc7d71f83fd24630a0..14db4b10c18330af194bfeb23dd964a3
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
@@ -8037,6 +8039,10 @@ test("unit_tests") {
@@ -8136,6 +8138,10 @@ test("unit_tests") {
"//ui/webui/resources/js/browser_command:mojo_bindings",
]

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

@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 2a8b535c99aaeab6047095bdb1822a2087f640c7..244851bcefe9b3ac1b7ce09219bd19f6c07d6eda 100644
index 24f2397278ccb400a47e065a676be5ae783fa2e6..7d96eee167aadcea896fa18b7c806d9b6ccfff83 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1034,6 +1034,7 @@ component("base") {
@@ -1035,6 +1035,7 @@ component("base") {
"//build/config/compiler:prevent_unsafe_narrowing",
"//build/config/compiler:wexit_time_destructors",
"//build/config/compiler:wglobal_constructors",
@ -74,7 +74,7 @@ index 53611e788cde9012ca566444e6c1ee05c99b921e..c5d018ae78b486ef4b3cc86a8091869f
if (is_win) {
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 961aa78f3d158ec3745d1cad215cd547b1b415f4..e5e1d4997825993b2f53e7e117512a5c17bc64fb 100644
index 7ad4e9e5166265651ef50e3ee5488595ab97bc06..a10c3387aa8e81c7b02983e7bae9480a5354a0f3 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -52,6 +52,7 @@ source_set("browser") {
@ -86,7 +86,7 @@ index 961aa78f3d158ec3745d1cad215cd547b1b415f4..e5e1d4997825993b2f53e7e117512a5c
libs = []
frameworks = []
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 42148bd0e7f13d0135b8869b1bfc321eabdf5e30..305b3197846034b47ca1810d29f9d2a936d9d064 100644
index ddfe84e25422812bbf7f7b1a08cfb8534572f7bc..0cefb8fbe178e025dcb3d186473c8ecbada5e522 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -182,6 +182,7 @@ source_set("common") {
@ -98,10 +98,10 @@ index 42148bd0e7f13d0135b8869b1bfc321eabdf5e30..305b3197846034b47ca1810d29f9d2a9
public_deps = [
":mojo_bindings",
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index e38a26605e909b2728f4038403f6d111d30cffff..d27a6ec314620d33d0282c8db3741eb65e258740 100644
index 697fa7c5e98e7ee16b1b5e676f60a9689f7aac2b..f5e7278a6e391cbab61bbd2981127beb4c624214 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -222,6 +222,7 @@ target(link_target_type, "renderer") {
@@ -224,6 +224,7 @@ target(link_target_type, "renderer") {
}
configs += [ "//content:content_implementation" ]
@ -110,10 +110,10 @@ index e38a26605e909b2728f4038403f6d111d30cffff..d27a6ec314620d33d0282c8db3741eb6
public_deps = [
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index c560e1681fb62453d9bd8f41c249b4b27f46e7e4..10b010eb919c7775bc2dd5d45cf8e3e034facbde 100644
index 810032493d005228fb9c49b924f91c247f6a9de2..46baa84dd5c05b185e8ea7ea7ea44a441056b9f1 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -482,6 +482,7 @@ static_library("test_support") {
@@ -480,6 +480,7 @@ static_library("test_support") {
configs += [
"//build/config:precompiled_headers",
"//v8:external_startup_data",
@ -212,7 +212,7 @@ index 299a028f23314f479d2da8f914a5bdf34698d854..672dcb04dd3cf4e3cc71403f727a1dde
source_set("sandbox_unittests") {
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index f39f854dbd7f0640f74fc266e69bff046ec2efb4..c5c81632b34677fd38ac7c2bdd5542e53670cd56 100644
index 2e6598b26ca41f973c4a84578b82f52895cdf065..8825ce847e5da43d7fd659329ddd7c5ad113d730 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -311,6 +311,7 @@ component("core") {

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

@ -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 e1f688d473d70affeeb19c2ce23fe2fc8fe6f365..6e63cf93684443befb5e4243ef3669316388336c 100644
index fe69db83393efd0a4b886761dce4b7ead3c4c7d0..f2e623cd6ed7eb910216ff4e32686f9124762d81 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8186,6 +8186,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -8231,6 +8231,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 e1f688d473d70affeeb19c2ce23fe2fc8fe6f365..6e63cf93684443befb5e4243ef366931
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9b720579e882f5696cd2a9ca13186da79ea764fd..c384642d42ca44958a3bd1936dfa8baee450a84b 100644
index eab88872f0cee9f2fa208031684b0ed0018333d4..59701b5246e2d07662fb0072b77f3d73ab5df49d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4361,6 +4361,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4487,6 +4487,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
auto* new_contents_impl = new_contents.get();
@ -37,7 +37,7 @@ index 9b720579e882f5696cd2a9ca13186da79ea764fd..c384642d42ca44958a3bd1936dfa8bae
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -4402,12 +4408,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4528,12 +4534,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -51,10 +51,10 @@ index 9b720579e882f5696cd2a9ca13186da79ea764fd..c384642d42ca44958a3bd1936dfa8bae
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 89f952c8459c245a18c9e0aeec7fd9310b4ce837..489fa03f969180b91073e6ddc4698f7c2e052604 100644
index 40c14e1757dee4fda9aa79f3a52532f8ab737a97..2c833d683b737bd6b24d2ec10d97b46d2c9fcdb0 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -593,6 +593,10 @@ struct CreateNewWindowParams {
@@ -598,6 +598,10 @@ struct CreateNewWindowParams {
// The navigation initiator's user activation and ad status.
blink.mojom.NavigationInitiatorActivationAndAdStatus
initiator_activation_and_ad_status;
@ -66,10 +66,10 @@ index 89f952c8459c245a18c9e0aeec7fd9310b4ce837..489fa03f969180b91073e6ddc4698f7c
// 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 01ac846da8a36437bcf52f576cf9e4d56c0f7561..23eb25c4413746cda368d5e61c0c2bbb74a144f1 100644
index dcdc54f90f114cdef17ae59e579493fe4278c5c8..72d942d2aea9369f319308fc01e6366ebd0f2612 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -720,6 +720,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -715,6 +715,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -79,10 +79,10 @@ index 01ac846da8a36437bcf52f576cf9e4d56c0f7561..23eb25c4413746cda368d5e61c0c2bbb
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 4068372cffe3a9115d72dfe3926fb57cf865a1eb..455722f8ae9e65814080c47e75746e68391497eb 100644
index 06e22b37dfbcefb71f0dc3705f7ab50a27487ff0..5266731678dbfe5fe66ff863b88325546c255be8 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -178,6 +178,7 @@ class NetworkService;
@@ -177,6 +177,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@ -90,7 +90,7 @@ index 4068372cffe3a9115d72dfe3926fb57cf865a1eb..455722f8ae9e65814080c47e75746e68
} // namespace network
namespace sandbox {
@@ -1136,6 +1137,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1142,6 +1143,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -100,7 +100,7 @@ index 4068372cffe3a9115d72dfe3926fb57cf865a1eb..455722f8ae9e65814080c47e75746e68
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 3a3e31d8228b662c3d6a2d72b4dc1f77a7dec758..45d4de0e48fce71bdcc612fbda9c8ba25349e98a 100644
index fdcd738fb91ef8b0a341d24496913196dcc3047a..fc19223c3fe7d675c00d26df35fc21dfbc3e15ec 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -29,6 +29,17 @@ namespace content {
@ -122,7 +122,7 @@ index 3a3e31d8228b662c3d6a2d72b4dc1f77a7dec758..45d4de0e48fce71bdcc612fbda9c8ba2
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index b7657b3e5ce43881de363fa7c18cb863fdb95cd5..ab819e0c1f42b195e8e171dabffa88e556c50fd3 100644
index a3da78805b9bc36d433861f7769dfdb943f43b6c..7400c6f7f50ae8fef6646590fab3e4186f911f67 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -16,6 +16,7 @@
@ -148,10 +148,10 @@ index b7657b3e5ce43881de363fa7c18cb863fdb95cd5..ab819e0c1f42b195e8e171dabffa88e5
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 5a434800b32caa1ec4443f9e16c3d8085e287b17..f19c8b5bff0fe6c5db2ac6b4a7409c7057191d70 100644
index d7c6222c977058f230d5e6153b1df13e127a9939..47562a65e99b1bdbeca57f1ba69822df768c0291 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6476,6 +6476,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6507,6 +6507,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@ -210,7 +210,7 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
} // 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 8ebb13e79e077a5d463868124090d4f9debf58e2..6d79684184fcb94cda3489876b8fd0e8ff85a32c 100644
index 7405d410af1859db405f3cc7a2169f3aab597631..bb27d4350590bc7712a271567e1457e6551c7f7d 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2175,6 +2175,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,

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

@ -9,10 +9,10 @@ This is an experimental commit; but if it's successful,
This patch should be upstreamed and then removed from electron's code.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index b76c0f49c5e4742674ca0db5e82a0a92d6881dfe..e944216e7e97f3449ec169f03747f90dd6925a1a 100644
index d6d8db2ed2341c475d076bef227f2973d9bca609..372a9760aa87f0dd97e95d0006da428ea46422c7 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -42,7 +42,6 @@
@@ -41,7 +41,6 @@
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include "chrome/common/buildflags.h"
#include "components/infobars/core/infobar_container.h"
@ -20,7 +20,7 @@ index b76c0f49c5e4742674ca0db5e82a0a92d6881dfe..e944216e7e97f3449ec169f03747f90d
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/feature_promo_handle.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
@@ -61,6 +60,10 @@
@@ -62,6 +61,10 @@
#include "ui/views/widget/widget_observer.h"
#include "ui/views/window/client_view.h"

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

@ -35,7 +35,7 @@ index 155296ba7ee5495be62045bc620bb1cd31d3ceb3..954efde9e7a58f8b556c6ceabb81643f
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc
index 878b5cfde7847990e41e1c5dc2de5c1d39c6c4d7..bc019bfb7540c38204316d46e9f46fe8b90395d4 100644
index 6494db63fa65aea215dbc63283b9575f4ec2068c..d05ce515ee04544677894b116e479727c601d5f5 100644
--- a/chrome/browser/ui/ash/ash_web_view_impl.cc
+++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
@@ -104,10 +104,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
@ -80,7 +80,7 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index f5de1cc9abc383117196ffde3834a9fedb24f7f1..bd0e85a9570f93720815dbdf684f0424232e61bd 100644
index bd2f3d64f3f382722a697d67e8b9adf4a29e028a..d7de167b805969194d79be5fa0418dede14222a5 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1884,12 +1884,11 @@ bool Browser::IsWebContentsCreationOverridden(
@ -99,10 +99,10 @@ index f5de1cc9abc383117196ffde3834a9fedb24f7f1..bd0e85a9570f93720815dbdf684f0424
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 6f271acab2bfda41436d8761e3dd9492f22f7100..0dee75fac4148da4b0d4a4d6b2e9a468d358a6a0 100644
index 654474036268324ff169a814c960f0ee83345872..d1bbc1c49b20e3f0eee2295a225aa39e57dbbcf9 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -890,8 +890,7 @@ class Browser : public TabStripModelObserver,
@@ -891,8 +891,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 37a2ed30b1c38de1976a432df43a07bb4342c056..e5dc3613110895de0b0647bb01d4bc1cab2ac94c 100644
index 3f7181097becd1b6236f49e6b653b7d9e080d5c7..16adc4112b0e10fadd9c8af254e9e26f6e8e19e3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4268,8 +4268,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4393,8 +4393,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@ -232,7 +232,7 @@ index 37a2ed30b1c38de1976a432df43a07bb4342c056..e5dc3613110895de0b0647bb01d4bc1c
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 45d4de0e48fce71bdcc612fbda9c8ba25349e98a..96d0ff18fc526f7179e6cc7f6ef86839046627c9 100644
index fc19223c3fe7d675c00d26df35fc21dfbc3e15ec..45d8465bce348c2a631f0a464b3cd14401d33a0c 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -137,8 +137,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@ -246,7 +246,7 @@ index 45d4de0e48fce71bdcc612fbda9c8ba25349e98a..96d0ff18fc526f7179e6cc7f6ef86839
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index ab819e0c1f42b195e8e171dabffa88e556c50fd3..2d340d29be4002efb45faaa9bf9ea8506cb33e92 100644
index 7400c6f7f50ae8fef6646590fab3e4186f911f67..1489dfcf8ea3d3181abe784556b40565cc335c02 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 {

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

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Mon, 30 Oct 2023 20:56:45 -0400
Subject: chore: remove CHECK_IS_TEST on script injection tracker
https://chromium-review.googlesource.com/c/chromium/src/+/4950530 added
a check for test when the UserScriptManager is not available. In
Electron when a session is non persistent we do not initialize the
ExtensionSystem, so this check is not relevant for Electron.
diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
index 3ae34e1d1fc791a74a2430076b4ff2ab7607a1e5..a336ee67f3f1ee7fbdb70053135a9caf4fa55173 100644
--- a/extensions/browser/script_injection_tracker.cc
+++ b/extensions/browser/script_injection_tracker.cc
@@ -176,7 +176,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
UserScriptManager* manager =
ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
if (!manager) {
- CHECK_IS_TEST();
return std::vector<const UserScript*>();
}

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

@ -117,7 +117,7 @@ index db596585cbb44b3710636e3fc013f288966f604f..6d5557ee1a2c35ee15e695e024834184
} // namespace ui
diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
index 3450e36ba7d80ad36d12fc4b85130d985c2f247a..e81a45c1f038cb43b19aa0225fbcf4c35f280442 100644
index a955d19eedfe56ae3a115ce4c77fea016fd66d49..ad2557495a02cae03dd2b87df8659a6f05f1beac 100644
--- a/ui/base/accelerators/media_keys_listener_mac.mm
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
@@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {

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

@ -102,10 +102,10 @@ index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd7
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index c3f379829453e00c6e044721962024550052a950..6b8a79f7167f89a2f94515bbeadb558e3a4de390 100644
index d60429bab364f63afacb5e022ebf4dc65fbcba07..439f215ac7ecac065fe504ba0365cff20ed9147a 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -540,8 +540,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -549,8 +549,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@ -115,7 +115,7 @@ index c3f379829453e00c6e044721962024550052a950..6b8a79f7167f89a2f94515bbeadb558e
if (g_mapped_snapshot) {
// TODO(crbug.com/802962): Confirm not loading different type of snapshot
// files in a process.
@@ -550,10 +549,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -559,10 +558,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =

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

@ -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 78e581b365fc64f028c827f53e4f3bda5fc4fefb..445d73cd279f7e8268be533a11e512ccbe88c52f 100644
index b64603e6a4bb9fae95ea529f90d9ad589bce9284..ae831251bd2a950297e1f2e264db7e24e2dae6ce 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1869,6 +1869,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
gfx::ContentColorUsage content_color_usage) const {
TargetColorParams params;
@ -35,7 +35,7 @@ index 78e581b365fc64f028c827f53e4f3bda5fc4fefb..445d73cd279f7e8268be533a11e512cc
// If we are likely to software composite the resource, we use sRGB because
// software compositing is unable to perform color conversion.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 5b803defbb737cdc1642863158e9548171f98f0a..975f860eb078602aadc6df1a37310dd791b8b745 100644
index e43b58e7458336f914662d026a24e774fbe647ba..68c8f235f6afb412ebc65604c7b39109d9842d23 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings {
@ -93,10 +93,10 @@ index 7c0598fb3f9f08d8d9905c5487f3a128f1262b15..314d443a60d0c9093dd06cd1589ab639
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 a66d46e157b7bb8b8fdd575bd5c8e16908ce9b1c..ba4d3cb88f5412e1574ac1b82349d86eb310e328 100644
index 179b9a06569a038e95a44ca42e35bf368860f51e..8d2053315bfa2847c7c3602b87f9bd6458bd484d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3344,6 +3344,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3353,6 +3353,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[] = {
@ -148,7 +148,7 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560
}
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
index 035cd59fe71d51714f904a6f6db8e5d883d2f1da..ba93a944cefeaec692e83d6683e7210cdb6fa9fe 100644
index b7e8b531371564695dd811ebba094b5f5cd4862b..051120e7988ab5168114ddfe6db2daf744e78fe6 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -30,6 +30,7 @@
@ -159,7 +159,7 @@ index 035cd59fe71d51714f904a6f6db8e5d883d2f1da..ba93a944cefeaec692e83d6683e7210c
#include "ui/native_theme/native_theme_features.h"
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
@@ -335,6 +336,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
@@ -336,6 +337,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
@ -170,7 +170,7 @@ index 035cd59fe71d51714f904a6f6db8e5d883d2f1da..ba93a944cefeaec692e83d6683e7210c
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 242681769f2fc5bfa2f84de56a1f91fc9c3cac5d..47c9df53bebe7179406c67857c2001b2d4f67a5f 100644
index 2f2eb750b71e6a219af9f8601c6053a9799a0044..928dc14ef709c0d4fcb3e5883fc073d00f91b7a9 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -21,6 +21,7 @@
@ -196,7 +196,7 @@ index 242681769f2fc5bfa2f84de56a1f91fc9c3cac5d..47c9df53bebe7179406c67857c2001b2
// Allow but ignore invalid color spaces.
if (!color_space.IsValid())
return true;
@@ -339,6 +348,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
@@ -340,6 +349,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
DCHECK_EQ(kIOReturnSuccess, r);
}
@ -210,8 +210,8 @@ index 242681769f2fc5bfa2f84de56a1f91fc9c3cac5d..47c9df53bebe7179406c67857c2001b2
+ }
+
// Ensure that all IOSurfaces start as sRGB.
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
IOSurfaceSetValue(surface.get(), CFSTR("IOSurfaceColorSpace"),
kCGColorSpaceSRGB);
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
index 1bf6fffae161414d650be3210c427dcc47ac1cf8..64a6e263c693b17b26a538219ab681000b98cb9a 100644
--- a/ui/gfx/switches.cc

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

@ -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 ce9c58efa5b742d6ec7671b4a078eb051e041008..dcea4448b0db09d8a30b28b3e0afa4f10f469aec 100644
index 6800be4c8a0a6355318bd85c010189ec6c5d530b..00b9249d9892315d826acfc2337a34e82955a4b2 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -563,7 +563,11 @@
@@ -556,7 +556,11 @@
return;
host()->WasHidden();

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

@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index 82d45115a964310fdccdedb03e542d417e632e6a..1b8f927f7a9b79d25178179205ddb63f8c425126 100644
index be1f39d4038a80b9d73ae0cb0a6709d280501bd4..d3ae9bcab7e28145c3c196f6c5bba56597c29ee4 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -212,6 +212,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -224,6 +224,9 @@ RenderProcessImpl::RenderProcessImpl()
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
}

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

@ -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 d7b85d4a6adbe718fe5a219a5c273d05676c3ec6..b85d2f53e55131491c32eff5475cffa7c9d65e25 100644
index a1ce7be62ca99bf8fecc750c781e18b282c12772..895f5126806b557c853f163fe69459ea929f11a4 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -807,6 +807,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -818,6 +818,9 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@ -20,10 +20,10 @@ index d7b85d4a6adbe718fe5a219a5c273d05676c3ec6..b85d2f53e55131491c32eff5475cffa7
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 7ff8a0383dc14e17f080b27c58ba9df77539ee8e..10b49eaf77216ddda23bff873e68ca5d33ac670e 100644
index 28001459e1357d9c14b240d6a729484b5a7e4eff..d194945e1f9d30a85d2bcd8482b7094ad1684cef 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -905,6 +905,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -911,6 +911,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
cc::BrowserControlsState current,
bool animate);
@ -33,7 +33,7 @@ index 7ff8a0383dc14e17f080b27c58ba9df77539ee8e..10b49eaf77216ddda23bff873e68ca5d
void StartDragging(blink::mojom::DragDataPtr drag_data,
const url::Origin& source_origin,
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 51aab89dfd7328b25e78d5f86d4a30e3df7437a5..eb478c177e5bd490778447c1bab81a33ca3972f0 100644
index 96dbd73ff09724236d912382409e0166ba6777ff..2b7a01cd1e7637031bbd28ba32f332f9f97456f1 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -625,7 +625,7 @@ void RenderWidgetHostViewAura::HideImpl() {

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

@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 416ce43ee7e3632fe2bb796a2f090608c600086f..dc0a9a0b4b2d3fa2ea0c9d0c916f81b66c9468e4 100644
index f07572030e7b80fdc2c0563606e0b3eecb6b9ee3..7caf22bd77afac6e699fe1d492796a33842ea204 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1562,6 +1562,13 @@ void NetworkContext::SetNetworkConditions(
@ -63,10 +63,10 @@ index 49d3215854977cbe78dff2909739646f0c40dad9..93ed007eb4ed65625d1c7edac240f138
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index c224584c548b9373b681deae026baec48c458213..4b7881410d85b789442fa09aebddd5a12af8710b 100644
index cda826721b166691f270dd9b28aacec1ce396d2b..7eb6a0b5e9471f605baae703ef654c61144cb39f 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1244,6 +1244,9 @@ interface NetworkContext {
@@ -1245,6 +1245,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

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

@ -12,7 +12,7 @@ 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 68ef0766a4fe8254f5e632b218b4e879c7b4d1c6..119f76aa1707fb2aaa9d62b5f4be81b65cb54932 100644
index 70953a480dbc71594e292609ebd327c9b1c685af..cf7077949d5d04d8aef22ed29bb1b13315d706f7 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -166,6 +166,7 @@

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

@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index 4203c52895ee6ef16506a2c1fdd9b608be5ec07a..393efb454a6f90f41e3ba3d8314f2819d290365f 100644
index ce34cced354b092b8e8cf04a8c034c9833765e71..67c1c16b028f87b04007242d60d9cf90a61731da 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -175,6 +175,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
@@ -191,6 +191,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@ -26,10 +26,10 @@ index 4203c52895ee6ef16506a2c1fdd9b608be5ec07a..393efb454a6f90f41e3ba3d8314f2819
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index e924f7f199156912f48c578e8b4d187cffde8cb0..4d79dc59d56bc883f7c2f7e2b0eeb30316765fdf 100644
index 099bc7193edf98c8b3aff2d35a3c1653820c75fd..1d1ae195131e80ee1bc080e28992ef3554808389 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -435,6 +435,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -441,6 +441,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
bool use_custom_frame = true) const;
@ -53,7 +53,7 @@ index e924f7f199156912f48c578e8b4d187cffde8cb0..4d79dc59d56bc883f7c2f7e2b0eeb303
// 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
@@ -656,6 +673,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -662,6 +679,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool inverted_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

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

@ -323,7 +323,7 @@ index 012069cada2220f6c1976107bc2e4ca6dcb7d7ca..a52a197eb51f8c00d7321f03ccb436ec
// launch failed.
enum class LaunchState {
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
index 1caf159300af5f8910d0c691c6eb5b2475d9f9a0..d3e4adfad23176d6e7989eb20d1f08d780d8831b 100644
index bf65aec1c2a8eb6a91d0d2815979dbedc0e4a09f..4025b4fd7950d40088aa1c1364a7e7aa16bc325e 100644
--- a/content/browser/utility_sandbox_delegate.cc
+++ b/content/browser/utility_sandbox_delegate.cc
@@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate::
@ -346,7 +346,7 @@ index 1caf159300af5f8910d0c691c6eb5b2475d9f9a0..d3e4adfad23176d6e7989eb20d1f08d7
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -96,11 +98,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -97,11 +99,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}
@ -627,10 +627,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab51c665477 100644
index 16eaab2a26ed43ac94d8bc2aa4b38ffc91fd166e..1699cdb4c9a97e7c475d07eca447d70f19254e16 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -721,11 +721,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@@ -728,11 +728,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
// command line flag.
ResultCode LaunchWithoutSandbox(
const base::CommandLine& cmd_line,
@ -643,7 +643,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
// Network process runs in a job even when unsandboxed. This is to ensure it
// does not outlive the browser, which could happen if there is a lot of I/O
// on process shutdown, in which case TerminateProcess can fail. See
@@ -953,7 +951,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
@@ -963,7 +961,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
@ -652,7 +652,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
SandboxDelegate* delegate,
TargetPolicy* policy) {
const base::CommandLine& launcher_process_command_line =
@@ -967,7 +965,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -977,7 +975,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
}
// Add any handles to be inherited to the policy.
@ -661,7 +661,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
policy->AddHandleToShare(handle);
if (!policy->GetConfig()->IsConfigured()) {
@@ -982,6 +980,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -992,6 +990,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@ -675,7 +675,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
#endif
if (!delegate->PreSpawnTarget(policy))
@@ -994,7 +999,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -1004,7 +1009,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
ResultCode SandboxWin::StartSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
@ -684,7 +684,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
SandboxDelegate* delegate,
base::Process* process) {
const base::ElapsedTimer timer;
@@ -1002,13 +1007,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -1012,13 +1017,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
// Avoid making a policy if we won't use it.
if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
*base::CommandLine::ForCurrentProcess())) {

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

@ -197,7 +197,7 @@ index e82717d5167e13e2926bcaf6c0ad66c1502e66f6..783c4d6ed399120e026bbf18baab4092
const raw_ptr<GpuServiceImpl> gpu_service_impl_;
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 4ceb1a9d9f336f65e15831856d30b45af594dd0f..646ac22f074c3d1827e59170a93807bc10d83d0b 100644
index 5dccc2360cd1f3d83ffc59697aeb559a19b0547a..5fe62069b15e6370e63645b257d931be2a714bc3 100644
--- a/components/viz/service/display_embedder/software_output_device_mac.cc
+++ b/components/viz/service/display_embedder/software_output_device_mac.cc
@@ -106,6 +106,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage(
@ -209,13 +209,13 @@ index 4ceb1a9d9f336f65e15831856d30b45af594dd0f..646ac22f074c3d1827e59170a93807bc
// Record the previous paint buffer.
Buffer* previous_paint_buffer =
buffer_queue_.empty() ? nullptr : buffer_queue_.back().get();
@@ -191,6 +193,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
@@ -194,6 +196,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
ca_layer_params.is_empty = false;
ca_layer_params.scale_factor = scale_factor_;
ca_layer_params.pixel_size = pixel_size_;
+ ca_layer_params.damage = last_damage;
ca_layer_params.io_surface_mach_port.reset(
IOSurfaceCreateMachPort(current_paint_buffer_->io_surface));
IOSurfaceCreateMachPort(current_paint_buffer_->io_surface.get()));
client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params);
diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h
index 67d5ff67d74c107a867b39b306c6528425b87e05..5fd12a25c9e319e8e675955926271c9d1cd3a7ca 100644
@ -556,7 +556,7 @@ index cc1ceb263a60b9bd743bd4166def23cd1c01b49f..d2c24bf0b674c5028e48c6b51f23d4a8
} // namespace viz
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index e7f972abb4ad6309faac81da759800e35582fe8d..d2edcf2c23d5faab2369ef0eace2df5b53aaf964 100644
index 2705338b960a4f8de7ad14c58824fb897590639a..2eb3bfdf573976f17ef9df6a481fda65a75793d8 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -397,8 +397,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@ -612,7 +612,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 3843d011de1df1dcb27ea6a84c9bf8b544a18239..250818e9850e502a68a64fe96290cba4fed51e5f 100644
index 456adfeb5725390289e3441974fcb579a491de9a..59d437e25be86b1d2e30478a90d1e102b891e662 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -93,6 +93,7 @@ class DisplayPrivate;
@ -650,7 +650,7 @@ index 3843d011de1df1dcb27ea6a84c9bf8b544a18239..250818e9850e502a68a64fe96290cba4
// 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
@@ -529,6 +543,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -533,6 +547,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

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

@ -28,10 +28,10 @@ index 0960ab9c8361222cd4acf554e04dc3fc124d714e..524c7cf9032a249a30cc726019266ecd
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index a1eb48d194029644d54ebf3b9f1e4ac24df0e3a0..d25d774c8c74b5bc3d042eeb749afba636b781bb 100644
index e7155091dd5c076e6a785833be3ba450d1b38c39..b1a007ba4b865f44c060bf16dd2d9137054dcc10 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -309,7 +309,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -308,7 +308,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
absl::optional<scheduler::TaskAttributionId>
soft_navigation_heuristics_task_id);

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

@ -17,7 +17,7 @@ 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 14049395fbc56fbb4b755da918cc82a9b3e024d4..c9db1f47dca8d166ec6b4391059c3ffbbeff31b4 100644
index 2a309fe2b1dd672c6a38889f707eb84872cfa57b..a98bcfdef9a7d7723971fd4f8f95317221de3bb4 100644
--- a/services/network/public/cpp/resource_request.cc
+++ b/services/network/public/cpp/resource_request.cc
@@ -151,6 +151,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@ -37,7 +37,7 @@ index 14049395fbc56fbb4b755da918cc82a9b3e024d4..c9db1f47dca8d166ec6b4391059c3ffb
allow_cookies_from_browser == other.allow_cookies_from_browser &&
client_security_state == other.client_security_state;
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index facf69cab3dc0c21ca7eddb7f2828fa7765c5744..45d0bce5d469a977ae8dafe5129265dfd52beea5 100644
index 41ef57d61f5d12748188a7791925d1c41bd52b66..b935b4d26e431599b8a37aa3725a7055ea7a7c65 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -69,6 +69,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@ -49,7 +49,7 @@ index facf69cab3dc0c21ca7eddb7f2828fa7765c5744..45d0bce5d469a977ae8dafe5129265df
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index a7fd270571a01ddaf2971ec1cdc845029bdf9a5e..fc567eeb9332ba7a4018bf51f2ef805e6a7bba71 100644
index dc34fcc0d78f5b46809e5062709bc37575742487..e6f1fd1e8ad284ead0b10476db48a4c698dc1b40 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -93,6 +93,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@ -61,7 +61,7 @@ index a7fd270571a01ddaf2971ec1cdc845029bdf9a5e..fc567eeb9332ba7a4018bf51f2ef805e
mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
out->trust_token_observer = data.TakeTrustTokenObserver<
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0295fa612 100644
index d3fcbf6dec2ff609e3d17f9b3af763a4fe341b05..d3d622f33cee467166ce2678d51d2c52e26efe4b 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -73,6 +73,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@ -76,7 +76,7 @@ index aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0
cookie_observer(
const network::ResourceRequest::TrustedParams& trusted_params) {
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index 6478e8136096fa7c4f704737372d36dcfc771600..b46ce581d8b5707a9a034344de96707daa4f4b5d 100644
index 0bb989b3f5341c4c06d02939ae48a400d20e0603..a191f73c357ef16cf61c10d71f01ca531b9af5dc 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {
@ -90,7 +90,7 @@ index 6478e8136096fa7c4f704737372d36dcfc771600..b46ce581d8b5707a9a034344de96707d
// a cookie. If this is set to non-null, the observer passed to
// URLLoaderFactory will be ignored.
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
index d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b9598492dff33ee 100644
index a58666f95cf6c0974e25b0c2805f944b290358ae..fa77efab0cbe5a702796a0e374f847c1f0cba697 100644
--- a/services/network/public/mojom/url_response_head.mojom
+++ b/services/network/public/mojom/url_response_head.mojom
@@ -12,6 +12,7 @@ import "services/network/public/mojom/encoded_body_length.mojom";
@ -112,7 +112,7 @@ index d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b959849
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 1d810a312adf1510819e234542765a0651a06e99..631b97c1b5591efb824f5926f5f1b0400859c77a 100644
index 6d220fb47ca8e9019c2e4e8efd8c73ad3632c690..b0b972c5768087ded0ade3dfc15bd1c47e68bc3c 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -623,6 +623,7 @@ URLLoader::URLLoader(
@ -132,7 +132,7 @@ index 1d810a312adf1510819e234542765a0651a06e99..631b97c1b5591efb824f5926f5f1b040
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1595,6 +1596,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1596,6 +1597,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@ -153,10 +153,10 @@ index 1d810a312adf1510819e234542765a0651a06e99..631b97c1b5591efb824f5926f5f1b040
// 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 5ac365a6aa5a1b3832312fe335bd6f7cf4def18f..6970066e65c6e61a6fed1248127abd6550ddfec6 100644
index b5a9c7db397be9a85c0fdc0a5c76e13393eaa436..3082770fd7cd93da2578e55c4ea256edf819bf29 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -631,6 +631,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -630,6 +630,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

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

@ -7,7 +7,7 @@ Subject: feat: filter out non-shareable windows in the current application in
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 814eab6a5e8c83cae50da2491398edf329ca1ed4..9cacf36eae623c4787d5cccef4bed0202bfd5d35 100644
index 0409dd9d72efd6a3b9da2842f3998e14ea1658ae..83c739080a48ced2d03d0a3d4d942910cc4ff4cf 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -170,7 +170,15 @@ void OnShareableContentCreated(SCShareableContent* content) {

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

@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index f3eb74091c0508f2bc7fdafa42229cf7975790c5..4c6e8aa06cf4fcaea9026ba06c3e21afd986ed76 100644
index 159a0e1c17214afb638fff635340add040433b2d..1fa0251171411f8cdb05621fb0d43948e7b3e4af 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -9838,6 +9838,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
@@ -9862,6 +9862,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
return std::make_pair(parent->GetLastCommittedOrigin(), "about_srcdoc");
}
@ -40,10 +40,10 @@ index f3eb74091c0508f2bc7fdafa42229cf7975790c5..4c6e8aa06cf4fcaea9026ba06c3e21af
// origin of |common_params.url| and/or |common_params.initiator_origin|.
return std::make_pair(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index 914ae3c4288d1e4c5c68388a8a51fdc748adc95f..9faf376a1013c6620a0a085afeb4522a00d6af85 100644
index 440601f36c4e7f1d28520b859e4df9d075db4aa1..0eca1096d5adc39520cb38b62ce38abafbb37759 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2084,6 +2084,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2113,6 +2113,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@ -54,7 +54,7 @@ index 914ae3c4288d1e4c5c68388a8a51fdc748adc95f..9faf376a1013c6620a0a085afeb4522a
StringBuilder debug_info_builder;
if (origin_to_commit_) {
// Origin to commit is specified by the browser process, it must be taken
@@ -2131,6 +2135,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
@@ -2160,6 +2164,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
debug_info_builder.Append(", url=");
debug_info_builder.Append(owner_document->Url().BaseAsString());
debug_info_builder.Append(")");

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

@ -13,7 +13,7 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index 59b3c1d3f4db78b080b5a89fdb789169343b783e..f5739e514553b776a29a6cedfa6264b43f2bf122 100644
index 21f74639c3a64e596e9ef06c492642489273ac4f..7c63f536458de2a680e5fe6eedd094b747d2c8d9 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -898,26 +898,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {

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

@ -54,12 +54,12 @@ index 42c27a6fd63abaf1fe096cb24b5bba53b725e4bb..c373d23ff31f18217ab06f668e21a5fb
+
} // namespace ui
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 250818e9850e502a68a64fe96290cba4fed51e5f..343cd29bd5edd28c75a9785e26c32cb90ec8e1e6 100644
index 59d437e25be86b1d2e30478a90d1e102b891e662..f99676c579402f0961de036a49e62462ec6a6cec 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -515,6 +515,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
const cc::LayerTreeSettings& GetLayerTreeSettings() const;
@@ -519,6 +519,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
return host_->saved_events_metrics_count_for_testing();
}
+ // Sets |background_throttling_| responsible for suspending drawing
+ // and switching frames.
@ -68,7 +68,7 @@ index 250818e9850e502a68a64fe96290cba4fed51e5f..343cd29bd5edd28c75a9785e26c32cb9
private:
friend class base::RefCounted<Compositor>;
friend class TotalAnimationThroughputReporter;
@@ -621,6 +625,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -625,6 +629,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// See go/report-ux-metrics-at-painting for details.
bool animation_started_ = false;

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

@ -14,19 +14,10 @@ can potentially be upstreamed but it's likely that the better fix for this
is to update our OSR code which is several years outdated.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a633447be5af6b9ab75bb28eb2361b4339771971..56f4c5bd320cb7c4acff9c76a160ba035d9ce787 100644
index f107f0089be4d7b75c95821d85b1666b0bf1077f..4aaa859a45e710863695755f69c2bdfbefb73ceb 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3867,6 +3867,8 @@ void WebContentsImpl::Restore() {
void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
#if defined(USE_AURA)
aura::Window* window = GetTopLevelNativeWindow();
+ if (!window)
+ return;
// TODO(laurila, crbug.com/1466855): This API function currently works only on
// Aura platforms (Win/Lin/CrOS/Fuchsia), make it also work on Mac.
@@ -3883,7 +3885,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
@@ -3996,7 +3996,7 @@ void WebContentsImpl::Restore() {
ui::WindowShowState WebContentsImpl::GetWindowShowState() {
#if defined(USE_AURA)
aura::Window* window = GetTopLevelNativeWindow();

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

@ -9,10 +9,10 @@ to support content settings UI. The support pulls in chrome content settings
and UI code which are not valid in the scope of Electron.
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135a456b651 100644
index c74ff0ec2cd7c57b042dddce4e763a4cadf9072a..7f60801c4d3e4513ac5aaf27f287776134f63945 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
@@ -19,8 +19,10 @@
@@ -20,8 +20,10 @@
#include "ui/gfx/geometry/size.h"
#if !BUILDFLAG(IS_ANDROID)
#include "base/task/sequenced_task_runner.h"
@ -23,7 +23,16 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
#include "third_party/blink/public/common/features.h"
#include "ui/views/view.h"
#endif // !BUILDFLAG(IS_ANDROID)
@@ -148,7 +150,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi(
@@ -36,7 +38,7 @@ constexpr gfx::Size kMinWindowSize(240, 52);
// not apply to video Picture-in-Picture windows.
constexpr double kMaxWindowSizeRatio = 0.8;
-#if !BUILDFLAG(IS_ANDROID)
+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Returns true if a document picture-in-picture window should be focused upon
// opening it.
bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) {
@@ -168,7 +170,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi(
return false;
}
@ -32,7 +41,16 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
if (auto_pip_setting_helper_) {
auto_pip_setting_helper_->OnUserClosedWindow();
}
@@ -343,7 +345,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
@@ -351,7 +353,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize(
// static
void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) {
-#if !BUILDFLAG(IS_ANDROID)
+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Always show document picture-in-picture in a new window. When this is
// not opened via the AutoPictureInPictureTabHelper, focus the window.
params.window_action = ShouldFocusPictureInPictureWindow(params)
@@ -374,7 +376,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
video_web_contents_observer_.reset();
pip_window_controller_->Close(false /* should_pause_video */);
pip_window_controller_ = nullptr;
@ -41,7 +59,7 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
auto_pip_setting_helper_.reset();
#endif // !BUILDFLAG(IS_ANDROID)
}
@@ -354,8 +356,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
@@ -385,8 +387,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
// contents, so we only need to forget the controller here when user closes
// the parent web contents with the PiP window open.
document_web_contents_observer_.reset();
@ -52,7 +70,7 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
if (pip_window_controller_)
pip_window_controller_ = nullptr;
}
@@ -377,6 +381,7 @@ PictureInPictureWindowManager::GetOverlayView(
@@ -408,6 +412,7 @@ PictureInPictureWindowManager::GetOverlayView(
return nullptr;
}
@ -60,7 +78,7 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
// It would be nice to create this in `EnterPictureInPicture*`, but detecting
// auto-pip while pip is in the process of opening doesn't work.
//
@@ -404,6 +409,8 @@ PictureInPictureWindowManager::GetOverlayView(
@@ -438,6 +443,8 @@ PictureInPictureWindowManager::GetOverlayView(
}
return overlay_view;
@ -69,7 +87,7 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
}
#endif // !BUILDFLAG(IS_ANDROID)
@@ -417,7 +424,7 @@ PictureInPictureWindowManager::GetActiveSessionOrigins() {
@@ -451,7 +458,7 @@ PictureInPictureWindowManager::GetActiveSessionOrigins() {
return active_origins;
}
@ -79,7 +97,7 @@ index 726b212594a22c3dc3003ca96f76f6e10e966094..02cf32181f77d39fe65f4b2fdcf8e135
// Because we have to defer creating this until after the tab helper finds out
// about pip, we don't care if there's already a helper. Just use it.
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
index dfad60d82ab51d88d1f9d17985f38225f17737d3..4b3171c7ebec98d3477b3d71749a1f51eec925b9 100644
index 64152ef42a5225e857fde6982e4d88baf0c96341..86617d4ae181337b3558b18303f305d4ce38fcbc 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
@@ -11,6 +11,7 @@
@ -100,7 +118,7 @@ index dfad60d82ab51d88d1f9d17985f38225f17737d3..4b3171c7ebec98d3477b3d71749a1f51
namespace views {
class View;
@@ -171,10 +174,11 @@ class PictureInPictureWindowManager {
@@ -176,10 +179,11 @@ class PictureInPictureWindowManager {
const gfx::Rect& browser_view_overridden_bounds,
views::View* anchor_view,
views::BubbleBorder::Arrow arrow);
@ -113,7 +131,7 @@ index dfad60d82ab51d88d1f9d17985f38225f17737d3..4b3171c7ebec98d3477b3d71749a1f51
#endif
// Get the origins for initiators of active Picture-in-Picture sessions.
@@ -232,7 +236,7 @@ class PictureInPictureWindowManager {
@@ -237,7 +241,7 @@ class PictureInPictureWindowManager {
// helper class for callbacks, to avoid re-entrant calls during pip set-up.
static void ExitPictureInPictureSoon();
@ -122,7 +140,7 @@ index dfad60d82ab51d88d1f9d17985f38225f17737d3..4b3171c7ebec98d3477b3d71749a1f51
// Create the settings helper if this is auto-pip and we don't have one.
void CreateAutoPipSettingHelperIfNeeded();
#endif // !BUILDFLAG(IS_ANDROID)
@@ -247,7 +251,9 @@ class PictureInPictureWindowManager {
@@ -252,7 +256,9 @@ class PictureInPictureWindowManager {
#if !BUILDFLAG(IS_ANDROID)
std::unique_ptr<DocumentWebContentsObserver> document_web_contents_observer_;

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

@ -15,10 +15,10 @@ node does not change in this case.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index eec7fc19b7d9892e17b41ec5575fc46328643e12..19dd5b8097f64d283de7c3a09970717e8aa5d949 100644
index f5f30d5696bdd2b8b5948b18b3f7959f9078cc72..660dc5f60bad28ce345827767fc508711ea06d31 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -1045,6 +1045,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
@@ -1046,6 +1046,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
}
@ -32,7 +32,7 @@ index eec7fc19b7d9892e17b41ec5575fc46328643e12..19dd5b8097f64d283de7c3a09970717e
if (!text_input_manager_)
return ui::TEXT_INPUT_TYPE_NONE;
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438691fce1f 100644
index 1dfd9c071a41482e0d35257b28522e5b37702f25..41a09e9470dfa5797c69d02fc9b4f5e608a43d94 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -184,6 +184,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
@ -45,15 +45,15 @@ index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438
// RenderFrameMetadataProvider::Observer implementation.
void OnRenderFrameMetadataChangedBeforeActivation(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d6f4547752f1efad0f461ebbe47b8ebf1ed287e5..a633447be5af6b9ab75bb28eb2361b4339771971 100644
index 6fd40ddf07a55ec12f18ff88e92a7f59a5a52f96..f107f0089be4d7b75c95821d85b1666b0bf1077f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -8400,7 +8400,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -8649,7 +8649,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =
- static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ static_cast<RenderWidgetHostViewBase*>(GetTopLevelRenderWidgetHostView());
if (!root_view || !frame->GetView())
if (!root_view || !frame->GetView()) {
return;
// Convert to screen coordinates from window coordinates by adding the
}

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

@ -25,10 +25,10 @@ index c9a13aee1e64f359cd1d5c2e440b4df204420997..7790c311400fc84bfda6c99e1ebd8da7
// 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 e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d73aa3a147 100644
index fab1e04e754cb63ab7335a45dce25c130c638a04..612a74964adaf7c2d82ca0bb846cb33a6449db98 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -485,7 +485,8 @@ void ApplySystemPrintDialogData(
@@ -486,7 +486,8 @@ void ApplySystemPrintDialogData(
!SetCollateInPrintSettings(settings_->collate()) ||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
!SetOutputColor(static_cast<int>(settings_->color())) ||
@ -38,7 +38,7 @@ index e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d7
return OnError();
}
}
@@ -637,6 +638,22 @@ void ApplySystemPrintDialogData(
@@ -639,6 +640,22 @@ void ApplySystemPrintDialogData(
return PMSetCopies(print_settings, copies, false) == noErr;
}
@ -62,7 +62,7 @@ index e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d7
PMPrintSettings print_settings =
static_cast<PMPrintSettings>([print_info_ PMPrintSettings]);
diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792c22bff20 100644
index 8a7d9c115cf5cca8d203cc71c5c83f06df2c6bee..d808b78d57ea2f29e0ed2248304fa720e3deede2 100644
--- a/printing/printing_context_system_dialog_win.cc
+++ b/printing/printing_context_system_dialog_win.cc
@@ -75,14 +75,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
@ -100,7 +100,7 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792
} else {
// No need to bother, we don't know how many pages are available.
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
index 3fb7a99ac1f2efa472dc8aa6682ab5b8c326c7aa..4c43edf8dd9db4416cc1edbb438ee3612524cc8a 100644
index 525df2cef7d1740ec488c88fd4f6c06314b45fbb..01b2e50d4537ed27916f978a9110b49a49bdcb32 100644
--- a/ui/gtk/printing/print_dialog_gtk.cc
+++ b/ui/gtk/printing/print_dialog_gtk.cc
@@ -241,6 +241,24 @@ void PrintDialogGtk::UpdateSettings(

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

@ -20,7 +20,7 @@ index 6c924dcf068a1ba2fe647a0a6b34d981d3dad570..febd81af331c06d9aaf1dda14be2718a
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
}
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 3b128633ad8798c8f9c98598ea2e10c16db43641..38e89f9d69cdc943b2b0da8ec08dc435254241e3 100644
index ad1adb6f54dc6975c95789287a594b371fead220..07f96c750b49188a11291e1bc165f771d2ca5142 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -442,6 +442,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 5f394296fb6661ae314286dba9910a62835a159a..479a11d52318a60cc7dde60c5c8e65f5528820e0 100644
index 6fc9f48d84590f85576be0362c716634c87eff80..33391eeb8ce9f70955e4e991c5f400a2c001461c 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -2835,6 +2835,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2844,6 +2844,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@ -75,7 +75,7 @@ index 5f394296fb6661ae314286dba9910a62835a159a..479a11d52318a60cc7dde60c5c8e65f5
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -2868,7 +2869,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2877,7 +2878,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@ -85,10 +85,10 @@ index 5f394296fb6661ae314286dba9910a62835a159a..479a11d52318a60cc7dde60c5c8e65f5
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index 2d09abe5f1ab95ab2c0952638078417ae4316b21..0e4461228b33f01a7542c8e74affd5056d701315 100644
index b233430e6049761d478065247e7c2cd4bc26e080..0cb7aef72fdff3686c1c5da81c1f97bf34008d0c 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -799,6 +799,7 @@ class CORE_EXPORT LocalFrame final
@@ -803,6 +803,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@ -204,7 +204,7 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
const mojom::blink::UserActivationOption user_activation_option_;
const mojom::blink::LoadEventBlockingOption blocking_option_;
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 77ae79a8b890b244f4e5fcfa416b6a73d3180968..817b11ed6395d25320d000013186702859d5337b 100644
index 6a52eedbbbebd07f588e1ea9cb3a644dc2ec60e4..43224443cad28087e5576aec07bf675de42e689c 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1113,14 +1113,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@ -226,7 +226,7 @@ index 77ae79a8b890b244f4e5fcfa416b6a73d3180968..817b11ed6395d25320d0000131867028
v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 95a0888c762e7303d079b32c86d4130b07d171cf..1a0a36fc76c459837674b77b9fc99c7b25e9a00e 100644
index f23c2223be86338be33b9ab82b4ffe1505431b97..cd696287bd545c2637ff9df84966962928fe1030 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final

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

@ -6,10 +6,10 @@ Subject: fix: select the first menu item when opened via keyboard
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 71b2770a644b3302ffca96addbf068804e0e57f1..89b292e84f95cf6bd19f19dd38291676cd457f89 100644
index 9b0b1c6011fec0a6653220b98c579443e22b3615..523929431b88fadb9d82838fdbcca9322c4ab490 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -565,6 +565,7 @@ void MenuController::Run(Widget* parent,
@@ -566,6 +566,7 @@ void MenuController::Run(Widget* parent,
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
@ -17,7 +17,7 @@ index 71b2770a644b3302ffca96addbf068804e0e57f1..89b292e84f95cf6bd19f19dd38291676
gfx::NativeView native_view_for_gestures) {
exit_type_ = ExitType::kNone;
possible_drag_ = false;
@@ -629,6 +630,14 @@ void MenuController::Run(Widget* parent,
@@ -630,6 +631,14 @@ void MenuController::Run(Widget* parent,
// Set the selection, which opens the initial menu.
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@ -32,7 +32,7 @@ index 71b2770a644b3302ffca96addbf068804e0e57f1..89b292e84f95cf6bd19f19dd38291676
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2255,19 +2264,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2256,19 +2265,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);

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

@ -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 2334502e6d8e2e3c55bcba938d2eabe076ac2dd6..b4f8c142309da5bebdf0fbda6cedb2d83c6f49c3 100644
index 583ca650938d2e4feac0c31b0f828815c816ee02..525c97a6cf53e69f9eedd5cfb1223c8ba7d72871 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4198,6 +4198,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4209,6 +4209,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@ -20,10 +20,10 @@ index 2334502e6d8e2e3c55bcba938d2eabe076ac2dd6..b4f8c142309da5bebdf0fbda6cedb2d8
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 455722f8ae9e65814080c47e75746e68391497eb..2eea022ab7ab8523b3b5d6f3cad6f9ebabb5c58a 100644
index 5266731678dbfe5fe66ff863b88325546c255be8..424ecbe94ec90ffd1351fb88d8ef48880862a451 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -316,6 +316,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -315,6 +315,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

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

@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7
// 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 bcc517b9d5cc45bd344d91efc65251b17919256f..c3f379829453e00c6e044721962024550052a950 100644
index d3ac95ba2740b6f3b047acae83a97dcddb805e53..d60429bab364f63afacb5e022ebf4dc65fbcba07 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -428,7 +428,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -437,7 +437,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
// static
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
const std::string js_command_line_flags,
@ -51,7 +51,7 @@ index bcc517b9d5cc45bd344d91efc65251b17919256f..c3f379829453e00c6e04472196202455
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -438,7 +439,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@@ -447,7 +448,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
SetFlags(mode, js_command_line_flags);

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

@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 583e2640861d187185df4c352729ef57f7765069..438d8e7568ad3f9d36e60f163613ba7653c2936a 100644
index 95e5ac768b9049ca5ce09264cd391f5f7247b5a3..e8c51cc830d87d08816c50525971c9f58a512b2e 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1260,6 +1260,11 @@

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

@ -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 f482e508a8bf717ecf72532b51aab302ad0bafa0..15c5e67738f22835c1835ad24e5cb2cbe5da1b0d 100755
index 2b2dc1a58d62419e3008cdf95b273929cbba3049..34178daaf9d40960a3e1f324e62a765f12500b98 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -307,6 +307,8 @@ def GetDefaultHostOs():

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

@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
Removes usage of the CGDisplayUsesForceToGray private API.
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index 2653ce451ee21f55824f30ee19c7b46b4c29c75e..e9144eba98b3b038f48b0c431af3bc39678ebec6 100644
index a771c1c03fd1afe3a5e563b4421721a5ddc2eb93..a6cbdfcbeff30508d921d4637aac543dce9e8ad3 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -170,7 +170,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
@@ -171,7 +171,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
display.set_color_depth(Display::kDefaultBitsPerPixel);
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
}

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

@ -99,7 +99,7 @@ index b267bc2272fa82334a70d897a900f1ea37b1a598..967e22699bf565368704972c021f9b42
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
}
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index b0d1486beef9115a03c036281dc6a9deed5b8f7a..1ec166ea009e0ba422a7fd0d868a04812694a17c 100644
index 2fa8809df1d4b29525a737cca40694a61e7ca570..c90c81b0bc5d87777b87de2848326696f95d2306 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -31,19 +31,23 @@

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

@ -75,7 +75,7 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..dbbebbdc1735bc14224dfcde0b7fe3a6
+
@end
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
index 94ac4fa8db42cb70fa5032a0c1eeb10ad94b8d9a..048cfe7b16d74845492c9317f1ed9790fed36250 100644
index 085d9821933390c781fe11d441910501bf22d601..6c79434e2a5b59267c9801ac23c318c9c320f019 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
@@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
@ -95,10 +95,10 @@ index 94ac4fa8db42cb70fa5032a0c1eeb10ad94b8d9a..048cfe7b16d74845492c9317f1ed9790
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index 2a5fa2627fd7abd46d2e87e5df9359ace9a40e91..eca679a3979b0d73455e8fc79f766ca06d2473b1 100644
index 6e837d66209e6322324227bc596e40e56fccc495..3c3c5db57cfaba8e59867e74b81b4fad1cf7a8ed 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -113,7 +113,9 @@ void OrderChildWindow(NSWindow* child_window,
@@ -101,7 +101,9 @@ void OrderChildWindow(NSWindow* child_window,
} // namespace
@interface NSWindow (Private)
@ -108,7 +108,7 @@ index 2a5fa2627fd7abd46d2e87e5df9359ace9a40e91..eca679a3979b0d73455e8fc79f766ca0
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -161,6 +163,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -139,6 +141,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end
@ -117,7 +117,7 @@ index 2a5fa2627fd7abd46d2e87e5df9359ace9a40e91..eca679a3979b0d73455e8fc79f766ca0
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -187,6 +191,8 @@ - (BOOL)usesCustomDrawing {
@@ -165,6 +169,8 @@ - (BOOL)usesCustomDrawing {
}
@end
@ -126,7 +126,7 @@ index 2a5fa2627fd7abd46d2e87e5df9359ace9a40e91..eca679a3979b0d73455e8fc79f766ca0
@implementation NativeWidgetMacNSWindow {
@private
CommandDispatcher* __strong _commandDispatcher;
@@ -430,6 +436,8 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -353,6 +359,8 @@ - (NSAccessibilityRole)accessibilityRole {
// NSWindow overrides.
@ -135,7 +135,7 @@ index 2a5fa2627fd7abd46d2e87e5df9359ace9a40e91..eca679a3979b0d73455e8fc79f766ca0
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -441,6 +449,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -364,6 +372,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}

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

@ -43,10 +43,10 @@ index 5a096477c123a782341115f964c4975301ccaf9a..ecfbb3b405425af346a6ba6788fc1d8f
} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index b9cab13f0916c1b6d092badb5100af52e640c479..3cb91f8ca4e7a9518d2ac34ab6a3f45b8aab2763 100644
index 4616dd8ca21d7e243d5bd785477fe6e43bcdb34b..3332856a44751b3dab0b0002ff3d5a135922fbca 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -605,10 +605,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -595,10 +595,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@ -147,10 +147,10 @@ index 223b88f1ab7cb6dd3694cf50187317555f2719c6..cfa7c77c7785388012f774317a7e5fbc
// 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 64a2ce0fe7fd75e5fcd6bd405239572dbd86c530..ce9c58efa5b742d6ec7671b4a078eb051e041008 100644
index 988682beecc0f2273859f6b4924d87b207778160..6800be4c8a0a6355318bd85c010189ec6c5d530b 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -279,8 +279,10 @@
@@ -272,8 +272,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@ -161,7 +161,7 @@ index 64a2ce0fe7fd75e5fcd6bd405239572dbd86c530..ce9c58efa5b742d6ec7671b4a078eb05
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1642,8 +1644,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1635,8 +1637,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@ -172,7 +172,7 @@ index 64a2ce0fe7fd75e5fcd6bd405239572dbd86c530..ce9c58efa5b742d6ec7671b4a078eb05
return [GetInProcessNSView() window];
}
@@ -1688,9 +1692,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1681,9 +1685,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@ -184,7 +184,7 @@ index 64a2ce0fe7fd75e5fcd6bd405239572dbd86c530..ce9c58efa5b742d6ec7671b4a078eb05
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2197,12 +2203,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2190,12 +2196,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@ -238,7 +238,7 @@ index 3182458838aa96d34911280ab4c6c3aa4aa22d6d..17b57f54492421743a0d69106eefce2c
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cbd0c4190f 100644
index f37c02488e6ba943ebf9b880a04bcfef9afc9d97..b10ed25b5cdf5eb2f314ed72226f71c8bc35e58e 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -30,7 +30,9 @@
@ -251,7 +251,7 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb
@class NSView;
namespace remote_cocoa {
@@ -464,10 +466,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -465,10 +467,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
@ -265,10 +265,10 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index db73dd2bbaf24fc7d737ff857861c0625701e35f..09c9eb4c5097cdc24f28a6ec31be285f7af3831b 100644
index 34dd3d7497828edc0a2cc1a5babb5b00d54f2ada..501afb8d381ce229d7b30f0a87342b7af37a45ba 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -344,7 +344,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
@ -280,7 +280,7 @@ index db73dd2bbaf24fc7d737ff857861c0625701e35f..09c9eb4c5097cdc24f28a6ec31be285f
}
gfx::NativeViewAccessible
@@ -359,7 +363,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -360,7 +364,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
return [in_process_ns_window_bridge_->ns_view() window];
}
@ -292,7 +292,7 @@ index db73dd2bbaf24fc7d737ff857861c0625701e35f..09c9eb4c5097cdc24f28a6ec31be285f
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1389,6 +1397,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1397,6 +1405,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@ -300,7 +300,7 @@ index db73dd2bbaf24fc7d737ff857861c0625701e35f..09c9eb4c5097cdc24f28a6ec31be285f
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1400,11 +1409,13 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1408,11 +1417,13 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
![NSAccessibilityRemoteUIElement isRemoteUIApp]) {
[NSAccessibilityRemoteUIElement setRemoteUIApp:YES];
}
@ -314,7 +314,7 @@ index db73dd2bbaf24fc7d737ff857861c0625701e35f..09c9eb4c5097cdc24f28a6ec31be285f
*pid = getpid();
id element_id = GetNativeViewAccessible();
@@ -1417,6 +1428,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1425,6 +1436,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
}
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

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

@ -86,10 +86,10 @@ index 34931ae06d7923aff611b384730ca2edb7e866e9..1973b90a04bcbd21059b82a0969d3ff1
ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
if (io_surface) {
diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
index 3ff04691217a6b3c9d7605c2e6b8f8a88959b271..0296ca57a4c51cb3e97c65d5aba46f33617cb799 100644
index dcf493d62990018040a3f84b6f875af737bd2214..6ffffe8b3946e0427aead8be19878c537c841294 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -120,6 +120,7 @@ - (void)setContentsChanged;
@@ -121,6 +121,7 @@ - (void)setContentsChanged;
}
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@ -97,7 +97,7 @@ index 3ff04691217a6b3c9d7605c2e6b8f8a88959b271..0296ca57a4c51cb3e97c65d5aba46f33
// Early-out if the remote layer has not changed.
if (remote_layer_.contextId == ca_context_id) {
return;
@@ -149,6 +150,9 @@ - (void)setContentsChanged;
@@ -150,6 +151,9 @@ - (void)setContentsChanged;
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_ = nil;
}

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

@ -145,10 +145,10 @@ index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736
base::WeakPtr<BluetoothLowEnergyAdapterApple>
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 03bceeedd5a46fdf6b47d7a6ba825743792e5378..5220b5823b78489437ab49ee0633bfe9930e495e 100644
index 3dc680c0abe4252e5c733c641a2fc46e13503c43..11e325816ff0e5d49f8f710375ba1d9de8198439 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -995,7 +995,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
@@ -989,7 +989,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
void AudioManagerMac::InitializeOnAudioThread() {
DCHECK(GetTaskRunner()->BelongsToCurrentThread());

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

@ -9,7 +9,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
index 342409c31eb73f4a13ac13a4740b32863f4ef0d6..a1b60a8f77fa4d32e07e6cda240447cf114e83cb 100644
index b28640bb4d89ba9508d4086c9e5ca9ed4a9a7023..15cb883b91f624c1f23f4458dbf8d14763d11778 100644
--- a/ui/gfx/platform_font_mac.mm
+++ b/ui/gfx/platform_font_mac.mm
@@ -28,9 +28,11 @@

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

@ -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 ad15222c06a6d295f50f1119699de02dcdd98fca..416ce43ee7e3632fe2bb796a2f090608c600086f 100644
index 344fb45470747ee5577e15fd5fc43f4e34a27459..f07572030e7b80fdc2c0563606e0b3eecb6b9ee3 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -146,6 +146,11 @@
@ -136,7 +136,7 @@ index ad15222c06a6d295f50f1119699de02dcdd98fca..416ce43ee7e3632fe2bb796a2f090608
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2463,6 +2568,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2467,6 +2572,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
#endif // BUILDFLAG(IS_CHROMEOS)
@ -177,10 +177,10 @@ index 3d07f29d3aaa2100960cca787b35b626d472d388..49d3215854977cbe78dff2909739646f
std::unique_ptr<HostResolver> internal_host_resolver_;
// Map values set to non-null only if that HostResolver has its own private
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 64fc19a76a63ecc172220a25854da0baa8859235..c224584c548b9373b681deae026baec48c458213 100644
index 88fc9ddba7fffd4d94a5086f258c5018788e9f93..cda826721b166691f270dd9b28aacec1ce396d2b 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -310,6 +310,17 @@ struct NetworkContextFilePaths {
@@ -311,6 +311,17 @@ struct NetworkContextFilePaths {
bool trigger_migration = false;
};
@ -198,7 +198,7 @@ index 64fc19a76a63ecc172220a25854da0baa8859235..c224584c548b9373b681deae026baec4
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -947,6 +958,9 @@ interface NetworkContext {
@@ -948,6 +959,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

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

@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 7b31b8fce0fb99baa751131b336a2842f728433a..8f230c09e465df0403c7f162f5f9161ae0085cdf 100644
index 1c301d00fc74fff81dd1495ac812f1970ace3773..5add3b27b2c1a0af5529cdd5908dfc99dac61e42 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -201,6 +201,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
@ -133,10 +133,10 @@ index 9c9e590aab71d5b66cdd2c9a0cfc5f2d34443e84..c461c131d93d592487e319893d531bf4
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index d0356a3e1c9aa3bc8d1a7c514da01d19e8783a9c..056ddf030c3d661b32f5d61d90b0f0b89b6d0e01 100644
index 5da4ee8f01e8314f8e5d84544e497a3600540b87..1d9b5d3134c363c7b55bee1cb45a45d3557020e2 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2018,7 +2018,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2038,7 +2038,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@ -145,7 +145,7 @@ index d0356a3e1c9aa3bc8d1a7c514da01d19e8783a9c..056ddf030c3d661b32f5d61d90b0f0b8
creator_type, std::move(receiver));
break;
}
@@ -2026,7 +2026,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2046,7 +2046,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

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

@ -40,7 +40,7 @@ index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index a3e66097bc3be2de82ff5556fb84bf4ab66da327..0eae8f823c6fbee2baabc5c9cf4e0113e5067c22 100644
index 56da12ea713adc699fc8a5d7eef493824f5a4980..599e3f762a7cd4213f5296a91fc290553608901f 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -16,9 +16,11 @@
@ -55,7 +55,7 @@ index a3e66097bc3be2de82ff5556fb84bf4ab66da327..0eae8f823c6fbee2baabc5c9cf4e0113
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
#include "chrome/browser/ui/views/overlay/close_image_button.h"
@@ -55,7 +57,7 @@
@@ -57,7 +59,7 @@
#include "ui/aura/window.h"
#endif
@ -64,7 +64,7 @@ index a3e66097bc3be2de82ff5556fb84bf4ab66da327..0eae8f823c6fbee2baabc5c9cf4e0113
#include "chrome/browser/shell_integration_win.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
@@ -279,7 +281,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -286,7 +288,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();

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

@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
index 44ef94806fae66475a1fe6c854e4b43499ba8b1a..cb996c5762f14fc2e1410094813ae8c5528738c5 100644
index 59a11d14d3f15e08f222a81f947b581b139fc7a6..7af378fc2148676d6f39d0e7e0f6f22d8c3716c6 100644
--- a/ui/color/color_id.h
+++ b/ui/color/color_id.h
@@ -400,6 +400,10 @@
@@ -403,6 +403,10 @@
E_CPONLY(kColorRadioButtonForegroundUnchecked) \
E_CPONLY(kColorRadioButtonForegroundDisabled) \
E_CPONLY(kColorRadioButtonForegroundChecked) \
@ -22,7 +22,7 @@ index 44ef94806fae66475a1fe6c854e4b43499ba8b1a..cb996c5762f14fc2e1410094813ae8c5
E_CPONLY(kColorSegmentedButtonBorder) \
E_CPONLY(kColorSegmentedButtonFocus) \
E_CPONLY(kColorSegmentedButtonForegroundChecked) \
@@ -506,6 +510,7 @@
@@ -509,6 +513,7 @@
E_CPONLY(kColorTreeNodeForeground) \
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \

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

@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/BUILD.gn b/BUILD.gn
index 30a9ed4f5f80cf11f8e8f062af0877758d7d8c2c..fc32380fdcbdc35542a4cfad2720fcfb4050cede 100644
index ad4b830fa0932340b7c6b45d94ebf49afb4b7f73..4acc0a5befd0da25460de37eef7c4aabfd291659 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -970,7 +970,6 @@ if (is_win) {
@@ -964,7 +964,6 @@ if (is_win) {
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
@ -22,7 +22,7 @@ index 30a9ed4f5f80cf11f8e8f062af0877758d7d8c2c..fc32380fdcbdc35542a4cfad2720fcfb
"//sql:sql_unittests",
"//third_party/breakpad:symupload($host_toolchain)",
"//ui/base:ui_base_unittests",
@@ -979,6 +978,10 @@ if (is_win) {
@@ -973,6 +972,10 @@ if (is_win) {
"//ui/views:views_unittests",
"//url:url_unittests",
]
@ -91,7 +91,7 @@ index 57c9c4408946066cd89304d50798a3719c8012d5..1c44d16c792a497623333ee4cb89005e
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a35736baf8c8 100644
index 5c39228c38530a7a631f94a6de3d2f607162650b..442a6f841e1e234413888c0b64d34b0828030494 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -22,7 +22,9 @@
@ -209,7 +209,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
return true;
}
@@ -339,12 +370,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
@@ -338,12 +369,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
}
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
<< print_settings->requested_media().vendor_id;
@ -224,7 +224,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
base::Value::Dict job_settings,
std::unique_ptr<PrintSettings> print_settings,
UpdatePrintSettingsCallback callback) {
@@ -352,7 +384,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -351,7 +383,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
settings->pages = GetPageRangesFromJobSettings(job_settings);
settings->params = mojom::PrintParams::New();
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
@ -234,7 +234,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
*job_settings.FindInt(kSettingPrinterType));
@@ -364,6 +397,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -363,6 +396,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
return;
}
@ -245,7 +245,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
set_cookie(settings->params->document_cookie);
std::move(callback).Run(std::move(settings));
}
@@ -499,7 +536,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
@@ -497,7 +534,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
void PrintViewManagerBase::ScriptedPrintReply(
ScriptedPrintCallback callback,
int process_id,
@ -255,7 +255,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
#if BUILDFLAG(ENABLE_OOP_PRINTING)
@@ -514,12 +552,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
@@ -512,12 +550,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
return;
}
@ -273,7 +273,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
}
@@ -647,10 +688,12 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -645,10 +686,12 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -284,9 +284,9 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
+#endif
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
if (features::ShouldPrintJobOop() &&
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
@@ -702,10 +745,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -700,10 +743,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value::Dict job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -299,7 +299,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
absl::optional<int> printer_type_value =
job_settings.FindInt(kSettingPrinterType);
@@ -716,6 +761,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -714,6 +759,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
mojom::PrinterType printer_type =
static_cast<mojom::PrinterType>(*printer_type_value);
@ -307,7 +307,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
if (printer_type != mojom::PrinterType::kExtension &&
printer_type != mojom::PrinterType::kPdf &&
printer_type != mojom::PrinterType::kLocal) {
@@ -735,6 +781,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -733,6 +779,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
if (value > 0)
job_settings.Set(kSettingRasterizePdfDpi, value);
}
@ -315,7 +315,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
std::unique_ptr<PrintSettings> print_settings =
PrintSettingsFromJobSettings(job_settings);
@@ -754,7 +801,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -752,7 +799,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
}
@ -338,7 +338,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
// for in-browser queries.
@@ -776,8 +837,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -774,8 +835,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
#endif
@ -347,7 +347,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
void PrintViewManagerBase::SetAccessibilityTree(
@@ -793,7 +852,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
@@ -791,7 +850,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
void PrintViewManagerBase::IsPrintingEnabled(
IsPrintingEnabledCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -356,7 +356,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -809,14 +868,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -807,13 +866,13 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
// didn't happen for some reason.
bad_message::ReceivedBadMessage(
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@ -365,15 +365,14 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
return;
}
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
!query_with_ui_client_id_.has_value()) {
if (features::ShouldPrintJobOop() && !query_with_ui_client_id_.has_value()) {
// Renderer process has requested settings outside of the expected setup.
- std::move(callback).Run(nullptr);
+ std::move(callback).Run(nullptr, false);
return;
}
#endif
@@ -858,6 +917,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -855,6 +914,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
PrintManager::PrintingFailed(cookie, reason);
@ -381,7 +380,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
// `PrintingFailed()` can occur because asynchronous compositing results
// don't complete until after a print job has already failed and been
// destroyed. In such cases the error notification to the user will
@@ -867,7 +927,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -864,7 +924,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
print_job_->document()->cookie() == cookie) {
ShowPrintErrorDialogForGenericError();
}
@ -390,7 +389,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
ReleasePrinterQuery();
}
@@ -879,15 +939,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
@@ -876,15 +936,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
test_observers_.RemoveObserver(&observer);
}
@ -415,7 +414,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
void PrintViewManagerBase::RenderFrameDeleted(
@@ -939,7 +1008,12 @@ void PrintViewManagerBase::OnJobDone() {
@@ -936,7 +1005,12 @@ void PrintViewManagerBase::OnJobDone() {
// Printing is done, we don't need it anymore.
// print_job_->is_job_pending() may still be true, depending on the order
// of object registration.
@ -429,7 +428,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
ReleasePrintJob();
}
@@ -948,9 +1022,10 @@ void PrintViewManagerBase::OnCanceling() {
@@ -945,9 +1019,10 @@ void PrintViewManagerBase::OnCanceling() {
}
void PrintViewManagerBase::OnFailed() {
@ -441,7 +440,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
TerminatePrintJob(true);
}
@@ -960,7 +1035,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
@@ -957,7 +1032,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// Is the document already complete?
if (print_job_->document() && print_job_->document()->IsComplete()) {
@ -450,7 +449,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
return true;
}
@@ -1013,7 +1088,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
@@ -1010,7 +1085,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
// Disconnect the current `print_job_`.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@ -462,7 +461,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
if (!weak_this)
return false;
@@ -1033,7 +1111,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
@@ -1030,7 +1108,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
#endif
print_job_->AddObserver(*this);
@ -471,7 +470,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
return true;
}
@@ -1101,6 +1179,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1098,6 +1176,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
}
#endif
@ -483,7 +482,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
if (!print_job_)
return;
@@ -1108,7 +1191,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1105,7 +1188,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// printing_rfh_ should only ever point to a RenderFrameHost with a live
// RenderFrame.
DCHECK(rfh->IsRenderFrameLive());
@ -492,7 +491,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
}
print_job_->RemoveObserver(*this);
@@ -1150,7 +1233,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -1147,7 +1230,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@ -501,7 +500,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
return true;
if (!cookie) {
@@ -1296,7 +1379,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
@@ -1293,7 +1376,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
}
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@ -510,7 +509,7 @@ index e0d145c82410fd17f5ff478d3839f51ec56b7b6e..5ce7e0a1605d17bbaf6016ddce99a357
for (auto& observer : GetTestObservers()) {
observer.OnPrintNow(rfh);
@@ -1346,7 +1429,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
@@ -1343,7 +1426,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
set_analyzing_content(/*analyzing=*/false);
if (!allowed || !printing_rfh_ || IsCrashed() ||
!printing_rfh_->IsRenderFrameLive()) {
@ -602,10 +601,10 @@ index ae2339d1ab82bd7cfa971ed03a188cfc26d6e1c0..186414ee72c6b431b87b02623abd4d19
// Indication that the job is getting canceled.
bool canceling_job_ = false;
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index e175525a9626624bca06f1ac2b5babd75a8fd833..cbf981c3fc3b7fe8022312d44e054b70d3f5e43b 100644
index 9fefdc150acf87774ca2a20301349f83de575944..13d6af57890b99192f4d3751ac47f2680cbe6266 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -353,17 +353,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
@@ -354,17 +354,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
#endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
}
@ -706,7 +705,7 @@ index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebde
// Tells the browser printing failed.
PrintingFailed(int32 cookie, PrintFailureReason reason);
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0d95cd1ed 100644
index 6000a308a23627e87afd9d979f8cb732a0db71bc..dfa51e2d8d31b34a605ac8dbfcb911b81d70da14 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -47,6 +47,7 @@
@ -717,7 +716,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
#include "printing/units.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
@@ -1215,14 +1216,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1217,14 +1218,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
}
print_in_progress_ = true;
@ -734,7 +733,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
if (!weak_this) {
return;
}
@@ -1253,7 +1254,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1255,7 +1256,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@ -743,7 +742,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -1268,7 +1269,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1270,7 +1271,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@ -752,7 +751,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
if (render_frame_gone_) {
return;
@@ -1357,7 +1358,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1359,7 +1360,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
}
Print(frame, print_preview_context_.source_node(),
@ -762,7 +761,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
if (render_frame_gone_) {
return;
}
@@ -1420,6 +1422,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
@@ -1422,6 +1424,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@ -771,7 +770,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
print_preview_context_.OnPrintPreview();
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -2044,7 +2048,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2046,7 +2050,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
}
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@ -781,7 +780,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
// Check if `this` is still valid.
if (!weak_this) {
return;
@@ -2060,17 +2065,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2062,17 +2067,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -804,7 +803,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
DidFinishPrinting(PrintingResult::kFailPrintInit);
return;
}
@@ -2091,8 +2098,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2093,8 +2100,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@ -821,7 +820,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
// Check if `this` is still valid.
if (!self)
return;
@@ -2331,25 +2345,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2333,25 +2347,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@ -861,7 +860,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
return true;
}
@@ -2456,7 +2478,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
@@ -2458,7 +2480,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
std::move(params),
base::BindOnce(
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
@ -905,10 +904,10 @@ index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c8
// Calculate number of pages in source document.
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index c5d07621fec40caf66bfefb3357b7ff2333b5dfb..961aa78f3d158ec3745d1cad215cd547b1b415f4 100644
index 3b4f0f00e2e214b9615a07acfc02c9baf4a2a7ab..7ad4e9e5166265651ef50e3ee5488595ab97bc06 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2983,8 +2983,9 @@ source_set("browser") {
@@ -2994,8 +2994,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]
@ -957,7 +956,7 @@ index c753f04d8b73a51cb7e05dcdb86afc0e981e7a71..7ec1729e08bf42a51f80885b3838eee9
bool skip_system_calls() const {
#if BUILDFLAG(ENABLE_OOP_PRINTING)
diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm
index 10096f5a3824c71e6cb13b86ef7bdd02488f76c8..f7de11c89efed78f0280ada29f55f3bbd119ee88 100644
index 2dd2b99216e6ebc1e326b9ff61ea2254ea7df4e9..3cc24bed974ba52a12272bc856d085cc890859c0 100644
--- a/sandbox/policy/mac/sandbox_mac.mm
+++ b/sandbox/policy/mac/sandbox_mac.mm
@@ -37,6 +37,10 @@

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

@ -30,10 +30,10 @@ index c4255d8dfc2e3c4f1f32506e4e9edbb90a74340a..142398a8adafc94e6724ee750b612a66
// 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 b85d2f53e55131491c32eff5475cffa7c9d65e25..73d9f46fd52a9bda3322d1883207a56171507692 100644
index 895f5126806b557c853f163fe69459ea929f11a4..b4ead2f5f2f813c23cd5eddae3d380522707fcb2 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2128,6 +2128,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -2139,6 +2139,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}
@ -44,10 +44,10 @@ index b85d2f53e55131491c32eff5475cffa7c9d65e25..73d9f46fd52a9bda3322d1883207a561
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c384642d42ca44958a3bd1936dfa8baee450a84b..37a2ed30b1c38de1976a432df43a07bb4342c056 100644
index 59701b5246e2d07662fb0072b77f3d73ab5df49d..3f7181097becd1b6236f49e6b653b7d9e080d5c7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4962,6 +4962,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5110,6 +5110,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -60,10 +60,10 @@ index c384642d42ca44958a3bd1936dfa8baee450a84b..37a2ed30b1c38de1976a432df43a07bb
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 5d1e943a398862806224c9bfbb913dc8504157a0..be190402db914b43db2917015a21cfd054bcb9c0 100644
index a42970282ae2801c6d00cf7e2f0e78b2cb6973fc..c59480be5af3dae8492b5cd8200748b6a085f613 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1002,6 +1002,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -1011,6 +1011,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@ -72,10 +72,10 @@ index 5d1e943a398862806224c9bfbb913dc8504157a0..be190402db914b43db2917015a21cfd0
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 e15a97a289261a901a7ad8868eeeff6937268627..3cc822d8736fe34c3e6c5b5d8332763e2760a55f 100644
index 617b5a5609796dccf158273ed729a132f0425f09..a4cc8a53b21b40942b403ac6ffbe1f1c676402bb 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -31,6 +31,7 @@
@@ -32,6 +32,7 @@
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-forward.h"
#include "third_party/blink/public/mojom/media/capture_handle_config.mojom-forward.h"
#include "third_party/skia/include/core/SkColor.h"
@ -83,7 +83,7 @@ index e15a97a289261a901a7ad8868eeeff6937268627..3cc822d8736fe34c3e6c5b5d8332763e
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
@@ -571,6 +572,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -572,6 +573,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// Invoked when the primary main frame changes size.
virtual void PrimaryMainFrameWasResized(bool width_changed) {}

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

@ -12,7 +12,7 @@ should be removed as soon as those have been updated. Patching because
every instance is a FTBFS that prevents testing any one instance's fix.
diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h
index 187cec43ddf23e9f4ba65766d87a9c27e5e63557..d83bee4d7f9e4739f4f553ca246115507f92efa8 100644
index 592e15fac9de34c3b1a36788ff4a36de83bbe7e4..9a1c4733b2b2bb7c1c0e3ca438ab600e9cf372f8 100644
--- a/base/functional/callback_helpers.h
+++ b/base/functional/callback_helpers.h
@@ -123,6 +123,22 @@ RepeatingCallback<void(Args...)> ForwardRepeatingCallbacks(

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

@ -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 1634c3556dc783f90f3a7527ab9f9745373b6f48..e3d2eeaa6d4af4cef87cb1dc639e0c247226092d 100644
index 94d403ba5c7a2a824fa17dec3a3b16d28e094ce9..d3781de61ca85bd966c7e30465f744dba6da6e6d 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -695,6 +695,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
@ -24,7 +24,7 @@ index 1634c3556dc783f90f3a7527ab9f9745373b6f48..e3d2eeaa6d4af4cef87cb1dc639e0c24
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 18bfb4853870b90665816ae186a9ac33a4cd8ad3..bf42bb964911c144b728b7e66e900cf03b2237e9 100644
index 955f08e21de3099964e0701b0887d293653d020f..2fca7fd90fcb86863b95d6bfae6719be1992c2b4 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -24,9 +24,12 @@

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

@ -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 1e865f18e4dd41304decff98320d29777c864d81..dfc645bedf13498abb087f4895f5f316364de069 100644
index 6ccd58b51df777e63bba4ee79f873e3cb25f9a0e..0594fc8f8122b5f66457c262890ea93be3a579d8 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1622,7 +1622,7 @@ if (is_chrome_branded && !is_android) {
@@ -1617,7 +1617,7 @@ if (is_chrome_branded && !is_android) {
}
}
@ -64,7 +64,7 @@ index 1e865f18e4dd41304decff98320d29777c864d81..dfc645bedf13498abb087f4895f5f316
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1651,6 +1651,12 @@ if (!is_android) {
@@ -1646,6 +1646,12 @@ if (!is_android) {
}
}

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

@ -6,7 +6,7 @@ Subject: Revert "Remove the AllowAggressiveThrottlingWithWebSocket feature."
This reverts commit 615c1810a187840ffeb04096087efff86edb37de.
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
index 19b03e9f1c5baa98f86e7b73be7de11a1a3c60da..693aee50f555830be560d0933a0f62969022b86f 100644
index f01370e63377722e9585e89d479100b87a448015..89fe8c569e7ddc2fad2076a33d3de743fb2fee52 100644
--- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -95,6 +95,17 @@ enum WebSocketOpCode {

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

@ -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 1f9918844afd413bc4da497ae4fccdf463d343e3..d9f8f28bd776cf73efb9b4a5a9bd9e63cc189ed0 100644
index 83daef460d5dd9b6b908485da1c807ec94a00f3f..7b4fb3da23f4e7805f74932cd959229554c3e217 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1304,7 +1304,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1302,7 +1302,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 056ddf030c3d661b32f5d61d90b0f0b89b6d0e01..a66d46e157b7bb8b8fdd575bd5c8e16908ce9b1c 100644
index 1d9b5d3134c363c7b55bee1cb45a45d3557020e2..179b9a06569a038e95a44ca42e35bf368860f51e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1704,9 +1704,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1715,9 +1715,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), IsJitDisabled());

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

@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e5dc3613110895de0b0647bb01d4bc1cab2ac94c..52e4c899b25e0d085782a83a1f44c01c8d7903eb 100644
index 16adc4112b0e10fadd9c8af254e9e26f6e8e19e3..b618812f6d750ed4e3122aad642e4cc06c316904 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3349,6 +3349,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3448,6 +3448,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@ -26,7 +26,7 @@ index e5dc3613110895de0b0647bb01d4bc1cab2ac94c..52e4c899b25e0d085782a83a1f44c01c
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3359,6 +3366,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3458,6 +3465,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@ -35,7 +35,7 @@ index e5dc3613110895de0b0647bb01d4bc1cab2ac94c..52e4c899b25e0d085782a83a1f44c01c
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 3bd1194d049e05be6030ed51c1663a847675cd04..56bb235cdd3f52a92c9b2f1612efaa0930af1e30 100644
index 3707858d0af5909fce48fc5e2270fdcb660492cb..2e213048464416e23e5d57258e7cf901ddab5415 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -98,10 +98,13 @@ class BrowserContext;

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

@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 6e63cf93684443befb5e4243ef3669316388336c..fb1674cc0b4997a569180f6cf1cb0b1336b683fe 100644
index f2e623cd6ed7eb910216ff4e32686f9124762d81..57a8a953452a1c1bddd7956c3a83fff8a922ca84 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7400,6 +7400,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -7445,6 +7445,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@ -37,10 +37,10 @@ index 6e63cf93684443befb5e4243ef3669316388336c..fb1674cc0b4997a569180f6cf1cb0b13
if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 52e4c899b25e0d085782a83a1f44c01c8d7903eb..d6f4547752f1efad0f461ebbe47b8ebf1ed287e5 100644
index b618812f6d750ed4e3122aad642e4cc06c316904..6fd40ddf07a55ec12f18ff88e92a7f59a5a52f96 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3595,21 +3595,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -3702,21 +3702,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@ -78,7 +78,7 @@ index 52e4c899b25e0d085782a83a1f44c01c8d7903eb..d6f4547752f1efad0f461ebbe47b8ebf
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -3741,7 +3745,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -3852,7 +3856,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
DCHECK(requesting_frame->IsActive());

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

@ -26,10 +26,10 @@ index 72f72e2c6627d1f7159796f9151e697b04af66b1..4dfabec61229f50faba64d5c14255e5a
// 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 55c98b48c0d0880b1e2b2cb6ab38afae5ea3843c..e166bc03436debd2b8e33fc96baf06e6626fc58b 100644
index ee367c7306b078e442b7ac91a5b85144b458de1f..751f6f4455cfe8706e12f362f9af17b5182d525b 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -793,6 +793,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -792,6 +792,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -43,7 +43,7 @@ index 55c98b48c0d0880b1e2b2cb6ab38afae5ea3843c..e166bc03436debd2b8e33fc96baf06e6
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 75486b5e0c49a04fa744a25793a57553151ad48b..7aba9f22ba90541f16e2e5acf8bbdbf9edbd641a 100644
index 23c389ed9c7317b7c2ba42d1228086fa8bd94635..e602b298a5dca24d64a3fe2b8962cb06a1f782ae 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -174,6 +174,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@ -55,10 +55,10 @@ index 75486b5e0c49a04fa744a25793a57553151ad48b..7aba9f22ba90541f16e2e5acf8bbdbf9
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 edfb414926e6f0a812088112aea5bd0d5c31379d..c6d230ec14865a4725c13ce02ed5cb290bcfe49a 100644
index 70987c88d0daf76c96eaa97c7361ac6d365a5541..578dc22dad63fdb9145186999f5fe24ad0c4155f 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -623,6 +623,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -622,6 +622,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

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

@ -35,10 +35,10 @@ index 4dfabec61229f50faba64d5c14255e5a726bf8f2..b91c37ed1dfccf2189cd17d61d2623c1
// 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 e166bc03436debd2b8e33fc96baf06e6626fc58b..8630de2e33a6feb3e94cddfd6fb756a2ac43f170 100644
index 751f6f4455cfe8706e12f362f9af17b5182d525b..5ba00c8ba1fd4d671627aa224e0d536867f0c875 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -805,6 +805,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -804,6 +804,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@ -52,7 +52,7 @@ index e166bc03436debd2b8e33fc96baf06e6626fc58b..8630de2e33a6feb3e94cddfd6fb756a2
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 7aba9f22ba90541f16e2e5acf8bbdbf9edbd641a..446f0e980a97552f3083e883ecf6280f6543cc80 100644
index e602b298a5dca24d64a3fe2b8962cb06a1f782ae..61f1f60e8fbe82fc9b595c5204ccd11f8507eec8 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -174,6 +174,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@ -65,10 +65,10 @@ index 7aba9f22ba90541f16e2e5acf8bbdbf9edbd641a..446f0e980a97552f3083e883ecf6280f
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 c6d230ec14865a4725c13ce02ed5cb290bcfe49a..1ba2c2a1aa41a76c872217ebb097a184f5a8fc1c 100644
index 578dc22dad63fdb9145186999f5fe24ad0c4155f..6589eb05ad1ca3121d39431bc1c376bb02e0d53a 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -623,6 +623,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -622,6 +622,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

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

@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index c62a8e6dd401c8be227c3c2a86a8da86ee795fba..af1abee6d5b4414f300854c85bc0e0cc3ddec198 100644
index e1168ac891dd79d3e66e18d2eef0eb897ff7146f..2c3add429b3c7ca3f97550baecce32ec87f76def 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -770,6 +770,8 @@ export class MainImpl {
@@ -743,6 +743,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-ignore Exported for Tests.js
globalThis.Main.Main = MainImpl;

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

@ -9,7 +9,7 @@ necessary for native modules to load.
Also change visibility on mksnapshot in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index a99a0a7bff0832d8372f638d24b18ba540bc6643..bc719c1ebf4b6dc3015c4a54cdf8049c9447ab77 100644
index 01159bc491a4a97bc0d8dd280f5871e9dc8d3dcd..4d0dd3c174bd8dff18f98506c062b595e88a0420 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -752,7 +752,7 @@ config("internal_config") {
@ -21,7 +21,7 @@ index a99a0a7bff0832d8372f638d24b18ba540bc6643..bc719c1ebf4b6dc3015c4a54cdf8049c
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6879,7 +6879,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6882,7 +6882,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index a99a0a7bff0832d8372f638d24b18ba540bc6643..bc719c1ebf4b6dc3015c4a54cdf8049c
deps = [
":v8_libbase",
@@ -6891,7 +6891,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6894,7 +6894,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

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

@ -12,7 +12,7 @@ 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 bc719c1ebf4b6dc3015c4a54cdf8049c9447ab77..9e9b3ddedb91d5ddbfc9f1b7b1a03ba75ed97d5c 100644
index 4d0dd3c174bd8dff18f98506c062b595e88a0420..91856bfe8ef7f5107e9fe94a075f137db2c8ae37 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -752,6 +752,10 @@ config("internal_config") {
@ -27,7 +27,7 @@ index bc719c1ebf4b6dc3015c4a54cdf8049c9447ab77..9e9b3ddedb91d5ddbfc9f1b7b1a03ba7
defines += [ "BUILDING_V8_SHARED" ]
}
diff --git a/src/base/macros.h b/src/base/macros.h
index f812583633b8d8b7efdf67deeb8a1190350d52c2..bb035f25ee60d9fd9a0e8af9751a84397221fb1a 100644
index 56ff8736b3000644905f128fd365797424761798..52e0384705bd3bbd6c72f1f2cadd7922cc01ee0c 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -388,13 +388,17 @@ bool is_inbounds(float_t v) {

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

@ -1370,8 +1370,8 @@ std::vector<gin_helper::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
pid_dict.Set("pid", process_metric.second->process.Pid());
pid_dict.Set("type", content::GetProcessTypeNameInEnglish(
process_metric.second->type));
pid_dict.Set("creationTime",
process_metric.second->process.CreationTime().ToJsTime());
pid_dict.Set("creationTime", process_metric.second->process.CreationTime()
.InMillisecondsFSinceUnixEpoch());
if (!process_metric.second->service_name.empty()) {
pid_dict.Set("serviceName", process_metric.second->service_name);

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

@ -61,7 +61,7 @@ struct Converter<net::CanonicalCookie> {
dict.Set("httpOnly", val.IsHttpOnly());
dict.Set("session", !val.IsPersistent());
if (val.IsPersistent())
dict.Set("expirationDate", val.ExpiryDate().ToDoubleT());
dict.Set("expirationDate", val.ExpiryDate().InSecondsFSinceUnixEpoch());
dict.Set("sameSite", val.SameSite());
return ConvertToV8(isolate, dict).As<v8::Object>();
}
@ -164,9 +164,9 @@ void FilterCookieWithStatuses(
base::Time ParseTimeProperty(const absl::optional<double>& value) {
if (!value) // empty time means ignoring the parameter
return base::Time();
if (*value == 0) // FromDoubleT would convert 0 to empty Time
if (*value == 0) // FromSecondsSinceUnixEpoch would convert 0 to empty Time
return base::Time::UnixEpoch();
return base::Time::FromDoubleT(*value);
return base::Time::FromSecondsSinceUnixEpoch(*value);
}
base::StringPiece InclusionStatusToString(net::CookieInclusionStatus status) {

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

@ -245,7 +245,7 @@ std::string DownloadItem::GetETag() const {
double DownloadItem::GetStartTime() const {
if (!CheckAlive())
return 0;
return download_item_->GetStartTime().ToDoubleT();
return download_item_->GetStartTime().InSecondsFSinceUnixEpoch();
}
// static

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

@ -828,7 +828,7 @@ void Session::DownloadURL(const GURL& url, gin::Arguments* args) {
void Session::CreateInterruptedDownload(const gin_helper::Dictionary& options) {
int64_t offset = 0, length = 0;
double start_time = base::Time::Now().ToDoubleT();
double start_time = base::Time::Now().InSecondsFSinceUnixEpoch();
std::string mime_type, last_modified, etag;
base::FilePath path;
std::vector<GURL> url_chain;
@ -853,7 +853,8 @@ void Session::CreateInterruptedDownload(const gin_helper::Dictionary& options) {
auto* download_manager = browser_context()->GetDownloadManager();
download_manager->GetNextId(base::BindRepeating(
&DownloadIdCallback, download_manager, path, url_chain, mime_type, offset,
length, last_modified, etag, base::Time::FromDoubleT(start_time)));
length, last_modified, etag,
base::Time::FromSecondsSinceUnixEpoch(start_time)));
}
void Session::SetPreloads(const std::vector<base::FilePath>& preloads) {

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

@ -128,7 +128,8 @@ void ToDictionary(gin_helper::Dictionary* details,
details->Set("id", info->id);
details->Set("url", info->url);
details->Set("method", info->method);
details->Set("timestamp", base::Time::Now().ToDoubleT() * 1000);
details->Set("timestamp",
base::Time::Now().InSecondsFSinceUnixEpoch() * 1000);
details->Set("resourceType", info->web_request_type);
if (!info->response_ip.empty())
details->Set("ip", info->response_ip);

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

@ -141,7 +141,7 @@ void FrameSubscriber::OnFrameCaptured(
Done(content_rect, bitmap);
}
void FrameSubscriber::OnNewCropVersion(uint32_t crop_version) {}
void FrameSubscriber::OnNewSubCaptureTargetVersion(uint32_t crop_version) {}
void FrameSubscriber::OnFrameWithEmptyRegionCapture() {}

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

@ -57,7 +57,7 @@ class FrameSubscriber : public content::WebContentsObserver,
const gfx::Rect& content_rect,
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
callbacks) override;
void OnNewCropVersion(uint32_t crop_version) override;
void OnNewSubCaptureTargetVersion(uint32_t crop_version) override;
void OnFrameWithEmptyRegionCapture() override;
void OnStopped() override;
void OnLog(const std::string& message) override;

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

@ -138,7 +138,8 @@ void AutoUpdater::CheckForUpdates() {
delegate->OnUpdateDownloaded(
base::SysNSStringToUTF8(update.releaseNotes),
base::SysNSStringToUTF8(update.releaseName),
base::Time::FromDoubleT(update.releaseDate.timeIntervalSince1970),
base::Time::FromSecondsSinceUnixEpoch(
update.releaseDate.timeIntervalSince1970),
base::SysNSStringToUTF8(update.updateURL.absoluteString));
} else {
g_update_available = false;

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

@ -136,7 +136,8 @@ void OffScreenVideoConsumer::OnFrameCaptured(
callback_.Run(*update_rect, bitmap);
}
void OffScreenVideoConsumer::OnNewCropVersion(uint32_t crop_version) {}
void OffScreenVideoConsumer::OnNewSubCaptureTargetVersion(
uint32_t crop_version) {}
void OffScreenVideoConsumer::OnFrameWithEmptyRegionCapture() {}

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

@ -44,7 +44,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer {
const gfx::Rect& content_rect,
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
callbacks) override;
void OnNewCropVersion(uint32_t crop_version) override;
void OnNewSubCaptureTargetVersion(uint32_t crop_version) override;
void OnFrameWithEmptyRegionCapture() override;
void OnStopped() override;
void OnLog(const std::string& message) override;

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

@ -169,7 +169,7 @@ v8::Local<v8::Value> ElectronBindings::GetCreationTime(v8::Isolate* isolate) {
if (timeValue.is_null()) {
return v8::Null(isolate);
}
double jsTime = timeValue.ToJsTime();
double jsTime = timeValue.InMillisecondsFSinceUnixEpoch();
return v8::Number::New(isolate, jsTime);
}

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

@ -460,20 +460,112 @@ v8::Local<v8::Value> Converter<blink::mojom::ContextMenuDataMediaType>::ToV8(
// static
v8::Local<v8::Value>
Converter<blink::mojom::ContextMenuDataInputFieldType>::ToV8(
Converter<absl::optional<blink::mojom::FormControlType>>::ToV8(
v8::Isolate* isolate,
const blink::mojom::ContextMenuDataInputFieldType& in) {
switch (in) {
case blink::mojom::ContextMenuDataInputFieldType::kPlainText:
return StringToV8(isolate, "plainText");
case blink::mojom::ContextMenuDataInputFieldType::kPassword:
return StringToV8(isolate, "password");
case blink::mojom::ContextMenuDataInputFieldType::kOther:
return StringToV8(isolate, "other");
default:
return StringToV8(isolate, "none");
const absl::optional<blink::mojom::FormControlType>& in) {
base::StringPiece str{"none"};
if (in.has_value()) {
switch (*in) {
case blink::mojom::FormControlType::kButtonButton:
str = "button-button";
break;
case blink::mojom::FormControlType::kButtonReset:
str = "reset-button";
break;
case blink::mojom::FormControlType::kButtonSelectList:
str = "select-list";
break;
case blink::mojom::FormControlType::kButtonSubmit:
str = "submit-button";
break;
case blink::mojom::FormControlType::kFieldset:
str = "field-set";
break;
case blink::mojom::FormControlType::kInputButton:
str = "input-button";
break;
case blink::mojom::FormControlType::kInputCheckbox:
str = "input-checkbox";
break;
case blink::mojom::FormControlType::kInputColor:
str = "input-color";
break;
case blink::mojom::FormControlType::kInputDate:
str = "input-date";
break;
case blink::mojom::FormControlType::kInputDatetimeLocal:
str = "input-datetime-local";
break;
case blink::mojom::FormControlType::kInputEmail:
str = "input-email";
break;
case blink::mojom::FormControlType::kInputFile:
str = "input-file";
break;
case blink::mojom::FormControlType::kInputHidden:
str = "input-hidden";
break;
case blink::mojom::FormControlType::kInputImage:
str = "input-image";
break;
case blink::mojom::FormControlType::kInputMonth:
str = "input-month";
break;
case blink::mojom::FormControlType::kInputNumber:
str = "input-number";
break;
case blink::mojom::FormControlType::kInputPassword:
str = "input-password";
break;
case blink::mojom::FormControlType::kInputRadio:
str = "input-radio";
break;
case blink::mojom::FormControlType::kInputRange:
str = "input-range";
break;
case blink::mojom::FormControlType::kInputReset:
str = "input-reset";
break;
case blink::mojom::FormControlType::kInputSearch:
str = "input-search";
break;
case blink::mojom::FormControlType::kInputSubmit:
str = "input-submit";
break;
case blink::mojom::FormControlType::kInputTelephone:
str = "input-telephone";
break;
case blink::mojom::FormControlType::kInputText:
str = "input-text";
break;
case blink::mojom::FormControlType::kInputTime:
str = "input-time";
break;
case blink::mojom::FormControlType::kInputUrl:
str = "input-url";
break;
case blink::mojom::FormControlType::kInputWeek:
str = "input-week";
break;
case blink::mojom::FormControlType::kOutput:
str = "output";
break;
case blink::mojom::FormControlType::kSelectList:
str = "select-list";
break;
case blink::mojom::FormControlType::kSelectMultiple:
str = "select-multiple";
break;
case blink::mojom::FormControlType::kSelectOne:
str = "select-one";
break;
case blink::mojom::FormControlType::kTextArea:
str = "text-area";
break;
}
}
return StringToV8(isolate, str);
}
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
auto dict = gin_helper::Dictionary::CreateEmpty(isolate);

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

@ -80,10 +80,10 @@ struct Converter<blink::mojom::ContextMenuDataMediaType> {
};
template <>
struct Converter<blink::mojom::ContextMenuDataInputFieldType> {
struct Converter<absl::optional<blink::mojom::FormControlType>> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const blink::mojom::ContextMenuDataInputFieldType& in);
const absl::optional<blink::mojom::FormControlType>& in);
};
template <>

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

@ -22,6 +22,51 @@
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
namespace {
[[nodiscard]] constexpr base::StringPiece FormControlToInputFieldTypeString(
const absl::optional<blink::mojom::FormControlType> form_control_type) {
if (!form_control_type)
return "none";
switch (*form_control_type) {
case blink::mojom::FormControlType::kInputPassword:
return "password";
case blink::mojom::FormControlType::kInputText:
return "plainText";
// other input types:
case blink::mojom::FormControlType::kInputButton:
case blink::mojom::FormControlType::kInputCheckbox:
case blink::mojom::FormControlType::kInputColor:
case blink::mojom::FormControlType::kInputDate:
case blink::mojom::FormControlType::kInputDatetimeLocal:
case blink::mojom::FormControlType::kInputEmail:
case blink::mojom::FormControlType::kInputFile:
case blink::mojom::FormControlType::kInputHidden:
case blink::mojom::FormControlType::kInputImage:
case blink::mojom::FormControlType::kInputMonth:
case blink::mojom::FormControlType::kInputNumber:
case blink::mojom::FormControlType::kInputRadio:
case blink::mojom::FormControlType::kInputRange:
case blink::mojom::FormControlType::kInputReset:
case blink::mojom::FormControlType::kInputSearch:
case blink::mojom::FormControlType::kInputSubmit:
case blink::mojom::FormControlType::kInputTelephone:
case blink::mojom::FormControlType::kInputTime:
case blink::mojom::FormControlType::kInputUrl:
case blink::mojom::FormControlType::kInputWeek:
return "other";
// not an input type
default:
return "none";
}
}
} // namespace
namespace gin {
// static
@ -156,7 +201,13 @@ v8::Local<v8::Value> Converter<ContextMenuParamsWithRenderFrameHost>::ToV8(
#endif
dict.Set("frameCharset", params.frame_charset);
dict.Set("referrerPolicy", params.referrer_policy);
dict.Set("inputFieldType", params.input_field_type);
dict.Set("formControlType", params.form_control_type);
// NB: inputFieldType is deprecated because the upstream
// field was removed; we are emulating it now until removal
dict.Set("inputFieldType",
FormControlToInputFieldTypeString(params.form_control_type));
dict.Set("menuSourceType", params.source_type);
return gin::ConvertToV8(isolate, dict);

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

@ -83,8 +83,8 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
dict.Set("subjectName", val->subject().GetDisplayName());
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),
val->serial_number().size()));
dict.Set("validStart", val->valid_start().ToDoubleT());
dict.Set("validExpiry", val->valid_expiry().ToDoubleT());
dict.Set("validStart", val->valid_start().InSecondsFSinceUnixEpoch());
dict.Set("validExpiry", val->valid_expiry().InSecondsFSinceUnixEpoch());
dict.Set("fingerprint",
net::HashValue(val->CalculateFingerprint256(val->cert_buffer()))
.ToString());
@ -510,7 +510,8 @@ v8::Local<v8::Value> Converter<network::ResourceRequestBody>::ToV8(
upload_data.Set("offset", static_cast<int>(element_file.offset()));
upload_data.Set("length", static_cast<int>(element_file.length()));
upload_data.Set("modificationTime",
element_file.expected_modification_time().ToDoubleT());
element_file.expected_modification_time()
.InSecondsFSinceUnixEpoch());
break;
}
case network::mojom::DataElement::Tag::kBytes: {
@ -597,10 +598,10 @@ bool Converter<scoped_refptr<network::ResourceRequestBody>>::FromV8(
dict.FindDouble("modificationTime").value_or(0.0);
int offset = dict.FindInt("offset").value_or(0);
int length = dict.FindInt("length").value_or(-1);
(*out)->AppendFileRange(base::FilePath::FromUTF8Unsafe(*file),
static_cast<uint64_t>(offset),
(*out)->AppendFileRange(
base::FilePath::FromUTF8Unsafe(*file), static_cast<uint64_t>(offset),
static_cast<uint64_t>(length),
base::Time::FromDoubleT(modification_time));
base::Time::FromSecondsSinceUnixEpoch(modification_time));
}
}
return true;

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

@ -12,7 +12,8 @@ namespace gin {
v8::Local<v8::Value> Converter<base::Time>::ToV8(v8::Isolate* isolate,
const base::Time& val) {
v8::Local<v8::Value> date;
if (v8::Date::New(isolate->GetCurrentContext(), val.ToJsTime())
if (v8::Date::New(isolate->GetCurrentContext(),
val.InMillisecondsFSinceUnixEpoch())
.ToLocal(&date))
return date;
else