chore: bump chromium to 106.0.5216.0 (main) (#34993)
This commit is contained in:
parent
e15e66f229
commit
97b353a30a
114 changed files with 886 additions and 779 deletions
|
@ -661,6 +661,7 @@ step-persist-data-for-tests: &step-persist-data-for-tests
|
|||
- src/buildtools/third_party/libc++
|
||||
- src/buildtools/third_party/libc++abi
|
||||
- src/out/Default/obj/buildtools/third_party
|
||||
- src/v8/tools/builtins-pgo
|
||||
|
||||
step-electron-dist-unzip: &step-electron-dist-unzip
|
||||
run:
|
||||
|
|
2
DEPS
2
DEPS
|
@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
|||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'105.0.5187.0',
|
||||
'106.0.5216.0',
|
||||
'node_version':
|
||||
'v16.16.0',
|
||||
'nan_version':
|
||||
|
|
|
@ -76,7 +76,6 @@ chore_provide_iswebcontentscreationoverridden_with_full_params.patch
|
|||
fix_properly_honor_printing_page_ranges.patch
|
||||
export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
|
||||
fix_export_zlib_symbols.patch
|
||||
don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
|
||||
web_contents.patch
|
||||
webview_fullscreen.patch
|
||||
disable_unload_metrics.patch
|
||||
|
@ -115,5 +114,6 @@ short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
|
|||
chore_add_electron_deps_to_gitignores.patch
|
||||
chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
|
||||
add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
|
||||
revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch
|
||||
add_electron_deps_to_license_credits_file.patch
|
||||
feat_add_set_can_resize_mutator.patch
|
||||
|
|
|
@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed
|
|||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749e3735a08 100644
|
||||
index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c275ff0dc6 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4435,6 +4435,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4294,6 +4294,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,10 @@ index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749
|
|||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef98153923101 100644
|
||||
index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21760ac96d 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -585,6 +585,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
uint32_t ng_call_count) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
|
@ -53,10 +53,10 @@ index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef981
|
|||
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 acb427e4a6688f14f4a6ceaec8bf3988525c5e08..35623174f16399d5fff637a07554e43c55f902d1 100644
|
||||
index 544ea3f5cd705d61dd0b99f2e0f541d98ca75c53..d863681a4297cbf2844469a1baae2a81cb0d1238 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -606,6 +606,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -579,6 +579,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
|
@ -79,7 +79,7 @@ index c8af53d40eaa1dd3a0067948a8cda80d1599cee3..4de918ee52efa7ec27a21aa2f57616d3
|
|||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
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 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847dd6a38d86 100644
|
||||
index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614d7e1d8c7 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
@ -92,7 +92,7 @@ index 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847d
|
|||
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 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d266b18cbe5 100644
|
||||
index f40f022ff8ff88f1f128d4996f4460b8fdea1d95..480503e245dbb28dffc8ac9d2843d541793db534 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
|
||||
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
|
@ -110,7 +110,7 @@ index 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d26
|
|||
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 c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f48c3c837a 100644
|
||||
index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8d33e89e8 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
|
||||
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
|
|
@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused
|
|||
by decoration shadows and rounded titlebars around the window while maximized.
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
|
||||
index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533bb1f293d8 100644
|
||||
index 1fbb58152c19193d480b437aea123abdd61c24fe..2b7e305d643aa2e0afef4c578688897c3a8832bf 100644
|
||||
--- a/ui/gtk/gtk_ui.cc
|
||||
+++ b/ui/gtk/gtk_ui.cc
|
||||
@@ -511,13 +511,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
@@ -500,13 +500,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,10 @@ index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533b
|
|||
}
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
|
||||
index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67021c949f 100644
|
||||
index e73bbdf28fba1f5b96d326dd7b0fd9aaa33ba221..5a537c8f6291909392824d62fc04209ad662d59a 100644
|
||||
--- a/ui/gtk/gtk_ui.h
|
||||
+++ b/ui/gtk/gtk_ui.h
|
||||
@@ -93,7 +93,7 @@ class GtkUi : public ui::LinuxUi {
|
||||
@@ -94,7 +94,7 @@ class GtkUi : public ui::LinuxUiBase {
|
||||
bool PreferDarkTheme() const override;
|
||||
bool AnimationsEnabled() const override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
|
@ -43,7 +43,7 @@ index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67
|
|||
base::flat_map<std::string, std::string> GetKeyboardLayoutMap() override;
|
||||
std::string GetCursorThemeName() override;
|
||||
int GetCursorThemeSize() override;
|
||||
@@ -197,6 +197,8 @@ class GtkUi : public ui::LinuxUi {
|
||||
@@ -199,6 +199,8 @@ class GtkUi : public ui::LinuxUiBase {
|
||||
// while Chrome is running.
|
||||
std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
|
||||
std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;
|
||||
|
@ -139,7 +139,7 @@ index e4dbdad327eb77994ffd7f068c67336a19897915..d3ae0636455489a7c7443df85cb76995
|
|||
// In GTK4, there's no way to obtain the frame thickness from CSS values
|
||||
// directly, so we must determine it experimentally based on the drawn
|
||||
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
|
||||
index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f03dcb8aeb 100644
|
||||
index 8370c1cb3f8c3532d94e1265242cbf2397920480..2e0105ba8782dfe0a3ac169850734032c8ab071c 100644
|
||||
--- a/ui/gtk/window_frame_provider_gtk.h
|
||||
+++ b/ui/gtk/window_frame_provider_gtk.h
|
||||
@@ -14,7 +14,7 @@ namespace gtk {
|
||||
|
@ -162,10 +162,10 @@ index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f0
|
|||
|
||||
} // namespace gtk
|
||||
diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
|
||||
index 0cd8a0e101de186e11ead65526c7f0abc60c6577..7db580ce04a407877ca4108ec087120cdb9ce2ad 100644
|
||||
index dee97740309e29c29d9c9c6c757455cddc817dbb..e5b71cd2b5e9e6252fe13c54bb54e26365347e2a 100644
|
||||
--- a/ui/linux/linux_ui.h
|
||||
+++ b/ui/linux/linux_ui.h
|
||||
@@ -176,7 +176,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi
|
||||
@@ -175,7 +175,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi {
|
||||
// if transparency is unsupported and the frame should be rendered opaque.
|
||||
// The returned object is not owned by the caller and will remain alive until
|
||||
// the process ends.
|
||||
|
|
|
@ -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 261e1dda1e128e22d15f3454f9012265db45bd74..98b130f0791d1ca2d59ef62151df7e60f3f40831 100644
|
||||
index 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a162891935d5c4b7 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -666,6 +666,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -658,6 +658,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da
|
|||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
|
||||
index 2f073474d8be6d8051606b0f07272969d3936f28..7f9ec06a10b4cba254737fabdc38dddf86137ad7 100644
|
||||
index f55211fdb346c8659c93d077ec04ccebdae5b450..19b846f6ccf99423b712f0b589c20c1ab35bdfcf 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -147,6 +147,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient {
|
||||
@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient {
|
||||
bool was_created_by_renderer,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
|
||||
|
||||
|
@ -73,10 +73,10 @@ index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319
|
|||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc2cfb7342 100644
|
||||
index 3af33a4d699b5bbfb0a1abac9408ad322a47a5ac..30bc8aa73fb46a0306ccc837a99cc4d58daef99d 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -361,6 +361,7 @@ class WebView {
|
||||
@@ -366,6 +366,7 @@ class WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
|
@ -85,10 +85,10 @@ index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc
|
|||
// 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 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc90e458696 100644
|
||||
index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b7183233b4bc 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3742,6 +3742,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3758,6 +3758,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9
|
|||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3753,7 +3760,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
@@ -3769,7 +3776,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
|
@ -113,10 +113,10 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9
|
|||
|
||||
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bbaa7584225 100644
|
||||
index 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc99099e16b 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -417,6 +417,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -416,6 +416,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
|
@ -124,7 +124,7 @@ index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bba
|
|||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -864,6 +865,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -866,6 +867,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@ WebPreferences of in-process child windows, rather than relying on
|
|||
process-level command line switches, as before.
|
||||
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff290113a833c3 100644
|
||||
index e5c9ebda8156c1a7c32f7eb0661dff40f022c264..8840d4be4b49b27dfb257866f6a074efc34ff869 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
@@ -142,6 +142,19 @@ WebPreferences::WebPreferences()
|
||||
fake_no_alloc_direct_call_for_testing_enabled(false),
|
||||
@@ -143,6 +143,19 @@ WebPreferences::WebPreferences()
|
||||
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
|
||||
record_whole_document(false),
|
||||
stylus_handwriting_enabled(false),
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ context_isolation(false),
|
||||
+ is_webview(false),
|
||||
|
@ -32,13 +32,13 @@ index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff2901
|
|||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2332dd9c2 100644
|
||||
index a910d7b53a1346797f0e2bd030dff7ff84a834b8..4847c7587484eb02b8d7f532be53e499517a95fb 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
data.fake_no_alloc_direct_call_for_testing_enabled();
|
||||
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ out->context_isolation = data.context_isolation();
|
||||
+ out->is_webview = data.is_webview();
|
||||
|
@ -51,12 +51,12 @@ index 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2
|
|||
+ out->enable_plugins = data.enable_plugins();
|
||||
+ out->enable_websql = data.enable_websql();
|
||||
+ out->webview_tag = data.webview_tag();
|
||||
+ // End Electron-specific WebPreferences.s
|
||||
+ // End Electron-specific WebPreferences.
|
||||
out->cookie_enabled = data.cookie_enabled();
|
||||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a140aace71 100644
|
||||
index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eeac87b0cca 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -10,6 +10,7 @@
|
||||
|
@ -67,10 +67,10 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1
|
|||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
|
||||
@@ -154,6 +155,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
blink::mojom::V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
@@ -157,6 +158,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// If true, stylus handwriting recognition to text input will be available in
|
||||
// editable input fields which are non-password type.
|
||||
bool stylus_handwriting_enabled;
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ bool context_isolation;
|
||||
+ bool is_webview;
|
||||
|
@ -84,12 +84,11 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1
|
|||
+ bool enable_websql;
|
||||
+ bool webview_tag;
|
||||
+ // End Electron-specific WebPreferences.
|
||||
+
|
||||
|
||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||
// only controls whether or not the "document.cookie" field is properly
|
||||
// connected to the backing store, for instance if you wanted to be able to
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd91cbf309 100644
|
||||
index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a4afe8e4f 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
|
@ -100,8 +99,8 @@ index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd
|
|||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -428,6 +429,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.record_whole_document;
|
||||
@@ -433,6 +434,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.stylus_handwriting_enabled;
|
||||
}
|
||||
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
|
@ -154,7 +153,7 @@ index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd
|
|||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a48fccd35 100644
|
||||
index 4638c6cf8f3834bb3dc5f98347069f1211cb7332..8cf8845375809f239998b1db256622c2ce5b1e58 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
|
||||
|
@ -165,10 +164,10 @@ index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a
|
|||
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
@@ -206,6 +207,20 @@ struct WebPreferences {
|
||||
V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
@@ -209,6 +210,19 @@ struct WebPreferences {
|
||||
// If true, stylus handwriting recognition to text input will be available in
|
||||
// editable input fields which are non-password type.
|
||||
bool stylus_handwriting_enabled;
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ bool context_isolation;
|
||||
+ bool is_webview;
|
||||
|
@ -182,7 +181,6 @@ index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a
|
|||
+ bool enable_websql;
|
||||
+ bool webview_tag;
|
||||
+ // End Electron-specific WebPreferences.
|
||||
+
|
||||
|
||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||
// only controls whether or not the "document.cookie" field is properly
|
||||
// connected to the backing store, for instance if you wanted to be able to
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
|
|||
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
|
||||
|
||||
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
|
||||
index 20a3b1efcb52be5e10dc184df620ec8102f2aff3..dfebc65b2ce180e4cd175ab8d09ad7e16f6b8df5 100644
|
||||
index ce1d8d490c34b7a1f7f539dac401be4a4eafdde6..a40d91b1135f2baf0b5d654b7175107180048163 100644
|
||||
--- a/ui/base/models/simple_menu_model.cc
|
||||
+++ b/ui/base/models/simple_menu_model.cc
|
||||
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
|
@ -21,36 +21,36 @@ index 20a3b1efcb52be5e10dc184df620ec8102f2aff3..dfebc65b2ce180e4cd175ab8d09ad7e1
|
|||
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
|
||||
int command_id) const {
|
||||
return ImageModel();
|
||||
@@ -304,6 +309,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
|
||||
@@ -310,6 +315,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
|
||||
MenuItemsChanged();
|
||||
}
|
||||
|
||||
+void SimpleMenuModel::SetSecondaryLabel(int index, const std::u16string& secondary_label) {
|
||||
+void SimpleMenuModel::SetSecondaryLabel(size_t index, const std::u16string& secondary_label) {
|
||||
+ items_[ValidateItemIndex(index)].secondary_label = secondary_label;
|
||||
+ MenuItemsChanged();
|
||||
+}
|
||||
+
|
||||
void SimpleMenuModel::SetMinorText(int index,
|
||||
void SimpleMenuModel::SetMinorText(size_t index,
|
||||
const std::u16string& minor_text) {
|
||||
items_[ValidateItemIndex(index)].minor_text = minor_text;
|
||||
@@ -396,6 +406,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
|
||||
@@ -403,6 +413,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
|
||||
return items_[ValidateItemIndex(index)].label;
|
||||
}
|
||||
|
||||
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(int index) const {
|
||||
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(size_t index) const {
|
||||
+ if (IsItemDynamicAt(index))
|
||||
+ return delegate_->GetSecondaryLabelForCommandId(GetCommandIdAt(index));
|
||||
+ return items_[ValidateItemIndex(index)].secondary_label;
|
||||
+}
|
||||
+
|
||||
std::u16string SimpleMenuModel::GetMinorTextAt(int index) const {
|
||||
std::u16string SimpleMenuModel::GetMinorTextAt(size_t index) const {
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af83735bd7 100644
|
||||
index 7ecb2f6cae709af8c512cfb6cac71d449a9b39c4..b7781d44125c1d66dba90bc39f9f17b194a85665 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -49,6 +49,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
// Some command ids have labels and icons that change over time.
|
||||
virtual bool IsItemForCommandIdDynamic(int command_id) const;
|
||||
virtual std::u16string GetLabelForCommandId(int command_id) const;
|
||||
|
@ -58,25 +58,25 @@ index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af
|
|||
// Gets the icon for the item with the specified id.
|
||||
virtual ImageModel GetIconForCommandId(int command_id) const;
|
||||
|
||||
@@ -160,6 +161,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -167,6 +168,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
// Sets the label for the item at |index|.
|
||||
void SetLabel(int index, const std::u16string& label);
|
||||
void SetLabel(size_t index, const std::u16string& label);
|
||||
|
||||
+ // Sets the secondary_label for the item at |index|.
|
||||
+ void SetSecondaryLabel(int index, const std::u16string& secondary_label);
|
||||
+ void SetSecondaryLabel(size_t index, const std::u16string& secondary_label);
|
||||
+
|
||||
// Sets the minor text for the item at |index|.
|
||||
void SetMinorText(int index, const std::u16string& minor_text);
|
||||
void SetMinorText(size_t index, const std::u16string& minor_text);
|
||||
|
||||
@@ -199,6 +203,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
|
||||
int GetCommandIdAt(int index) const override;
|
||||
std::u16string GetLabelAt(int index) const override;
|
||||
+ std::u16string GetSecondaryLabelAt(int index) const override;
|
||||
std::u16string GetMinorTextAt(int index) const override;
|
||||
ImageModel GetMinorIconAt(int index) const override;
|
||||
bool IsItemDynamicAt(int index) const override;
|
||||
@@ -238,6 +243,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -206,6 +210,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
|
||||
int GetCommandIdAt(size_t index) const override;
|
||||
std::u16string GetLabelAt(size_t index) const override;
|
||||
+ std::u16string GetSecondaryLabelAt(size_t index) const override;
|
||||
std::u16string GetMinorTextAt(size_t index) const override;
|
||||
ImageModel GetMinorIconAt(size_t index) const override;
|
||||
bool IsItemDynamicAt(size_t index) const override;
|
||||
@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
int command_id = 0;
|
||||
ItemType type = TYPE_COMMAND;
|
||||
std::u16string label;
|
||||
|
|
|
@ -15,10 +15,10 @@ Refs changes in:
|
|||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583fd836051 100644
|
||||
index 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43be61659d9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
|
||||
DCHECK(!IsDetached());
|
||||
|
||||
|
@ -33,7 +33,7 @@ index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583
|
|||
if (type == FrameDetachType::kRemove) {
|
||||
if (provisional_frame_) {
|
||||
provisional_frame_->Detach(FrameDetachType::kRemove);
|
||||
@@ -155,6 +147,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
GetWindowProxyManager()->ClearForSwap();
|
||||
}
|
||||
|
||||
|
@ -49,10 +49,10 @@ index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583
|
|||
// 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 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a294c27bb71 100644
|
||||
index dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee2139648501d377dfb 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
|
@ -63,7 +63,7 @@ index 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a29
|
|||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -593,6 +589,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ on linux. If removing this patch doesn't cause a compile failure, it's
|
|||
fine to delete!
|
||||
|
||||
diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h
|
||||
index c0771b00922c1f21ec9dba726c5c7cd51c267d69..d731c7bf168c4b8df0a46da40c9164b4ac6239f3 100644
|
||||
index bf88c1180ee507c97e2613d4aba12a8e87fcfcd3..fae2b77315784f9167c0fcf4cc5330520c14b862 100644
|
||||
--- a/components/crash/core/common/crash_key.h
|
||||
+++ b/components/crash/core/common/crash_key.h
|
||||
@@ -219,6 +219,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl {
|
||||
|
|
|
@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
|||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index a1a93418b0b0d56f92647aa1087bb4485c354201..191bfe2d3922d2e65f0be10d6436c50efc3b0880 100644
|
||||
index be712614ac5be3573427247d7032432f18e47a15..4ad49e65f6139b43a8f9d1041dfdd4b6951ca7a7 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -80,6 +80,7 @@
|
||||
|
|
|
@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved.
|
|||
Related issue: https://github.com/electron/electron/issues/32718
|
||||
|
||||
diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni
|
||||
index c3c62f83553bd0d258de4d5d9ecd8b02a74f594b..3dbf4462fa056db7a4084453ef35f1b944fbd093 100644
|
||||
index 605a2d455a8affffb3e864d872ffa767fdbc988f..ab4da059149f51724c057cdff7e04e9f6bc85270 100644
|
||||
--- a/base/allocator/allocator.gni
|
||||
+++ b/base/allocator/allocator.gni
|
||||
@@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug)
|
||||
|
|
|
@ -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 a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020687314c2 100644
|
||||
index 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfefb578981 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -175,11 +175,16 @@ if (!is_android && !is_mac) {
|
||||
|
@ -33,10 +33,10 @@ index a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020
|
|||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884b97ec8b5 100644
|
||||
index db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c7fbdcf50 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4574,7 +4574,7 @@ static_library("browser") {
|
||||
@@ -4614,7 +4614,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 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884
|
|||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8e85e46cd 100644
|
||||
index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34e9a0c579 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -5963,7 +5963,6 @@ test("unit_tests") {
|
||||
@@ -6011,7 +6011,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
|
@ -57,7 +57,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8
|
|||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:crash_reporter_client_win_unit_tests",
|
||||
@@ -5988,6 +5987,10 @@ test("unit_tests") {
|
||||
@@ -6036,6 +6035,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
|
@ -68,7 +68,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8
|
|||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -6879,7 +6882,7 @@ test("unit_tests") {
|
||||
@@ -6933,7 +6936,7 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
|
@ -77,7 +77,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8
|
|||
"//chrome/browser/enterprise/connectors/analysis:features",
|
||||
"//chrome/browser/media/router:test_support",
|
||||
"//chrome/browser/media/router/discovery:discovery",
|
||||
@@ -6993,6 +6996,10 @@ test("unit_tests") {
|
||||
@@ -7051,6 +7054,10 @@ test("unit_tests") {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
|
|||
nan tests
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
|
||||
index b3e5378f711c54b76c73179e791646d4e5e4e96b..262c8e53ec25b2e91a73b5971d64dbe5d5e005a1 100644
|
||||
index 4fec8db3c0431294f65e2a7f0046b6ac5ba78c47..2a4ad0955b3c01b2f1d1665fb65e6d9bb16f5fc2 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -44,7 +44,11 @@ config("winver") {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron
|
|||
https://nornagon.medium.com/a-libc-odyssey-973e51649063
|
||||
|
||||
diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn
|
||||
index 09324583a2f98621fe328ec9f0178736dabe6d2b..d57c2c16ea3475c3ad77e81bdb9700ec2f64976a 100644
|
||||
index 5d222aaccd15cbcdd413094e33bd48fd3798de8f..a2653637c2735b268dc4e6174536565d9add17bf 100644
|
||||
--- a/build/config/c++/BUILD.gn
|
||||
+++ b/build/config/c++/BUILD.gn
|
||||
@@ -29,10 +29,12 @@ config("runtime_library") {
|
||||
|
|
|
@ -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 bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf633a324c7 100644
|
||||
index 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad75a0ff582 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7283,6 +7283,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -7298,6 +7298,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 bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf6
|
|||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806d2a9e38c 100644
|
||||
index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d06dd4436 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3990,6 +3990,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3996,6 +3996,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
|
@ -39,7 +39,7 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806
|
|||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_config, session_storage_namespace);
|
||||
|
||||
@@ -4034,12 +4042,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4040,12 +4048,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,10 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806
|
|||
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 cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd698887604 100644
|
||||
index fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bdcd7b8f01 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -587,6 +587,10 @@ struct CreateNewWindowParams {
|
||||
@@ -571,6 +571,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// Additional parameters for creating picture-in-picture windows.
|
||||
blink.mojom.PictureInPictureWindowOptions? pip_options;
|
||||
|
@ -68,10 +68,10 @@ index cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd6
|
|||
|
||||
// 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 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b44ba2c254 100644
|
||||
index 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f14902e6f 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -610,6 +610,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -81,10 +81,10 @@ index 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b4
|
|||
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 cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823ddda956c4 100644
|
||||
index 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a029c40ea 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -165,6 +165,7 @@ class NetworkService;
|
||||
@@ -164,6 +164,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
|
@ -92,7 +92,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d
|
|||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -993,6 +994,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -991,6 +992,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -102,7 +102,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d
|
|||
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 ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae139178fe 100644
|
||||
index 74847a4fbd4d0d897ce6aecd1b39e30bc226f8f4..3ddcc2d403a68fdc2b4b0246899cd9507ecc6195 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -26,6 +26,17 @@ namespace content {
|
||||
|
@ -124,7 +124,7 @@ index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae
|
|||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f064987b4d4d3 100644
|
||||
index 0274e3bb5cc62ce2c52be68a50b57c339fc5bba7..1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
|
@ -150,12 +150,12 @@ index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f0649
|
|||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569695b197e 100644
|
||||
index f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a0d1d2016 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -315,6 +315,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
@@ -297,6 +297,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
/*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(),
|
||||
creator->IsAdSubframe());
|
||||
creator->IsAdFrame());
|
||||
|
||||
+ params->raw_features = features.raw_features.Utf8(
|
||||
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
|
||||
|
@ -165,7 +165,7 @@ index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569
|
|||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index d6dd69c53b66a89ea63927319d7b385f91921ea2..71748596f4d05de73263ed11b122d75a38b49616 100644
|
||||
index 6abdcf70bdeeb3a34d01c3b00e5f629373eef76b..537f71cbf3cc1112100a199a15b77a535efd8a4e 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
|
@ -212,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e
|
|||
|
||||
} // 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 ec10f16c6e6c5507ad2fb0afe306a744885eb58e..3f7a069c3f1b8412074864eb99bf47469a699837 100644
|
||||
index cc39235616f0249c8a979a870885aec2d0e04cc4..77e6bbe18556279a98b5453d4ba1c3eb5b850287 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2084,6 +2084,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2090,6 +2090,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
|||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index d68a1b2dd91704a00be9cce6ccfa5daf7da35e1a..ab30dd802543491352d3b407f12127c04742d1ab 100644
|
||||
index baf86ec0cde417fa4287f794de10b78d19439930..29d7b595fbfd6e211864e3baa8e2d3014b2e7a5b 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -229,6 +229,7 @@ vs-chromium-project.txt
|
||||
@@ -230,6 +230,7 @@ vs-chromium-project.txt
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
/docs/website
|
||||
|
|
|
@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
|
|||
actions in the non-client caption area.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index f6b37bdec2343d45447b419aeadbe2aa19493c3c..bdbf7153f27376bd68459f9cb480bff7485c9e98 100644
|
||||
index 2b1fa6a345247fdbb17bd2381ab9e74a8af40b8d..f11cefe945c33c82cafe7ac0d496f3fcfbc48931 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1169,6 +1169,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged(
|
||||
|
@ -34,10 +34,10 @@ index 0aae49ec83b88057434af5bbfb54b10e53469918..058e5dc978e76a71fa02dc9e275592f3
|
|||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 3b546cf67089e6677fc668b4d1d6c0863282dff5..c6810f162806b36494885b2f63982a756d4dcd38 100644
|
||||
index 67871eec9821cf100acc719a1765be489dfbe7d8..1f883dc7d46d5cc3fddffe75c55e6b96fb0fc5f2 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3129,15 +3129,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3136,15 +3136,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
SetMsgHandled(FALSE);
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
|
|
|
@ -108,10 +108,10 @@ index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48
|
|||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a47e867c7a 100644
|
||||
index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4ca6b3b66e 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1821,12 +1821,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -127,10 +127,10 @@ index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a4
|
|||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 64eeec32ac70f32b71cd30f7d1adb1f12fa6fa46..8ebf50854a4fdf2cdc9b7f90844456c12902cb4b 100644
|
||||
index b0f70cfaa60d28547f74b199d41ce81a5cdc8891..74efdc0a0ba5e5b862e12180dbfdb9534e9e0a5d 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -843,8 +843,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -855,8 +855,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -246,10 +246,10 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7
|
|||
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 ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2b8de1a5e 100644
|
||||
index a2f1f72a30f694d53f28d38d823341e7b4f008e1..7ff6febe70e9ec82becfbe036883fbc7572b5b01 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3916,8 +3916,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3922,8 +3922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
@ -260,7 +260,7 @@ index ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2
|
|||
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 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb53327aa69 100644
|
||||
index 3ddcc2d403a68fdc2b4b0246899cd9507ecc6195..eecc92f2ffce2c2eeb5fde977da6b94a29923b67 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
|
@ -274,7 +274,7 @@ index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb5
|
|||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f0340295339c7838e5 100644
|
||||
index 1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f..aa9af63f6d4708660496e5892f00766281be22c9 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
|
@ -288,10 +288,10 @@ index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f034029533
|
|||
// Allow delegate to creates a custom WebContents when
|
||||
// WebContents::CreateNewWindow() is called. This function is only called
|
||||
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590efd3892c61 100644
|
||||
index add3f3f73b1e44401b31330cd06f8c9211c62516..a64b0d6dac663b23e6cec32c2898ae88157ad602 100644
|
||||
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
@@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
@@ -199,8 +199,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -302,7 +302,7 @@ index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590ef
|
|||
// view is used for displaying embedded extension options, we want any
|
||||
// external links to be opened in a new tab, not in a new guest view so we
|
||||
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e1002cf38cc 100644
|
||||
index f1c474143b087988b8084ad1bdf01b8ba80327e8..47ffb7d406eb04622fffce9f0671eddab4ff8fe3 100644
|
||||
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
@@ -58,8 +58,7 @@ class ExtensionOptionsGuest
|
||||
|
@ -316,10 +316,10 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10
|
|||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf3a137dc3 100644
|
||||
index 75a2534e3be7102a221378afbfef3df8e6a8555e..495fc687379c6456384acc3a1864c5f0c49ad47f 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -403,8 +403,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -399,8 +399,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -330,10 +330,10 @@ index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf
|
|||
}
|
||||
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec4844497334 100644
|
||||
index 26dc86a7534d9296f1b1f772ec95f5313c61061c..925152a6c1fb645dfff5bd7238b620a8344de734 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -171,8 +171,7 @@ class MimeHandlerViewGuest
|
||||
@@ -170,8 +170,7 @@ class MimeHandlerViewGuest
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -372,7 +372,7 @@ index 0661fd642dcee69a7c8f955490dadf32dc0eb468..e3fa74da87513fbfcd035fa872dc938d
|
|||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
index 807879aa4894e5fabe043d07d5899e5700a7c172..5044c462ccfeaeb4aeb2dd3189e40e60c835ed73 100644
|
||||
index aa488570851f68e892b024c901f31b658929fc72..efe6a6bc939a6bdea0eaca65e12242e23f3e6d59 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -179,8 +179,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
|
|
|
@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
|
|||
as its not supported in the current version of chrome.
|
||||
|
||||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
|
||||
index f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867e9f75cce 100644
|
||||
index 732260f0da15c50f660348e0c66e0b3098aa418f..0a0394a3607e9b955f9fc517e0814ac07b3ba67e 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -17,7 +17,9 @@
|
||||
|
@ -20,7 +20,7 @@ index f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867
|
|||
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
|
||||
#include "components/cdm/renderer/widevine_key_system_properties.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
@@ -184,12 +186,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
|
||||
@@ -235,12 +237,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
|
||||
|
||||
// Returns whether persistent-license session can be supported.
|
||||
bool CanSupportPersistentLicense() {
|
||||
|
|
|
@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
|
|||
can be found at https://github.com/electron/electron/issues/1821
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a11bfee888 100644
|
||||
index 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7cccaee61d61 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -308,6 +308,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
@@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -29,7 +29,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1
|
|||
// A scoping class that prevents a window from being able to redraw in response
|
||||
// to invalidations that may occur within it for the lifetime of the object.
|
||||
//
|
||||
@@ -358,7 +362,8 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
@@ -359,7 +363,8 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
hwnd_(owner_->hwnd()),
|
||||
cancel_unlock_(false),
|
||||
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
||||
|
@ -39,7 +39,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1
|
|||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -1051,6 +1056,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
@@ -1052,6 +1057,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
return scoped_enable;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1
|
|||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index 65bf924561934d445e201aa2753ec7a3e32b6a6b..e4805643c6994404a1443fe89f0348a19310023b 100644
|
||||
index cdc283b7e1aa89c8a273c4df97ad8aea55024743..caa02c07b371569be5ac5ac3ce7efe40359cd017 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -207,6 +207,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
|
|
|
@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
|||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index 6a148c3173f8f5653b945ed9b6ffcbf48d76d511..3809ffe0f487e60539db58980b3232030ce8d4f8 100644
|
||||
index 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c5130e93e74d 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1864,6 +1864,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1866,6 +1866,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
TargetColorParams params;
|
||||
|
@ -81,7 +81,7 @@ index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3
|
|||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 9b29ab96d6e7dd7160502ee2252843bdeeab84c9..a9889d625dac9148dd8bbc2853c4e09f6546bd0d 100644
|
||||
index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363b1203c58 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
@ -93,7 +93,7 @@ index 9b29ab96d6e7dd7160502ee2252843bdeeab84c9..a9889d625dac9148dd8bbc2853c4e09f
|
|||
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 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c27a154460 100644
|
||||
index 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf26423d0e 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -199,6 +199,7 @@
|
||||
|
@ -104,7 +104,7 @@ index 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c2
|
|||
#include "ui/gl/gl_switches.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3185,6 +3186,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3195,6 +3196,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[] = {
|
||||
|
@ -178,7 +178,7 @@ index 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937
|
|||
// 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 8bdb9fafc4c5e59d6d6aad323ca2547ecc1b4069..069ed9744dca4fb208daaaf76d4618706c65b84e 100644
|
||||
index 961b730933d285ccea7b81b8c21dd5bb0ecea56a..d6e536924f0b397d3e8808298d2b9fdd6025411f 100644
|
||||
--- a/ui/gfx/mac/io_surface.cc
|
||||
+++ b/ui/gfx/mac/io_surface.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
|
|
|
@ -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 fc7c4474aaa74000b901b93b26bb46d7a7dc07a3..9444d5411cf7caffb3cf180089ca5468c2303803 100644
|
||||
index 54681d4aaaa52ee07fba0055a8411b8e19b4cc8c..8109976614a9ae39dd802d433517bbf29a51349e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -514,7 +514,11 @@
|
||||
@@ -516,7 +516,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
|
|
@ -15,7 +15,7 @@ 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 02b4f803369202a81f2d54f3b35aef04be13dfa2..04a8d29ba210313076eacf5074ed86402160c0c3 100644
|
||||
index 207cda4b937282a3a719e4285f21066b4d1322f6..4367002caa2b3fd5885204a16f1802f67cde3ebc 100644
|
||||
--- a/content/renderer/render_process_impl.cc
|
||||
+++ b/content/renderer/render_process_impl.cc
|
||||
@@ -222,7 +222,8 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: disable_hidden.patch
|
|||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 3c934fe49b745d79d502311af02c4b2409f87742..5647890d0f62bcd5b1d1b2e6adc511b262a83b7f 100644
|
||||
index cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468cef6e56d 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
|
@ -20,7 +20,7 @@ index 3c934fe49b745d79d502311af02c4b2409f87742..5647890d0f62bcd5b1d1b2e6adc511b2
|
|||
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 4c568e15eaf82231004e89590dfe2e28e6ba0ac0..2ba5e20d961494995c11ac2a40d2c78b8b3d7de0 100644
|
||||
index db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545cade0e23 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
@ -34,7 +34,7 @@ index 4c568e15eaf82231004e89590dfe2e28e6ba0ac0..2ba5e20d961494995c11ac2a40d2c78b
|
|||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index f709beca890c426c9355297c6a741d5a8c887fdb..8050e3b8d603e48323002475680d76dfa059e20e 100644
|
||||
index ea62c4a966dd76c1964b6d7f9053cb4fb73376f5..79253c9d5c8f4e71e5c0d0d87dd641feab901e51 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
|
|
@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
|||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index b88a9d695e2e743cdd9446e8e3c3ca38a914630a..a35f8b3118632d503c5750d59e847580cbb47a9f 100644
|
||||
index 8caea1c8d54c59efc5f7b758e78638042f7db23c..579c335888f4df61cfeb08e01ecef09ad1b3a92f 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1195,6 +1195,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1200,6 +1200,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ index b88a9d695e2e743cdd9446e8e3c3ca38a914630a..a35f8b3118632d503c5750d59e847580
|
|||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1245,6 +1246,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1250,6 +1251,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Fri, 18 Dec 2020 15:19:39 -0800
|
||||
Subject: Don't use potentially null "GetWebFrame()->View()" when get blink
|
||||
prefs
|
||||
|
||||
For whatever reason (still haven't narrowed it down to an exact test case) when using OOPIFs the "GetWebFrame()->View()" call during "RenderFrameCreated" call be nullptr. Accessing the prefs via the render_view though still works.
|
||||
|
||||
This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572256
|
||||
|
||||
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
|
||||
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 3e186230715aaf840959a93038167749e3735a08..4c2dbe2b7629c94a16620988ae96fb10da39e0b8 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2294,7 +2294,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
|
||||
}
|
||||
|
||||
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
|
||||
- return GetWebView()->GetWebPreferences();
|
||||
+ return render_view_->GetWebView()->GetWebPreferences();
|
||||
}
|
||||
|
||||
const blink::RendererPreferences& RenderFrameImpl::GetRendererPreferences()
|
|
@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
|
|||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa19493c3c 100644
|
||||
index b6d243983474cfc2c314b555ccc1de4d833a7f00..2b1fa6a345247fdbb17bd2381ab9e74a8af40b8d 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -530,7 +530,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
|
@ -19,10 +19,10 @@ index d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa
|
|||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 81f59c4476cd07930fc302ecbf0377a11bfee888..70e33b49e77240248c629fb18c5d3ca57ea32d66 100644
|
||||
index fe882b31026b527df28d384e6e7e7cccaee61d61..82616ebcb1f56de12cbd932a4614bb3858e9bad9 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1001,8 +1001,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
@@ -1002,8 +1002,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
}
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
|
|
|
@ -33,10 +33,10 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3
|
|||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index d53e403bda407bb46f59395ebcbb39cd9495875b..4850469bb2bd96c87b0aa936c654f7bd58b7b17f 100644
|
||||
index 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f84811dde 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1410,6 +1410,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1412,6 +1412,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ index d53e403bda407bb46f59395ebcbb39cd9495875b..4850469bb2bd96c87b0aa936c654f7bd
|
|||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 614ba5b278f8bed722072ca07399b247ddb971be..21024709a79dc2bb838492090ce1365450427430 100644
|
||||
index 07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9..d4dd2699fa0876d374750135851e1e5325bf4e0d 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -296,6 +296,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
|
@ -63,10 +63,10 @@ index 614ba5b278f8bed722072ca07399b247ddb971be..21024709a79dc2bb838492090ce13654
|
|||
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 118c6469c038e5b53eb76f76abf60f5df15a94d1..9f364ccfd22e736330a2ce9879495fa072373997 100644
|
||||
index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529d3f603b3 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1102,6 +1102,9 @@ interface NetworkContext {
|
||||
@@ -1103,6 +1103,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
@ -77,7 +77,7 @@ index 118c6469c038e5b53eb76f76abf60f5df15a94d1..9f364ccfd22e736330a2ce9879495fa0
|
|||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index b23f4227a6819d1b6b894262f5dda39841b5dd2b..3b8761ddb1d2111cb5b4df0f2448742adeb8f0c8 100644
|
||||
index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e6ee7916d 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
|
|
|
@ -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 9151815e6bf33a3a6980f8337f578dc90e458696..664b8c2b0a3eb5da577a6ac9d70cafff4702a622 100644
|
||||
index 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502b5d47996 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -161,6 +161,7 @@
|
||||
|
@ -23,7 +23,7 @@ index 9151815e6bf33a3a6980f8337f578dc90e458696..664b8c2b0a3eb5da577a6ac9d70cafff
|
|||
#include "third_party/blink/renderer/platform/graphics/image.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
|
||||
@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1797,6 +1798,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
|
|
@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
|||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 5dd898d8db8e6db8278f00d5caa5ab1a0d7f0fc0..90b80c3252a6134ba43f0496a7128cdbf21ce39b 100644
|
||||
index d7be414239f8e120c3b833a5f12ef06d0b3e57b5..eb6f2cd02483a7cf398fc6631f6b46cf336b481e 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -124,6 +124,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
|
@ -26,10 +26,10 @@ index 5dd898d8db8e6db8278f00d5caa5ab1a0d7f0fc0..90b80c3252a6134ba43f0496a7128cdb
|
|||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f01ea1c8b6 100644
|
||||
index bd6a77d5f0f5dd93ea57455651d3cc5024dc45fb..63f4bee073cdcb5b37662b60a9bb0386d7f480c0 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -393,6 +393,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -406,6 +406,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
custom_theme,
|
||||
bool use_custom_frame = true) const;
|
||||
|
||||
|
@ -53,8 +53,8 @@ index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f0
|
|||
// 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
|
||||
@@ -566,6 +583,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
bool forced_colors_ = false;
|
||||
@@ -584,6 +601,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
PageColors page_colors_ = PageColors::kOff;
|
||||
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
+ ThemeSource theme_source_ = ThemeSource::kSystem;
|
||||
|
@ -62,10 +62,10 @@ index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f0
|
|||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 6b9fb74004eba57fdff396124214356f4bcf0852..70807b315f805baab2574148520323ce78f624cb 100644
|
||||
index b4840142322aa216369985a52567727f4e6806b7..63d77806ed6ed324d37e715319288c843c16f7a0 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -618,6 +618,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -621,6 +621,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
// ...unless --force-dark-mode was specified in which case caveat emptor.
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode())
|
||||
return false;
|
||||
|
|
|
@ -81,7 +81,7 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c
|
|||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 267af5f85d4036e144ad9829922dcd3ac62b8a31..a658a43a12f5597a7bea094471191d040fc3d6c2 100644
|
||||
index 90e1c4adeab61374adf9da5708497ea32a46c7f5..b812a22802c7c425ab259dfe5681cafe6ad758c8 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -134,6 +134,8 @@ viz_component("service") {
|
||||
|
@ -94,7 +94,7 @@ index 267af5f85d4036e144ad9829922dcd3ac62b8a31..a658a43a12f5597a7bea094471191d04
|
|||
"display_embedder/software_output_surface.h",
|
||||
"display_embedder/vsync_parameter_listener.cc",
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider.h b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c06a01a60 100644
|
||||
index 18ea9142343e68dfa64c5e81269dbc80e55c1277..c76c4bcd3b30230753be51d87eabffa93a107b6e 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider.h
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
@@ -38,7 +38,8 @@ class OutputSurfaceProvider {
|
||||
|
@ -108,7 +108,7 @@ index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c
|
|||
|
||||
} // namespace viz
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
index c019d729f29440e44d9dd47ff62d3f8fa1ee19a8..8f589394b12cff75df9708310c5f891664674c28 100644
|
||||
index d6ffe3a759fbde3fbb0f86fda9a07c63d50ff73a..4854bca8e1d3117534e4bf02ea8ebf5b2e6ea70c 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
@@ -23,12 +23,14 @@
|
||||
|
@ -119,9 +119,9 @@ index c019d729f29440e44d9dd47ff62d3f8fa1ee19a8..8f589394b12cff75df9708310c5f8916
|
|||
#include "components/viz/service/display_embedder/software_output_surface.h"
|
||||
#include "components/viz/service/gl/gpu_service_impl.h"
|
||||
#include "gpu/command_buffer/client/shared_memory_limits.h"
|
||||
#include "gpu/command_buffer/service/scheduler_sequence.h"
|
||||
#include "gpu/config/gpu_finch_features.h"
|
||||
#include "gpu/ipc/common/surface_handle.h"
|
||||
#include "gpu/ipc/scheduler_sequence.h"
|
||||
+#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
|
@ -502,7 +502,7 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2
|
|||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 8eeb87e2322821ac52e4bc0000cb777d69515a2c..5a7d1501aed1f01b1b67ae156cfb927ee696f83b 100644
|
||||
index 4e150f1fc12884d92b11605b6f39ec4a1d720b99..569b4e2277c758f628e528b80917f0f1e65f76d8 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -84,7 +84,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
|
@ -516,7 +516,7 @@ index 8eeb87e2322821ac52e4bc0000cb777d69515a2c..5a7d1501aed1f01b1b67ae156cfb927e
|
|||
// Creating output surface failed. The host can send a new request, possibly
|
||||
// with a different compositing mode.
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index 0e3af0f9280abe8560393325b400ad2543ed0556..7fe490e55a4bb8a183d0d241188ea15a44347245 100644
|
||||
index 4a9cf8ff4a94ecda70e3d0f8d1b9d18687e4aa87..27a7adcf524e33819b372213285bfccb1f3924ba 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
|
@ -549,13 +549,13 @@ index b2f873919d68633103d115d7d9550a098c1a254c..8e38831a6df15d37e5fb87d63613b7db
|
|||
|
||||
// Notifies that a swap has occurred and provides information about the pixel
|
||||
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
index 3c495dfe499e1bae90fa0d576d5f58f1300c17fa..678700882d379f528ee1d77819b063cfdcdad036 100644
|
||||
index 2534c06b9de7de9b6353c81016ae0fa8609effd3..e5edff80fcdd969c0854641a6e67af12b80138dc 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
@@ -32,6 +32,7 @@ struct RootCompositorFrameSinkParams {
|
||||
@@ -31,6 +31,7 @@ struct RootCompositorFrameSinkParams {
|
||||
bool send_swap_size_notifications = false;
|
||||
// Disables begin frame rate limiting for the display compositor.
|
||||
bool disable_frame_rate_limit = false;
|
||||
bool use_preferred_interval_for_video = false;
|
||||
+ bool offscreen = false;
|
||||
|
||||
[EnableIf=is_android]
|
||||
|
|
|
@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide
|
|||
access to these headers for loader clients created on the browser process.
|
||||
|
||||
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
|
||||
index c8e468f41930dc8e31533e086d72743e12d134f1..5b54e21568019b108d92c28086b8d73db98fc704 100644
|
||||
index 7e02d8c952d2228a39d1fd1fa5a36859e2ea9ab9..1cfa83a0d0d0fa3fec3f92faa94aece678f83552 100644
|
||||
--- a/services/network/public/cpp/resource_request.cc
|
||||
+++ b/services/network/public/cpp/resource_request.cc
|
||||
@@ -233,6 +233,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -234,6 +234,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
do_not_prompt_for_login == request.do_not_prompt_for_login &&
|
||||
is_outermost_main_frame == request.is_outermost_main_frame &&
|
||||
transition_type == request.transition_type &&
|
||||
|
@ -29,10 +29,10 @@ index c8e468f41930dc8e31533e086d72743e12d134f1..5b54e21568019b108d92c28086b8d73d
|
|||
upgrade_if_insecure == request.upgrade_if_insecure &&
|
||||
is_revalidating == request.is_revalidating &&
|
||||
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
|
||||
index 9af8605aaab177daf89524680cb88455fcb48d04..9c851c96588342b245b24fed51d9241f8da7ffcc 100644
|
||||
index 10d7912016a57e413e7f6056697028bbc5a4e0e6..f22a212ca8dc3f95373e23d22689c896720b7ee0 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -158,6 +158,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
@@ -159,6 +159,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
bool do_not_prompt_for_login = false;
|
||||
bool is_outermost_main_frame = false;
|
||||
int transition_type = 0;
|
||||
|
@ -103,10 +103,10 @@ index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd
|
|||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239ab71ae00 100644
|
||||
index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6aeacaf22f2 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -603,6 +603,7 @@ URLLoader::URLLoader(
|
||||
@@ -606,6 +606,7 @@ URLLoader::URLLoader(
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunnerHandle::Get()),
|
||||
per_factory_corb_state_(context.GetMutableCorbState()),
|
||||
|
@ -114,7 +114,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239
|
|||
devtools_request_id_(request.devtools_request_id),
|
||||
request_mode_(request.mode),
|
||||
request_credentials_mode_(request.credentials_mode),
|
||||
@@ -792,7 +793,7 @@ URLLoader::URLLoader(
|
||||
@@ -795,7 +796,7 @@ URLLoader::URLLoader(
|
||||
url_request_->SetRequestHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
|
||||
|
||||
|
@ -123,7 +123,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239
|
|||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1541,6 +1542,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1545,6 +1546,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
|
@ -144,7 +144,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239
|
|||
|
||||
// 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 158eaacb1bf69afad16107491851dab750df9606..eff061c729bed4b8f3b41699f66d087416b08f47 100644
|
||||
index 7a1d7fe570c3b3d94d1dbcfdda2b965323ce5e95..9bc4eb1a1f300529308a2f120b4bc676b11acfbe 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -518,6 +518,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
|
|
|
@ -16,10 +16,10 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
|||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e415735e4 100644
|
||||
index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff118eed07 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -16,12 +16,16 @@
|
||||
@@ -17,12 +17,16 @@
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
|
@ -36,7 +36,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
#include "chrome/common/chrome_switches.h"
|
||||
#include "content/public/browser/navigation_details.h"
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
@@ -165,6 +169,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -177,6 +181,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
if (base::FeatureList::IsEnabled(
|
||||
blink::features::kWindowPlacementFullscreenCompanionWindow)) {
|
||||
if (!popunder_preventer_)
|
||||
@@ -172,6 +177,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -184,6 +189,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
else
|
||||
popunder_preventer_->WillActivateWebContents(web_contents);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
|
||||
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
|
||||
// value of |IsWindowFullscreenForTabOrPending|.
|
||||
@@ -221,7 +227,9 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -233,7 +239,9 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
}
|
||||
|
||||
void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
|
@ -62,7 +62,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
|
||||
if (MaybeToggleFullscreenWithinTab(web_contents, false)) {
|
||||
// During tab capture of fullscreen-within-tab views, the browser window
|
||||
@@ -276,11 +284,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -288,11 +296,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
void FullscreenController::FullscreenTabOpeningPopup(
|
||||
content::WebContents* opener,
|
||||
content::WebContents* popup) {
|
||||
|
@ -76,7 +76,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
}
|
||||
|
||||
void FullscreenController::OnTabDeactivated(
|
||||
@@ -443,17 +453,15 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -460,18 +470,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
|
@ -96,25 +96,19 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
bool entering_tab_fullscreen = option == TAB && !tab_fullscreen_;
|
||||
+#endif
|
||||
GURL url;
|
||||
+#if 0
|
||||
if (option == TAB) {
|
||||
url = GetRequestingOrigin();
|
||||
@@ -463,6 +471,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
tab_fullscreen_ = true;
|
||||
@@ -498,6 +507,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
if (!extension_caused_fullscreen_.is_empty())
|
||||
url = extension_caused_fullscreen_;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
if (option == TAB && display_id != display::kInvalidDisplayId) {
|
||||
// Check, but do not prompt, for permission to request a specific screen.
|
||||
// Sites generally need permission to get the display id in the first place.
|
||||
@@ -480,6 +489,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
GetDisplayId(WebContents::FromRenderFrameHost(requesting_frame));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (option == BROWSER)
|
||||
base::RecordAction(base::UserMetricsAction("ToggleFullscreen"));
|
||||
@@ -507,12 +517,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -525,12 +535,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
RecordExitingUMA();
|
||||
toggled_into_fullscreen_ = false;
|
||||
started_fullscreen_transition_ = true;
|
||||
|
@ -131,10 +125,10 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e
|
|||
extension_caused_fullscreen_ = GURL();
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
index f0841982cb296079c8b943067564d74bc1b7067c..49f59fc2c12c98faada52e0e7c8c9c6e6251b599 100644
|
||||
index a31c0b1a17d4cda765a4511923686b7f44d10e81..0b0a015f0500432273bf0e7f7231987cdd11b440 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
@@ -242,10 +242,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
@@ -247,10 +247,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
// Used in testing to set the state to tab fullscreen.
|
||||
bool is_tab_fullscreen_for_testing_ = false;
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
|
|||
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6f01f3eb8df96320700448e4583e4a4a0b3d2beb..e3c9f87e651be09fd40f1f51b3f9ba6fb18a770b 100644
|
||||
index 2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4..fd6477ee04aee6a87dd33ea0e573eec3d7bba175 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3447,7 +3447,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -3453,7 +3453,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
|
|
@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
|
|||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 70e33b49e77240248c629fb18c5d3ca57ea32d66..3b546cf67089e6677fc668b4d1d6c0863282dff5 100644
|
||||
index 82616ebcb1f56de12cbd932a4614bb3858e9bad9..67871eec9821cf100acc719a1765be489dfbe7d8 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3694,6 +3694,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
@@ -3702,6 +3702,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
|
||||
min_window_size = delegate_->DIPToScreenSize(min_window_size);
|
||||
max_window_size = delegate_->DIPToScreenSize(max_window_size);
|
||||
|
|
|
@ -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 96d6028af1408c34f98ee638b8b8d41e8dc8b2ee..6e3c8da273aa4d24c32200f3d67210eb08ee3dad 100644
|
||||
index 940a00b9b9f992d4254fc74922c3d8b31772fa4e..b3373265a65a6b50276a09bfb54065521ad6eac4 100644
|
||||
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
@@ -860,26 +860,12 @@ export class PDFViewerElement extends PDFViewerBaseElement {
|
||||
|
|
|
@ -50,10 +50,10 @@ upstream would also hit this DCHECK, so give it a try with content_shell or
|
|||
chrome and that would help reporting upstream crbug.
|
||||
|
||||
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
|
||||
index 1f18714dd0c79359173f8e9204b9314a92e3b2a8..068570dba8673d2b0af674f556465abda2ed16f5 100644
|
||||
index e1066e90022485463adb69f5738107670d94ba3f..85cdc5d2df4b17d41305fa8ff4337de65056cdf7 100644
|
||||
--- a/services/device/device_service.cc
|
||||
+++ b/services/device/device_service.cc
|
||||
@@ -158,7 +158,7 @@ DeviceService::~DeviceService() {
|
||||
@@ -159,7 +159,7 @@ DeviceService::~DeviceService() {
|
||||
// naturally sequenced after the last task on
|
||||
// |serial_port_manager_task_runner_| per ThreadPool shutdown semantics).
|
||||
// See crbug.com/1263149#c20 for details.
|
||||
|
|
|
@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
|||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 53435224b5e331bbe24119752c1a44a8d58bfa88..de1a5b60474ce872eba03dfb8931b9b566fd6cee 100644
|
||||
index 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c6935c90a 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1828,7 +1828,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1837,7 +1837,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// IncrementCapturerCount() is destructed.
|
||||
void DecrementCapturerCount(bool stay_hidden,
|
||||
bool stay_awake,
|
||||
|
@ -21,7 +21,7 @@ index 53435224b5e331bbe24119752c1a44a8d58bfa88..de1a5b60474ce872eba03dfb8931b9b5
|
|||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||
// state into account.
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index a3ae580ea073024882bd860abf914bbf7c0ed54d..85ae2b5ba31926d21ffb52ab31fca6a66ad6d5ec 100644
|
||||
index f92bcc8f2a212e6cda464d9b6060a561d689f467..f9cb0eea11665148a4be669acaf5703cf9c0ea09 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -669,6 +669,10 @@ class WebContents : public PageNavigator,
|
||||
|
|
|
@ -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 a64114d9eeb56b3dc0389415d44a842d3cda12fb..6c3b36f36e375a626f9fc2a59935c5ac851a128c 100644
|
||||
index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d27548f6b62a7 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -3184,6 +3184,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3271,6 +3271,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ index a64114d9eeb56b3dc0389415d44a842d3cda12fb..6c3b36f36e375a626f9fc2a59935c5ac
|
|||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index e0bfafe859b600ac5033f78d1eb5823ddda956c4..e2b0937007413b158ac28e48352acd3ab68e6dd0 100644
|
||||
index f399bc59be5705542b34185e7fe7202a029c40ea..3293b6e035a6ea182504aa2700866fea8c213f4c 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -270,6 +270,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node
|
|||
things.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 7b4b42449a60e9309135aae38213cb3b003337e0..7d9068b87eee4dbc3435ed6f67285d428dc85f52 100644
|
||||
index 88f9e4dd05d8efdabbbdd044f5e09e844ced3d55..c254b045494936eca14ce947e1c2de3327820aa2 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -123,9 +123,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
||||
@@ -137,9 +137,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
||||
const intptr_t* reference_table,
|
||||
const std::string js_command_line_flags,
|
||||
v8::FatalErrorCallback fatal_error_callback,
|
||||
|
@ -24,10 +24,10 @@ index 7b4b42449a60e9309135aae38213cb3b003337e0..7d9068b87eee4dbc3435ed6f67285d42
|
|||
g_reference_table = reference_table;
|
||||
g_fatal_error_callback = fatal_error_callback;
|
||||
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
||||
index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d064318627452ba852b2 100644
|
||||
index d7739924bc3c3daec848db52730bd60c72ff2d8a..78af701cb06f6cb1bdd9829b2fcc46c8d63f5c4f 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
@@ -109,7 +109,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
const intptr_t* reference_table = nullptr,
|
||||
const std::string js_command_line_flags = {},
|
||||
v8::FatalErrorCallback fatal_error_callback = nullptr,
|
||||
|
@ -38,10 +38,10 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745
|
|||
// 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 d04aa76f6667c941637de26998b52b4b2f0d2802..1b41c6ad5681ee85250b27cb9d221995ca1e4b7f 100644
|
||||
index ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b3c640dd4 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -353,7 +353,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
@@ -362,7 +362,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 d04aa76f6667c941637de26998b52b4b2f0d2802..1b41c6ad5681ee85250b27cb9d221995
|
|||
static bool v8_is_initialized = false;
|
||||
if (v8_is_initialized)
|
||||
return;
|
||||
@@ -363,7 +364,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
@@ -372,7 +373,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
// See https://crbug.com/v8/11043
|
||||
SetFlags(mode, js_command_line_flags);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ rendering and there is no signal from browser process on this event
|
|||
to identify it.
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
index bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb008827ed 100644
|
||||
index 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58ef31931ae 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
@@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
||||
|
@ -28,10 +28,10 @@ index bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb
|
|||
|
||||
void GpuDataManagerImpl::UpdateDawnInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec63031666e6b978e 100644
|
||||
index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb00a156332 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
@@ -128,6 +128,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
@@ -125,6 +125,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
// BrowserMainParts override instead.
|
||||
void PostCreateThreads();
|
||||
void TerminateInfoCollectionGpuProcess();
|
||||
|
@ -40,10 +40,10 @@ index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec6303166
|
|||
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 54e4a915263eaf1cb6a2854c61b26d0269a49228..567f9e42a931975770f8ce63ce9b0ba80f8f234c 100644
|
||||
index 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f0c91ee61 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1237,6 +1237,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -1209,6 +1209,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
if (host)
|
||||
host->ForceShutdown();
|
||||
}
|
||||
|
@ -57,10 +57,10 @@ index 54e4a915263eaf1cb6a2854c61b26d0269a49228..567f9e42a931975770f8ce63ce9b0ba8
|
|||
|
||||
void GpuDataManagerImplPrivate::UpdateDawnInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
index 85a4d09a54922205d416538ea97c7f2b5897f86a..acba97124a8643c7452bea63e91533cbfa7e182c 100644
|
||||
index 1aff605f7c126104edc9e74adc80d56344177a80..93e589d1ede1fb33dde3b099d04540fef777e182 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -90,6 +90,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
@@ -87,6 +87,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
bool VulkanRequested() const;
|
||||
void PostCreateThreads();
|
||||
void TerminateInfoCollectionGpuProcess();
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
|||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 9a8d321de570ee1a0669aa6022e34f8ff604694f..abcdba63bcbd0b9e323bf482cc292360d30be8fe 100644
|
||||
index 1bc95f7cab225ff4ff5d9819fa07d8a8cf7d9f9c..3631ccc4e41db1b6c9d3873f52cc3ff708b18d68 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -971,6 +971,11 @@
|
||||
@@ -975,6 +975,11 @@
|
||||
"includes": [4960],
|
||||
},
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119
|
|||
# on GTK.
|
||||
"//examples:peerconnection_client",
|
||||
diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn
|
||||
index a4edf639f8fe7170ce15f80e6e429d035fd5d7f7..7bf86bfde863b05c4727f09b24f556f2073d928a 100644
|
||||
index 34126e87bb62c312230e4a0c479f49736fa20e35..7320904ca819b6f6616192dd9f04f02ead2430a8 100644
|
||||
--- a/ui/ozone/platform/x11/BUILD.gn
|
||||
+++ b/ui/ozone/platform/x11/BUILD.gn
|
||||
@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
|
|
|
@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
|||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 194ce0ca751da8677df74489a04e143276264fbe..9df287e5a9d122f26730480d54a1bbfd47e8d95e 100755
|
||||
index f25be7d134b65a6caf65241a78111de145727fcd..4fcbd6e5fd6e0d692c3bad4232b37d2a95a7073f 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -302,6 +302,8 @@ def GetDefaultHostOs():
|
||||
|
|
|
@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were
|
|||
replaced with clean ozone native implementations.
|
||||
|
||||
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
index 7ffb9d707407210e566c8f2bd2f89cf7f31690c9..06bb59fe5e855d0a339e738cf12c566afcf376ac 100644
|
||||
index f7fe443469c54e6cf76c2eb7f00c94d245515e59..d2dac184b3bfa69e142c106ec91f94d5c5e38d5a 100644
|
||||
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
@@ -199,6 +199,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
properties->supports_vulkan_swap_chain = true;
|
||||
properties->uses_external_vulkan_image_factory = true;
|
||||
properties->skia_can_fall_back_to_x11 = true;
|
||||
|
@ -21,10 +21,10 @@ index 7ffb9d707407210e566c8f2bd2f89cf7f31690c9..06bb59fe5e855d0a339e738cf12c566a
|
|||
properties->supports_global_application_menus = true;
|
||||
properties->app_modal_dialogs_use_event_blocker = true;
|
||||
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
|
||||
index df6b551b94bd4e04f4c0d6e976c68cc187a57d85..3b6dd20277af88568cdb17a7fddf89bdf89b5640 100644
|
||||
index 193224d33283d4d3c45dc11b9620700a3a379cce..81abd63261952f0930a4659f270791d27d9d74a3 100644
|
||||
--- a/ui/ozone/public/ozone_platform.h
|
||||
+++ b/ui/ozone/public/ozone_platform.h
|
||||
@@ -132,6 +132,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
|
||||
@@ -129,6 +129,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
|
||||
// Linux only: determines if Skia can fall back to the X11 output device.
|
||||
bool skia_can_fall_back_to_x11 = false;
|
||||
|
||||
|
|
|
@ -15,38 +15,65 @@ for us to register the isolate in between Isolate::Allocate and
|
|||
Isolate::Initialize.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 7d9068b87eee4dbc3435ed6f67285d428dc85f52..c0b8c6e5b49390b8a87d6a9d19605f6b6a1c3562 100644
|
||||
index c254b045494936eca14ce947e1c2de3327820aa2..63c9b9681fcc4e1e9a9590d59d74349bb8aee3b1 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -59,7 +59,8 @@ IsolateHolder::IsolateHolder(
|
||||
@@ -73,7 +73,8 @@ IsolateHolder::IsolateHolder(
|
||||
IsolateType isolate_type,
|
||||
IsolateCreationMode isolate_creation_mode,
|
||||
v8::CreateHistogramCallback create_histogram_callback,
|
||||
- v8::AddHistogramSampleCallback add_histogram_sample_callback)
|
||||
+ v8::AddHistogramSampleCallback add_histogram_sample_callback,
|
||||
+ v8::Isolate* isolate)
|
||||
: IsolateHolder(task_runner,
|
||||
access_mode,
|
||||
isolate_type,
|
||||
@@ -81,14 +82,16 @@ IsolateHolder::IsolateHolder(
|
||||
atomics_wait_mode,
|
||||
create_histogram_callback,
|
||||
add_histogram_sample_callback),
|
||||
- isolate_creation_mode) {}
|
||||
+ isolate_creation_mode,
|
||||
+ isolate) {}
|
||||
|
||||
IsolateHolder::IsolateHolder(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
AccessMode access_mode,
|
||||
IsolateType isolate_type,
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
- IsolateCreationMode isolate_creation_mode)
|
||||
+ IsolateCreationMode isolate_creation_mode,
|
||||
+ v8::Isolate* isolate)
|
||||
: access_mode_(access_mode), isolate_type_(isolate_type) {
|
||||
CHECK(Initialized())
|
||||
<< "You need to invoke gin::IsolateHolder::Initialize first";
|
||||
@@ -70,7 +71,7 @@ IsolateHolder::IsolateHolder(
|
||||
v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
|
||||
@@ -99,7 +102,7 @@ IsolateHolder::IsolateHolder(
|
||||
v8::ArrayBuffer::Allocator* allocator = params->array_buffer_allocator;
|
||||
DCHECK(allocator);
|
||||
|
||||
- isolate_ = v8::Isolate::Allocate();
|
||||
+ isolate_ = isolate ? isolate : v8::Isolate::Allocate();
|
||||
isolate_data_ = std::make_unique<PerIsolateData>(isolate_, allocator,
|
||||
access_mode_, task_runner);
|
||||
if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) {
|
||||
// TODO(https://crbug.com/1347092): Refactor such that caller need not
|
||||
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
||||
index 4efc13c79ae742fa1925d064318627452ba852b2..978c0d144370162e65038cf8a2e125fbfd0f7ebf 100644
|
||||
index 78af701cb06f6cb1bdd9829b2fcc46c8d63f5c4f..4a36f4826f9df765c664a819eb4e3679fbecb104 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
@@ -83,13 +83,15 @@ class GIN_EXPORT IsolateHolder {
|
||||
IsolateType isolate_type,
|
||||
IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
|
||||
v8::CreateHistogramCallback create_histogram_callback = nullptr,
|
||||
- v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr);
|
||||
+ v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr,
|
||||
+ v8::Isolate* isolate = nullptr);
|
||||
IsolateHolder(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
AccessMode access_mode,
|
||||
IsolateType isolate_type,
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
- IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal);
|
||||
+ IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
|
||||
+ v8::Isolate* isolate = nullptr);
|
||||
IsolateHolder(const IsolateHolder&) = delete;
|
||||
IsolateHolder& operator=(const IsolateHolder&) = delete;
|
||||
|
|
|
@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot
|
|||
in the browser process.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 88e46d8d05c0b5732468568b84b3283d2f4a934e..f19e32fd33ff0ce8f44ecec76e4583273f43b231 100644
|
||||
index ed19f7f1a283da619c01e2dc476d9d1ace950dc7..ef51df5e85584329c9c02aa2b6b88ba9eadd1a31 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -251,11 +251,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
|
|
|
@ -7,7 +7,7 @@ Allows embedders to get a handle to the gtk and
|
|||
gdk_pixbuf libraries already loaded in the process.
|
||||
|
||||
diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc
|
||||
index b5c7af5bdb93b320f95252d35d2d76bae7f8c445..65b097cfab72b92f301968715eb218ef0e468567 100644
|
||||
index 2ba5b4c4468fca1bf76011754e358c81f670a8d3..e831abb6d14be75b3f5e5b4b3455b8b136f921b1 100644
|
||||
--- a/ui/gtk/gtk_compat.cc
|
||||
+++ b/ui/gtk/gtk_compat.cc
|
||||
@@ -66,11 +66,6 @@ void* GetLibGio() {
|
||||
|
|
|
@ -39,13 +39,13 @@ index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a
|
|||
|
||||
} // namespace base
|
||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
||||
index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a182626fee5 100644
|
||||
index 1cbc8d582610426c870ac14ee825345805a9639a..1889df911a449e0b2ed80b42d55d747b36f9cf8c 100644
|
||||
--- a/base/mac/foundation_util.mm
|
||||
+++ b/base/mac/foundation_util.mm
|
||||
@@ -30,12 +30,6 @@
|
||||
@@ -28,12 +28,6 @@
|
||||
extern "C" {
|
||||
CFTypeID SecKeyGetTypeID();
|
||||
#if !BUILDFLAG(IS_IOS)
|
||||
CFTypeID SecACLGetTypeID();
|
||||
CFTypeID SecTrustedApplicationGetTypeID();
|
||||
-// The NSFont/CTFont toll-free bridging is broken before 10.15.
|
||||
-// http://www.openradar.me/15341349 rdar://15341349
|
||||
-//
|
||||
|
@ -55,7 +55,7 @@ index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a18
|
|||
#endif
|
||||
} // extern "C"
|
||||
|
||||
@@ -317,8 +311,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
|
||||
@@ -315,8 +309,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
|
||||
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
||||
DCHECK(!cf_val ||
|
||||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
||||
|
@ -65,7 +65,7 @@ index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a18
|
|||
return ns_val;
|
||||
}
|
||||
|
||||
@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
||||
@@ -387,9 +380,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
||||
return (CTFontRef)(cf_val);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
|
|||
+
|
||||
@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 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807eb797316 100644
|
||||
index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90209ee47c 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,7 +95,7 @@ index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807
|
|||
// 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 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e866244fdb 100644
|
||||
index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583513ea8ec 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window,
|
||||
|
@ -126,7 +126,7 @@ index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e8
|
|||
@implementation NativeWidgetMacNSWindow {
|
||||
@private
|
||||
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
|
||||
@@ -281,6 +287,8 @@ - (BOOL)hasViewsMenuActive {
|
||||
@@ -287,6 +293,8 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
|
@ -135,7 +135,7 @@ index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e8
|
|||
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
if (windowStyle & NSWindowStyleMaskTitled) {
|
||||
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
|
||||
@@ -292,6 +300,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
@@ -298,6 +306,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
return [super frameViewClassForStyleMask:windowStyle];
|
||||
}
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063
|
|||
|
||||
} // 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 34721e51d0ebe3a99751bba88b0afe026a910cc6..3a415dd6daf655c31ceb6fd6d307dc6e96c9aced 100644
|
||||
index c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94494d5a97 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
|
||||
@@ -582,10 +582,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
// this should be treated as an error and caught early.
|
||||
CHECK(bridged_view_);
|
||||
|
||||
|
@ -61,10 +61,10 @@ index 34721e51d0ebe3a99751bba88b0afe026a910cc6..3a415dd6daf655c31ceb6fd6d307dc6e
|
|||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
|
||||
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4fb37ae38 100644
|
||||
index d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550fb973e03 100644
|
||||
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
@@ -74,8 +74,10 @@ id GetFocusedBrowserAccessibilityElement() override {
|
||||
@@ -76,8 +76,10 @@ id GetFocusedBrowserAccessibilityElement() override {
|
||||
return nil;
|
||||
}
|
||||
void SetAccessibilityWindow(NSWindow* window) override {
|
||||
|
@ -75,7 +75,7 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4
|
|||
}
|
||||
|
||||
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
|
||||
@@ -137,8 +139,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
|
||||
@@ -139,8 +141,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
|
||||
|
||||
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
|
||||
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
|
||||
|
@ -87,7 +87,7 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4
|
|||
}
|
||||
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f413d29aab 100644
|
||||
index 6c0700b182e9765afd60d8deec501d13432e1b0a..c85c024a5a5711471e24698f14dda21b49817424 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
@@ -21,7 +21,9 @@
|
||||
|
@ -100,7 +100,7 @@ index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f4
|
|||
|
||||
namespace {
|
||||
|
||||
@@ -609,6 +611,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
@@ -613,6 +615,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
if ([NSApp isActive])
|
||||
return window == [NSApp accessibilityFocusedWindow];
|
||||
|
||||
|
@ -108,7 +108,7 @@ index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f4
|
|||
// TODO(accessibility): We need a solution to the problem described below.
|
||||
// If the window is NSAccessibilityRemoteUIElement, there are some challenges:
|
||||
// 1. NSApp is the browser which spawned the PWA, and what it considers the
|
||||
@@ -636,6 +639,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
@@ -640,6 +643,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
// from within the app shim content.
|
||||
if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]])
|
||||
return true;
|
||||
|
@ -144,7 +144,7 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880
|
|||
// 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 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7a7dc07a3 100644
|
||||
index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e19b4cc8c 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -258,8 +258,10 @@
|
||||
|
@ -158,7 +158,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7
|
|||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1555,8 +1557,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1559,8 +1561,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
|
@ -169,7 +169,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7
|
|||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1600,9 +1604,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1604,9 +1608,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
|
@ -181,7 +181,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7
|
|||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2097,12 +2103,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2101,12 +2107,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
|
@ -197,7 +197,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index a922dc6ce99ed32ede8812a63a836f72691bece3..9e4ef4235c49eeb7cd34f05ae2d75169d787fa55 100644
|
||||
index 012ab83bb9f4887646decb030b4a18f6b21e0d01..0d8b56cc387b24833ec7950a8049e038f650020c 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -341,6 +341,13 @@ component("base") {
|
||||
|
@ -263,10 +263,10 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7
|
|||
// 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 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea374bf9a0a 100644
|
||||
index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372424d0eb8 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -295,14 +295,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -325,14 +325,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
|
||||
if (in_process_ns_window_bridge_)
|
||||
return in_process_ns_window_bridge_->ns_view();
|
||||
|
@ -289,7 +289,7 @@ index 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea3
|
|||
}
|
||||
|
||||
remote_cocoa::mojom::NativeWidgetNSWindow*
|
||||
@@ -1261,6 +1269,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1289,6 +1297,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
|
||||
const std::vector<uint8_t>& window_token,
|
||||
const std::vector<uint8_t>& view_token) {
|
||||
|
@ -297,7 +297,7 @@ index 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea3
|
|||
remote_window_accessible_ =
|
||||
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
|
||||
remote_view_accessible_ =
|
||||
@@ -1268,14 +1277,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1296,14 +1305,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
|
||||
[remote_view_accessible_
|
||||
setTopLevelUIElement:remote_window_accessible_.get()];
|
||||
|
|
|
@ -313,10 +313,10 @@ index d59a16112d27e2696437163483c44eca414c225c..1ccd20fe7efa3cbae48f99d0660b0252
|
|||
NOTREACHED();
|
||||
return nullptr;
|
||||
diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
||||
index 7cb34e119cd30353fe56e7c71ed5e1d417896888..dbb6cc8e37eff9b30269687f29808ec3ca46b243 100644
|
||||
index 397f01d7249f491840e5953b65c2d54eb92dc638..a7279e44346cb5b0b26599bd62693ad40a59e84f 100644
|
||||
--- a/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
||||
+++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
||||
@@ -86,6 +86,7 @@
|
||||
@@ -87,6 +87,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,11 +324,11 @@ index 7cb34e119cd30353fe56e7c71ed5e1d417896888..dbb6cc8e37eff9b30269687f29808ec3
|
|||
// AXTextMarker
|
||||
if (IsAXTextMarker(value)) {
|
||||
return AXTextMarkerToBaseValue(value, indexer);
|
||||
@@ -94,6 +95,7 @@
|
||||
@@ -95,6 +96,7 @@
|
||||
// AXTextMarkerRange
|
||||
if (IsAXTextMarkerRange(value))
|
||||
return AXTextMarkerRangeToBaseValue(value, indexer);
|
||||
+#endif
|
||||
|
||||
// Accessible object
|
||||
if (IsNSAccessibilityElement(value) || IsAXUIElement(value)) {
|
||||
if (AXElementWrapper::IsValidElement(value)) {
|
||||
|
|
|
@ -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 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd9495875b 100644
|
||||
index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059e4289a9b 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -130,6 +130,11 @@
|
||||
|
@ -128,7 +128,7 @@ index 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd
|
|||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2304,6 +2401,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2320,6 +2417,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
@ -139,7 +139,7 @@ index 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd
|
|||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247ddb971be 100644
|
||||
index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -104,6 +104,7 @@ class URLMatcher;
|
||||
|
@ -159,7 +159,7 @@ index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247
|
|||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -821,6 +824,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -822,6 +825,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::vector<base::OnceClosure> dismount_closures_;
|
||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||
|
||||
|
@ -169,7 +169,7 @@ index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247
|
|||
// CertNetFetcher is not used by the current platform, or if the actual
|
||||
// net::CertVerifier is instantiated outside of the network service.
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 0a376689aeb81f85372ce163d9e199ada2cdcde2..118c6469c038e5b53eb76f76abf60f5df15a94d1 100644
|
||||
index 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83725d3b0b 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -283,6 +283,17 @@ struct NetworkContextFilePaths {
|
||||
|
|
|
@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d
|
|||
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 4b40e3faa498b6c86b381f6efae9d04e48a85c0f..5499f85fa578511d5817ecd9be2f33cf56e2db4b 100644
|
||||
index f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518bccab6a7c 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2069,8 +2069,9 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2073,8 +2073,9 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
// For workers:
|
||||
if (render_frame_id == MSG_ROUTING_NONE) {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
@ -148,7 +148,7 @@ index 4b40e3faa498b6c86b381f6efae9d04e48a85c0f..5499f85fa578511d5817ecd9be2f33cf
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -2078,7 +2079,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2082,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id);
|
||||
CHECK(rfh);
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
|
|
@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent
|
|||
because we don't generate them in our build.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
index 27e776fcf770b0ef72151d98d07778badabe807e..f7fb7850497a289ca8627752ba952d9f59468079 100644
|
||||
index be17e30aa831282c4be52e788d67993d47eba5df..d5c3988af5be1d9e89330eb5c5195f9b94d13ffc 100644
|
||||
--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
@@ -15,15 +15,19 @@
|
||||
|
@ -138,7 +138,7 @@ index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d1
|
|||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
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 0d5857b5f3afa823a7a2aff68f833623ec2e7b1c..fb6217f28c306921a86afc9b854a60b4e38e1584 100644
|
||||
index 9ce062e48c356f2ac23feb97c31aabcac8610942..08c27dc6f54c9216098d29b6a5331483722517d2 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -15,9 +15,11 @@
|
||||
|
|
|
@ -8,7 +8,7 @@ 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 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4966394e6 100644
|
||||
index 277c93b46025fc5efa7c9462222bf3704172e035..6683578241804b9634965f96d0d1c1a317b94643 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -129,6 +129,16 @@
|
||||
|
@ -28,7 +28,7 @@ index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4
|
|||
E_CPONLY(kColorSeparator) \
|
||||
E_CPONLY(kColorShadowBase) \
|
||||
E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \
|
||||
@@ -182,6 +192,7 @@
|
||||
@@ -183,6 +193,7 @@
|
||||
E_CPONLY(kColorTreeNodeForeground) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
|
||||
|
@ -37,10 +37,10 @@ index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4
|
|||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
|
||||
index 6e97a162f3a823090115fdcb47828c6e0b10ad06..5fcb8cb147aa1356853cb0ed1f3731456c434946 100644
|
||||
index ca33acaffdb3c3dbd8f5f1b7012b1013a983645e..ae5ca280a3965c5922f272fdbc45247fcc8a9750 100644
|
||||
--- a/ui/color/ui_color_mixer.cc
|
||||
+++ b/ui/color/ui_color_mixer.cc
|
||||
@@ -150,6 +150,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -151,6 +151,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
gfx::kGoogleGreyAlpha500);
|
||||
mixer[kColorProgressBarPaused] = {kColorDisabledForeground};
|
||||
mixer[kColorProgressBar] = {kColorAccent};
|
||||
|
@ -58,7 +58,7 @@ index 6e97a162f3a823090115fdcb47828c6e0b10ad06..5fcb8cb147aa1356853cb0ed1f373145
|
|||
mixer[kColorSeparator] = {kColorMidground};
|
||||
mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800};
|
||||
mixer[kColorShadowValueAmbientShadowElevationThree] =
|
||||
@@ -230,6 +241,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -232,6 +243,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground};
|
||||
mixer[kColorTreeNodeForegroundSelectedUnfocused] = {
|
||||
kColorTreeNodeForegroundSelectedFocused};
|
||||
|
|
|
@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
|
|||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index a3cf0a49943f53608f783f439917c256ec5b9040..d52cc220107218e53290d21ce1c52a7f855385b4 100644
|
||||
index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0ca8b03202 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -973,7 +973,6 @@ if (is_win) {
|
||||
|
@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc
|
|||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
||||
index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac09986cfd9 100644
|
||||
index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2661cf5db 100644
|
||||
--- a/chrome/browser/printing/print_job_worker.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker.cc
|
||||
@@ -20,7 +20,6 @@
|
||||
|
@ -97,7 +97,7 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac0
|
|||
#include "printing/backend/print_backend.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
@@ -222,16 +222,19 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings,
|
||||
@@ -209,16 +209,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings,
|
||||
#endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS)
|
||||
}
|
||||
|
||||
|
@ -121,10 +121,10 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac0
|
|||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/chrome/browser/printing/print_job_worker_oop.cc b/chrome/browser/printing/print_job_worker_oop.cc
|
||||
index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf06d4852f5 100644
|
||||
index 398d59a0ebad165981e9e96b29ffc672e4b841eb..e420d87ef0e90cddb740ac4b24f92519a6eb3347 100644
|
||||
--- a/chrome/browser/printing/print_job_worker_oop.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker_oop.cc
|
||||
@@ -362,7 +362,7 @@ void PrintJobWorkerOop::OnFailure() {
|
||||
@@ -356,7 +356,7 @@ void PrintJobWorkerOop::OnFailure() {
|
||||
}
|
||||
|
||||
void PrintJobWorkerOop::ShowErrorDialog() {
|
||||
|
@ -134,7 +134,7 @@ index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf0
|
|||
|
||||
void PrintJobWorkerOop::UnregisterServiceManagerClient() {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851ac8b8df85 100644
|
||||
index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212b98a2b15 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -30,8 +30,6 @@
|
||||
|
@ -146,7 +146,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -83,10 +81,23 @@ namespace printing {
|
||||
@@ -86,10 +84,23 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -170,7 +170,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
// Runs always on the UI thread.
|
||||
static bool is_dialog_shown = false;
|
||||
if (is_dialog_shown)
|
||||
@@ -95,6 +106,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
|
||||
@@ -98,6 +109,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
|
||||
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
|
||||
|
||||
chrome::ShowWarningMessageBox(nullptr, std::u16string(), message);
|
||||
|
@ -178,7 +178,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
void OnDidGetDefaultPrintSettings(
|
||||
@@ -144,7 +156,9 @@ void OnDidUpdatePrintSettings(
|
||||
@@ -147,7 +159,9 @@ void OnDidUpdatePrintSettings(
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
DCHECK(printer_query);
|
||||
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
|
||||
|
@ -189,7 +189,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
@@ -172,6 +186,7 @@ void OnDidScriptedPrint(
|
||||
@@ -175,6 +189,7 @@ void OnDidScriptedPrint(
|
||||
mojom::PrintManagerHost::ScriptedPrintCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
|
||||
|
@ -197,7 +197,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
if (printer_query->last_status() == mojom::ResultCode::kSuccess &&
|
||||
printer_query->settings().dpi()) {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
@@ -181,7 +196,8 @@ void OnDidScriptedPrint(
|
||||
@@ -184,7 +199,8 @@ void OnDidScriptedPrint(
|
||||
}
|
||||
bool has_valid_cookie = params->params->document_cookie;
|
||||
bool has_dpi = !params->params->dpi.IsEmpty();
|
||||
|
@ -207,7 +207,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
|
||||
if (has_dpi && has_valid_cookie) {
|
||||
queue->QueuePrinterQuery(std::move(printer_query));
|
||||
@@ -196,12 +212,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -199,12 +215,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
|
@ -222,7 +222,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -209,7 +227,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -212,7 +230,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
|
||||
// is still valid after a possible inner message loop runs in
|
||||
// `DisconnectFromCurrentPrintJob()`.
|
||||
@@ -237,6 +258,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -240,6 +261,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
#endif
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
|
@ -244,7 +244,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
enterprise_connectors::ContentAnalysisDelegate::Data scanning_data;
|
||||
@@ -405,7 +429,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -452,7 +476,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
|
@ -254,7 +254,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -420,8 +445,11 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -467,8 +492,11 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
@@ -429,8 +457,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
@@ -476,8 +504,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
// The Unretained() is safe because ForEachRenderFrameHost() is synchronous.
|
||||
web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost(
|
||||
base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled,
|
||||
|
@ -277,7 +277,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -546,11 +573,14 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -593,11 +620,14 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -292,7 +292,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
|
||||
!service_manager_client_id_.has_value()) {
|
||||
@@ -588,18 +618,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -635,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -314,7 +314,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
content::BrowserContext* context =
|
||||
web_contents() ? web_contents()->GetBrowserContext() : nullptr;
|
||||
PrefService* prefs =
|
||||
@@ -609,6 +641,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -656,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
|
||||
auto callback_wrapper =
|
||||
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
|
||||
@@ -640,14 +673,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -687,14 +720,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
|
||||
|
@ -339,7 +339,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -685,7 +718,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -732,7 +765,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function.
|
||||
|
@ -347,7 +347,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -700,6 +732,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
@@ -747,6 +779,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
|
@ -359,7 +359,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -710,10 +747,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
@@ -757,10 +794,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::RenderFrameHost::LifecycleState /*old_state*/,
|
||||
content::RenderFrameHost::LifecycleState new_state) {
|
||||
|
@ -372,7 +372,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::DidStartLoading() {
|
||||
@@ -769,7 +808,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -821,7 +860,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.
|
||||
|
@ -386,7 +386,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -783,7 +827,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -835,7 +879,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
|
@ -395,7 +395,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -831,7 +875,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -883,7 +927,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -407,7 +407,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -852,7 +899,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -904,7 +951,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
|
@ -416,7 +416,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -912,6 +959,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -964,6 +1011,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -428,7 +428,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -919,7 +971,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -971,7 +1023,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
|
@ -437,7 +437,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -961,7 +1013,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1013,7 +1065,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -446,7 +446,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1069,7 +1121,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
@@ -1121,7 +1173,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
|
@ -456,10 +456,10 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a
|
|||
for (auto& observer : GetObservers())
|
||||
observer.OnPrintNow(rfh);
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde990e10e1 100644
|
||||
index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187845e6a75 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -41,6 +41,8 @@ namespace printing {
|
||||
@@ -43,6 +43,8 @@ namespace printing {
|
||||
class PrintQueriesQueue;
|
||||
class PrinterQuery;
|
||||
|
||||
|
@ -468,7 +468,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde
|
|||
// Base class for managing the print commands for a WebContents.
|
||||
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
public:
|
||||
@@ -64,7 +66,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -70,7 +72,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Prints the current document immediately. Since the rendering is
|
||||
// asynchronous, the actual printing will not be completed on the return of
|
||||
// this function. Returns false if printing is impossible at the moment.
|
||||
|
@ -480,7 +480,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in `print_data` with settings specified in
|
||||
@@ -113,6 +118,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -128,6 +133,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void ShowInvalidPrinterSettingsError() override;
|
||||
void PrintingFailed(int32_t cookie,
|
||||
mojom::PrintFailureReason reason) override;
|
||||
|
@ -488,7 +488,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde
|
|||
|
||||
// Adds and removes observers for `PrintViewManagerBase` events. The order in
|
||||
// which notifications are sent to observers is undefined. Observers must be
|
||||
@@ -120,6 +126,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -135,6 +141,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void AddObserver(Observer& observer);
|
||||
void RemoveObserver(Observer& observer);
|
||||
|
||||
|
@ -503,7 +503,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde
|
|||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -241,7 +255,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -256,7 +270,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Runs `callback` with `params` to reply to ScriptedPrint().
|
||||
void ScriptedPrintReply(ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
|
@ -513,7 +513,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde
|
|||
|
||||
// Requests the RenderView to render all the missing pages for the print job.
|
||||
// No-op if no print job is pending. Returns true if at least one page has
|
||||
@@ -314,8 +329,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
|
||||
|
||||
|
@ -575,7 +575,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a
|
|||
// Tells the browser that there are invalid printer settings.
|
||||
ShowInvalidPrinterSettingsError();
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991aeed63e6d7 100644
|
||||
index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86bc0e0f90 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
|
@ -586,7 +586,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
@@ -1279,7 +1280,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1282,7 +1283,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
|
@ -596,7 +596,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
if (!weak_this)
|
||||
return;
|
||||
|
||||
@@ -1310,7 +1312,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1313,7 +1315,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
@@ -1325,7 +1327,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1328,7 +1330,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
|
@ -614,7 +614,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
|
||||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
@@ -1402,7 +1404,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1405,7 +1407,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
|
@ -624,7 +624,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
if (!render_frame_gone_)
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1451,6 +1454,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1454,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
|
@ -633,7 +633,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2063,7 +2068,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2066,7 +2071,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
|
@ -643,7 +643,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -2078,7 +2084,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2081,7 +2087,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -654,7 +654,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -2086,7 +2094,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2089,7 +2097,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
|
@ -663,7 +663,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -2105,8 +2113,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2108,8 +2116,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -680,7 +680,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2364,36 +2379,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2374,36 +2389,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae
|
|||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2518,7 +2549,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2528,7 +2559,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
|
@ -796,10 +796,10 @@ index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f003
|
|||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 56e3651f7e79957e444ec82b534a07dff9ef7415..43f2d487947eaf77171d918cc5072aee4291290b 100644
|
||||
index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6b2992922 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2766,8 +2766,9 @@ source_set("browser") {
|
||||
@@ -2783,8 +2783,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
@ -812,7 +812,7 @@ index 56e3651f7e79957e444ec82b534a07dff9ef7415..43f2d487947eaf77171d918cc5072aee
|
|||
if (is_chromeos) {
|
||||
sources += [
|
||||
diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc
|
||||
index e3c1b29138f175836424bcfe917cd00bd081b34c..7d8b6f06c5d1a7ea9a5ed86c5c612e8df08f2659 100644
|
||||
index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da79270244062c210d6 100644
|
||||
--- a/content/browser/utility_sandbox_delegate_win.cc
|
||||
+++ b/content/browser/utility_sandbox_delegate_win.cc
|
||||
@@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) {
|
||||
|
@ -830,12 +830,12 @@ index e3c1b29138f175836424bcfe917cd00bd081b34c..7d8b6f06c5d1a7ea9a5ed86c5c612e8d
|
|||
+#endif
|
||||
} // namespace
|
||||
|
||||
bool UtilitySandboxedProcessLauncherDelegate::GetAppContainerId(
|
||||
std::string UtilitySandboxedProcessLauncherDelegate::GetSandboxTag() {
|
||||
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
|
||||
index 56ee836445c53c5cde3947fca19d8576d2684f6f..454e26baa8b3688c2af98081085aa5378ff0554b 100644
|
||||
index 6cca846b9831da669ca52aff776caf5a23f6f4d1..39d1032f276181a535de9fba89c2246c7a9814d7 100644
|
||||
--- a/printing/printing_context.cc
|
||||
+++ b/printing/printing_context.cc
|
||||
@@ -128,7 +128,6 @@ void PrintingContext::UsePdfSettings() {
|
||||
@@ -143,7 +143,6 @@ void PrintingContext::UsePdfSettings() {
|
||||
|
||||
mojom::ResultCode PrintingContext::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings) {
|
||||
|
@ -844,7 +844,7 @@ index 56ee836445c53c5cde3947fca19d8576d2684f6f..454e26baa8b3688c2af98081085aa537
|
|||
std::unique_ptr<PrintSettings> settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
diff --git a/printing/printing_context.h b/printing/printing_context.h
|
||||
index 58fcf619add5093bd99fd9c561e8686b060a01c6..76db2a2438cef84fcb6dfd4a67d2e171428e4be0 100644
|
||||
index 0e6dd8092f6025790560ca2bab2d68daf47caff2..a4aa6e21b1d37e534b543ad8b112070eedd12d2e 100644
|
||||
--- a/printing/printing_context.h
|
||||
+++ b/printing/printing_context.h
|
||||
@@ -171,6 +171,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
||||
|
|
|
@ -23,8 +23,35 @@ This patch adds a few changes to the Chromium code:
|
|||
`ProcessSingleton` instance that tries to connect to the socket
|
||||
before the browser thread is ready.
|
||||
|
||||
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
||||
index aca2f19f53657fc2b944b69418e099b056c8e734..e43b0d89e2e6ad0bcb2c34bfacc4ef3b59eaaab1 100644
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -1424,7 +1424,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
switch (notify_result_) {
|
||||
case ProcessSingleton::PROCESS_NONE:
|
||||
// No process already running, fall through to starting a new one.
|
||||
- process_singleton_->StartWatching();
|
||||
g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing(
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
break;
|
||||
diff --git a/chrome/browser/chrome_process_singleton.cc b/chrome/browser/chrome_process_singleton.cc
|
||||
index d97fa8a96c110acc25b0ef46d7a4ac1c708f7c76..0919af8e8b0a51ef8e8dd28f2f07139d197a7384 100644
|
||||
--- a/chrome/browser/chrome_process_singleton.cc
|
||||
+++ b/chrome/browser/chrome_process_singleton.cc
|
||||
@@ -31,10 +31,6 @@ ProcessSingleton::NotifyResult
|
||||
return process_singleton_.NotifyOtherProcessOrCreate();
|
||||
}
|
||||
|
||||
-void ChromeProcessSingleton::StartWatching() {
|
||||
- process_singleton_.StartWatching();
|
||||
-}
|
||||
-
|
||||
void ChromeProcessSingleton::Cleanup() {
|
||||
process_singleton_.Cleanup();
|
||||
}
|
||||
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
|
||||
index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de67fe0a779 100644
|
||||
index 7cd82d27a741f194da5d0b3fcfd9c15c8ea1fa5c..5a64220aaf1309832dc0ad543e353de67fe0a779 100644
|
||||
--- a/chrome/browser/process_singleton.h
|
||||
+++ b/chrome/browser/process_singleton.h
|
||||
@@ -102,12 +102,19 @@ class ProcessSingleton {
|
||||
|
@ -56,7 +83,17 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6
|
|||
|
||||
// Sets ourself up as the singleton instance. Returns true on success. If
|
||||
// false is returned, we are not the singleton instance and the caller must
|
||||
@@ -173,6 +182,8 @@ class ProcessSingleton {
|
||||
@@ -127,9 +136,6 @@ class ProcessSingleton {
|
||||
// another process should call this directly.
|
||||
bool Create();
|
||||
|
||||
- // Start watching for notifications from other processes.
|
||||
- void StartWatching();
|
||||
-
|
||||
// Clear any lock state during shutdown.
|
||||
void Cleanup();
|
||||
|
||||
@@ -176,6 +182,8 @@ class ProcessSingleton {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool EscapeVirtualization(const base::FilePath& user_data_dir);
|
||||
|
||||
|
@ -65,7 +102,13 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6
|
|||
HWND remote_window_; // The HWND_MESSAGE of another browser.
|
||||
base::win::MessageWindow window_; // The message-only window.
|
||||
bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment.
|
||||
@@ -222,6 +233,8 @@ class ProcessSingleton {
|
||||
@@ -220,12 +228,13 @@ class ProcessSingleton {
|
||||
|
||||
// Temporary directory to hold the socket.
|
||||
base::ScopedTempDir socket_dir_;
|
||||
- int sock_ = -1;
|
||||
|
||||
// Helper class for linux specific messages. LinuxWatcher is ref counted
|
||||
// because it posts messages between threads.
|
||||
class LinuxWatcher;
|
||||
scoped_refptr<LinuxWatcher> watcher_;
|
||||
|
@ -75,7 +118,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6
|
|||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527dcee5125 100644
|
||||
index 7e4cc9cdd350e814c20feccdcc8d70b1080e60a1..2de07460462632680f9b16a019744527dcee5125 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -54,6 +54,7 @@
|
||||
|
@ -138,7 +181,17 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527
|
|||
bool ConnectSocket(ScopedSocket* socket,
|
||||
const base::FilePath& socket_path,
|
||||
const base::FilePath& cookie_path) {
|
||||
@@ -769,6 +791,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
@@ -757,7 +779,8 @@ ProcessSingleton::ProcessSingleton(
|
||||
const base::FilePath& user_data_dir,
|
||||
const NotificationCallback& notification_callback)
|
||||
: notification_callback_(notification_callback),
|
||||
- current_pid_(base::GetCurrentProcId()) {
|
||||
+ current_pid_(base::GetCurrentProcId()),
|
||||
+ watcher_(new LinuxWatcher(this)) {
|
||||
socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename);
|
||||
lock_path_ = user_data_dir.Append(chrome::kSingletonLockFilename);
|
||||
cookie_path_ = user_data_dir.Append(chrome::kSingletonCookieFilename);
|
||||
@@ -768,6 +791,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
|
||||
ProcessSingleton::~ProcessSingleton() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
@ -149,7 +202,7 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527
|
|||
}
|
||||
|
||||
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -933,6 +959,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
@@ -932,6 +959,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
base::Seconds(kTimeoutInSeconds));
|
||||
}
|
||||
|
||||
|
@ -170,7 +223,7 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527
|
|||
ProcessSingleton::NotifyResult
|
||||
ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate(
|
||||
const base::CommandLine& command_line,
|
||||
@@ -1032,14 +1072,32 @@ bool ProcessSingleton::Create() {
|
||||
@@ -1031,14 +1072,32 @@ bool ProcessSingleton::Create() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -208,26 +261,58 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527
|
|||
// Check that the directory was created with the correct permissions.
|
||||
int dir_mode = 0;
|
||||
CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) &&
|
||||
@@ -1082,10 +1140,13 @@ bool ProcessSingleton::Create() {
|
||||
if (listen(sock, 5) < 0)
|
||||
@@ -1050,9 +1109,10 @@ bool ProcessSingleton::Create() {
|
||||
// leaving a dangling symlink.
|
||||
base::FilePath socket_target_path =
|
||||
socket_dir_.GetPath().Append(chrome::kSingletonSocketFilename);
|
||||
+ int sock;
|
||||
SockaddrUn addr;
|
||||
socklen_t socklen;
|
||||
- SetupSocket(socket_target_path.value(), &sock_, &addr, &socklen);
|
||||
+ SetupSocket(socket_target_path.value(), &sock, &addr, &socklen);
|
||||
|
||||
// Setup the socket symlink and the two cookies.
|
||||
base::FilePath cookie(GenerateCookie());
|
||||
@@ -1071,26 +1131,24 @@ bool ProcessSingleton::Create() {
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (bind(sock_, reinterpret_cast<sockaddr*>(&addr), socklen) < 0) {
|
||||
+ if (bind(sock, reinterpret_cast<sockaddr*>(&addr), socklen) < 0) {
|
||||
PLOG(ERROR) << "Failed to bind() " << socket_target_path.value();
|
||||
- CloseSocket(sock_);
|
||||
+ CloseSocket(sock);
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (listen(sock_, 5) < 0)
|
||||
+ if (listen(sock, 5) < 0)
|
||||
NOTREACHED() << "listen failed: " << base::safe_strerror(errno);
|
||||
|
||||
- return true;
|
||||
-}
|
||||
+ sock_ = sock;
|
||||
|
||||
-void ProcessSingleton::StartWatching() {
|
||||
- DCHECK_GE(sock_, 0);
|
||||
- DCHECK(!watcher_);
|
||||
- watcher_ = new LinuxWatcher(this);
|
||||
- DCHECK(BrowserThread::IsThreadInitialized(BrowserThread::IO));
|
||||
- content::GetIOThreadTaskRunner({})->PostTask(
|
||||
- FROM_HERE, base::BindOnce(&ProcessSingleton::LinuxWatcher::StartListening,
|
||||
- watcher_, sock));
|
||||
+ sock_ = sock;
|
||||
+
|
||||
- watcher_, sock_));
|
||||
+ if (BrowserThread::IsThreadInitialized(BrowserThread::IO)) {
|
||||
+ StartListeningOnSocket();
|
||||
+ } else {
|
||||
+ listen_on_ready_ = true;
|
||||
+ }
|
||||
|
||||
return true;
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
void ProcessSingleton::Cleanup() {
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644
|
||||
index 41bc176510f93ef667e4f1373eab61142f3e264f..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -29,7 +29,9 @@
|
||||
|
@ -316,3 +401,12 @@ index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5d
|
|||
CHECK(result && window_.hwnd());
|
||||
}
|
||||
}
|
||||
@@ -430,8 +455,6 @@ bool ProcessSingleton::Create() {
|
||||
return window_.hwnd() != NULL;
|
||||
}
|
||||
|
||||
-void ProcessSingleton::StartWatching() {}
|
||||
-
|
||||
void ProcessSingleton::Cleanup() {
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ index bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca
|
|||
// 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 5647890d0f62bcd5b1d1b2e6adc511b262a83b7f..9a818c66d76d50e9ba678e7a8e57381315eacf88 100644
|
||||
index 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e6f060787 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2075,6 +2075,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
|
@ -43,10 +43,10 @@ index 5647890d0f62bcd5b1d1b2e6adc511b262a83b7f..9a818c66d76d50e9ba678e7a8e573813
|
|||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 14bc2c9e77b7db69d03c00314fe55806d2a9e38c..ad3f25362279d889e800cee3fd20240cc6d176a9 100644
|
||||
index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7b4f008e1 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4587,6 +4587,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4593,6 +4593,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
|
@ -59,10 +59,10 @@ index 14bc2c9e77b7db69d03c00314fe55806d2a9e38c..ad3f25362279d889e800cee3fd20240c
|
|||
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 a636e3c31860f67b01c178fd580df466266481ed..53435224b5e331bbe24119752c1a44a8d58bfa88 100644
|
||||
index 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd6afb9e34 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -967,6 +967,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
@ -71,7 +71,7 @@ index a636e3c31860f67b01c178fd580df466266481ed..53435224b5e331bbe24119752c1a44a8
|
|||
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 9ee3b74460c009c92fb811787250270ea13233b3..802d02e825d98f103f48e3134d6b9dd7e99aa2c5 100644
|
||||
index af8a777096c1202b3742d328c02e9e957389fc1e..3a3359865bcedecfa946d517dd50b299172958c9 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
@ -82,7 +82,7 @@ index 9ee3b74460c009c92fb811787250270ea13233b3..802d02e825d98f103f48e3134d6b9dd7
|
|||
#include "content/public/browser/allow_service_worker_result.h"
|
||||
#include "content/public/browser/reload_type.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
@@ -527,6 +528,9 @@ class CONTENT_EXPORT WebContentsObserver {
|
||||
@@ -533,6 +534,9 @@ class CONTENT_EXPORT WebContentsObserver {
|
||||
// Invoked when the primary main frame changes size.
|
||||
virtual void PrimaryMainFrameWasResized(bool width_changed) {}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
|||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39fe14086e 100644
|
||||
index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3b7e5c7a7 100644
|
||||
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -26,10 +26,10 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39
|
|||
+- (BOOL)shouldIgnoreMouseEvent;
|
||||
+@end
|
||||
+
|
||||
// These are not documented, so use only after checking -respondsToSelector:.
|
||||
@interface NSApplication (UndocumentedSpeechMethods)
|
||||
- (void)speakString:(NSString*)string;
|
||||
@@ -602,6 +611,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
// RenderWidgetHostViewCocoa ---------------------------------------------------
|
||||
|
||||
// Private methods:
|
||||
@@ -597,6 +606,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@ -39,7 +39,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39
|
|||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -678,6 +690,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
@@ -673,6 +685,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
// its parent view.
|
||||
BOOL hitSelf = NO;
|
||||
while (view) {
|
||||
|
@ -50,7 +50,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39
|
|||
if (view == self)
|
||||
hitSelf = YES;
|
||||
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
|
||||
@@ -997,6 +1013,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
@@ -992,6 +1008,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
eventType == NSEventTypeKeyDown &&
|
||||
!(modifierFlags & NSEventModifierFlagCommand);
|
||||
|
||||
|
@ -61,7 +61,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39
|
|||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSEventTypeKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1778,9 +1798,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -1812,9 +1832,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
|
@ -73,7 +73,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39
|
|||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1789,7 +1811,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
@@ -1823,7 +1845,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
|
|
@ -52,7 +52,7 @@ 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 f42cc96b606f07f66a9d4dfacbdcd5b8cb157d21..a9e0afc645b8bd543590e80b55a7461381373187 100644
|
||||
index 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4328244f8 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) {
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <keeleymhammond@gmail.com>
|
||||
Date: Mon, 15 Aug 2022 21:51:18 -0700
|
||||
Subject: Revert "[SpellCheck] Fully launch spell check delayed initialization"
|
||||
|
||||
This reverts commit bf1a502a147c3208d7bb9106fb3aa71b4eee3cf6.
|
||||
Delaying spell check initialization is causing specs for
|
||||
'custom dictionary word list API' to fail in Electron. This patch
|
||||
can be reverted when those failures are addressed. It's unlikely
|
||||
that this patch will be upstreamed.
|
||||
|
||||
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
||||
index 72f8e9251df63db8ebebad9a5b682add91340e79..89361e9e8ea4e73c571d3960123030c0011a129d 100644
|
||||
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
||||
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
||||
@@ -302,26 +302,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) {
|
||||
}
|
||||
}
|
||||
|
||||
-class LanguageSettingsPrivateApiGetLanguageListTest
|
||||
- : public LanguageSettingsPrivateApiTest {
|
||||
- public:
|
||||
- LanguageSettingsPrivateApiGetLanguageListTest() = default;
|
||||
- ~LanguageSettingsPrivateApiGetLanguageListTest() override = default;
|
||||
-
|
||||
- protected:
|
||||
- void InitFeatures() override {
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
- // Force Windows hybrid spellcheck to be enabled, and disable the delayed
|
||||
- // init feature since that case is tested in
|
||||
- // LanguageSettingsPrivateApiTestDelayInit below.
|
||||
- feature_list_.InitWithFeatures(
|
||||
- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker},
|
||||
- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit});
|
||||
-#endif // BUILDFLAG(IS_WIN)
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-TEST_F(LanguageSettingsPrivateApiGetLanguageListTest, GetLanguageList) {
|
||||
+TEST_F(LanguageSettingsPrivateApiTest, GetLanguageListTest) {
|
||||
translate::TranslateDownloadManager::GetInstance()->ResetForTesting();
|
||||
RunGetLanguageListTest();
|
||||
}
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
||||
index b8fa14fa50d82521845b9f84d62d9de922df9168..1e9c21eca325845bbc8f09a5287a2451f9829e80 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
||||
@@ -341,18 +341,9 @@ const std::vector<std::string> SpellcheckServiceHybridUnitTestBase::
|
||||
// dictionaries.
|
||||
};
|
||||
|
||||
-class GetDictionariesHybridUnitTestNoDelayInit
|
||||
+class SpellcheckServiceHybridUnitTest
|
||||
: public SpellcheckServiceHybridUnitTestBase,
|
||||
- public testing::WithParamInterface<TestCase> {
|
||||
- protected:
|
||||
- void InitFeatures() override {
|
||||
- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
|
||||
- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
|
||||
- feature_list_.InitWithFeatures(
|
||||
- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker},
|
||||
- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit});
|
||||
- }
|
||||
-};
|
||||
+ public testing::WithParamInterface<TestCase> {};
|
||||
|
||||
static const TestCase kHybridGetDictionariesParams[] = {
|
||||
// Galician (gl) has only Windows support, no Hunspell dictionary. Croatian
|
||||
@@ -407,10 +398,10 @@ static const TestCase kHybridGetDictionariesParams[] = {
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(TestCases,
|
||||
- GetDictionariesHybridUnitTestNoDelayInit,
|
||||
+ SpellcheckServiceHybridUnitTest,
|
||||
testing::ValuesIn(kHybridGetDictionariesParams));
|
||||
|
||||
-TEST_P(GetDictionariesHybridUnitTestNoDelayInit, GetDictionaries) {
|
||||
+TEST_P(SpellcheckServiceHybridUnitTest, GetDictionaries) {
|
||||
RunGetDictionariesTest(GetParam().accept_languages,
|
||||
GetParam().spellcheck_dictionaries,
|
||||
GetParam().expected_dictionaries);
|
||||
@@ -440,16 +431,7 @@ std::ostream& operator<<(std::ostream& out,
|
||||
|
||||
class SpellcheckServiceWindowsDictionaryMappingUnitTest
|
||||
: public SpellcheckServiceHybridUnitTestBase,
|
||||
- public testing::WithParamInterface<DictionaryMappingTestCase> {
|
||||
- protected:
|
||||
- void InitFeatures() override {
|
||||
- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
|
||||
- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
|
||||
- feature_list_.InitWithFeatures(
|
||||
- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker},
|
||||
- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit});
|
||||
- }
|
||||
-};
|
||||
+ public testing::WithParamInterface<DictionaryMappingTestCase> {};
|
||||
|
||||
static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = {
|
||||
DictionaryMappingTestCase({"en-CA", "en-CA", "en-CA", "en", "en"}),
|
||||
diff --git a/components/spellcheck/common/spellcheck_features.cc b/components/spellcheck/common/spellcheck_features.cc
|
||||
index 37f2b0e837d8031bee488e9fd7bd4eb456c42204..dcd365a802e0feebbb2bc3839c7a0f47fb113c70 100644
|
||||
--- a/components/spellcheck/common/spellcheck_features.cc
|
||||
+++ b/components/spellcheck/common/spellcheck_features.cc
|
||||
@@ -32,7 +32,7 @@ const base::Feature kWinUseBrowserSpellChecker{
|
||||
"WinUseBrowserSpellChecker", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kWinDelaySpellcheckServiceInit{
|
||||
- "WinDelaySpellcheckServiceInit", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "WinDelaySpellcheckServiceInit", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kWinRetrieveSuggestionsOnlyOnDemand{
|
||||
"WinRetrieveSuggestionsOnlyOnDemand", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
@ -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 028c190ad21eb1899c61295695931bd2353518a5..9e74a54266460fc51e6b3492c842cda3c0b88538 100644
|
||||
index 14985e39b792e931a9884ae95b8d550776520478..d6c104b05471161901e76051e6ec0d1059aa2dd1 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1255,7 +1255,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1282,7 +1282,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
|
|
@ -22,7 +22,7 @@ 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 5499f85fa578511d5817ecd9be2f33cf56e2db4b..3f0a3b2133f0d48054f33df28b93a9ee40d7ed78 100644
|
||||
index d2fbb44deef7a63cc1f5296d338d518bccab6a7c..7bb696c3ad090828b2a7e3a9a648b75bbf39f844 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1762,9 +1762,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
|
@ -42,7 +42,7 @@ index 5499f85fa578511d5817ecd9be2f33cf56e2db4b..3f0a3b2133f0d48054f33df28b93a9ee
|
|||
|
||||
auto file_data = std::make_unique<ChildProcessLauncherFileData>();
|
||||
diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
|
||||
index af8173d4203150237387529aa2b974aeec7c5a41..9fadaa80a4547a583484355342c3fd98d53bcd27 100644
|
||||
index 71bbf3608a2b112e51b6b178755f06657f657ff9..6f3f2f00f35f5c5b38654cb0388cba070e3cdab2 100644
|
||||
--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
|
||||
+++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
|
||||
@@ -31,6 +31,9 @@ namespace content {
|
||||
|
@ -66,7 +66,7 @@ index af8173d4203150237387529aa2b974aeec7c5a41..9fadaa80a4547a583484355342c3fd98
|
|||
dynamic_code_can_be_disabled_ = true;
|
||||
return;
|
||||
diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
|
||||
index 3a0e25b38965de5b57fd0be1112cf62dfda846d7..f412080cfb49330d855fdf1cbc13ff8850530401 100644
|
||||
index d820cb4ff004194d9c18bfddaf90bf520e8446ff..0dcffcf367b5d08bb31b68e648c1f4ce3aa15600 100644
|
||||
--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
|
||||
+++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h
|
||||
@@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch
|
|||
Unsandboxed ppapi processes should skip zygote.
|
||||
|
||||
diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
|
||||
index 6e1d72902ec3e4a479304ff39b8b537d23f5cdf3..b7b198b159d250eca1498206ec29cc0270071f2a 100644
|
||||
index f822120af8bf8849609a765d7478fbdba1e50a8b..f928b747d202179636761666ff084a81433a933b 100644
|
||||
--- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
|
||||
+++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
|
@ -17,7 +17,7 @@ index 6e1d72902ec3e4a479304ff39b8b537d23f5cdf3..b7b198b159d250eca1498206ec29cc02
|
|||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "base/win/windows_version.h"
|
||||
@@ -54,6 +55,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget(
|
||||
@@ -62,6 +63,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget(
|
||||
ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() {
|
||||
const base::CommandLine& browser_command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
|
|
|
@ -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 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a0b3d2beb 100644
|
||||
index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3066,6 +3066,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3073,6 +3073,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
site_instance.get(), params.renderer_initiated_creation,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy);
|
||||
|
||||
|
@ -26,7 +26,7 @@ index 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a
|
|||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3076,6 +3083,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3083,6 +3090,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ index 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a
|
|||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 5c710ded76711125c8e2de8e2c9bce7569548732..a3ae580ea073024882bd860abf914bbf7c0ed54d 100644
|
||||
index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561d689f467 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -94,10 +94,13 @@ class BrowserContext;
|
||||
|
|
|
@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
|
|||
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 6f963b0a1fcb00a16bcf423a494aad29b4c86b52..004fbb98b212372f7af73b9334ff44fb7a2a5eba 100644
|
||||
index 7f60d038fb9c2bc8364c580bc9c7684d97fbbcfb..b1eddf20c22edf974375b8a04d70fca72f7834af 100644
|
||||
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -901,10 +901,7 @@ bool WebContentsViewAura::IsValidDragTarget(
|
||||
@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget(
|
||||
// for the outermost view. Inner `WebContents` will have a
|
||||
// `WebContentsViewChildFrame` so when dragging between an inner
|
||||
// `WebContents` and its embedder the view IDs will be the same.
|
||||
|
|
|
@ -14,10 +14,10 @@ Note that we also need to manually update embedder's
|
|||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 9c6f51f1667d9bf1b430a83747faebf633a324c7..edc7111e2a61c917ec987264ddfbc4ee55f33730 100644
|
||||
index 115dab63efa4b90f37609a9a0a363ad75a0ff582..324232704f0bc0db6c20031cc0a2217b35667c3d 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -6565,6 +6565,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -6579,6 +6579,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ An attempt to upstream this was made, but rejected:
|
|||
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df28cf05e4 100644
|
||||
index d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa27f7084d 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
|
@ -26,10 +26,10 @@ index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df
|
|||
// 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 e6ed59bb367c2ec8997867d847d79304b5e78be4..f2401245c4feb507966a47c82c66d956802d5ede 100644
|
||||
index 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -873,6 +873,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -869,6 +869,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
|
@ -43,10 +43,10 @@ index e6ed59bb367c2ec8997867d847d79304b5e78be4..f2401245c4feb507966a47c82c66d956
|
|||
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 62370f36f8b19c409e65c3d19a7536a50c7f3d0c..ad67b32366ee276d4a9917e17ce335c3ec507a48 100644
|
||||
index 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df39eb9d82 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -183,6 +183,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
|
@ -67,10 +67,10 @@ index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768
|
|||
const WebSecurityOrigin& script_origin) {
|
||||
return false;
|
||||
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
index ef06596ca9597496809064a4b5a5388caf2dac5a..aa045c3bebc0653449d99dd6e507ac76952ebf8c 100644
|
||||
index 91fd003fe648c8ac854843922714f30434e3663f..f67fbdd1c9eda7feb9f171fa8482c1d5cc29d508 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
@@ -735,6 +735,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
@@ -744,6 +744,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
nested_runner_->QuitNow();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ that clearly establishes the worker script is ready for evaluation with the scop
|
|||
initialized.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7b491b9ba 100644
|
||||
index b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04ecd9f05d8 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
|
@ -35,10 +35,10 @@ index dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7
|
|||
// 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 f2401245c4feb507966a47c82c66d956802d5ede..916fc0110338224c21bc6cc29536a152659e9569 100644
|
||||
index c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c5900fc9aec3 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -885,6 +885,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
worker);
|
||||
}
|
||||
|
||||
|
@ -52,10 +52,10 @@ index f2401245c4feb507966a47c82c66d956802d5ede..916fc0110338224c21bc6cc29536a152
|
|||
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 ad67b32366ee276d4a9917e17ce335c3ec507a48..62bc2b9122733d397093fdba0b2315cb0993cb48 100644
|
||||
index 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f1716318f0d2 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -183,6 +183,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
|
|
|
@ -21,5 +21,7 @@
|
|||
|
||||
"src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle",
|
||||
|
||||
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC"
|
||||
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC",
|
||||
|
||||
"src/electron/patches/lss": "src/third_party/lss"
|
||||
}
|
||||
|
|
1
patches/lss/.patches
Normal file
1
patches/lss/.patches
Normal file
|
@ -0,0 +1 @@
|
|||
fix_cast_pwrite64_arg_to_long_for_arm.patch
|
24
patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch
Normal file
24
patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <keeleymhammond@gmail.com>
|
||||
Date: Tue, 9 Aug 2022 14:05:55 -0700
|
||||
Subject: fix: cast pwrite64 arg to long for arm
|
||||
|
||||
This patch cases pwrite64 arg to a long in order to avoid a
|
||||
compilation error on arm. This patch can be eliminated when the
|
||||
upstream patch is merged into chromium main:
|
||||
|
||||
https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946
|
||||
|
||||
diff --git a/linux_syscall_support.h b/linux_syscall_support.h
|
||||
index e4e816f4bd001a6de7b98972d1cbaec9aaa8f821..5ea1295f8e9bb5312469dbc1aadb67dd620d35d3 100644
|
||||
--- a/linux_syscall_support.h
|
||||
+++ b/linux_syscall_support.h
|
||||
@@ -4842,7 +4842,7 @@ struct kernel_statfs {
|
||||
unsigned, o2)
|
||||
LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f,
|
||||
const void *, b, size_t, c, unsigned, o1,
|
||||
- long, o2)
|
||||
+ unsigned, o2)
|
||||
LSS_INLINE _syscall4(int, _readahead, int, f,
|
||||
unsigned, o1, unsigned, o2, size_t, c)
|
||||
#endif
|
|
@ -46,3 +46,4 @@ json_parse_errors_made_user-friendly.patch
|
|||
support_v8_sandboxed_pointers.patch
|
||||
build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
|
||||
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
|
||||
fix_override_createjob_in_node_platform.patch
|
||||
|
|
41
patches/node/fix_override_createjob_in_node_platform.patch
Normal file
41
patches/node/fix_override_createjob_in_node_platform.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <khammond@slack-corp.com>
|
||||
Date: Tue, 2 Aug 2022 12:52:02 -0700
|
||||
Subject: fix: override createjob in node_platform
|
||||
|
||||
This CL changed Platform::CreateJob to an abstract method:
|
||||
https://chromium-review.googlesource.com/c/v8/v8/+/3779694
|
||||
This patch adds an override for NodePlatform::CreateJob, using
|
||||
the same parameters as PostJob.
|
||||
|
||||
diff --git a/src/node_platform.cc b/src/node_platform.cc
|
||||
index 5be79694fef65c9290f1b46d2657581dea16f543..e10caa9f6e39ec5b255acd9bc6b7f8efc77221d9 100644
|
||||
--- a/src/node_platform.cc
|
||||
+++ b/src/node_platform.cc
|
||||
@@ -523,6 +523,12 @@ std::unique_ptr<v8::JobHandle> NodePlatform::PostJob(v8::TaskPriority priority,
|
||||
this, priority, std::move(job_task), NumberOfWorkerThreads());
|
||||
}
|
||||
|
||||
+std::unique_ptr<v8::JobHandle> NodePlatform::CreateJob(v8::TaskPriority priority,
|
||||
+ std::unique_ptr<v8::JobTask> job_task) {
|
||||
+ return v8::platform::NewDefaultJobHandle(
|
||||
+ this, priority, std::move(job_task), NumberOfWorkerThreads());
|
||||
+}
|
||||
+
|
||||
bool NodePlatform::IdleTasksEnabled(Isolate* isolate) {
|
||||
return ForIsolate(isolate)->IdleTasksEnabled();
|
||||
}
|
||||
diff --git a/src/node_platform.h b/src/node_platform.h
|
||||
index 4a05f3bba58c8e875d0ab67f292589edbb3b812b..b8a956c286a5ea88b8b520322e04b4e4e16a2591 100644
|
||||
--- a/src/node_platform.h
|
||||
+++ b/src/node_platform.h
|
||||
@@ -158,6 +158,9 @@ class NodePlatform : public MultiIsolatePlatform {
|
||||
std::unique_ptr<v8::JobHandle> PostJob(
|
||||
v8::TaskPriority priority,
|
||||
std::unique_ptr<v8::JobTask> job_task) override;
|
||||
+ std::unique_ptr<v8::JobHandle> CreateJob(
|
||||
+ v8::TaskPriority priority,
|
||||
+ std::unique_ptr<v8::JobTask> job_task) override;
|
||||
|
||||
void RegisterIsolate(v8::Isolate* isolate, uv_loop_t* loop) override;
|
||||
void RegisterIsolate(v8::Isolate* isolate,
|
|
@ -9,4 +9,3 @@ fix_disable_implies_dcheck_for_node_stream_array_buffers.patch
|
|||
revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch
|
||||
revert_runtime_dhceck_terminating_exception_in_microtasks.patch
|
||||
chore_disable_is_execution_terminating_dcheck.patch
|
||||
build_remove_legacy_oom_error_callback.patch
|
||||
|
|
|
@ -9,10 +9,10 @@ necessary for native modules to load.
|
|||
Also, some fixes relating to mksnapshot on ARM.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index c918081b31fdf15efd325ae9d688f6c4f59aded1..15d0dcf9f6ea151f4dcacff0f3dc11b318a1e1cd 100644
|
||||
index 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944ea566018 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -636,7 +636,7 @@ config("internal_config") {
|
||||
@@ -650,7 +650,7 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
@ -21,7 +21,7 @@ index c918081b31fdf15efd325ae9d688f6c4f59aded1..15d0dcf9f6ea151f4dcacff0f3dc11b3
|
|||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
@@ -5999,7 +5999,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6124,7 +6124,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
|
|
@ -1,168 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <keeleymhammond@gmail.com>
|
||||
Date: Tue, 14 Jun 2022 15:12:43 -0700
|
||||
Subject: build: remove legacy oom error callback
|
||||
|
||||
Addresses 3646014: [API] Deprecate LegacyOOMErrorCallback:
|
||||
https://chromium-review.googlesource.com/c/v8/v8/+/3646014
|
||||
|
||||
This deprecation was added to warn embedders that the legacy method
|
||||
was being replaced. However, Electron does not use the legacy method.
|
||||
The deprecation causes build issues on Windows, this patch removes
|
||||
the unused method entirely to avoid those errors.
|
||||
|
||||
This patch can be removed in v8 10.6, when legacy_oom_error_callback
|
||||
is removed.
|
||||
|
||||
diff --git a/include/v8-callbacks.h b/include/v8-callbacks.h
|
||||
index b39921dea0415362d1a30159f3fac0e345e2313e..810fc4edaf69565959148d3c1ec662f0db3e8490 100644
|
||||
--- a/include/v8-callbacks.h
|
||||
+++ b/include/v8-callbacks.h
|
||||
@@ -217,10 +217,6 @@ using AddHistogramSampleCallback = void (*)(void* histogram, int sample);
|
||||
|
||||
using FatalErrorCallback = void (*)(const char* location, const char* message);
|
||||
|
||||
-using LegacyOOMErrorCallback V8_DEPRECATED(
|
||||
- "Use OOMErrorCallback (https://crbug.com/1323177)") =
|
||||
- void (*)(const char* location, bool is_heap_oom);
|
||||
-
|
||||
struct OOMDetails {
|
||||
bool is_heap_oom = false;
|
||||
const char* detail = nullptr;
|
||||
diff --git a/include/v8-initialization.h b/include/v8-initialization.h
|
||||
index 66adf98c17998dd81178e515db01ef43daae14d7..224ae0dc6b34b4724192a1b0547be110f796a9b2 100644
|
||||
--- a/include/v8-initialization.h
|
||||
+++ b/include/v8-initialization.h
|
||||
@@ -284,9 +284,6 @@ class V8_EXPORT V8 {
|
||||
*/
|
||||
static void SetFatalMemoryErrorCallback(OOMErrorCallback callback);
|
||||
|
||||
- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)")
|
||||
- static void SetFatalMemoryErrorCallback(LegacyOOMErrorCallback callback);
|
||||
-
|
||||
/**
|
||||
* Get statistics about the shared memory usage.
|
||||
*/
|
||||
diff --git a/include/v8-isolate.h b/include/v8-isolate.h
|
||||
index b54c7388603b4582356f6741c9a36f2835aa1928..b9533b78046228705e2038396eebf23b1d663df1 100644
|
||||
--- a/include/v8-isolate.h
|
||||
+++ b/include/v8-isolate.h
|
||||
@@ -288,9 +288,6 @@ class V8_EXPORT Isolate {
|
||||
FatalErrorCallback fatal_error_callback = nullptr;
|
||||
OOMErrorCallback oom_error_callback = nullptr;
|
||||
|
||||
- V8_DEPRECATED("Use oom_error_callback (https://crbug.com/1323177)")
|
||||
- LegacyOOMErrorCallback legacy_oom_error_callback = nullptr;
|
||||
-
|
||||
/**
|
||||
* The following parameter is experimental and may change significantly.
|
||||
* This is currently for internal testing.
|
||||
@@ -1468,10 +1465,6 @@ class V8_EXPORT Isolate {
|
||||
/** Set the callback to invoke in case of fatal errors. */
|
||||
void SetFatalErrorHandler(FatalErrorCallback that);
|
||||
|
||||
- /** Set the callback to invoke in case of OOM errors (deprecated). */
|
||||
- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)")
|
||||
- void SetOOMErrorHandler(LegacyOOMErrorCallback that);
|
||||
-
|
||||
/** Set the callback to invoke in case of OOM errors. */
|
||||
void SetOOMErrorHandler(OOMErrorCallback that);
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 9fafa6b0089aabf55984b68cff85e353fe50ce52..9472ad8f4f776f98d398113b22a6a710596b3cde 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -171,13 +171,6 @@
|
||||
|
||||
namespace v8 {
|
||||
|
||||
-// Redefine LegacyOOMErrorCallback here for internal usage. We still need to
|
||||
-// support it but it is deprecated so would trigger warnings.
|
||||
-// TODO(chromium:1323177): Remove this.
|
||||
-using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location,
|
||||
- bool is_heap_oom);
|
||||
-
|
||||
-static DeprecatedLegacyOOMErrorCallback g_legacy_oom_error_callback = nullptr;
|
||||
static OOMErrorCallback g_oom_error_callback = nullptr;
|
||||
|
||||
static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate,
|
||||
@@ -235,9 +228,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location,
|
||||
// Give the embedder a chance to handle the condition. If it doesn't,
|
||||
// just crash.
|
||||
if (g_oom_error_callback) g_oom_error_callback(location, details);
|
||||
- if (g_legacy_oom_error_callback) {
|
||||
- g_legacy_oom_error_callback(location, details.is_heap_oom);
|
||||
- }
|
||||
FATAL("Fatal process out of memory: %s", location);
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -313,9 +303,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location,
|
||||
}
|
||||
Utils::ReportOOMFailure(i_isolate, location, details);
|
||||
if (g_oom_error_callback) g_oom_error_callback(location, details);
|
||||
- if (g_legacy_oom_error_callback) {
|
||||
- g_legacy_oom_error_callback(location, details.is_heap_oom);
|
||||
- }
|
||||
// If the fatal error handler returns, we stop execution.
|
||||
FATAL("API fatal error handler returned after process out of memory");
|
||||
}
|
||||
@@ -347,8 +334,6 @@ void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location,
|
||||
const OOMDetails& details) {
|
||||
if (auto oom_callback = i_isolate->oom_behavior()) {
|
||||
oom_callback(location, details);
|
||||
- } else if (auto legacy_oom_callback = i_isolate->legacy_oom_behavior()) {
|
||||
- legacy_oom_callback(location, details.is_heap_oom);
|
||||
} else {
|
||||
// TODO(wfh): Remove this fallback once Blink is setting OOM handler. See
|
||||
// crbug.com/614440.
|
||||
@@ -6175,11 +6160,6 @@ void v8::V8::SetFatalMemoryErrorCallback(
|
||||
g_oom_error_callback = oom_error_callback;
|
||||
}
|
||||
|
||||
-void v8::V8::SetFatalMemoryErrorCallback(
|
||||
- v8::LegacyOOMErrorCallback legacy_oom_error_callback) {
|
||||
- g_legacy_oom_error_callback = legacy_oom_error_callback;
|
||||
-}
|
||||
-
|
||||
void v8::V8::SetEntropySource(EntropySource entropy_source) {
|
||||
base::RandomNumberGenerator::SetEntropySource(entropy_source);
|
||||
}
|
||||
@@ -8702,8 +8682,6 @@ void Isolate::Initialize(Isolate* v8_isolate,
|
||||
#endif
|
||||
if (params.oom_error_callback) {
|
||||
v8_isolate->SetOOMErrorHandler(params.oom_error_callback);
|
||||
- } else if (params.legacy_oom_error_callback) {
|
||||
- v8_isolate->SetOOMErrorHandler(params.legacy_oom_error_callback);
|
||||
}
|
||||
#if __clang__
|
||||
#pragma clang diagnostic pop
|
||||
@@ -9445,8 +9423,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) {
|
||||
|
||||
CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior)
|
||||
CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior)
|
||||
-CALLBACK_SETTER(OOMErrorHandler, DeprecatedLegacyOOMErrorCallback,
|
||||
- legacy_oom_behavior)
|
||||
CALLBACK_SETTER(ModifyCodeGenerationFromStringsCallback,
|
||||
ModifyCodeGenerationFromStringsCallback2,
|
||||
modify_code_gen_callback2)
|
||||
diff --git a/src/execution/isolate.h b/src/execution/isolate.h
|
||||
index 13100146bdc981480a08156b54649b8f995789ae..9a117c4220704ed512b117aa2f50c3791f8e9189 100644
|
||||
--- a/src/execution/isolate.h
|
||||
+++ b/src/execution/isolate.h
|
||||
@@ -487,16 +487,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob();
|
||||
|
||||
using DebugObjectCache = std::vector<Handle<HeapObject>>;
|
||||
|
||||
-// Redefine LegacyOOMErrorCallback here for internal usage. We still need to
|
||||
-// support it but it is deprecated so would trigger warnings.
|
||||
-// TODO(chromium:1323177): Remove this.
|
||||
-using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location,
|
||||
- bool is_heap_oom);
|
||||
-
|
||||
#define ISOLATE_INIT_LIST(V) \
|
||||
/* Assembler state. */ \
|
||||
V(FatalErrorCallback, exception_behavior, nullptr) \
|
||||
- V(DeprecatedLegacyOOMErrorCallback, legacy_oom_behavior, nullptr) \
|
||||
V(OOMErrorCallback, oom_behavior, nullptr) \
|
||||
V(LogEventCallback, event_logger, nullptr) \
|
||||
V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, nullptr) \
|
|
@ -20,3 +20,16 @@ index 149dd0555a69be576fd1eb97aa79b8aedafcac04..233e6d2ac511c4a7fa45d47bb7448bee
|
|||
DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate)
|
||||
|
||||
#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate) \
|
||||
diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc
|
||||
index f47228f80b6a2b9e89afd50e6f67eba1185c0dd6..8adf3a9159b947f4fa567317d05cf0b9f204c862 100644
|
||||
--- a/src/execution/microtask-queue.cc
|
||||
+++ b/src/execution/microtask-queue.cc
|
||||
@@ -179,7 +179,7 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) {
|
||||
|
||||
if (isolate->is_execution_terminating()) {
|
||||
DCHECK(isolate->has_scheduled_exception());
|
||||
- DCHECK(maybe_result.is_null());
|
||||
+ // DCHECK(maybe_result.is_null());
|
||||
delete[] ring_buffer_;
|
||||
ring_buffer_ = nullptr;
|
||||
capacity_ = 0;
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: dcheck.patch
|
|||
https://github.com/auchenberg/volkswagen
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index bbab4c72ac93fe7a5bba5de531e66be0775244ca..9fafa6b0089aabf55984b68cff85e353fe50ce52 100644
|
||||
index 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b84221f3b1 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -9194,7 +9194,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
@@ -9181,7 +9181,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
}
|
||||
|
||||
void Isolate::PerformMicrotaskCheckpoint() {
|
||||
|
@ -19,10 +19,10 @@ index bbab4c72ac93fe7a5bba5de531e66be0775244ca..9fafa6b0089aabf55984b68cff85e353
|
|||
i_isolate->default_microtask_queue()->PerformCheckpoint(this);
|
||||
}
|
||||
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
||||
index 5ed434303b6be71dc99abd7600f4ef489f763419..7e2952b9b14f915df72573d6be0813401da0cafb 100644
|
||||
index 41f2378ba770a96d9722b8d50d28f3562ebf5101..59338d1d293d5325e89052dd226a9ad4f9e8b46a 100644
|
||||
--- a/src/heap/heap.cc
|
||||
+++ b/src/heap/heap.cc
|
||||
@@ -6195,9 +6195,9 @@ void Heap::TearDown() {
|
||||
@@ -6165,9 +6165,9 @@ void Heap::TearDown() {
|
||||
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
|
||||
GCType gc_type, void* data) {
|
||||
DCHECK_NOT_NULL(callback);
|
||||
|
|
|
@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
|
|||
contain any standard C++ library exports (e.g. `std::ostringstream`).
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 88d775bfe22d6f1ff738120d11cb1123c5ac106c..feab71df47427d6aaebddb581762fa1a2fd16887 100644
|
||||
index 09c3dc73292e2778baba3a0f7f1a02d875845d34..cf9dff8346bbe086464391758a5c11f228b3898c 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -636,6 +636,10 @@ config("internal_config") {
|
||||
@@ -650,6 +650,10 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
|
|||
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
|
||||
|
||||
diff --git a/src/objects/objects.h b/src/objects/objects.h
|
||||
index 647fbb52bf1faaad92ef1b4537d6226344cb27b2..86b1123804058f1ecca5bd7076f5108cd1f28912 100644
|
||||
index fbdf5f029f19d8c231e70593e4860f8949e66e45..f98808fa74d79f8492f5a9aac92783b0775bfdf6 100644
|
||||
--- a/src/objects/objects.h
|
||||
+++ b/src/objects/objects.h
|
||||
@@ -929,7 +929,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
|
||||
@@ -930,7 +930,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
|
||||
// Utility superclass for stack-allocated objects that must be updated
|
||||
// on gc. It provides two ways for the gc to update instances, either
|
||||
// iterating or updating after gc.
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
|
|||
Needed in order to target mksnapshot for mksnapshot zip.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 15d0dcf9f6ea151f4dcacff0f3dc11b318a1e1cd..88d775bfe22d6f1ff738120d11cb1123c5ac106c 100644
|
||||
index f359ea10d6e83f94b698d9d728147944ea566018..09c3dc73292e2778baba3a0f7f1a02d875845d34 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -6011,7 +6011,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6136,7 +6136,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions
|
|||
This attribute can only be used in all contexts in Visual Studio 2019
|
||||
|
||||
diff --git a/include/v8config.h b/include/v8config.h
|
||||
index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb59df80869 100644
|
||||
index 85bbfce01dff2b0b499e5c02b80e23b682443582..9cedeff64478d900bc6730537caff16f09dcfd46 100644
|
||||
--- a/include/v8config.h
|
||||
+++ b/include/v8config.h
|
||||
@@ -454,10 +454,13 @@ path. Add it with -I<path> to the command line
|
||||
@@ -469,10 +469,13 @@ path. Add it with -I<path> to the command line
|
||||
# define V8_NOINLINE /* NOT SUPPORTED */
|
||||
#endif
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb5
|
|||
#else
|
||||
# define V8_DEPRECATED(message)
|
||||
#endif
|
||||
@@ -465,13 +468,17 @@ path. Add it with -I<path> to the command line
|
||||
@@ -480,7 +483,11 @@ path. Add it with -I<path> to the command line
|
||||
|
||||
// A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated.
|
||||
#if defined(V8_IMMINENT_DEPRECATION_WARNINGS)
|
||||
|
@ -38,6 +38,8 @@ index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb5
|
|||
#else
|
||||
# define V8_DEPRECATE_SOON(message)
|
||||
#endif
|
||||
@@ -514,7 +521,7 @@ path. Add it with -I<path> to the command line
|
||||
END_ALLOW_USE_DEPRECATED()
|
||||
|
||||
|
||||
-#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6)
|
||||
|
|
|
@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904
|
|||
StoreRoot(RootIndex::kCurrentMicrotask, microtask);
|
||||
TNode<IntPtrT> saved_entered_context_count = GetEnteredContextCount();
|
||||
diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc
|
||||
index a984d2ce736a2c9a46eb7cc46eb03fc062f508d2..6bda9bc5878b1ee344eac9f9c4420db09a307792 100644
|
||||
index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c20982a675 100644
|
||||
--- a/src/codegen/code-stub-assembler.cc
|
||||
+++ b/src/codegen/code-stub-assembler.cc
|
||||
@@ -6123,12 +6123,6 @@ void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {
|
||||
@@ -6124,12 +6124,6 @@ void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {
|
||||
StoreFullTaggedNoWriteBarrier(pending_message, message);
|
||||
}
|
||||
|
||||
|
@ -35,10 +35,10 @@ index a984d2ce736a2c9a46eb7cc46eb03fc062f508d2..6bda9bc5878b1ee344eac9f9c4420db0
|
|||
int type) {
|
||||
return Word32Equal(instance_type, Int32Constant(type));
|
||||
diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h
|
||||
index 9633ba5333c4f1c37e706f655fe37c59c4993b86..6022d5d5063bc6c4db1c15e1ffaaf4d5420c0a01 100644
|
||||
index c4878044b149ec23f4ac9198f402ccc5114e219e..ba9be792cbcce3cbc85062daa524010dced2cfeb 100644
|
||||
--- a/src/codegen/code-stub-assembler.h
|
||||
+++ b/src/codegen/code-stub-assembler.h
|
||||
@@ -2518,7 +2518,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
@@ -2533,7 +2533,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
TNode<HeapObject> GetPendingMessage();
|
||||
void SetPendingMessage(TNode<HeapObject> message);
|
||||
|
@ -46,16 +46,3 @@ index 9633ba5333c4f1c37e706f655fe37c59c4993b86..6022d5d5063bc6c4db1c15e1ffaaf4d5
|
|||
|
||||
// Type checks.
|
||||
// Check whether the map is for an object with special properties, such as a
|
||||
diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc
|
||||
index 2bea5d45bb0605877ad430882c914dddeb2c51c5..12a626900d0295be0b250cd6d4692ab4e329c681 100644
|
||||
--- a/src/execution/microtask-queue.cc
|
||||
+++ b/src/execution/microtask-queue.cc
|
||||
@@ -179,8 +179,6 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) {
|
||||
processed_microtask_count);
|
||||
}
|
||||
|
||||
- DCHECK_IMPLIES(isolate->has_scheduled_exception(),
|
||||
- maybe_result.is_null() && maybe_exception.is_null());
|
||||
// If execution is terminating, clean up and propagate that to TryCatch scope.
|
||||
if (maybe_result.is_null() && maybe_exception.is_null()) {
|
||||
delete[] ring_buffer_;
|
||||
|
|
|
@ -11,9 +11,10 @@ from lib.patches import patch_from_dir
|
|||
def apply_patches(dirs):
|
||||
threeway = os.environ.get("ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES")
|
||||
for patch_dir, repo in dirs.items():
|
||||
git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir),
|
||||
threeway=threeway is not None,
|
||||
committer_name="Electron Scripts", committer_email="scripts@electron")
|
||||
if os.path.exists(repo):
|
||||
git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir),
|
||||
threeway=threeway is not None,
|
||||
committer_name="Electron Scripts", committer_email="scripts@electron")
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
|
@ -28,6 +28,7 @@ def main():
|
|||
if args.snapshot_files_dir is None:
|
||||
with open(os.path.join(app_path, 'mksnapshot_args')) as f:
|
||||
mkargs = f.read().splitlines()
|
||||
print('running: ' + ' '.join(mkargs + [ SNAPSHOT_SOURCE ]))
|
||||
subprocess.check_call(mkargs + [ SNAPSHOT_SOURCE ], cwd=app_path)
|
||||
print('ok mksnapshot successfully created snapshot_blob.bin.')
|
||||
context_snapshot = 'v8_context_snapshot.bin'
|
||||
|
@ -41,6 +42,7 @@ def main():
|
|||
app_path)
|
||||
genargs = [ gen_binary, \
|
||||
'--output_file={0}'.format(context_snapshot_path) ]
|
||||
print('running: ' + ' '.join(genargs))
|
||||
subprocess.check_call(genargs)
|
||||
print('ok v8_context_snapshot_generator successfully created ' \
|
||||
+ context_snapshot)
|
||||
|
@ -69,6 +71,7 @@ def main():
|
|||
else:
|
||||
electron = os.path.join(app_path, PROJECT_NAME)
|
||||
|
||||
print('running: ' + ' '.join([electron, test_path]))
|
||||
subprocess.check_call([electron, test_path])
|
||||
print('ok successfully used custom snapshot.')
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
|
|
@ -240,7 +240,7 @@ const char* const ElectronMainDelegate::kNonWildcardDomainNonPortSchemes[] = {
|
|||
const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize =
|
||||
std::size(kNonWildcardDomainNonPortSchemes);
|
||||
|
||||
bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
absl::optional<int> ElectronMainDelegate::BasicStartupComplete() {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -318,7 +318,7 @@ bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||
content_client_ = std::make_unique<ElectronContentClient>();
|
||||
SetContentClient(content_client_.get());
|
||||
|
||||
return false;
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
void ElectronMainDelegate::PreSandboxStartup() {
|
||||
|
@ -411,7 +411,7 @@ void ElectronMainDelegate::SandboxInitialized(const std::string& process_type) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void ElectronMainDelegate::PreBrowserMain() {
|
||||
absl::optional<int> ElectronMainDelegate::PreBrowserMain() {
|
||||
// This is initialized early because the service manager reads some feature
|
||||
// flags and we need to make sure the feature list is initialized before the
|
||||
// service manager reads the features.
|
||||
|
@ -419,6 +419,7 @@ void ElectronMainDelegate::PreBrowserMain() {
|
|||
#if BUILDFLAG(IS_MAC)
|
||||
RegisterAtomCrApp();
|
||||
#endif
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
content::ContentBrowserClient*
|
||||
|
|
|
@ -32,10 +32,10 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
|
|||
|
||||
protected:
|
||||
// content::ContentMainDelegate:
|
||||
bool BasicStartupComplete(int* exit_code) override;
|
||||
absl::optional<int> BasicStartupComplete() override;
|
||||
void PreSandboxStartup() override;
|
||||
void SandboxInitialized(const std::string& process_type) override;
|
||||
void PreBrowserMain() override;
|
||||
absl::optional<int> PreBrowserMain() override;
|
||||
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
||||
content::ContentGpuClient* CreateContentGpuClient() override;
|
||||
content::ContentRendererClient* CreateContentRendererClient() override;
|
||||
|
|
|
@ -210,7 +210,7 @@ void Menu::Clear() {
|
|||
}
|
||||
|
||||
int Menu::GetIndexOfCommandId(int command_id) const {
|
||||
return model_->GetIndexOfCommandId(command_id);
|
||||
return model_->GetIndexOfCommandId(command_id).value_or(-1);
|
||||
}
|
||||
|
||||
int Menu::GetItemCount() const {
|
||||
|
|
|
@ -2868,7 +2868,7 @@ void WebContents::OnPDFCreated(
|
|||
gin_helper::Promise<v8::Local<v8::Value>> promise,
|
||||
PrintViewManagerElectron::PrintResult print_result,
|
||||
scoped_refptr<base::RefCountedMemory> data) {
|
||||
if (print_result != PrintViewManagerElectron::PrintResult::PRINT_SUCCESS) {
|
||||
if (print_result != PrintViewManagerElectron::PrintResult::kPrintSuccess) {
|
||||
promise.RejectWithErrorMessage(
|
||||
"Failed to generate PDF: " +
|
||||
PrintViewManagerElectron::PrintResultToString(print_result));
|
||||
|
|
|
@ -134,7 +134,8 @@ void ElectronBluetoothDelegate::ShowDevicePairPrompt(
|
|||
content::RenderFrameHost* frame,
|
||||
const std::u16string& device_identifier,
|
||||
PairPromptCallback callback,
|
||||
PairingKind pairing_kind) {
|
||||
PairingKind pairing_kind,
|
||||
const absl::optional<std::u16string>& pin) {
|
||||
NOTIMPLEMENTED();
|
||||
std::move(callback).Run(BluetoothDelegate::PairPromptResult(
|
||||
BluetoothDelegate::PairPromptStatus::kCancelled));
|
||||
|
|
|
@ -55,7 +55,8 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate {
|
|||
void ShowDevicePairPrompt(content::RenderFrameHost* frame,
|
||||
const std::u16string& device_identifier,
|
||||
PairPromptCallback callback,
|
||||
PairingKind pairing_kind) override;
|
||||
PairingKind pairing_kind,
|
||||
const absl::optional<std::u16string>& pin) override;
|
||||
blink::WebBluetoothDeviceId GetWebBluetoothDeviceId(
|
||||
content::RenderFrameHost* frame,
|
||||
const std::string& device_address) override;
|
||||
|
|
|
@ -1539,8 +1539,7 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
|
|||
bool ElectronBrowserClient::PreSpawnChild(sandbox::TargetPolicy* policy,
|
||||
sandbox::mojom::Sandbox sandbox_type,
|
||||
ChildSpawnFlags flags) {
|
||||
// Allow crashpad to communicate via named pipe.
|
||||
sandbox::ResultCode result = policy->AddRule(
|
||||
sandbox::ResultCode result = policy->GetConfig()->AddRule(
|
||||
sandbox::SubSystem::kFiles, sandbox::Semantics::kFilesAllowAny,
|
||||
L"\\??\\pipe\\crashpad_*");
|
||||
if (result != sandbox::SBOX_ALL_OK)
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "base/win/dark_mode_support.h"
|
||||
#include "ui/base/l10n/l10n_util_win.h"
|
||||
#include "ui/display/win/dpi.h"
|
||||
#include "ui/gfx/system_fonts_win.h"
|
||||
|
@ -370,7 +371,6 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
|
|||
void ElectronBrowserMainParts::ToolkitInitialized() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
auto linux_ui = ui::CreateLinuxUi();
|
||||
DCHECK(ui::LinuxInputMethodContextFactory::instance());
|
||||
|
||||
// Try loading gtk symbols used by Electron.
|
||||
electron::InitializeElectron_gtk(gtk::GetLibGtk());
|
||||
|
@ -440,6 +440,11 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() {
|
|||
SpellcheckServiceFactory::GetInstance();
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// access ui native theme here to prevent blocking calls later
|
||||
base::win::AllowDarkModeForApp(true);
|
||||
#endif
|
||||
|
||||
content::WebUIControllerFactory::RegisterFactory(
|
||||
ElectronWebUIControllerFactory::GetInstance());
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "services/device/public/cpp/hid/hid_switches.h"
|
||||
|
@ -106,6 +107,7 @@ void ElectronHidDelegate::AddObserver(content::BrowserContext* browser_context,
|
|||
}
|
||||
|
||||
void ElectronHidDelegate::RemoveObserver(
|
||||
content::BrowserContext* browser_context,
|
||||
content::HidDelegate::Observer* observer) {
|
||||
observer_list_.RemoveObserver(observer);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ class ElectronHidDelegate : public content::HidDelegate,
|
|||
content::BrowserContext* browser_context) override;
|
||||
void AddObserver(content::BrowserContext* browser_context,
|
||||
content::HidDelegate::Observer* observer) override;
|
||||
void RemoveObserver(content::HidDelegate::Observer* observer) override;
|
||||
void RemoveObserver(content::BrowserContext* browser_context,
|
||||
content::HidDelegate::Observer* observer) override;
|
||||
const device::mojom::HidDeviceInfo* GetDeviceInfo(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::string& guid) override;
|
||||
|
|
|
@ -63,27 +63,27 @@ void PrintViewManagerElectron::BindPrintManagerHost(
|
|||
// static
|
||||
std::string PrintViewManagerElectron::PrintResultToString(PrintResult result) {
|
||||
switch (result) {
|
||||
case PRINT_SUCCESS:
|
||||
case kPrintSuccess:
|
||||
return std::string(); // no error message
|
||||
case PRINTING_FAILED:
|
||||
case kPrintFailure:
|
||||
return "Printing failed";
|
||||
case INVALID_PRINTER_SETTINGS:
|
||||
case kInvalidPrinterSettings:
|
||||
return "Show invalid printer settings error";
|
||||
case INVALID_MEMORY_HANDLE:
|
||||
case kInvalidMemoryHandle:
|
||||
return "Invalid memory handle";
|
||||
case METAFILE_MAP_ERROR:
|
||||
case kMetafileMapError:
|
||||
return "Map to shared memory error";
|
||||
case METAFILE_INVALID_HEADER:
|
||||
case kMetafileInvalidHeader:
|
||||
return "Invalid metafile header";
|
||||
case METAFILE_GET_DATA_ERROR:
|
||||
case kMetafileGetDataError:
|
||||
return "Get data from metafile error";
|
||||
case SIMULTANEOUS_PRINT_ACTIVE:
|
||||
case kSimultaneousPrintActive:
|
||||
return "The previous printing job hasn't finished";
|
||||
case PAGE_RANGE_SYNTAX_ERROR:
|
||||
case kPageRangeSyntaxError:
|
||||
return "Page range syntax error";
|
||||
case PAGE_RANGE_INVALID_RANGE:
|
||||
case kPageRangeInvalidRange:
|
||||
return "Page range is invalid (start > end)";
|
||||
case PAGE_COUNT_EXCEEDED:
|
||||
case kPageCountExceeded:
|
||||
return "Page range exceeds page count";
|
||||
default:
|
||||
NOTREACHED();
|
||||
|
@ -99,39 +99,31 @@ void PrintViewManagerElectron::PrintToPdf(
|
|||
DCHECK(callback);
|
||||
|
||||
if (callback_) {
|
||||
std::move(callback).Run(SIMULTANEOUS_PRINT_ACTIVE,
|
||||
std::move(callback).Run(kSimultaneousPrintActive,
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rfh->IsRenderFrameLive()) {
|
||||
std::move(callback).Run(PRINTING_FAILED,
|
||||
std::move(callback).Run(kPrintFailure,
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
return;
|
||||
}
|
||||
|
||||
absl::variant<printing::PageRanges, print_to_pdf::PageRangeError>
|
||||
absl::variant<printing::PageRanges, print_to_pdf::PdfPrintResult>
|
||||
parsed_ranges = print_to_pdf::TextPageRangesToPageRanges(page_ranges);
|
||||
if (absl::holds_alternative<print_to_pdf::PageRangeError>(parsed_ranges)) {
|
||||
PrintResult print_result;
|
||||
switch (absl::get<print_to_pdf::PageRangeError>(parsed_ranges)) {
|
||||
case print_to_pdf::PageRangeError::kSyntaxError:
|
||||
print_result = PAGE_RANGE_SYNTAX_ERROR;
|
||||
break;
|
||||
case print_to_pdf::PageRangeError::kInvalidRange:
|
||||
print_result = PAGE_RANGE_INVALID_RANGE;
|
||||
break;
|
||||
}
|
||||
std::move(callback).Run(print_result,
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
if (absl::holds_alternative<print_to_pdf::PdfPrintResult>(parsed_ranges)) {
|
||||
DCHECK_NE(absl::get<print_to_pdf::PdfPrintResult>(parsed_ranges),
|
||||
print_to_pdf::PdfPrintResult::kPrintSuccess);
|
||||
std::move(callback).Run(
|
||||
static_cast<PrintResult>(
|
||||
absl::get<print_to_pdf::PdfPrintResult>(parsed_ranges)),
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
return;
|
||||
}
|
||||
|
||||
printing_rfh_ = rfh;
|
||||
print_pages_params->pages = absl::get<printing::PageRanges>(parsed_ranges);
|
||||
auto cookie = print_pages_params->params->document_cookie;
|
||||
set_cookie(cookie);
|
||||
headless_jobs_.emplace_back(cookie);
|
||||
callback_ = std::move(callback);
|
||||
|
||||
// There is no need for a weak pointer here since the mojo proxy is held
|
||||
|
@ -147,26 +139,32 @@ void PrintViewManagerElectron::OnDidPrintWithParams(
|
|||
if (result->is_failure_reason()) {
|
||||
switch (result->get_failure_reason()) {
|
||||
case printing::mojom::PrintFailureReason::kGeneralFailure:
|
||||
ReleaseJob(PRINTING_FAILED);
|
||||
FailJob(kPrintFailure);
|
||||
return;
|
||||
case printing::mojom::PrintFailureReason::kInvalidPageRange:
|
||||
ReleaseJob(PAGE_COUNT_EXCEEDED);
|
||||
FailJob(kPageCountExceeded);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto& content = *result->get_params()->content;
|
||||
if (!content.metafile_data_region.IsValid()) {
|
||||
ReleaseJob(INVALID_MEMORY_HANDLE);
|
||||
FailJob(kInvalidMemoryHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
base::ReadOnlySharedMemoryMapping map = content.metafile_data_region.Map();
|
||||
if (!map.IsValid()) {
|
||||
ReleaseJob(METAFILE_MAP_ERROR);
|
||||
FailJob(kMetafileMapError);
|
||||
return;
|
||||
}
|
||||
data_ = std::string(static_cast<const char*>(map.memory()), map.size());
|
||||
ReleaseJob(PRINT_SUCCESS);
|
||||
|
||||
std::string data =
|
||||
std::string(static_cast<const char*>(map.memory()), map.size());
|
||||
std::move(callback_).Run(kPrintSuccess,
|
||||
base::RefCountedString::TakeString(&data));
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
void PrintViewManagerElectron::GetDefaultPrintSettings(
|
||||
|
@ -201,7 +199,7 @@ void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() {
|
|||
return;
|
||||
}
|
||||
|
||||
ReleaseJob(INVALID_PRINTER_SETTINGS);
|
||||
FailJob(kInvalidPrinterSettings);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
@ -248,12 +246,7 @@ void PrintViewManagerElectron::RenderFrameDeleted(
|
|||
if (printing_rfh_ != render_frame_host)
|
||||
return;
|
||||
|
||||
if (callback_) {
|
||||
std::move(callback_).Run(PRINTING_FAILED,
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
}
|
||||
|
||||
Reset();
|
||||
FailJob(kPrintFailure);
|
||||
}
|
||||
|
||||
void PrintViewManagerElectron::DidGetPrintedPagesCount(int32_t cookie,
|
||||
|
@ -270,17 +263,14 @@ void PrintViewManagerElectron::Reset() {
|
|||
data_.clear();
|
||||
}
|
||||
|
||||
void PrintViewManagerElectron::ReleaseJob(PrintResult result) {
|
||||
void PrintViewManagerElectron::FailJob(PrintResult result) {
|
||||
DCHECK_NE(result, kPrintSuccess);
|
||||
if (callback_) {
|
||||
DCHECK(result == PRINT_SUCCESS || data_.empty());
|
||||
std::move(callback_).Run(result,
|
||||
base::RefCountedString::TakeString(&data_));
|
||||
if (printing_rfh_ && printing_rfh_->IsRenderFrameLive()) {
|
||||
GetPrintRenderFrame(printing_rfh_)->PrintingDone(result == PRINT_SUCCESS);
|
||||
}
|
||||
|
||||
Reset();
|
||||
base::MakeRefCounted<base::RefCountedString>());
|
||||
}
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintViewManagerElectron);
|
||||
|
|
|
@ -26,17 +26,17 @@ class PrintViewManagerElectron
|
|||
public content::WebContentsUserData<PrintViewManagerElectron> {
|
||||
public:
|
||||
enum PrintResult {
|
||||
PRINT_SUCCESS,
|
||||
PRINTING_FAILED,
|
||||
INVALID_PRINTER_SETTINGS,
|
||||
INVALID_MEMORY_HANDLE,
|
||||
METAFILE_MAP_ERROR,
|
||||
METAFILE_INVALID_HEADER,
|
||||
METAFILE_GET_DATA_ERROR,
|
||||
SIMULTANEOUS_PRINT_ACTIVE,
|
||||
PAGE_RANGE_SYNTAX_ERROR,
|
||||
PAGE_RANGE_INVALID_RANGE,
|
||||
PAGE_COUNT_EXCEEDED,
|
||||
kPrintSuccess,
|
||||
kPrintFailure,
|
||||
kInvalidPrinterSettings,
|
||||
kInvalidMemoryHandle,
|
||||
kMetafileMapError,
|
||||
kMetafileInvalidHeader,
|
||||
kMetafileGetDataError,
|
||||
kSimultaneousPrintActive,
|
||||
kPageRangeSyntaxError,
|
||||
kPageRangeInvalidRange,
|
||||
kPageCountExceeded,
|
||||
};
|
||||
|
||||
using PrintToPDFCallback =
|
||||
|
@ -91,8 +91,8 @@ class PrintViewManagerElectron
|
|||
CheckForCancelCallback callback) override;
|
||||
#endif
|
||||
|
||||
void FailJob(PrintResult result);
|
||||
void Reset();
|
||||
void ReleaseJob(PrintResult result);
|
||||
|
||||
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
|
||||
PrintToPDFCallback callback_;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue