mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: update chromium to 82.0.4058.2 (#22198)
Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Robo <hop2deep@gmail.com>
This commit is contained in:
2
DEPS
2
DEPS
@@ -12,7 +12,7 @@ gclient_gn_args = [
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'2102ff0fb03469ca5ff317a168e6ad99ca0f23f1',
|
||||
'82.0.4058.2',
|
||||
'node_version':
|
||||
'v12.14.1',
|
||||
'nan_version':
|
||||
|
||||
@@ -68,7 +68,6 @@ static_library("chrome") {
|
||||
]
|
||||
deps = [
|
||||
"//chrome/browser:resource_prefetch_predictor_proto",
|
||||
"//chrome/browser/ssl:proto",
|
||||
"//components/feature_engagement:buildflags",
|
||||
]
|
||||
|
||||
|
||||
@@ -84,5 +84,7 @@ fixme_grit_conflicts.patch
|
||||
fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch
|
||||
use_electron_resources_in_pdf_util.patch
|
||||
hack_plugin_response_interceptor_to_point_to_electron.patch
|
||||
delay_lock_the_protocol_scheme_registry.patch
|
||||
fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
|
||||
feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
|
||||
gpu_notify_when_dxdiag_request_fails.patch
|
||||
|
||||
@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 68654a3e7d5ec6caddccb667f9f8fa2feabfa71b..650ce53e112bd65e1901a09480452855a0c16dda 100644
|
||||
index b09355c6dc2fe264c66fceaafd4ef75bc1059f82..205a9197acef55dc062a8645a6cc406f1db496c2 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -23,10 +23,10 @@ index 68654a3e7d5ec6caddccb667f9f8fa2feabfa71b..650ce53e112bd65e1901a09480452855
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 6730d6f6eb8448452991ebf5968a8c5a398b6a88..b87f9c7ac0f31ec33f03c36131c3255c8a31c22c 100644
|
||||
index 24d5189649d7ce6fd702cd6c686aac2edf2e6150..0d3d1b8f0aeefbcf81d14460fd687ddd09ff9d98 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -5187,6 +5187,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -5034,6 +5034,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 6730d6f6eb8448452991ebf5968a8c5a398b6a88..b87f9c7ac0f31ec33f03c36131c3255c
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index bc896201057832415b5d54dc8987bb74bf7aa778..5c96af71646722b1108a8d6eafba1adaddf0a05a 100644
|
||||
index ee6e06ed821f8caff2fd5d475e878389e5f9c61f..dac55b994034aafd01c93ccab17d7bc8ded3e022 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -773,6 +773,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -752,6 +752,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
bool ShouldTrackUseCounter(const blink::WebURL& url) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index bc896201057832415b5d54dc8987bb74bf7aa778..5c96af71646722b1108a8d6eafba1ada
|
||||
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 30638c31e30d98bb23292115b25b528ff8e8f62c..e0f2f786b75f861851d1194f57b253a173053299 100644
|
||||
index d427db5260bf6faf34fa32a8990d84f6119e7f61..32fd79b23c5d6afa0d3681906398f4a410fa2659 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -652,6 +652,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -574,6 +574,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -67,10 +67,10 @@ index 30638c31e30d98bb23292115b25b528ff8e8f62c..e0f2f786b75f861851d1194f57b253a1
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 8095edd988c171a8ad7382d1c2f9fa63ee9e5ffc..510dae593d2a0e2ce13a2879dde5c31e01d21c21 100644
|
||||
index b00085e2f313a69f6dd5a8817d5a4cf0a78a198e..bb8a830fc70fee6b7e79b6ffb36889923b7e09ce 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -231,6 +231,7 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -215,6 +215,7 @@ void LocalWindowProxy::Initialize() {
|
||||
}
|
||||
|
||||
InstallConditionalFeatures();
|
||||
@@ -79,10 +79,10 @@ index 8095edd988c171a8ad7382d1c2f9fa63ee9e5ffc..510dae593d2a0e2ce13a2879dde5c31e
|
||||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
index f8c512c9db0b88904a562b7d4195790d4b0f86a6..d31ef9bd5b98f584a3296638662ae0d27aa37b65 100644
|
||||
index d7adc387557a0f65d507ebddebda5fa611ddfa5f..f2a465c6223de32970ce5a39ba6935ceaea9f15c 100644
|
||||
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
@@ -267,6 +267,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -348,6 +348,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -97,10 +97,10 @@ index f8c512c9db0b88904a562b7d4195790d4b0f86a6..d31ef9bd5b98f584a3296638662ae0d2
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
index a055f4b0cc1ccc30752b65d6dc54e638e9b63001..0e6501adbf6f9696429c3fa95357de399ee30a9d 100644
|
||||
index ef5fe8dfd99d8800c0fc20c52a19bfdc9fc2b722..6c5832f3394e84bcb420f18871984c2437e29425 100644
|
||||
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
@@ -79,6 +79,8 @@ class LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -80,6 +80,8 @@ class LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
@@ -110,10 +110,10 @@ index a055f4b0cc1ccc30752b65d6dc54e638e9b63001..0e6501adbf6f9696429c3fa95357de39
|
||||
int32_t world_id) override;
|
||||
|
||||
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 1d6facb9ec63abebc5b79a57860765bc8b3f6638..0b58cb679ed34c54e39af661d4a432d482db8c3c 100644
|
||||
index e3de4cf6e464d42816a40ff39c0b979528f42298..97a912a188f95b85310049dc0c7960cc8644d6f4 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -303,6 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -123,10 +123,10 @@ index 1d6facb9ec63abebc5b79a57860765bc8b3f6638..0b58cb679ed34c54e39af661d4a432d4
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index f3f00e7d6ac44d77dd75997abf8b93eb59476eb3..2010792697b3443dd6f5058bed5ccd0026c4a152 100644
|
||||
index bf63bab30fd7f839574bf0d6a903b514245c0c2b..f278bae3715e42bce6fdf8b27659ca5b9b837405 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -370,6 +370,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -368,6 +368,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
|
||||
|
||||
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index 7aa84a3e19c257dde8f48d25743dc8ab2a3a0a30..58cbfc6e6f9f916ace683705d8a87ee05dc73422 100644
|
||||
index 02078481fc5e10597a810c0ef7857f259ae877d4..99019dbf45f4a7fd209e6836e5738b1781223e4e 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -659,6 +659,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
@@ -660,6 +660,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
size, ArrayBufferContents::kDontInitialize);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
|
||||
available, which there isn't in the case of the 'net' module.
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 78fd4bd72b07f38b447840b584253883756fe021..6d8aaecc08207456f243125db8e6d7c74f731d87 100644
|
||||
index f6672a20f1eb0914b8e103ae38079e9e0e6bfbdc..ee32e6f6361085b51b3ab905d0c5aa2d9ff93ab7 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -191,6 +191,25 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
@@ -192,6 +192,25 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ index 78fd4bd72b07f38b447840b584253883756fe021..6d8aaecc08207456f243125db8e6d7c7
|
||||
interface CertVerifierClient {
|
||||
Verify(
|
||||
int32 default_error,
|
||||
@@ -608,6 +627,8 @@ struct URLLoaderFactoryParams {
|
||||
@@ -621,6 +640,8 @@ struct URLLoaderFactoryParams {
|
||||
// interface. This still respects the per-context block lists.
|
||||
CorsOriginAccessPatterns? factory_bound_access_patterns;
|
||||
|
||||
@@ -49,10 +49,10 @@ index 78fd4bd72b07f38b447840b584253883756fe021..6d8aaecc08207456f243125db8e6d7c7
|
||||
NetworkIsolationKey? network_isolation_key;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 6f69ca035500a7af795ccd93b689bcc3b376576e..bf112361de669c22532d269b5871c9b23ca7b694 100644
|
||||
index 3a288e96c446a69e54a12e2237b75bca9663e811..118d2f126bdcd4a08bd2b9822382edbf1838ad9b 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -338,6 +338,7 @@ URLLoader::URLLoader(
|
||||
@@ -429,6 +429,7 @@ URLLoader::URLLoader(
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
@@ -60,7 +60,7 @@ index 6f69ca035500a7af795ccd93b689bcc3b376576e..bf112361de669c22532d269b5871c9b2
|
||||
mojom::OriginPolicyManager* origin_policy_manager)
|
||||
: url_request_context_(url_request_context),
|
||||
network_service_client_(network_service_client),
|
||||
@@ -396,6 +397,11 @@ URLLoader::URLLoader(
|
||||
@@ -491,6 +492,11 @@ URLLoader::URLLoader(
|
||||
header_client_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index 6f69ca035500a7af795ccd93b689bcc3b376576e..bf112361de669c22532d269b5871c9b2
|
||||
if (want_raw_headers_) {
|
||||
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
|
||||
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
|
||||
@@ -830,7 +836,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
|
||||
@@ -929,7 +935,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
|
||||
|
||||
void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
const net::AuthChallengeInfo& auth_info) {
|
||||
@@ -81,7 +81,7 @@ index 6f69ca035500a7af795ccd93b689bcc3b376576e..bf112361de669c22532d269b5871c9b2
|
||||
OnAuthCredentials(base::nullopt);
|
||||
return;
|
||||
}
|
||||
@@ -846,11 +852,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -945,11 +951,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
if (url_request->response_headers())
|
||||
head->headers = url_request->response_headers();
|
||||
head->auth_challenge_info = auth_info;
|
||||
@@ -108,10 +108,10 @@ index 6f69ca035500a7af795ccd93b689bcc3b376576e..bf112361de669c22532d269b5871c9b2
|
||||
auth_challenge_responder_receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 532ecdc0a9b386eb9ea04a480b18aeb1ac32a059..b3ad0f42ab9c2f513d8c4a06683d1af6f0219a56 100644
|
||||
index c9bc24da6e0bc26509685d8031ff2ccb2377f96a..8a4730fc49ac186cd98cb9f2c4433e45d6a3290d 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -85,6 +85,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -104,6 +104,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
@@ -119,7 +119,7 @@ index 532ecdc0a9b386eb9ea04a480b18aeb1ac32a059..b3ad0f42ab9c2f513d8c4a06683d1af6
|
||||
mojom::OriginPolicyManager* origin_policy_manager);
|
||||
~URLLoader() override;
|
||||
|
||||
@@ -384,6 +385,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -407,6 +408,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
base::Optional<base::UnguessableToken> fetch_window_id_;
|
||||
|
||||
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
|
||||
|
||||
@@ -14,10 +14,10 @@ when there is code doing that.
|
||||
This patch reverts the change to fix the crash in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 28d4c323a1c94ad61f83d4d9cc37863801f02276..85cb2f33afff53c8e524b04e398241928acf8305 100644
|
||||
index ec7a282e9d254141c298d78e6237403ec24ec058..2514b82ca59c3d39d6dc1f5bfe7903184174292c 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -357,10 +357,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -364,10 +364,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
CHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -28,7 +28,7 @@ index 28d4c323a1c94ad61f83d4d9cc37863801f02276..85cb2f33afff53c8e524b04e39824192
|
||||
if (!Client())
|
||||
return;
|
||||
|
||||
@@ -378,6 +374,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -385,6 +381,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
// Notify ScriptController that the frame is closing, since its cleanup ends
|
||||
// up calling back to LocalFrameClient via WindowProxy.
|
||||
GetScriptController().ClearForClose();
|
||||
|
||||
@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
|
||||
otherwise not available in the Blink API.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index 6f52b7e81585ad04ed8c14331aa07654354de386..812e555b9df7d39977798997f7517b1eb0467393 100644
|
||||
index d4482dae09bc9fef32d081be949f0566e562f005..d8f7f59fe3fff4e044f9238d1b69856b0accecc3 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -333,6 +333,9 @@ class WebLocalFrame : public WebFrame {
|
||||
@@ -328,6 +328,9 @@ class WebLocalFrame : public WebFrame {
|
||||
// be calling this API.
|
||||
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
|
||||
|
||||
@@ -21,10 +21,10 @@ index 6f52b7e81585ad04ed8c14331aa07654354de386..812e555b9df7d39977798997f7517b1e
|
||||
// that the script evaluated to with callback. Script execution can be
|
||||
// suspend.
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index e3dc69f4df92cc731c93373fa2579a3eb58ae2bc..be9626f3c594aef8fa9b9fa09b7e65716afcd5fd 100644
|
||||
index 9035dffc460acd9d0a556a53e859f8c7a5ae0184..f48c5103a3fefa856a43c7b028d05ec8c2258fa5 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -943,6 +943,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
@@ -945,6 +945,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ index e3dc69f4df92cc731c93373fa2579a3eb58ae2bc..be9626f3c594aef8fa9b9fa09b7e6571
|
||||
return BindingSecurity::ShouldAllowAccessToFrame(
|
||||
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index 26184ae197e935335420bb85f639f3cf1c8f8020..ff05a80f48533b3c1ec4f934bc4788663f9fef09 100644
|
||||
index 2315b8ef3123abeda0d3638bd541fbec7f5964c2..3067597161194324723ec5c07f74cd51e5c027a6 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -165,6 +165,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -162,6 +162,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
int argc,
|
||||
v8::Local<v8::Value> argv[]) override;
|
||||
v8::Local<v8::Context> MainWorldScriptContext() const override;
|
||||
|
||||
@@ -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 bf408c6bff28f05b91dae284565e6f4ecf2b03d1..6bbf011aad1a6fc20ea5c3f0adee9e6b2f11d707 100644
|
||||
index b447973cdd4c95a4b1468224151dd18c624a74be..46d33f5d0449fd51a8d7cf17cec334bc80c23442 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 49587997fa1ebe73dd00e96c95ae0448fcc7fa62..7e203486c32617e325c8aa6305c4ee57c93540f7 100644
|
||||
index a6da1d84ee4c103411392bc151dfb48516118c97..96d597c7d63763ba5fda4d44581af81b7cf4d3d9 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -4487,6 +4487,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -4544,6 +4544,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 49587997fa1ebe73dd00e96c95ae0448fcc7fa62..7e203486c32617e325c8aa6305c4ee57
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index abd2be4bc8e81a28209aa551f4435b9e8d37a249..f33766c98e1a28c89fc41f9e5cfd098ca6bc6150 100644
|
||||
index e3a4ac61e468fa6458d80065635519816cb6ed97..6350a93e0e047499f067e2cc36a15757c736fa95 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -305,6 +305,10 @@ struct CreateNewWindowParams {
|
||||
@@ -296,6 +296,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// The window features to use for the new window.
|
||||
blink.mojom.WindowFeatures features;
|
||||
@@ -36,10 +36,10 @@ index abd2be4bc8e81a28209aa551f4435b9e8d37a249..f33766c98e1a28c89fc41f9e5cfd098c
|
||||
|
||||
// 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 bcdc73fdf89d46e267f0c9568e46172ec89f9f23..930e043a0fdf40ef0e48a19597da567c8603878c 100644
|
||||
index aceb1814fced09e3a93464f48a8c16446c589360..a7000c7ee15c5c988bff448e1d762d91cd6f5141 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -505,6 +505,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -513,6 +513,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -49,10 +49,10 @@ index bcdc73fdf89d46e267f0c9568e46172ec89f9f23..930e043a0fdf40ef0e48a19597da567c
|
||||
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 51f31b2c7e431004f2f1bf54e043ed497d166d4f..f9601b5813746ce930bb7082178e1f826aaeb62e 100644
|
||||
index ffc0526baef9127d34852649e80b4fd8c0d84ef8..cfb548239a9bd4582344cc332ca4c253628d7438 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -146,6 +146,7 @@ class NetworkService;
|
||||
@@ -142,6 +142,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -60,7 +60,7 @@ index 51f31b2c7e431004f2f1bf54e043ed497d166d4f..f9601b5813746ce930bb7082178e1f82
|
||||
} // namespace network
|
||||
|
||||
namespace rappor {
|
||||
@@ -831,6 +832,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -829,6 +830,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -70,7 +70,7 @@ index 51f31b2c7e431004f2f1bf54e043ed497d166d4f..f9601b5813746ce930bb7082178e1f82
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index bd44565e78aaa70e9402312830d30c4a908ede11..463906df3f761bb321c8580185c5e12dceb96854 100644
|
||||
index 4ff7f7b2640fab10267079f01d910113c0558f13..cc33b1b54e812e0284b4c66b228b3a0a8b88e85f 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -69,6 +69,7 @@
|
||||
@@ -81,7 +81,7 @@ index bd44565e78aaa70e9402312830d30c4a908ede11..463906df3f761bb321c8580185c5e12d
|
||||
#include "content/renderer/media/audio/audio_device_factory.h"
|
||||
#include "content/renderer/render_frame_impl.h"
|
||||
#include "content/renderer/render_frame_proxy.h"
|
||||
@@ -1276,6 +1277,8 @@ WebView* RenderViewImpl::CreateView(
|
||||
@@ -1267,6 +1268,8 @@ WebView* RenderViewImpl::CreateView(
|
||||
}
|
||||
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
|
||||
|
||||
@@ -91,10 +91,10 @@ index bd44565e78aaa70e9402312830d30c4a908ede11..463906df3f761bb321c8580185c5e12d
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
|
||||
index 62e1749ae329791ed31374b255958bfc971599ab..64285a53a4baa65216f58412909202ce085fca12 100644
|
||||
index 6692dd42929f56455e11e7784e2e89c6a22a11ce..bede71b49dd6ea9c0381f895a72dcd076c5de9b1 100644
|
||||
--- a/content/shell/browser/web_test/web_test_content_browser_client.cc
|
||||
+++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
|
||||
@@ -326,6 +326,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -339,6 +339,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -104,10 +104,10 @@ index 62e1749ae329791ed31374b255958bfc971599ab..64285a53a4baa65216f58412909202ce
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
|
||||
index 5f985e2f11ebef42ed676260297e5e699096ba4a..2f3e68199f50b0e85dbb0d5cb95388279a194028 100644
|
||||
index 09924087558f172f481a0e10c0c000f8aec4678a..c00b88ce7c9e0f3f04ee2e6442d5ee987cab9667 100644
|
||||
--- a/content/shell/browser/web_test/web_test_content_browser_client.h
|
||||
+++ b/content/shell/browser/web_test/web_test_content_browser_client.h
|
||||
@@ -66,6 +66,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -67,6 +67,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
||||
@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
|
||||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index d730660c086f..ba9b098d848e 100644
|
||||
index a941c98c6c17af9e025902f31332a612eada9f6b..4087d4156b51d72d646e1a6ae9fac8e31d6f36f1 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -5049,6 +5049,7 @@ jumbo_split_static_library("browser") {
|
||||
@@ -5247,6 +5247,7 @@ jumbo_static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
@@ -32,7 +32,7 @@ index 48ac0a24efde0cb7d3ba71c8b8bdf5178f606e80..e2beefc276098fdc8f1cdab2e0edb8fa
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
|
||||
index f28230ea94fe..c10eea103852 100644
|
||||
index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20a38bf187 100644
|
||||
--- a/components/language/core/browser/BUILD.gn
|
||||
+++ b/components/language/core/browser/BUILD.gn
|
||||
@@ -31,6 +31,7 @@ static_library("browser") {
|
||||
|
||||
@@ -41,10 +41,10 @@ index c5125495b4d178ffb18be4d2d9670f7556412cbd..cddb321abb938c667a4a2089f87eab99
|
||||
// Create an observer that registers a hot key for |accelerator|.
|
||||
std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener_x11.cc b/chrome/browser/extensions/global_shortcut_listener_x11.cc
|
||||
index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e48792cc4159 100644
|
||||
index 9b6bba3ed87cae8ecc4288d01e5e7a3f74f71510..a4e4a5d6f1096754bf20c3438f47ebe60147f184 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener_x11.cc
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener_x11.cc
|
||||
@@ -38,6 +38,7 @@ int GetNativeModifiers(const ui::Accelerator& accelerator) {
|
||||
@@ -39,6 +39,7 @@ int GetNativeModifiers(const ui::Accelerator& accelerator) {
|
||||
modifiers |= accelerator.IsShiftDown() ? ShiftMask : 0;
|
||||
modifiers |= accelerator.IsCtrlDown() ? ControlMask : 0;
|
||||
modifiers |= accelerator.IsAltDown() ? Mod1Mask : 0;
|
||||
@@ -52,15 +52,6 @@ index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e487
|
||||
|
||||
return modifiers;
|
||||
}
|
||||
@@ -151,6 +152,8 @@ void GlobalShortcutListenerX11::OnXKeyPressEvent(::XEvent* x_event) {
|
||||
modifiers |= (x_event->xkey.state & ShiftMask) ? ui::EF_SHIFT_DOWN : 0;
|
||||
modifiers |= (x_event->xkey.state & ControlMask) ? ui::EF_CONTROL_DOWN : 0;
|
||||
modifiers |= (x_event->xkey.state & Mod1Mask) ? ui::EF_ALT_DOWN : 0;
|
||||
+ // For Windows key
|
||||
+ modifiers |= (x_event->xkey.state & Mod4Mask) ? ui::EF_COMMAND_DOWN: 0;
|
||||
|
||||
ui::Accelerator accelerator(
|
||||
ui::KeyboardCodeFromXKeyEvent(x_event), modifiers);
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
|
||||
index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc7951d372 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.cc
|
||||
|
||||
@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
|
||||
in atom::CommonWebContentsDelegate::ResetManageWebContents.
|
||||
|
||||
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
||||
index 00d50221bbb63070be48e2493e766242b76724c8..ce20a8dc5135a9b9b6565ac3f1daf0cbeb2df185 100644
|
||||
index ce2ce3e4bd62e4d0bebf50293f7af28ba6103f58..fa2874db541bb9d532906908d95bc9ab74e44c1d 100644
|
||||
--- a/content/browser/browser_main_loop.cc
|
||||
+++ b/content/browser/browser_main_loop.cc
|
||||
@@ -1504,7 +1504,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
@@ -1507,7 +1507,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
NOTREACHED();
|
||||
#else
|
||||
base::RunLoop run_loop;
|
||||
|
||||
@@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the
|
||||
failing checks and allow the rest of the target to have them enabled.
|
||||
|
||||
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
index 1bb7007c16029db901514e79171952d07b47058e..5f5e887f85abc5c4f948de034feb4482571144fc 100644
|
||||
index deb02fbfd0732978ef82cd389559d29be1d562b1..37207b205dbc8308b0d92cbcf0e3861dc397ed93 100644
|
||||
--- a/content/browser/frame_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
@@ -1250,8 +1250,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -46,20 +46,20 @@ index 1bb7007c16029db901514e79171952d07b47058e..5f5e887f85abc5c4f948de034feb4482
|
||||
// navigation. Now we know that the renderer has updated its state accordingly
|
||||
// and it is safe to also clear the browser side history.
|
||||
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
||||
index 1308bcb042b38d502b1b65b04affabf7e09d6fcd..52c9da3ea565d131ea8704f34f743f6661d42e84 100644
|
||||
index 23681d4192ac329a68822dbcdb06369f34e5e28a..ecb4cd19c364285044da60830fb1b4d4f52204f3 100644
|
||||
--- a/ui/base/clipboard/clipboard_win.cc
|
||||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -768,10 +768,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
||||
}
|
||||
@@ -767,10 +767,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
||||
|
||||
void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
|
||||
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
|
||||
UINT cf_format = format.ToFormatEtc().cfFormat;
|
||||
- DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
||||
+ //DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
||||
if (handle && !::SetClipboardData(format, handle)) {
|
||||
if (handle && !::SetClipboardData(cf_format, handle)) {
|
||||
- DCHECK_NE(GetLastError(),
|
||||
- static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
||||
+ //DCHECK_NE(GetLastError(),
|
||||
+ // static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
||||
FreeData(format, handle);
|
||||
FreeData(cf_format, handle);
|
||||
}
|
||||
}
|
||||
|
||||
109
patches/chromium/delay_lock_the_protocol_scheme_registry.patch
Normal file
109
patches/chromium/delay_lock_the_protocol_scheme_registry.patch
Normal file
@@ -0,0 +1,109 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Locascio <andy@slack-corp.com>
|
||||
Date: Tue, 18 Feb 2020 14:35:04 -0800
|
||||
Subject: content: allow embedder to prevent locking scheme registry
|
||||
|
||||
The //content layer requires all schemes to be registered during startup,
|
||||
because Add*Scheme aren't threadsafe. However, Electron exposes the option to
|
||||
register additional schemes via JavaScript in the main process before the app
|
||||
is ready, but after the //content layer has already locked the registry.
|
||||
|
||||
This allows embedders to optionally keep the scheme registry unlocked, and it
|
||||
is their responsibility to ensure that it is not accessed in a way that would
|
||||
cause potential thread-safety issues.
|
||||
|
||||
Previously upstreamed patch: https://chromium-review.googlesource.com/c/chromium/src/+/1637040
|
||||
|
||||
This change was lost during upstream refactor in
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
|
||||
re-submitting the patch.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index aa6244ed2a389625731d68c328e2e3f37aaf9095..8bba34a9783ec5a1bfae7ad0d15745c32ed3d8d1 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -668,7 +668,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
- RegisterContentSchemes();
|
||||
+ RegisterContentSchemes(delegate_->ShouldLockSchemeRegistry());
|
||||
ContentClientInitializer::Set(process_type, delegate_);
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
|
||||
index 686c7157e5db3530fc2ea9ad682808c07b421288..8c7bef1e015236afae91a7a808f82861a60390e1 100644
|
||||
--- a/content/common/url_schemes.cc
|
||||
+++ b/content/common/url_schemes.cc
|
||||
@@ -49,7 +49,7 @@ std::vector<std::string>& GetMutableServiceWorkerSchemes() {
|
||||
|
||||
} // namespace
|
||||
|
||||
-void RegisterContentSchemes() {
|
||||
+void RegisterContentSchemes(bool should_lock_registry) {
|
||||
// On Android and in tests, schemes may have been registered already.
|
||||
if (g_registered_url_schemes)
|
||||
return;
|
||||
@@ -103,7 +103,8 @@ void RegisterContentSchemes() {
|
||||
// threadsafe so must be called when GURL isn't used on any other thread. This
|
||||
// is really easy to mess up, so we say that all calls to Add*Scheme in Chrome
|
||||
// must be inside this function.
|
||||
- url::LockSchemeRegistries();
|
||||
+ if (should_lock_registry)
|
||||
+ url::LockSchemeRegistries();
|
||||
|
||||
// Combine the default savable schemes with the additional ones given.
|
||||
GetMutableSavableSchemes().assign(std::begin(kDefaultSavableSchemes),
|
||||
diff --git a/content/common/url_schemes.h b/content/common/url_schemes.h
|
||||
index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f889977bee 100644
|
||||
--- a/content/common/url_schemes.h
|
||||
+++ b/content/common/url_schemes.h
|
||||
@@ -16,7 +16,7 @@ namespace content {
|
||||
// parsed as "standard" or "referrer" with the src/url/ library, then locks the
|
||||
// sets of schemes down. The embedder can add additional schemes by
|
||||
// overriding the ContentClient::AddAdditionalSchemes method.
|
||||
-CONTENT_EXPORT void RegisterContentSchemes();
|
||||
+CONTENT_EXPORT void RegisterContentSchemes(bool should_lock_registry = true);
|
||||
|
||||
// Re-initializes schemes for tests.
|
||||
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
|
||||
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
|
||||
index af1200a0f2e04c1582e527b609a2e89a97bb0f4c..7ab4cd4a1d8aefcb4bd90d68870f02f3edcff5a7 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -40,6 +40,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+bool ContentMainDelegate::ShouldLockSchemeRegistry() {
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
service_manager::ProcessType ContentMainDelegate::OverrideProcessType() {
|
||||
return service_manager::ProcessType::kDefault;
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index f8590642a8d6807a15746e9e7673b5e76cbe0e14..7d8df731b6dd18a42ec4fc2b1bb08a6198da8ff8 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -77,6 +77,20 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
// returning initialization error code. Default behavior is CHECK(false).
|
||||
virtual int TerminateForFatalInitializationError();
|
||||
|
||||
+ // Allows the embedder to prevent locking the scheme registry. The scheme
|
||||
+ // registry is the list of URL schemes we recognize, with some additional
|
||||
+ // information about each scheme such as whether it expects a host. The
|
||||
+ // scheme registry is not thread-safe, so by default it is locked before any
|
||||
+ // threads are created to ensure single-threaded access. An embedder can
|
||||
+ // override this to prevent the scheme registry from being locked during
|
||||
+ // startup, but if they do so then they are responsible for making sure that
|
||||
+ // the registry is only accessed in a thread-safe way, and for calling
|
||||
+ // url::LockSchemeRegistries() when initialization is complete. If possible,
|
||||
+ // prefer registering additional schemes through
|
||||
+ // ContentClient::AddAdditionalSchemes over preventing the scheme registry
|
||||
+ // from being locked.
|
||||
+ virtual bool ShouldLockSchemeRegistry();
|
||||
+
|
||||
// Overrides the Service Manager process type to use for the currently running
|
||||
// process.
|
||||
virtual service_manager::ProcessType OverrideProcessType();
|
||||
@@ -19,28 +19,11 @@ This can be removed once web content (including WebGL) learn how
|
||||
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 4691cedce6d16b5ffcbed995bc2a4a49dda2556b..7c95c65dbb7067524f8696ea4d86e27dacc815cb 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1814,6 +1814,12 @@ const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpace() const {
|
||||
|
||||
const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpaceAndId(
|
||||
int* id) const {
|
||||
+ if (!settings_.enable_color_correct_rendering) {
|
||||
+ static gfx::ColorSpace invalid_color_space;
|
||||
+ *id = -1;
|
||||
+ return invalid_color_space;
|
||||
+ }
|
||||
+
|
||||
const gfx::ColorSpace* result = nullptr;
|
||||
// The pending tree will have the most recently updated color space, so
|
||||
// prefer that.
|
||||
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
|
||||
index 161ce54e75c0047797e9d0db27aafc3d0bfe7140..61838deb281cc11db50d195cf960970ee9cdac89 100644
|
||||
index 799ea55b4d74fa5b86034e0dc63e0ab81e7f47fb..9960298ea2306db6482f610c2f5fdb2977dc232b 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -100,6 +100,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
bool use_rgba_4444 = false;
|
||||
bool unpremultiply_and_dither_low_bit_depth_tiles = false;
|
||||
|
||||
@@ -50,7 +33,7 @@ index 161ce54e75c0047797e9d0db27aafc3d0bfe7140..61838deb281cc11db50d195cf960970e
|
||||
// Image Decode Service and raster tiles without images until the decode is
|
||||
// ready.
|
||||
diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
|
||||
index 389f2ed29bd85c35b38df92346a8d6c76ce22fd6..02cf492fa4068d10c4b8b2addee8102b35aac3e0 100644
|
||||
index f4d5e4daf5db36da88e5dfabc698a51a32d55010..33ecf4ac5792b38d5d2b5e4a81dd79478c562e24 100644
|
||||
--- a/components/viz/common/display/renderer_settings.h
|
||||
+++ b/components/viz/common/display/renderer_settings.h
|
||||
@@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
|
||||
@@ -83,7 +66,7 @@ index cb69e08c0185f55497089505ed5b226e57140321..362f28accc248248f3bcb54955c23528
|
||||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
#if defined(OS_MACOSX)
|
||||
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
|
||||
index be727deec562337330e29570cfc232d57cc69a83..fee41b66cf4b3b14c6f5b1b7278c9070ac6f80fa 100644
|
||||
index a89c6e85d86dd035e834c9ff4be3387024082815..a89a1b393ea95dea52b5c78c0b0be075a80a0118 100644
|
||||
--- a/components/viz/service/display/gl_renderer.cc
|
||||
+++ b/components/viz/service/display/gl_renderer.cc
|
||||
@@ -84,6 +84,9 @@
|
||||
@@ -101,10 +84,10 @@ index be727deec562337330e29570cfc232d57cc69a83..fee41b66cf4b3b14c6f5b1b7278c9070
|
||||
SetBlendEnabled(quad->ShouldDrawWithBlending());
|
||||
|
||||
- SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(),
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- CurrentRenderPassColorSpace());
|
||||
+ SetUseProgram(ProgramKey::DebugBorder(),
|
||||
+ PATCH_CS(gfx::ColorSpace::CreateSRGB()),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
// Use the full quad_rect for debug quads to not move the edges based on
|
||||
// partial swaps.
|
||||
@@ -118,71 +101,67 @@ index be727deec562337330e29570cfc232d57cc69a83..fee41b66cf4b3b14c6f5b1b7278c9070
|
||||
}
|
||||
|
||||
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
|
||||
@@ -1979,8 +1984,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
@@ -1979,7 +1984,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
- quad_color_space,
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- quad_color_space, CurrentRenderPassColorSpace());
|
||||
+ PATCH_CS(quad_color_space),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
SetShaderColor(color, opacity);
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
SetShaderRoundedCorner(
|
||||
@@ -2135,8 +2140,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2134,7 +2140,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
: NON_PREMULTIPLIED_ALPHA,
|
||||
false, false, tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
- quad_resource_lock.color_space(),
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- quad_resource_lock.color_space(), CurrentRenderPassColorSpace());
|
||||
+ PATCH_CS(quad_resource_lock.color_space()),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2232,8 +2237,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2230,7 +2237,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
- quad_resource_lock.color_space(),
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- quad_resource_lock.color_space(), CurrentRenderPassColorSpace());
|
||||
+ PATCH_CS(quad_resource_lock.color_space()),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2336,7 +2341,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
@@ -2332,7 +2340,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
// The source color space should never be RGB.
|
||||
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
|
||||
|
||||
gfx::ColorSpace dst_color_space =
|
||||
- current_frame()->current_render_pass->color_space;
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space);
|
||||
- gfx::ColorSpace dst_color_space = CurrentRenderPassColorSpace();
|
||||
+ gfx::ColorSpace dst_color_space = PATCH_CS(CurrentRenderPassColorSpace());
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Force sRGB output on Windows for overlay candidate video quads to match
|
||||
@@ -2499,8 +2504,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
@@ -2496,7 +2504,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
|
||||
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
- lock.color_space(),
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- lock.color_space(), CurrentRenderPassColorSpace());
|
||||
+ PATCH_CS(lock.color_space()),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
|
||||
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
|
||||
@@ -2562,8 +2567,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
@@ -2561,8 +2570,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
|
||||
|
||||
// Bind the program to the GL state.
|
||||
- SetUseProgram(draw_cache_.program_key, locked_quad.color_space(),
|
||||
- current_frame()->current_render_pass->color_space);
|
||||
- CurrentRenderPassColorSpace());
|
||||
+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()),
|
||||
+ PATCH_CS(current_frame()->current_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
SetShaderRoundedCorner(
|
||||
@@ -3300,7 +3305,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
|
||||
@@ -3299,7 +3308,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
|
||||
void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
const gfx::ColorSpace& src_color_space,
|
||||
const gfx::ColorSpace& dst_color_space) {
|
||||
@@ -193,37 +172,41 @@ index be727deec562337330e29570cfc232d57cc69a83..fee41b66cf4b3b14c6f5b1b7278c9070
|
||||
|
||||
// If the input color space is PQ, and it did not specify a white level,
|
||||
// override it with the frame's white level.
|
||||
@@ -3683,7 +3690,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
@@ -3681,9 +3692,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
|
||||
}
|
||||
|
||||
*overlay_texture = FindOrCreateOverlayTexture(
|
||||
params.quad->render_pass_id, iosurface_width, iosurface_height,
|
||||
- current_frame()->root_render_pass->color_space);
|
||||
+ PATCH_CS(current_frame()->root_render_pass->color_space));
|
||||
- *overlay_texture =
|
||||
- FindOrCreateOverlayTexture(params.quad->render_pass_id, iosurface_width,
|
||||
- iosurface_height, RootRenderPassColorSpace());
|
||||
+ *overlay_texture = FindOrCreateOverlayTexture(
|
||||
+ params.quad->render_pass_id, iosurface_width, iosurface_height,
|
||||
+ PATCH_CS(RootRenderPassColorSpace()));
|
||||
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
|
||||
gfx::SizeF((*overlay_texture)->texture.size()));
|
||||
|
||||
@@ -3902,8 +3909,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
@@ -3902,8 +3913,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
|
||||
PrepareGeometry(SHARED_BINDING);
|
||||
|
||||
- SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(),
|
||||
- current_frame()->root_render_pass->color_space);
|
||||
- CurrentRenderPassColorSpace());
|
||||
+ SetUseProgram(ProgramKey::DebugBorder(), PATCH_CS(gfx::ColorSpace::CreateSRGB()),
|
||||
+ PATCH_CS(current_frame()->root_render_pass->color_space));
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()));
|
||||
|
||||
gfx::Transform render_matrix;
|
||||
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
|
||||
@@ -4012,3 +4019,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
|
||||
@@ -4012,3 +4023,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
|
||||
}
|
||||
|
||||
} // namespace viz
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 34510d80f708b2e61dac8605526d7b34c484a962..3ba61b3c1fbec6e9d5d9fe62704f6a9d05c4cbdd 100644
|
||||
index fcca8876d3d2ac935dd02303319b070ff6c6e099..97a21a042e2e9f2ad78ea97999de5ad1de1a5cca 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -221,6 +221,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -209,6 +209,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -232,7 +215,7 @@ index 34510d80f708b2e61dac8605526d7b34c484a962..3ba61b3c1fbec6e9d5d9fe62704f6a9d
|
||||
service_manager::switches::kGpuSandboxAllowSysVShm,
|
||||
service_manager::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 89fa83bbda39e90c1fcd6df83cd248c1f2de7195..8d69e9a2f2ee1ea7e639c1bfcdf42eb89a4099ff 100644
|
||||
index 8205a898bc368543ffe150a641c9f04c137fc072..9aa8cb0bb65af9c506e928fdcd5b3e26c220f6a2 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -228,6 +228,7 @@
|
||||
@@ -243,7 +226,7 @@ index 89fa83bbda39e90c1fcd6df83cd248c1f2de7195..8d69e9a2f2ee1ea7e639c1bfcdf42eb8
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3083,6 +3084,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3149,6 +3150,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[] = {
|
||||
@@ -252,10 +235,10 @@ index 89fa83bbda39e90c1fcd6df83cd248c1f2de7195..8d69e9a2f2ee1ea7e639c1bfcdf42eb8
|
||||
service_manager::switches::kDisableInProcessStackTraces,
|
||||
service_manager::switches::kDisableSeccompFilterSandbox,
|
||||
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
||||
index bef9630bc7a15b9b8fcebd064d4cea013e6adc4d..c376dab8247eb8352f045dbcd1b8d01a6571aaa3 100644
|
||||
index 13affc02e2bde412faa258ea872640219ad0eddd..98ff1d26d92c03c83c0f8cae29c217d95e7102ee 100644
|
||||
--- a/content/renderer/render_widget.cc
|
||||
+++ b/content/renderer/render_widget.cc
|
||||
@@ -2853,6 +2853,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
|
||||
@@ -2806,6 +2806,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
|
||||
@@ -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 954011b5d5623ddb24971e8797d3ba9c957b2e94..8e095e6cbc3408c8b884ea0cecb5f869c7b83ffd 100644
|
||||
index e2160f13472a287435574edca789ead1d77bfc04..a2d741641a7a716b28975edce02753312a364de7 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -613,6 +613,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
|
||||
See https://github.com/electron/electron/issues/10754
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
|
||||
index f7a30a0bd0d37b0a23ae441794f5a968e45dc3d9..74e1143f30411106b598fb7bd12f618fd439b041 100644
|
||||
index 2dfa801e802a12b23dd0e37aab037a5c4e2ac819..2091d773d2122a8282c779624a87d600fd079fd1 100644
|
||||
--- a/third_party/blink/renderer/core/dom/document.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/document.cc
|
||||
@@ -3896,7 +3896,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
|
||||
@@ -4027,7 +4027,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
|
||||
"frame that never had a user gesture since its load. "
|
||||
"https://www.chromestatus.com/feature/5082396709879808";
|
||||
Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);
|
||||
|
||||
@@ -32,10 +32,10 @@ index 3fd108c89c3b070a08790850db4dfd6cc8a3ce44..c393f51709efd8b28b07edfe452d2b84
|
||||
|
||||
} // namespace storage
|
||||
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
||||
index 1f1b2c6fa109aa52c4e7c7f5fcaac91beb538449..d8f15eed9be83340ffd1f2400df08558e9554710 100644
|
||||
index c9f9124eb6f4900988ad63fa38a03b7b6c5d1abb..9cba4e5af9a624d358697d806f151ee3998f0b58 100644
|
||||
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
||||
+++ b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
||||
@@ -40,7 +40,8 @@ interface StorageAreaGetAllCallback {
|
||||
@@ -50,7 +50,8 @@ struct KeyValue {
|
||||
interface StorageArea {
|
||||
// The quota for each storage area.
|
||||
// This value is enforced in renderer processes and the browser process.
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
|
||||
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 7e7e50880804583acf75206d3f5f1c6f4c3b158d..3e69113249366e4bb6e62a9fe7085f608dd59755 100644
|
||||
index 1e73a5c4eb015bcbfacb4f7ae0a36f3855f320a6..0b8cc7a550422445e4c07800682b5f60277a39d2 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -991,6 +991,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -978,6 +978,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 7e7e50880804583acf75206d3f5f1c6f4c3b158d..3e69113249366e4bb6e62a9fe7085f60
|
||||
// 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 67f0e98426345beac34bfd41be384210be5911e4..b6fcd9920fcc047d58501dccc492bb0a118e654f 100644
|
||||
index 68a8a0e228103ea4e9fe58f416a53587b2d26f6e..7c3055e6250b693546c29ac315ce3f418ab478f8 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -234,6 +234,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -231,6 +231,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -63,10 +63,10 @@ index 67f0e98426345beac34bfd41be384210be5911e4..b6fcd9920fcc047d58501dccc492bb0a
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if defined(OS_CHROMEOS)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 6adfd8969148daba3f77aea4c5f89adec6338e6b..78fd4bd72b07f38b447840b584253883756fe021 100644
|
||||
index 4729cc2bc74d410100a0c1946b867cd5d8428d31..f6672a20f1eb0914b8e103ae38079e9e0e6bfbdc 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -984,6 +984,9 @@ interface NetworkContext {
|
||||
@@ -1001,6 +1001,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ index c20f1455d9d81e6780deecdebfb1f1b4e125db66..8a933b20b4d5ca8c2c55c881e95695d8
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 782dd1d122bfab4990c924a7fb0e7276fb51b18b..8ff66638296fefd66443ea83436258b07235aded 100644
|
||||
index 20df4f2086bcc5aa572115ab32ac22348c196c03..f1e66535d690e9bb905058f58e7ccda0a5262335 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -449,6 +449,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -455,6 +455,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
ColorId color_id,
|
||||
ColorScheme color_scheme = ColorScheme::kDefault) const = 0;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 782dd1d122bfab4990c924a7fb0e7276fb51b18b..8ff66638296fefd66443ea83436258b0
|
||||
// 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
|
||||
@@ -573,6 +589,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -579,6 +595,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
PreferredColorScheme preferred_color_scheme_ =
|
||||
PreferredColorScheme::kNoPreference;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: 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 26df70e508cd60ddc96d668697e76542a7f1cd2c..dd3eb6426bdeeb641f551be6f92665589823e597 100644
|
||||
index 660ed00ae8a22287b2dbe090374cdb032ba3e7eb..bdac4bd7dd6ff5fe5d6de6cd9f573d9a9f092f51 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -432,6 +432,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -33,7 +33,7 @@ index 2f666f75debc36767a9746bdfb2c99d7c8ee71a0..0ed154e56ad144750ecf0cc25118e00d
|
||||
void UpdateWebkitPreferences(const WebPreferences& prefs) override;
|
||||
void OnWebkitPreferencesChanged() override;
|
||||
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
|
||||
index 18d157538ec3cc6a6bfde3eda3873d61336ed649..54d7085355e42e5d7ced7262b6b6e91e19b24e9e 100644
|
||||
index 9dfdaf825b2288bc4975c898f331881263b80431..0057459007983424e08ffd7a5e8a4a87c8b7a9bf 100644
|
||||
--- a/content/common/view_messages.h
|
||||
+++ b/content/common/view_messages.h
|
||||
@@ -109,6 +109,9 @@ IPC_STRUCT_TRAITS_END()
|
||||
@@ -61,20 +61,20 @@ index 95679ab2915ad496ca0018aa13874b84eb11d7fd..c278e0fc072409677beafc7f252ebcf6
|
||||
//
|
||||
// Returns the current WebKit preferences. Note: WebPreferences is cached, so
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 463906df3f761bb321c8580185c5e12dceb96854..053abd33b8f73b0f12a7729b507914516dff584e 100644
|
||||
index cc33b1b54e812e0284b4c66b228b3a0a8b88e85f..5d5e06fc90bd09458054720b03436cae80111370 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -1192,6 +1192,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -1188,6 +1188,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
|
||||
+ IPC_MESSAGE_HANDLER(ViewMsg_SetSchedulerThrottling,
|
||||
+ OnSetSchedulerThrottling)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
|
||||
@@ -1748,6 +1750,12 @@ void RenderViewImpl::OnSetPageScale(float page_scale_factor) {
|
||||
webview()->SetPageScaleFactor(page_scale_factor);
|
||||
@@ -1733,6 +1735,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
|
||||
return send_content_state_immediately_;
|
||||
}
|
||||
|
||||
+void RenderViewImpl::OnSetSchedulerThrottling(bool allowed) {
|
||||
@@ -87,10 +87,10 @@ index 463906df3f761bb321c8580185c5e12dceb96854..053abd33b8f73b0f12a7729b50791451
|
||||
PageVisibilityState visibility_state,
|
||||
bool initial_setting) {
|
||||
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
|
||||
index edefd461a9d6b127886a2e84355a3a99e891ade7..af5fc0cc3334e66368c1780b4e79e923aeac1394 100644
|
||||
index 828303a718e17c98c4dfd6222a482c5d978b5762..3ccbbd3d012e065ab839c1a7ac2f1d2641e4dde6 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -440,6 +440,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
@@ -424,6 +424,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
void OnSetInitialFocus(bool reverse);
|
||||
void OnSetRendererPrefs(
|
||||
const blink::mojom::RendererPreferences& renderer_prefs);
|
||||
@@ -111,10 +111,10 @@ index a6d03eca18db4566002d71ec0b6aedae39a78be7..5eaf6fa6e7568d89d3051617f3ac99b3
|
||||
// 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 7f58ed742695387c9516dd5c5c3f195e66348cfc..0688b04bc98cecc7506aa69af6b1c2a355dddf62 100644
|
||||
index cee2e9a8c2d72ce27d3496023f102a231390cec5..bbe4ffef747c01d8fd2fe8722d068109355160b7 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3334,12 +3334,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3332,12 +3332,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -138,10 +138,10 @@ index 7f58ed742695387c9516dd5c5c3f195e66348cfc..0688b04bc98cecc7506aa69af6b1c2a3
|
||||
|
||||
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 710607bd9112b399e14826105e45f5bf93ab6524..dafc73dc85222298a3e027433939632f4fddb9c1 100644
|
||||
index 4cd0387325448e568de6baff3f8eae18498498ea..5a4a4dafc5ec2aa983f4501a203c9f2e5345600a 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -310,6 +310,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -313,6 +313,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -149,7 +149,7 @@ index 710607bd9112b399e14826105e45f5bf93ab6524..dafc73dc85222298a3e027433939632f
|
||||
void SetVisibilityState(PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
PageVisibilityState GetVisibilityState() override;
|
||||
@@ -680,6 +681,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -684,6 +685,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// WebViewImpl::Close while handling an input event.
|
||||
bool debug_inside_input_handling_ = false;
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
|
||||
to true as then Chromiums assumptions around processes become correct.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 70d735dcc38734edaaf6221cd40c49beb6d2e37e..9cd7368966c20b9e9306c41e455c002d686d3013 100644
|
||||
index 2cdc3785010b78d74bb980de9211622130a3c072..d45314c55e6b7a9412e2a7f07de33a16361a0338 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2347,11 +2347,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -2358,11 +2358,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
WebContentsImpl* outermost = GetOutermostWebContents();
|
||||
if (event.button == blink::WebPointerProperties::Button::kBack &&
|
||||
outermost->controller_.CanGoBack()) {
|
||||
|
||||
@@ -10,10 +10,10 @@ Should be removed once grit is fixed.
|
||||
Tracking bug: https://crbug.com/1040605
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 9def0bb9dda87c476fdf3b52ce4d4125f37c7f49..90c81d2a9711d88284d960149e25db55ae8dc1c2 100644
|
||||
index 9043b1e7a60282701ced0b9f36726a9b2b1adcd9..14c15ca63ec3d0d76f51dba18c149134ee5dde9a 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -573,15 +573,16 @@
|
||||
@@ -578,15 +578,16 @@
|
||||
"includes": [3840],
|
||||
},
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
|
||||
// another SiteInstance for the same site.
|
||||
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
|
||||
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
|
||||
index e911c3aa1cf13b17bd43ad8c9d50f0fd59996907..373e36eb61d57e1bcd98d45419ee4b434820bf02 100644
|
||||
index 50a2551342ad6a37f7ac7635f795b7e50d325a47..1c894fc4df54af4184074501ea56d422ce6327f6 100644
|
||||
--- a/content/browser/frame_host/navigation_request.cc
|
||||
+++ b/content/browser/frame_host/navigation_request.cc
|
||||
@@ -1185,6 +1185,24 @@ void NavigationRequest::BeginNavigation() {
|
||||
@@ -1223,6 +1223,24 @@ void NavigationRequest::BeginNavigation() {
|
||||
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationRequest", this,
|
||||
"ResponseStarted");
|
||||
|
||||
@@ -71,10 +71,10 @@ index e911c3aa1cf13b17bd43ad8c9d50f0fd59996907..373e36eb61d57e1bcd98d45419ee4b43
|
||||
render_frame_host_ =
|
||||
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
|
||||
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
index e41e833e963617cf5b2e463e839b2ae0bfd212ae..f544da86cb12d2786f7aad24953741ed77a0ac24 100644
|
||||
index ad629ffc0a855f70598d8f224f55588b3c42d59d..8658faff1c65a48a10e988a709949aba283375cc 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -2247,6 +2247,16 @@ bool RenderFrameHostManager::InitRenderView(
|
||||
@@ -2282,6 +2282,16 @@ bool RenderFrameHostManager::InitRenderView(
|
||||
scoped_refptr<SiteInstance>
|
||||
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
NavigationRequest* request) {
|
||||
@@ -91,7 +91,7 @@ index e41e833e963617cf5b2e463e839b2ae0bfd212ae..f544da86cb12d2786f7aad24953741ed
|
||||
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
|
||||
|
||||
// All children of MHTML documents must be MHTML documents. They all live in
|
||||
@@ -2266,10 +2276,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2301,10 +2311,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
//
|
||||
// TODO(clamy): We should also consider as a candidate SiteInstance the
|
||||
// speculative SiteInstance that was computed on redirects.
|
||||
@@ -156,21 +156,20 @@ index e41e833e963617cf5b2e463e839b2ae0bfd212ae..f544da86cb12d2786f7aad24953741ed
|
||||
|
||||
// Account for renderer-initiated reload as well.
|
||||
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
|
||||
@@ -2300,6 +2360,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->GetRestoreType() != RestoreType::NONE, request->is_view_source(),
|
||||
request->WasServerRedirect(), cross_origin_policy_swap);
|
||||
|
||||
@@ -2342,6 +2402,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->dest_site_instance() != dest_site_instance) {
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
+ GetContentClient()->browser()->RegisterPendingSiteInstance(
|
||||
+ render_frame_host_.get(), dest_site_instance.get());
|
||||
+
|
||||
|
||||
return dest_site_instance;
|
||||
}
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index eb20d84de260b35049cac72fdc8d0645688fdd9a..eb3106ece80f3b347b7b13efbd77b11a60e03169 100644
|
||||
index 9dbc9bb7114e1dea5e8a24395f39bd9d068eeb76..31bddf69f2e805451d42d1a284a53f41bdaa5650 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -427,6 +427,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
|
||||
@@ -426,6 +426,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
|
||||
return browsing_instance_->HasSiteInstance(url);
|
||||
}
|
||||
|
||||
@@ -194,10 +193,10 @@ index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369
|
||||
size_t GetRelatedActiveContentsCount() override;
|
||||
bool RequiresDedicatedProcess() override;
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 930e043a0fdf40ef0e48a19597da567c8603878c..b6ba4dfad79d6031efd725de795bf901bab1a06c 100644
|
||||
index a7000c7ee15c5c988bff448e1d762d91cd6f5141..a4ee01d118a7c4e4375bd42926a150553f3f1f92 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -50,6 +50,21 @@
|
||||
@@ -58,6 +58,21 @@
|
||||
|
||||
namespace content {
|
||||
|
||||
@@ -220,10 +219,10 @@ index 930e043a0fdf40ef0e48a19597da567c8603878c..b6ba4dfad79d6031efd725de795bf901
|
||||
const MainFunctionParams& parameters) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index f9601b5813746ce930bb7082178e1f826aaeb62e..f94bc9e640b54c6abf05bfe074ae0635d57470e8 100644
|
||||
index cfb548239a9bd4582344cc332ca4c253628d7438..8beaad24a22647a6a3f8b92e4343b55ec61e1ada 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -233,8 +233,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -231,8 +231,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
using IsClipboardPasteAllowedCallback =
|
||||
base::OnceCallback<void(ClipboardPasteAllowed)>;
|
||||
|
||||
|
||||
69
patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
Normal file
69
patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Deepak Mohan <hop2deep@gmail.com>
|
||||
Date: Fri, 28 Feb 2020 15:08:26 -0800
|
||||
Subject: gpu: notify when dxdiag request for gpu info fails
|
||||
|
||||
We rely on the signal OnGpuInfoUpdate to process gpu info.
|
||||
When Electron wants to collect the complete info in a single run
|
||||
it checks for the presence of dx_diagnostics attribute, as these
|
||||
are the only async calls that happens in the gpu process, but
|
||||
there are times when this call can fail due to crash or software
|
||||
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 bc006a1fe2f946b88f41a2cd7addbe7822f07b1e..5a7ef72f28761f185ca68e9f541079432fec6f65 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
@@ -140,6 +140,11 @@ bool GpuDataManagerImpl::Dx12VulkanRequested() const {
|
||||
base::AutoLock auto_lock(lock_);
|
||||
return private_->Dx12VulkanRequested();
|
||||
}
|
||||
+
|
||||
+bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const {
|
||||
+ base::AutoLock auto_lock(lock_);
|
||||
+ return private_->DxdiagDx12VulkanRequested();
|
||||
+}
|
||||
#endif
|
||||
|
||||
void GpuDataManagerImpl::UpdateGpuFeatureInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
index edb5af251fc305215c629c27c6536a01830ee857..42e5bdbba323dda8c3b301f2d2a49a86cf48121b 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
@@ -85,6 +85,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
void UpdateDxDiagNodeRequestStatus(bool request_continues);
|
||||
void UpdateDx12VulkanRequestStatus(bool request_continues);
|
||||
bool Dx12VulkanRequested() const;
|
||||
+ bool DxdiagDx12VulkanRequested() const;
|
||||
#endif
|
||||
// Update the GPU feature info. This updates the blacklist and enabled status
|
||||
// of GPU rasterization. In the future this will be used for more features.
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index e623685b9ab4b370ed5cfe25160b879a79c668cf..4185a4a63b3380d71a1af55793324ab06349055f 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -848,6 +848,11 @@ void GpuDataManagerImplPrivate::UpdateDx12VulkanRequestStatus(
|
||||
bool GpuDataManagerImplPrivate::Dx12VulkanRequested() const {
|
||||
return gpu_info_dx12_vulkan_requested_;
|
||||
}
|
||||
+
|
||||
+bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const {
|
||||
+ return !(gpu_info_dx12_vulkan_request_failed_ ||
|
||||
+ gpu_info_dx_diag_request_failed_);
|
||||
+}
|
||||
#endif
|
||||
|
||||
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
index 610f406e6fbeb1404f32c711dc2c53ae2fd3267c..40f2973613016f646a9f9468ad192fcb5f6fd0c7 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -72,6 +72,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
void UpdateDx12VulkanRequestStatus(bool request_continues);
|
||||
void UpdateDxDiagNodeRequestStatus(bool request_continues);
|
||||
bool Dx12VulkanRequested() const;
|
||||
+ bool DxdiagDx12VulkanRequested() const;
|
||||
#endif
|
||||
void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
|
||||
const base::Optional<gpu::GpuFeatureInfo>&
|
||||
@@ -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 cd531c9abd2da78f0edb718575ea219d8edd456e..9def0bb9dda87c476fdf3b52ce4d4125f37c7f49 100644
|
||||
index bd7bc70c20ec0876f7526c2d0c3cf72603a42864..9043b1e7a60282701ced0b9f36726a9b2b1adcd9 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -579,6 +579,11 @@
|
||||
@@ -584,6 +584,11 @@
|
||||
"includes": [3860],
|
||||
},
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ Subject: mas-cgdisplayusesforcetogray.patch
|
||||
Removes usage of the CGDisplayUsesForceToGray private API.
|
||||
|
||||
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
||||
index 43b5ae0c4fcbbaa3fc95ed15a9b02289e45c0cff..a743edce57b31b867afbc9676ac9c3e7475e5fe9 100644
|
||||
index 585d02bf08000834b941455d90d355de3f9e76a9..de80c433a2151890d50bf1248d0948fd9df1b436 100644
|
||||
--- a/ui/display/mac/screen_mac.mm
|
||||
+++ b/ui/display/mac/screen_mac.mm
|
||||
@@ -107,7 +107,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
|
||||
|
||||
display.set_color_depth(Display::kDefaultBitsPerPixel);
|
||||
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
|
||||
@@ -134,7 +134,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
|
||||
display.set_color_depth(Display::kDefaultBitsPerPixel);
|
||||
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
|
||||
}
|
||||
+#ifdef MAS_BUILD
|
||||
+ // This is equivalent to the CGDisplayUsesForceToGray() API as at 2018-08-06,
|
||||
+ // but avoids usage of the private API.
|
||||
|
||||
@@ -236,7 +236,7 @@ index 1c68117a8987463e810d0d1da5e7e598ce8fc3e1..ad29e87c00db0d34ee3a7d95469fb3fb
|
||||
// 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 d4209f169d3e468339371e661db6ae84ed20bbe3..7223e9c769904a0aa2ba082d99d597c775e66970 100644
|
||||
index 3bc6ab0565f83b6a8d2b4b94029de23e8fb8d162..99926aba86a07dd568a51eed24faac63ffd4d591 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -282,14 +282,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -262,7 +262,7 @@ index d4209f169d3e468339371e661db6ae84ed20bbe3..7223e9c769904a0aa2ba082d99d597c7
|
||||
}
|
||||
|
||||
remote_cocoa::mojom::NativeWidgetNSWindow*
|
||||
@@ -1133,6 +1141,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1122,6 +1130,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
|
||||
const std::vector<uint8_t>& window_token,
|
||||
const std::vector<uint8_t>& view_token) {
|
||||
@@ -270,7 +270,7 @@ index d4209f169d3e468339371e661db6ae84ed20bbe3..7223e9c769904a0aa2ba082d99d597c7
|
||||
remote_window_accessible_ =
|
||||
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
|
||||
remote_view_accessible_ =
|
||||
@@ -1140,14 +1149,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1129,14 +1138,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
|
||||
[remote_view_accessible_
|
||||
setTopLevelUIElement:remote_window_accessible_.get()];
|
||||
|
||||
@@ -16,8 +16,32 @@ could hit 60fps before will likely still be able to hit 60fps. There may even be
|
||||
cases where performance improves when disabling remote CoreAnimation (remote
|
||||
CoreAnimation is really only about battery usage).
|
||||
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
index a298747e3b755acd4f8d366d625142371ed1995e..9c9bdc53016637c6d6dbb27f3581b343ec96fb97 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "ui/gl/gl_surface_egl.h"
|
||||
#endif
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
@class CAContext;
|
||||
+#endif
|
||||
@class CALayer;
|
||||
|
||||
namespace ui {
|
||||
@@ -97,7 +99,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass,
|
||||
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
|
||||
|
||||
bool use_remote_layer_api_;
|
||||
+#ifndef MAS_BUILD
|
||||
base::scoped_nsobject<CAContext> ca_context_;
|
||||
+#endif
|
||||
std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;
|
||||
|
||||
gfx::Size pixel_size_;
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
index c1af03a268dc..b883883ad52b 100644
|
||||
index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c153b599c 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
@@ -63,6 +63,7 @@
|
||||
@@ -46,35 +70,11 @@ index c1af03a268dc..b883883ad52b 100644
|
||||
} else {
|
||||
IOSurfaceRef io_surface =
|
||||
ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
index f65ad035e90c..9edb62e713e8 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "ui/gl/gl_surface_egl.h"
|
||||
#endif
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
@class CAContext;
|
||||
+#endif
|
||||
@class CALayer;
|
||||
|
||||
namespace ui {
|
||||
@@ -97,7 +99,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass,
|
||||
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
|
||||
|
||||
bool use_remote_layer_api_;
|
||||
+#ifndef MAS_BUILD
|
||||
base::scoped_nsobject<CAContext> ca_context_;
|
||||
+#endif
|
||||
std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;
|
||||
|
||||
gfx::Size pixel_size_;
|
||||
diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
|
||||
index 60abe639bd9c..c38eed5fbdef 100644
|
||||
index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329fc8954826 100644
|
||||
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
|
||||
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
|
||||
@@ -98,6 +98,7 @@ - (void)setContentsChanged;
|
||||
@@ -97,6 +97,7 @@ - (void)setContentsChanged;
|
||||
}
|
||||
|
||||
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
|
||||
@@ -82,7 +82,7 @@ index 60abe639bd9c..c38eed5fbdef 100644
|
||||
// Early-out if the remote layer has not changed.
|
||||
if ([remote_layer_ contextId] == ca_context_id)
|
||||
return;
|
||||
@@ -122,6 +123,9 @@ - (void)setContentsChanged;
|
||||
@@ -121,6 +122,9 @@ - (void)setContentsChanged;
|
||||
[io_surface_layer_ removeFromSuperlayer];
|
||||
io_surface_layer_.reset();
|
||||
}
|
||||
@@ -93,7 +93,7 @@ index 60abe639bd9c..c38eed5fbdef 100644
|
||||
|
||||
void DisplayCALayerTree::GotIOSurfaceFrame(
|
||||
diff --git a/ui/base/cocoa/remote_layer_api.h b/ui/base/cocoa/remote_layer_api.h
|
||||
index 2057fe69d1bb..2aba330fc488 100644
|
||||
index 2057fe69d1bb4a2eb0b1dabc5473a30d676847fe..2aba330fc488660ef874caae26a06e6847cdaf93 100644
|
||||
--- a/ui/base/cocoa/remote_layer_api.h
|
||||
+++ b/ui/base/cocoa/remote_layer_api.h
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -114,7 +114,7 @@ index 2057fe69d1bb..2aba330fc488 100644
|
||||
|
||||
// This function will check if all of the interfaces listed above are supported
|
||||
diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm
|
||||
index bbaf9f466f49..8c846ce9523a 100644
|
||||
index bbaf9f466f4999acb5bfccf3b9565fd8f556ca2f..8c846ce9523a4b2f6fbdbdbeae4f94b45ac3c115 100644
|
||||
--- a/ui/base/cocoa/remote_layer_api.mm
|
||||
+++ b/ui/base/cocoa/remote_layer_api.mm
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
@@ -50,7 +50,7 @@ index 9cc52238971a095421c3cde01a5df24a2f6f92cd..0216501dda1dc8b8fb4307785a0dab86
|
||||
// is concerned.
|
||||
@property(nonatomic, readonly) NSString* subrole;
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e46166935012cad 100644
|
||||
index 24d34fbb830000cedb69c18f4a463d20811e4f6c..42923fcf189c6684bb25b4093b43fabc0818454f 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -206,6 +206,7 @@
|
||||
@@ -157,7 +157,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
|
||||
// Returns whether or not this node should be ignored in the
|
||||
// accessibility tree.
|
||||
@@ -2163,6 +2180,7 @@ - (NSArray*)selectedChildren {
|
||||
@@ -2167,6 +2184,7 @@ - (NSArray*)selectedChildren {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
- (NSString*)selectedText {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2174,11 +2192,13 @@ - (NSString*)selectedText {
|
||||
@@ -2178,11 +2196,13 @@ - (NSString*)selectedText {
|
||||
return nil;
|
||||
return base::SysUTF16ToNSString(range.GetText());
|
||||
}
|
||||
@@ -179,7 +179,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
- (NSValue*)selectedTextRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2199,12 +2219,15 @@ - (NSValue*)selectedTextRange {
|
||||
@@ -2203,12 +2223,15 @@ - (NSValue*)selectedTextRange {
|
||||
int selLength = range.GetText().length();
|
||||
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
||||
}
|
||||
@@ -195,7 +195,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
|
||||
- (NSValue*)size {
|
||||
if (![self instanceActive])
|
||||
@@ -2237,6 +2260,7 @@ - (NSString*)sortDirection {
|
||||
@@ -2241,6 +2264,7 @@ - (NSString*)sortDirection {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
// Returns a text marker that points to the first character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)startTextMarker {
|
||||
@@ -2247,6 +2271,7 @@ - (id)startTextMarker {
|
||||
@@ -2251,6 +2275,7 @@ - (id)startTextMarker {
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
|
||||
}
|
||||
@@ -211,7 +211,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
|
||||
// Returns a subrole based upon the role.
|
||||
- (NSString*)subrole {
|
||||
@@ -2554,11 +2579,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
@@ -2558,11 +2583,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
NSMutableAttributedString* attributedValue =
|
||||
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
|
||||
|
||||
@@ -225,7 +225,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
|
||||
return [attributedValue attributedSubstringFromRange:range];
|
||||
}
|
||||
@@ -2661,9 +2688,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -2665,9 +2692,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
return ToBrowserAccessibilityCocoa(cell);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
BrowserAccessibilityPositionInstance position =
|
||||
CreatePositionFromTextMarker(parameter);
|
||||
if (!position->IsNullPosition())
|
||||
@@ -2974,6 +3000,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -2978,6 +3004,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
|
||||
return CreateTextMarker(root->CreatePositionAt(index));
|
||||
}
|
||||
@@ -245,7 +245,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
|
||||
if ([attribute isEqualToString:
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
||||
@@ -3007,6 +3034,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -3011,6 +3038,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ index fed745716ad3d0d9152c20353372c34740c097e4..1381a64458dd37d07c72c3265e461669
|
||||
if ([attribute
|
||||
isEqualToString:
|
||||
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
||||
@@ -3121,6 +3149,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -3125,6 +3153,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
|
||||
return @(child->GetIndexInParent());
|
||||
}
|
||||
@@ -358,10 +358,10 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
|
||||
|
||||
void BluetoothAdapterMac::RemovePairingDelegateInternal(
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index 32c78e9f533782e1cfca44217a8a831959bba5e6..655bcfb43e49440ce341b11013d0620b8c2354ce 100644
|
||||
index de1318ef5912375496d8cb77178bdc8a870df66e..b92f823fd8a186b2278d2442bd6fe05ef5d3796b 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -171,6 +171,12 @@ source_set("audio") {
|
||||
@@ -173,6 +173,12 @@ source_set("audio") {
|
||||
"mac/scoped_audio_unit.cc",
|
||||
"mac/scoped_audio_unit.h",
|
||||
]
|
||||
|
||||
@@ -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 e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f4c3b158d 100644
|
||||
index ed92b3b4f19d49fd371c9a8bad7f2124174b1c67..1e73a5c4eb015bcbfacb4f7ae0a36f3855f320a6 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -95,6 +95,11 @@
|
||||
@@ -102,7 +102,7 @@ index e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -516,6 +594,13 @@ void NetworkContext::SetClient(
|
||||
@@ -497,6 +575,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ index e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -1661,6 +1746,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1646,6 +1731,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
|
||||
std::unique_ptr<net::CertVerifier> cert_verifier;
|
||||
@@ -124,7 +124,7 @@ index e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f
|
||||
if (g_cert_verifier_for_testing) {
|
||||
cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
|
||||
} else {
|
||||
@@ -1714,8 +1800,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1694,8 +1780,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
}
|
||||
#endif
|
||||
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
|
||||
@@ -135,7 +135,7 @@ index e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f
|
||||
std::make_unique<net::CoalescingCertVerifier>(
|
||||
std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
params_->use_builtin_cert_verifier
|
||||
@@ -1725,12 +1811,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1705,12 +1791,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
cert_net_fetcher_))));
|
||||
}
|
||||
#endif
|
||||
@@ -160,10 +160,10 @@ index e5dfb9c6fd2032608ac32cd997fb027fd9b324e5..7e7e50880804583acf75206d3f5f1c6f
|
||||
std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
|
||||
std::make_unique<NetworkServiceNetworkDelegate>(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 23a5fe596b2607fa2b95f601cb621e4e11f81d50..67f0e98426345beac34bfd41be384210be5911e4 100644
|
||||
index 5b6b6fc0f2cb3716de4e996938b2f146e4e66f1c..68a8a0e228103ea4e9fe58f416a53587b2d26f6e 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -87,6 +87,7 @@ class DomainReliabilityMonitor;
|
||||
@@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
|
||||
|
||||
namespace network {
|
||||
class CertVerifierWithTrustAnchors;
|
||||
@@ -171,7 +171,7 @@ index 23a5fe596b2607fa2b95f601cb621e4e11f81d50..67f0e98426345beac34bfd41be384210
|
||||
class CookieManager;
|
||||
class ExpectCTReporter;
|
||||
class HostResolver;
|
||||
@@ -184,6 +185,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -181,6 +182,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
@@ -180,7 +180,7 @@ index 23a5fe596b2607fa2b95f601cb621e4e11f81d50..67f0e98426345beac34bfd41be384210
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -621,6 +624,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -620,6 +623,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
|
||||
#endif
|
||||
|
||||
@@ -190,10 +190,10 @@ index 23a5fe596b2607fa2b95f601cb621e4e11f81d50..67f0e98426345beac34bfd41be384210
|
||||
// CertNetFetcher is not used by the current platform.
|
||||
scoped_refptr<net::CertNetFetcherURLRequest> cert_net_fetcher_;
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index c37e71fb1eac0c568f91676eddcd624f491a7b69..6adfd8969148daba3f77aea4c5f89adec6338e6b 100644
|
||||
index df53831fd07b7fb4903e73015ca8350a2de1ebbc..4729cc2bc74d410100a0c1946b867cd5d8428d31 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -191,6 +191,17 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
@@ -192,6 +192,17 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
|
||||
};
|
||||
|
||||
@@ -211,7 +211,7 @@ index c37e71fb1eac0c568f91676eddcd624f491a7b69..6adfd8969148daba3f77aea4c5f89ade
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -813,6 +824,9 @@ interface NetworkContext {
|
||||
@@ -830,6 +841,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Do not check for unique origin in CacheStorage, in Electron we may have
|
||||
scripts running without an origin.
|
||||
|
||||
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
index a2c9bc873ae4def01bc31a5b4a280a799b241213..3cb71674bc5a000bca1e3473cf7ad6b8437ab507 100644
|
||||
index 0abdf04f5fa016d7ee8241eab60375944fe8fe62..95f62ba41bd28c08364c5f13927bc90c4567f88b 100644
|
||||
--- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
@@ -106,7 +106,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
@@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
cache_storage_(cache_storage),
|
||||
origin_(origin),
|
||||
owner_(owner) {
|
||||
|
||||
@@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 5c07cb506115cdc846952d9b8e1061b6de6042d0..baf9e4ed20a41b9c1320ec6fbae290319e8e05e5 100644
|
||||
index d62a91f5aa838735ea6052a550aad002eeaecbde..fb7995dc1e80ba4bce5c466526d4119bbcf8f28a 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2033,7 +2033,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2084,7 +2084,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -35,7 +35,7 @@ index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
index 02c05417bf3a2b6ca1bfc839d76262b97e9b2d69..3ac71544700f517b4c7397fa7a838ca8d778d2b1 100644
|
||||
index 4af5ead7df57e26ceb64ab909c4dc2de86ccfc41..294e6c08975fae62ca8dbe9e471f39a5adbf03e3 100644
|
||||
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
@@ -8,39 +8,39 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
||||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/chrome/browser/ui/gtk/native_theme_gtk.cc b/chrome/browser/ui/gtk/native_theme_gtk.cc
|
||||
index 26f1842494bdbcf5ffefb07e8fc74ba816a2a2d8..8ef9c27728a5b3166732d753d582e30a015cc0a6 100644
|
||||
index 0bc7a7ecdacd666cc0cc4769f5bb36053515a732..aecde5b7ee8e28a14ba7f3ee6b77f421041c4443 100644
|
||||
--- a/chrome/browser/ui/gtk/native_theme_gtk.cc
|
||||
+++ b/chrome/browser/ui/gtk/native_theme_gtk.cc
|
||||
@@ -301,6 +301,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
|
||||
@@ -300,6 +300,27 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
case ui::NativeTheme::kColorId_TableHeaderSeparator:
|
||||
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
|
||||
|
||||
+ // Results Table
|
||||
+ case ui::NativeTheme::kColorId_ResultsTableNormalBackground:
|
||||
+ return SkColorFromColorId(
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground);
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground, base_theme, color_scheme);
|
||||
+ case ui::NativeTheme::kColorId_ResultsTableHoveredBackground:
|
||||
+ return color_utils::AlphaBlend(
|
||||
+ SkColorFromColorId(
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground),
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground, base_theme, color_scheme).value(),
|
||||
+ SkColorFromColorId(
|
||||
+ ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused),
|
||||
+ ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused, base_theme, color_scheme).value(),
|
||||
+ 0.5f);
|
||||
+ case ui::NativeTheme::kColorId_ResultsTableNormalText:
|
||||
+ return SkColorFromColorId(
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultColor);
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultColor, base_theme, color_scheme);
|
||||
+ case ui::NativeTheme::kColorId_ResultsTableDimmedText:
|
||||
+ return color_utils::AlphaBlend(
|
||||
+ SkColorFromColorId(ui::NativeTheme::kColorId_TextfieldDefaultColor),
|
||||
+ SkColorFromColorId(ui::NativeTheme::kColorId_TextfieldDefaultColor, base_theme, color_scheme).value(),
|
||||
+ SkColorFromColorId(
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground),
|
||||
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground, base_theme, color_scheme).value(),
|
||||
+ 0.5f);
|
||||
+
|
||||
// Throbber
|
||||
// TODO(thomasanderson): Render GtkSpinner directly.
|
||||
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
|
||||
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
|
||||
index 90b86727d8ab48d25dcede1f18fd3107eba83e1b..4a4bf7f0f809d5a69f48eb47d631072c1c86ee3a 100644
|
||||
index dfa5a1c6e9ba1798de5be08a20f6f134f1b9e8d5..5ac2f70df6ba26671827a8634633b3bfb53ee7bc 100644
|
||||
--- a/ui/native_theme/common_theme.cc
|
||||
+++ b/ui/native_theme/common_theme.cc
|
||||
@@ -59,6 +59,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
|
||||
@@ -58,7 +58,7 @@ index 90b86727d8ab48d25dcede1f18fd3107eba83e1b..4a4bf7f0f809d5a69f48eb47d631072c
|
||||
// FocusableBorder
|
||||
case NativeTheme::kColorId_FocusedBorderColor:
|
||||
return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
|
||||
@@ -401,6 +409,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
|
||||
@@ -424,6 +432,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
|
||||
case NativeTheme::kColorId_UnfocusedBorderColor:
|
||||
return gfx::kGoogleGrey300;
|
||||
|
||||
@@ -78,10 +78,10 @@ index 90b86727d8ab48d25dcede1f18fd3107eba83e1b..4a4bf7f0f809d5a69f48eb47d631072c
|
||||
case NativeTheme::kColorId_ThrobberSpinningColor:
|
||||
return gfx::kGoogleBlue600;
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 0c26cce0cb14bd9e87c3a095116501bf0c1803e4..782dd1d122bfab4990c924a7fb0e7276fb51b18b 100644
|
||||
index d69cba7667555c3f552739f8273afd4d9928cb3b..20df4f2086bcc5aa572115ab32ac22348c196c03 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -409,6 +409,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -415,6 +415,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
kColorId_TableHeaderText,
|
||||
kColorId_TableHeaderBackground,
|
||||
kColorId_TableHeaderSeparator,
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 95724e75d7c9d1582bb820321c1c47774e49dd7d..7d8c0f47e41e2bcf4ef29aec1c0873098e40d8ee 100644
|
||||
index bfe2491d454e5cf7844a6350d38b291002694b1a..e43b31435702f87728caab3d268377802dc52375 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -618,6 +618,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
@@ -24,7 +24,7 @@ index 95724e75d7c9d1582bb820321c1c47774e49dd7d..7d8c0f47e41e2bcf4ef29aec1c087309
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 226e7c96a2b7539890b297c05d3c963c5d4d193f..8a75e5253dd8ee66fc05232fccb3502b320ac353 100644
|
||||
index f9c6c00902f9313d56d9a26008391837a0bbad43..397acfff6e96b529f5b435afdbaab5268a8100e6 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -23,9 +23,11 @@
|
||||
|
||||
@@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
||||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 4df726e8331572fe96551fdde60b4174aff30588..66b1e2b52c9da2d485fd9f076e1628861a74cb69 100644
|
||||
index 8b48f4dcfd00c415919811a6128cd606a33c6065..853f14e77f57ae20f3d5b3a7a5e8ce1217f4958e 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
|
||||
@@ -154,6 +154,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -46,7 +46,7 @@ index 4df726e8331572fe96551fdde60b4174aff30588..66b1e2b52c9da2d485fd9f076e162886
|
||||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1762,9 +1774,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -1759,9 +1771,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
|
||||
//
|
||||
@@ -58,7 +58,7 @@ index 4df726e8331572fe96551fdde60b4174aff30588..66b1e2b52c9da2d485fd9f076e162886
|
||||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1773,7 +1787,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
@@ -1770,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index fe09f99a91e3b1d2abfb335ec2771d1ed8592d87..050102ea2d7cac519c5bba4845021df6f671b4fa 100644
|
||||
index 5b8ef55339ad0833270cbde99d30ed9b7d414ece..0196d66e4b4e3e95a4a2ebb6f390edf6883609b8 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1489,7 +1489,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1484,7 +1484,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index fe09f99a91e3b1d2abfb335ec2771d1ed8592d87..050102ea2d7cac519c5bba4845021df6
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1509,6 +1509,12 @@ if (!is_android) {
|
||||
@@ -1504,6 +1504,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Wed, 23 Oct 2019 15:30:18 -0700
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Tue, 4 Feb 2020 08:59:32 -0700
|
||||
Subject: Revert "Remove ContentRendererClient::ShouldFork."
|
||||
|
||||
This reverts commit 6b068eb8ca4a3c7350bdafa22fc0cf0636ef8b74.
|
||||
This reverts the CL at https://chromium-review.googlesource.com/c/chromium/src/+/1812128.
|
||||
We use it to force a new renderer process for navigations, and need to start a new renderer process
|
||||
for every navigation to keep Node.js working properly. Once Native Modules in the renderer process
|
||||
are required to be NAPI or context aware (Electron v11), this patch can be removed.
|
||||
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
index e03ad3a5a115383143d1324164dfd37f87c6f2f2..1c179e0cca8b0b1fc19971d1c9e93d59af7b9383 100644
|
||||
index f4164c6d41ea1b10bf8c4f4b75ee788c7529cbcf..b15a72fe6d02617e227395461dbbdf3c830a3dd8 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -1291,6 +1291,17 @@ bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
|
||||
return true;
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -1269,6 +1269,25 @@ bool ChromeContentRendererClient::AllowPopup() {
|
||||
#endif
|
||||
}
|
||||
|
||||
+bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
|
||||
+ const GURL& url,
|
||||
+ const std::string& http_method,
|
||||
+ bool is_initial_navigation,
|
||||
+ bool is_server_redirect) {
|
||||
+ DCHECK(!frame->Parent());
|
||||
+
|
||||
+ // If |url| matches one of the prerendered URLs, stop this navigation and try
|
||||
@@ -24,84 +32,90 @@ index e03ad3a5a115383143d1324164dfd37f87c6f2f2..1c179e0cca8b0b1fc19971d1c9e93d59
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
|
||||
index b4895b8770bd58d400cc8ca55c74940b25b3a8d5..3c0d6bc9bb50abc5f02e07c24ed8ae424dcda1a5 100644
|
||||
--- a/content/renderer/render_view_browsertest.cc
|
||||
+++ b/content/renderer/render_view_browsertest.cc
|
||||
@@ -1004,6 +1004,73 @@ TEST_F(RenderViewImplTest, BeginNavigationForWebUI) {
|
||||
FrameHostMsg_OpenURL::ID));
|
||||
}
|
||||
|
||||
+class AlwaysForkingRenderViewTest : public RenderViewImplTest {
|
||||
+ public:
|
||||
+ ContentRendererClient* CreateContentRendererClient() override {
|
||||
+ return new TestContentRendererClient;
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+ private:
|
||||
+ class TestContentRendererClient : public ContentRendererClient {
|
||||
+ public:
|
||||
+ bool ShouldFork(blink::WebLocalFrame* frame,
|
||||
+ const GURL& url,
|
||||
+ const std::string& http_method,
|
||||
+ bool is_initial_navigation,
|
||||
+ bool is_server_redirect) override {
|
||||
+ return true;
|
||||
void ChromeContentRendererClient::WillSendRequest(
|
||||
WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
|
||||
index f46086288686d68c0ee0078c9deb97ba4177f79c..5422bb4bc6310da74cb60068455d1f58cd93ba65 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.h
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.h
|
||||
@@ -131,6 +131,11 @@ class ChromeContentRendererClient
|
||||
base::SingleThreadTaskRunner* compositor_thread_task_runner) override;
|
||||
bool RunIdleHandlerWhenWidgetsHidden() override;
|
||||
bool AllowPopup() override;
|
||||
+ bool ShouldFork(blink::WebLocalFrame* frame,
|
||||
+ const GURL& url,
|
||||
+ const std::string& http_method,
|
||||
+ bool is_initial_navigation,
|
||||
+ bool is_server_redirect) override;
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
|
||||
index c4c0e27127ff2976db4e78cf5a02bd22d1c667d3..a4318511d1081d4f101cb2f18ca5fa200fb9773c 100644
|
||||
--- a/content/public/renderer/content_renderer_client.cc
|
||||
+++ b/content/public/renderer/content_renderer_client.cc
|
||||
@@ -104,6 +104,14 @@ bool ContentRendererClient::HandleNavigation(
|
||||
}
|
||||
#endif
|
||||
|
||||
+bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
+ const GURL& url,
|
||||
+ const std::string& http_method,
|
||||
+ bool is_initial_navigation,
|
||||
+ bool is_server_redirect) {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
void ContentRendererClient::WillSendRequest(
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 0a4ec619e96a840b4b4d5b51246de6c91e0f94f2..5dabb49f061b4e0643256cbf9162d128c1e0bacf 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -213,6 +213,13 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
bool is_redirect);
|
||||
#endif
|
||||
|
||||
+ // Returns true if we should fork a new process for the given navigation.
|
||||
+ virtual bool ShouldFork(blink::WebLocalFrame* frame,
|
||||
+ const GURL& url,
|
||||
+ const std::string& http_method,
|
||||
+ bool is_initial_navigation,
|
||||
+ bool is_server_redirect);
|
||||
+
|
||||
// Notifies the embedder that the given frame is requesting the resource at
|
||||
// |url|. If the function returns a valid |new_url|, the request must be
|
||||
// updated to use it. The |attach_same_site_cookies| output parameter
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 0d3d1b8f0aeefbcf81d14460fd687ddd09ff9d98..e3b2829e875984c122e8f7d82447abb29b42ed5a 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -5788,6 +5788,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
|
||||
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
|
||||
(cumulative_bindings & kWebUIBindingsPolicyMask);
|
||||
+
|
||||
+ if (!should_fork && url.SchemeIs(url::kFileScheme)) {
|
||||
+ // Fork non-file to file opens (see https://crbug.com/1031119). Note that
|
||||
+ // this may fork unnecessarily if another tab (hosting a file or not)
|
||||
+ // targeted this one before its initial navigation, but that shouldn't
|
||||
+ // cause a problem.
|
||||
+ should_fork = !old_url.SchemeIs(url::kFileScheme);
|
||||
+ }
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+TEST_F(AlwaysForkingRenderViewTest, BeginNavigationDoesNotForkEmptyUrl) {
|
||||
+ GURL example_url("http://example.com");
|
||||
+ GURL empty_url("");
|
||||
+ if (!should_fork) {
|
||||
+ // Give the embedder a chance.
|
||||
+ bool is_initial_navigation = render_view_->history_list_length_ == 0;
|
||||
+ should_fork = GetContentClient()->renderer()->ShouldFork(
|
||||
+ frame_, url, info->url_request.HttpMethod().Utf8(),
|
||||
+ is_initial_navigation, false /* is_redirect */);
|
||||
+ }
|
||||
+
|
||||
+ LoadHTMLWithUrlOverride("<body></body", example_url.spec().c_str());
|
||||
+ EXPECT_EQ(example_url,
|
||||
+ GURL(frame()->GetWebFrame()->GetDocumentLoader()->GetUrl()));
|
||||
+
|
||||
+ // Empty url should never fork.
|
||||
+ blink::WebURLRequest request(empty_url);
|
||||
+ request.SetMode(network::mojom::RequestMode::kNavigate);
|
||||
+ request.SetRedirectMode(network::mojom::RedirectMode::kManual);
|
||||
+ request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL);
|
||||
+ request.SetRequestorOrigin(blink::WebSecurityOrigin::Create(example_url));
|
||||
+ auto navigation_info = std::make_unique<blink::WebNavigationInfo>();
|
||||
+ navigation_info->url_request = request;
|
||||
+ navigation_info->frame_type =
|
||||
+ network::mojom::RequestContextFrameType::kTopLevel;
|
||||
+ navigation_info->navigation_policy = blink::kWebNavigationPolicyCurrentTab;
|
||||
+ frame()->BeginNavigation(std::move(navigation_info));
|
||||
+ EXPECT_FALSE(render_thread_->sink().GetUniqueMessageMatching(
|
||||
+ FrameHostMsg_OpenURL::ID));
|
||||
+}
|
||||
+
|
||||
+TEST_F(AlwaysForkingRenderViewTest, BeginNavigationDoesNotForkAboutBlank) {
|
||||
+ GURL example_url("http://example.com");
|
||||
+ GURL blank_url(url::kAboutBlankURL);
|
||||
+
|
||||
+ LoadHTMLWithUrlOverride("<body></body", example_url.spec().c_str());
|
||||
+ EXPECT_EQ(example_url,
|
||||
+ GURL(frame()->GetWebFrame()->GetDocumentLoader()->GetUrl()));
|
||||
+
|
||||
+ // about:blank should never fork.
|
||||
+ blink::WebURLRequest request(blank_url);
|
||||
+ request.SetMode(network::mojom::RequestMode::kNavigate);
|
||||
+ request.SetRedirectMode(network::mojom::RedirectMode::kManual);
|
||||
+ request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL);
|
||||
+ request.SetRequestorOrigin(blink::WebSecurityOrigin::Create(example_url));
|
||||
+ auto navigation_info = std::make_unique<blink::WebNavigationInfo>();
|
||||
+ navigation_info->url_request = request;
|
||||
+ navigation_info->frame_type =
|
||||
+ network::mojom::RequestContextFrameType::kTopLevel;
|
||||
+ navigation_info->navigation_policy = blink::kWebNavigationPolicyCurrentTab;
|
||||
+ frame()->BeginNavigation(std::move(navigation_info));
|
||||
+ EXPECT_FALSE(render_thread_->sink().GetUniqueMessageMatching(
|
||||
+ FrameHostMsg_OpenURL::ID));
|
||||
+}
|
||||
+
|
||||
// This test verifies that when device emulation is enabled, RenderFrameProxy
|
||||
// continues to receive the original ScreenInfo and not the emualted
|
||||
// ScreenInfo.
|
||||
if (should_fork) {
|
||||
OpenURL(std::move(info));
|
||||
return; // Suppress the load here.
|
||||
|
||||
@@ -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 ae1a77a219f153f034c2702447a3ede9d9c9b960..4e50a255b99bbce1e3c4aa696bfc0fa8ae4dddee 100644
|
||||
index 33ab18228d821c1d3a8361463db7f55727500309..c4462aec2f2bf1aa4b8bf7fcb21415888b658323 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1338,7 +1338,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
@@ -1345,7 +1345,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
}
|
||||
|
||||
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 baf9e4ed20a41b9c1320ec6fbae290319e8e05e5..89fa83bbda39e90c1fcd6df83cd248c1f2de7195 100644
|
||||
index fb7995dc1e80ba4bce5c466526d4119bbcf8f28a..8205a898bc368543ffe150a641c9f04c137fc072 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -414,6 +414,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -62,7 +62,7 @@ index baf9e4ed20a41b9c1320ec6fbae290319e8e05e5..89fa83bbda39e90c1fcd6df83cd248c1
|
||||
};
|
||||
|
||||
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
|
||||
@@ -1746,11 +1757,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1790,11 +1801,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
cmd_line->PrependWrapper(renderer_prefix);
|
||||
AppendRendererCommandLine(cmd_line.get());
|
||||
|
||||
|
||||
@@ -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 ea2e52bf16dd7897a104c67dfcb2f95598cf291e..7ca7e5c594d729d365692336861abfc93a88680b 100644
|
||||
index 4660c704904ba1c2366e34b768446a620e3814d8..2cdc3785010b78d74bb980de9211622130a3c072 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2062,6 +2062,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2073,6 +2073,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
@@ -25,7 +25,7 @@ index ea2e52bf16dd7897a104c67dfcb2f95598cf291e..7ca7e5c594d729d365692336861abfc9
|
||||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -2072,6 +2078,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2083,6 +2089,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
view_.reset(CreateWebContentsView(this, delegate,
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index 44bc4902a374821eecebf72bfcb150b7d86db621..c570fadb559230e17440c64b9042fbd9
|
||||
GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
|
||||
drag_start_view_id_;
|
||||
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
index b35ff2edf854aa759a91fa708ed560d2f269e078..4ca6119b2105f27cabcb664d9ba7631973b49966 100644
|
||||
index c2bf0258a94c39da79b3f3056f2fef93f86281a5..abd9a305ff0b4c4e60fe9e3d4ba46fc7983b50f4 100644
|
||||
--- a/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
@@ -337,6 +337,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
|
||||
@@ -401,6 +401,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
|
||||
}
|
||||
|
||||
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
|
||||
|
||||
@@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 87df60c52d1e6adf464e85deccef87ae2c6cb48c..5dabb49f061b4e0643256cbf9162d128c1e0bacf 100644
|
||||
index 39a0c8dd6e16146dd1c760db59786a1a6ef6342c..0a4ec619e96a840b4b4d5b51246de6c91e0f94f2 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -389,6 +389,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -382,6 +382,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {}
|
||||
|
||||
@@ -55,10 +55,10 @@ index 096cd162c7d5228fea0c56ad007b9939e6f27809..1c332800cb133f93d21ee628b3b85e89
|
||||
const blink::WebString& header_name) override;
|
||||
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index 8690ec1fdd213a4898ebce1c8dce38079972f7df..b06e541ec3cbb6cac7b58222a4718b4560a49ff0 100644
|
||||
index 7d00b2a49d37c6e5ecdbfb08c8f273cc1d5b61f2..a68f9d16fbd1142a1ebda0a8fd1b29defb632b8f 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -623,6 +623,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -622,6 +622,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
@@ -67,10 +67,10 @@ index 8690ec1fdd213a4898ebce1c8dce38079972f7df..b06e541ec3cbb6cac7b58222a4718b45
|
||||
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 e00f788541d7c0f96d2c00c4840da1598c3f7a81..0c3d589ba1ca0727d46feda8ae48c5d0049c304e 100644
|
||||
index c43f8b1e8f4a20ee0bf267ef78f2b067837be223..b34800d0a569b31f9ecc9c62d0e93e676eddf32d 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
@@ -681,6 +681,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
@@ -688,6 +688,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
nested_runner_->QuitNow();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,3 +36,4 @@ remove_serialization_deserialization_of_wasmmoduleobject.patch
|
||||
64bit_bump_typedarray_max_length_to_2_32-1_elements.patch
|
||||
test_use_tmpdir_refresh_in_test-esm-windows_js.patch
|
||||
override_existing_v8_reallocate.patch
|
||||
avoid_calling_deprecated_method.patch
|
||||
|
||||
22
patches/node/avoid_calling_deprecated_method.patch
Normal file
22
patches/node/avoid_calling_deprecated_method.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Thu, 13 Feb 2020 10:34:31 -0800
|
||||
Subject: Avoid calling deprecated method
|
||||
|
||||
The {SetExpectInlineWasm} method is deprecated and non-functional since
|
||||
V8 v8.1.
|
||||
Thus node should stop calling it, so that it can be fully removed in a
|
||||
future v8 version.
|
||||
|
||||
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
|
||||
index a2d185c4167a75e227cd4b2abbf5c5abc7e16acb..e918ed9d12e9fb1d13b2fc05a98cab099fb71a68 100644
|
||||
--- a/src/node_serdes.cc
|
||||
+++ b/src/node_serdes.cc
|
||||
@@ -286,7 +286,6 @@ DeserializerContext::DeserializerContext(Environment* env,
|
||||
length_(Buffer::Length(buffer)),
|
||||
deserializer_(env->isolate(), data_, length_, this) {
|
||||
object()->Set(env->context(), env->buffer_string(), buffer).Check();
|
||||
- deserializer_.SetExpectInlineWasm(true);
|
||||
|
||||
MakeWeak();
|
||||
}
|
||||
@@ -233,8 +233,6 @@ base::RefCountedMemory* ElectronContentClient::GetDataResourceBytes(
|
||||
void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes,
|
||||
&schemes->service_worker_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kStandardSchemes,
|
||||
&schemes->standard_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kSecureSchemes,
|
||||
&schemes->secure_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kBypassCSPSchemes,
|
||||
|
||||
@@ -342,15 +342,12 @@ int ElectronMainDelegate::RunProcess(
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool ElectronMainDelegate::DelaySandboxInitialization(
|
||||
const std::string& process_type) {
|
||||
return process_type == kRelauncherProcess;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ElectronMainDelegate::ShouldCreateFeatureList() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ElectronMainDelegate::ShouldLockSchemeRegistry() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -39,10 +39,8 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
|
||||
int RunProcess(
|
||||
const std::string& process_type,
|
||||
const content::MainFunctionParams& main_function_params) override;
|
||||
#if defined(OS_MACOSX)
|
||||
bool DelaySandboxInitialization(const std::string& process_type) override;
|
||||
#endif
|
||||
bool ShouldCreateFeatureList() override;
|
||||
bool ShouldLockSchemeRegistry() override;
|
||||
|
||||
private:
|
||||
#if defined(OS_MACOSX)
|
||||
|
||||
@@ -838,16 +838,18 @@ v8::Local<v8::Promise> Session::ListWordsInSpellCheckerDictionary() {
|
||||
}
|
||||
|
||||
bool Session::AddWordToSpellCheckerDictionary(const std::string& word) {
|
||||
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
|
||||
if (spellcheck::UseBrowserSpellChecker()) {
|
||||
spellcheck_platform::AddWord(base::UTF8ToUTF16(word));
|
||||
}
|
||||
#endif
|
||||
SpellcheckService* spellcheck =
|
||||
SpellcheckServiceFactory::GetForContext(browser_context_.get());
|
||||
if (!spellcheck)
|
||||
return false;
|
||||
|
||||
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
|
||||
if (spellcheck::UseBrowserSpellChecker()) {
|
||||
spellcheck_platform::AddWord(spellcheck->platform_spell_checker(),
|
||||
base::UTF8ToUTF16(word));
|
||||
}
|
||||
#endif
|
||||
|
||||
return spellcheck->GetCustomDictionary()->AddWord(word);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/blink/public/common/page/page_zoom.h"
|
||||
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
|
||||
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
|
||||
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
|
||||
#include "third_party/blink/public/platform/web_cursor_info.h"
|
||||
@@ -1235,7 +1236,7 @@ void WebContents::DidUpdateFaviconURL(
|
||||
const std::vector<content::FaviconURL>& urls) {
|
||||
std::set<GURL> unique_urls;
|
||||
for (const auto& iter : urls) {
|
||||
if (iter.icon_type != content::FaviconURL::IconType::kFavicon)
|
||||
if (iter.icon_type != blink::mojom::FaviconIconType::kFavicon)
|
||||
continue;
|
||||
const GURL& url = iter.icon_url;
|
||||
if (url.is_valid())
|
||||
|
||||
@@ -38,30 +38,30 @@ struct Converter<URLPattern> {
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Converter<content::ResourceType> {
|
||||
struct Converter<blink::mojom::ResourceType> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
content::ResourceType type) {
|
||||
blink::mojom::ResourceType type) {
|
||||
const char* result;
|
||||
switch (type) {
|
||||
case content::ResourceType::kMainFrame:
|
||||
case blink::mojom::ResourceType::kMainFrame:
|
||||
result = "mainFrame";
|
||||
break;
|
||||
case content::ResourceType::kSubFrame:
|
||||
case blink::mojom::ResourceType::kSubFrame:
|
||||
result = "subFrame";
|
||||
break;
|
||||
case content::ResourceType::kStylesheet:
|
||||
case blink::mojom::ResourceType::kStylesheet:
|
||||
result = "stylesheet";
|
||||
break;
|
||||
case content::ResourceType::kScript:
|
||||
case blink::mojom::ResourceType::kScript:
|
||||
result = "script";
|
||||
break;
|
||||
case content::ResourceType::kImage:
|
||||
case blink::mojom::ResourceType::kImage:
|
||||
result = "image";
|
||||
break;
|
||||
case content::ResourceType::kObject:
|
||||
case blink::mojom::ResourceType::kObject:
|
||||
result = "object";
|
||||
break;
|
||||
case content::ResourceType::kXhr:
|
||||
case blink::mojom::ResourceType::kXhr:
|
||||
result = "xhr";
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -125,6 +125,18 @@ void GPUInfoEnumerator::EndDx12VulkanVersionInfo() {
|
||||
value_stack.pop();
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::BeginOverlayInfo() {
|
||||
value_stack.push(std::move(current));
|
||||
current = std::make_unique<base::DictionaryValue>();
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::EndOverlayInfo() {
|
||||
auto& top_value = value_stack.top();
|
||||
top_value->SetDictionary(kOverlayInfo, std::move(current));
|
||||
current = std::move(top_value);
|
||||
value_stack.pop();
|
||||
}
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> GPUInfoEnumerator::GetDictionary() {
|
||||
return std::move(current);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
||||
"imageDecodeAcceleratorSupportedProfile";
|
||||
const char* kAuxAttributesKey = "auxAttributes";
|
||||
const char* kDx12VulkanVersionInfoKey = "dx12VulkanVersionInfo";
|
||||
const char* kOverlayInfo = "overlayInfo";
|
||||
|
||||
public:
|
||||
GPUInfoEnumerator();
|
||||
@@ -50,6 +51,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
||||
void EndAuxAttributes() override;
|
||||
void BeginDx12VulkanVersionInfo() override;
|
||||
void EndDx12VulkanVersionInfo() override;
|
||||
void BeginOverlayInfo() override;
|
||||
void EndOverlayInfo() override;
|
||||
std::unique_ptr<base::DictionaryValue> GetDictionary();
|
||||
|
||||
private:
|
||||
|
||||
@@ -34,8 +34,8 @@ bool GPUInfoManager::NeedsCompleteGpuInfoCollection() const {
|
||||
#if defined(OS_MACOSX)
|
||||
return gpu_data_manager_->GetGPUInfo().gl_vendor.empty();
|
||||
#elif defined(OS_WIN)
|
||||
return (gpu_data_manager_->GetGPUInfo().dx_diagnostics.values.empty() &&
|
||||
gpu_data_manager_->GetGPUInfo().dx_diagnostics.children.empty());
|
||||
return gpu_data_manager_->DxdiagDx12VulkanRequested() &&
|
||||
gpu_data_manager_->GetGPUInfo().dx_diagnostics.IsEmpty();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
||||
// once we have the complete information data
|
||||
std::vector<gin_helper::Promise<base::DictionaryValue>>
|
||||
complete_info_promise_set_;
|
||||
content::GpuDataManager* gpu_data_manager_;
|
||||
content::GpuDataManagerImpl* gpu_data_manager_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GPUInfoManager);
|
||||
};
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "net/proxy_resolution/proxy_config.h"
|
||||
#include "net/proxy_resolution/proxy_config_service.h"
|
||||
#include "net/proxy_resolution/proxy_config_with_annotation.h"
|
||||
#include "net/proxy_resolution/proxy_resolution_service.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
@@ -38,6 +37,11 @@ BrowserProcessImpl::~BrowserProcessImpl() {
|
||||
g_browser_process = nullptr;
|
||||
}
|
||||
|
||||
BuildState* BrowserProcessImpl::GetBuildState() {
|
||||
NOTIMPLEMENTED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
void BrowserProcessImpl::ApplyProxyModeFromCommandLine(
|
||||
ValueMapPrefStore* pref_store) {
|
||||
|
||||
@@ -101,6 +101,7 @@ class BrowserProcessImpl : public BrowserProcess {
|
||||
const std::string& GetApplicationLocale() override;
|
||||
printing::PrintJobManager* print_job_manager() override;
|
||||
StartupData* startup_data() override;
|
||||
BuildState* GetBuildState() override;
|
||||
|
||||
private:
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
|
||||
@@ -436,6 +436,9 @@ void ElectronBrowserMainParts::PreMainMessageLoopRun() {
|
||||
node_bindings_->PrepareMessageLoop();
|
||||
node_bindings_->RunMessageLoop();
|
||||
|
||||
// url::Add*Scheme are not threadsafe, this helps prevent data races.
|
||||
url::LockSchemeRegistries();
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_client_ = std::make_unique<ElectronExtensionsClient>();
|
||||
extensions::ExtensionsClient::Set(extensions_client_.get());
|
||||
|
||||
@@ -178,7 +178,7 @@ void ElectronExtensionsBrowserClient::LoadResourceFromResourceBundle(
|
||||
|
||||
namespace {
|
||||
bool AllowCrossRendererResourceLoad(const GURL& url,
|
||||
content::ResourceType resource_type,
|
||||
blink::mojom::ResourceType resource_type,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
@@ -208,7 +208,7 @@ bool AllowCrossRendererResourceLoad(const GURL& url,
|
||||
|
||||
bool ElectronExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
const GURL& url,
|
||||
content::ResourceType resource_type,
|
||||
blink::mojom::ResourceType resource_type,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
|
||||
@@ -71,7 +71,7 @@ class ElectronExtensionsBrowserClient
|
||||
bool send_cors_header) override;
|
||||
bool AllowCrossRendererResourceLoad(
|
||||
const GURL& url,
|
||||
content::ResourceType resource_type,
|
||||
blink::mojom::ResourceType resource_type,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
|
||||
@@ -577,7 +577,11 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
||||
}
|
||||
#endif
|
||||
|
||||
const views::Widget* NativeWindow::GetWidgetImpl() const {
|
||||
views::Widget* NativeWindow::GetWidget() {
|
||||
return widget();
|
||||
}
|
||||
|
||||
const views::Widget* NativeWindow::GetWidget() const {
|
||||
return widget();
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,8 @@ class NativeWindow : public base::SupportsUserData,
|
||||
NativeWindow(const gin_helper::Dictionary& options, NativeWindow* parent);
|
||||
|
||||
// views::WidgetDelegate:
|
||||
const views::Widget* GetWidgetImpl() const override;
|
||||
views::Widget* GetWidget() override;
|
||||
const views::Widget* GetWidget() const override;
|
||||
base::string16 GetAccessibleWindowTitle() const override;
|
||||
|
||||
void set_content_view(views::View* view) { content_view_ = view; }
|
||||
|
||||
@@ -49,7 +49,8 @@ class DevToolsWindowDelegate : public views::ClientView,
|
||||
base::string16 GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
gfx::ImageSkia GetWindowAppIcon() override { return GetWindowIcon(); }
|
||||
gfx::ImageSkia GetWindowIcon() override { return icon_; }
|
||||
const views::Widget* GetWidgetImpl() const override { return widget_; }
|
||||
views::Widget* GetWidget() override { return widget_; }
|
||||
const views::Widget* GetWidget() const override { return widget_; }
|
||||
views::View* GetContentsView() override { return view_; }
|
||||
views::ClientView* CreateClientView(views::Widget* widget) override {
|
||||
return this;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "shell/browser/ui/x/window_state_watcher.h"
|
||||
|
||||
#include "ui/events/platform/platform_event_source.h"
|
||||
#include "ui/gfx/x/x11.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
|
||||
@@ -12,22 +11,22 @@ namespace electron {
|
||||
|
||||
WindowStateWatcher::WindowStateWatcher(NativeWindowViews* window)
|
||||
: window_(window), widget_(window->GetAcceleratedWidget()) {
|
||||
ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this);
|
||||
ui::X11EventSource::GetInstance()->AddXEventObserver(this);
|
||||
}
|
||||
|
||||
WindowStateWatcher::~WindowStateWatcher() {
|
||||
ui::PlatformEventSource::GetInstance()->RemovePlatformEventObserver(this);
|
||||
ui::X11EventSource::GetInstance()->RemoveXEventObserver(this);
|
||||
}
|
||||
|
||||
void WindowStateWatcher::WillProcessEvent(const ui::PlatformEvent& event) {
|
||||
if (IsWindowStateEvent(event)) {
|
||||
void WindowStateWatcher::WillProcessXEvent(XEvent* xev) {
|
||||
if (IsWindowStateEvent(xev)) {
|
||||
was_minimized_ = window_->IsMinimized();
|
||||
was_maximized_ = window_->IsMaximized();
|
||||
}
|
||||
}
|
||||
|
||||
void WindowStateWatcher::DidProcessEvent(const ui::PlatformEvent& event) {
|
||||
if (IsWindowStateEvent(event)) {
|
||||
void WindowStateWatcher::DidProcessXEvent(XEvent* xev) {
|
||||
if (IsWindowStateEvent(xev)) {
|
||||
bool is_minimized = window_->IsMinimized();
|
||||
bool is_maximized = window_->IsMaximized();
|
||||
bool is_fullscreen = window_->IsFullscreen();
|
||||
@@ -55,10 +54,10 @@ void WindowStateWatcher::DidProcessEvent(const ui::PlatformEvent& event) {
|
||||
}
|
||||
}
|
||||
|
||||
bool WindowStateWatcher::IsWindowStateEvent(const ui::PlatformEvent& event) {
|
||||
::Atom changed_atom = event->xproperty.atom;
|
||||
bool WindowStateWatcher::IsWindowStateEvent(XEvent* xev) {
|
||||
::Atom changed_atom = xev->xproperty.atom;
|
||||
return (changed_atom == gfx::GetAtom("_NET_WM_STATE") &&
|
||||
event->type == PropertyNotify && event->xproperty.window == widget_);
|
||||
xev->type == PropertyNotify && xev->xproperty.window == widget_);
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
#ifndef SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_
|
||||
#define SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_
|
||||
|
||||
#include "ui/events/platform/platform_event_observer.h"
|
||||
#include "ui/events/platform/x11/x11_event_source.h"
|
||||
|
||||
#include "shell/browser/native_window_views.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
class WindowStateWatcher : public ui::PlatformEventObserver {
|
||||
class WindowStateWatcher : public ui::XEventObserver {
|
||||
public:
|
||||
explicit WindowStateWatcher(NativeWindowViews* window);
|
||||
~WindowStateWatcher() override;
|
||||
|
||||
protected:
|
||||
// ui::PlatformEventObserver:
|
||||
void WillProcessEvent(const ui::PlatformEvent& event) override;
|
||||
void DidProcessEvent(const ui::PlatformEvent& event) override;
|
||||
// ui::XEventObserver:
|
||||
void WillProcessXEvent(XEvent* xev) override;
|
||||
void DidProcessXEvent(XEvent* xev) override;
|
||||
|
||||
private:
|
||||
bool IsWindowStateEvent(const ui::PlatformEvent& event);
|
||||
bool IsWindowStateEvent(XEvent* xev);
|
||||
|
||||
NativeWindowViews* window_;
|
||||
gfx::AcceleratedWidget widget_;
|
||||
|
||||
@@ -264,17 +264,16 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
||||
bool has_precise_scrolling_deltas = false;
|
||||
dict.Get("hasPreciseScrollingDeltas", &has_precise_scrolling_deltas);
|
||||
if (has_precise_scrolling_deltas) {
|
||||
out->delta_units =
|
||||
ui::input_types::ScrollGranularity::kScrollByPrecisePixel;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPrecisePixel;
|
||||
} else {
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPixel;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPixel;
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Matches the behavior of ui/events/blink/web_input_event_traits.cc:
|
||||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPage;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPage;
|
||||
out->SetModifiers(out->GetModifiers() & ~blink::WebInputEvent::kControlKey);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -148,7 +148,7 @@ v8::Local<v8::Value> Converter<display::Display>::ToV8(
|
||||
dict.Set("accelerometerSupport", val.accelerometer_support());
|
||||
dict.Set("monochrome", val.is_monochrome());
|
||||
dict.Set("colorDepth", val.color_depth());
|
||||
dict.Set("colorSpace", val.color_space().ToString());
|
||||
dict.Set("colorSpace", val.color_spaces().GetRasterColorSpace().ToString());
|
||||
dict.Set("depthPerComponent", val.depth_per_component());
|
||||
dict.Set("size", val.size());
|
||||
dict.Set("workAreaSize", val.work_area_size());
|
||||
|
||||
@@ -1091,9 +1091,11 @@ describe('app module', () => {
|
||||
// Gl version is present in the complete info.
|
||||
expect(completeInfo).to.have.ownProperty('auxAttributes')
|
||||
.that.is.an('object')
|
||||
expect(completeInfo.auxAttributes).to.have.ownProperty('glVersion')
|
||||
.that.is.a('string')
|
||||
.and.does.not.equal([])
|
||||
if (completeInfo.gpuDevice.active) {
|
||||
expect(completeInfo.auxAttributes).to.have.ownProperty('glVersion')
|
||||
.that.is.a('string')
|
||||
.and.does.not.equal([])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
26
spec/fixtures/api/gpu-info.js
vendored
26
spec/fixtures/api/gpu-info.js
vendored
@@ -1,17 +1,21 @@
|
||||
const { app } = require('electron')
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('--disable-software-rasterizer')
|
||||
|
||||
app.whenReady().then(() => {
|
||||
const infoType = process.argv.pop()
|
||||
app.getGPUInfo(infoType).then(
|
||||
(gpuInfo) => {
|
||||
console.log(JSON.stringify(gpuInfo))
|
||||
app.exit(0)
|
||||
},
|
||||
(error) => {
|
||||
console.error(error)
|
||||
app.exit(1)
|
||||
}
|
||||
)
|
||||
const w = new BrowserWindow({ show: false })
|
||||
w.webContents.once('did-finish-load', () => {
|
||||
app.getGPUInfo(infoType).then(
|
||||
(gpuInfo) => {
|
||||
console.log(JSON.stringify(gpuInfo))
|
||||
app.exit(0)
|
||||
},
|
||||
(error) => {
|
||||
console.error(error)
|
||||
app.exit(1)
|
||||
}
|
||||
)
|
||||
})
|
||||
w.loadURL('data:text/html;<canvas></canvas>')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user