rebase chromium patches on M70

This commit is contained in:
Jeremy Apthorp 2018-10-24 16:25:48 -07:00 committed by deepak1556
parent 559fd5cb31
commit 3b4e706758
51 changed files with 234 additions and 517 deletions

View file

@ -38,7 +38,6 @@ mas_blink_no_private_api.patch
mas_no_private_api.patch
resource_file_conflict.patch
scroll_bounce_flag.patch
webview_reattach.patch
mas-cfisobjc.patch
mas-cgdisplayusesforcetogray.patch
mas-audiodeviceduck.patch
@ -55,7 +54,6 @@ disable_detach_webview_frame.patch
ssl_security_state_tab_helper.patch
leveldb_ssize_t.patch
exclude-a-few-test-files-from-build.patch
crashpad_http_status.patch
expose-net-observer-api.patch
desktop_media_list.patch
proxy_config_monitor.patch

View file

@ -26,7 +26,7 @@ index 7e55ef366ac8320f730cdcb268453b1fa2710887..9b000ab1dfb85c097e879eacbfe69dc0
namespace ui {
@@ -139,7 +138,15 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -147,7 +146,15 @@ base::string16 Accelerator::GetShortcutText() const {
shortcut = KeyCodeToName(key_code_);
#endif
@ -70,9 +70,9 @@ index 7e55ef366ac8320f730cdcb268453b1fa2710887..9b000ab1dfb85c097e879eacbfe69dc0
@@ -223,7 +226,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
shortcut = l10n_util::GetStringFUTF16(IDS_APP_CONTROL_MODIFIER, shortcut);
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);
- else if (IsAltDown())
+ if (IsAltDown())
shortcut = l10n_util::GetStringFUTF16(IDS_APP_ALT_MODIFIER, shortcut);
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_ALT_KEY);
if (IsCmdDown()) {

View file

@ -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 83a6639306a9a2c907b478a974628cc89e2de97c..8511e7d594ce5116f19619fa89115e24422e419c 100644
index de5c4b11829141913784fc3c7190ab86368cf675..f88a404c95c12ab5647bf88bd7be2504699b7ff7 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -665,6 +665,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -671,6 +671,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, WTF::ArrayBufferContents::kDontInitialize);
}
@ -54,7 +54,7 @@ index 83a6639306a9a2c907b478a974628cc89e2de97c..8511e7d594ce5116f19619fa89115e24
WTF::ArrayBufferContents::FreeMemory(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
index 053babce10512d9967546f2e547f826c9ad1b158..e33d6d4ceb5a10ffbe853dc87cad8a1145992154 100644
index 83133e1a836d0c3b25e931e0c19ebcdb987173cf..2c64bd4d5cf3ecd71ee0711cecd1c149e8795797 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
@@ -121,6 +121,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@ -70,10 +70,10 @@ index 053babce10512d9967546f2e547f826c9ad1b158..e33d6d4ceb5a10ffbe853dc87cad8a11
Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
index 809229caa872789345218538d945f3ed6a871adc..6248ad32d6b045fbd4c863cbdbeb859a3ecde3a5 100644
index a87a02bdaf4b7050752f05984ff1c0170f64a203..cf7f2940d48b03c51b997729fc7ea033dc0d1bfe 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
@@ -178,6 +178,7 @@ class WTF_EXPORT ArrayBufferContents {
@@ -187,6 +187,7 @@ class WTF_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

View file

@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch
Allow webview to load non-web URLs.
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 061ad189c46d5f0f1afb09052cc21aeb7e60a744..d64ba4f20d49a57b29e1ad5bc7ac53616974efc9 100644
index 2ed617dbab85dc45184cc0883669f9b5401d5766..6830ea9a0c18affb54ecab7cead5059a7e27bbed 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1488,6 +1488,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
@@ -1459,6 +1459,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
!policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
!is_external_protocol;

View file

@ -5,10 +5,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
index 6e803af108f310b6df0ff0f3e2f0ddb0cce3cae3..94a72b37ae8ebf7f142b5dfdd02261220b6eeb99 100644
index fae3bbccaf04ae653b52b484334a1b402a127b76..5a13426281adb0d51a5259346c1f588a67a78e07 100644
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
@@ -244,7 +244,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
@@ -261,7 +261,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
// document (which is implemented in WorkerMessagingProxy, and
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
if (!response.Url().ProtocolIs("blob") &&

View file

@ -10,7 +10,7 @@ to fix electron/electron#13787. The backport landed in Chromium 67 but the
DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
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 cbd9f811d97855e8bf083cbb2dd9ebcbcab0a1a5..160e5bc7d57ad18619a4c912d57b6b07b790ddf5 100644
index e148eda29606cdf8856c6875dc8e370f29e90f8a..c7289e9c60fc75d0db0d3671d7dd4b428bd80329 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
@@ -177,11 +177,10 @@ void LocalWindowProxy::Initialize() {

View file

@ -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 52810bba03b0c2916ae84d5b1642740cc2d7a2e6..65575d432df5e8e27f8285dcf6dd77e48e2ea1ec 100644
index a7ddc156c2b13acaaf9295df98dfa3955e9a015b..d684cbcaf2a82f1d7423522bf4cc48713a13dead 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -392,10 +392,6 @@ void LocalFrame::Detach(FrameDetachType type) {
@@ -340,10 +340,6 @@ void LocalFrame::Detach(FrameDetachType type) {
}
CHECK(!view_ || !view_->IsAttached());
@ -28,7 +28,7 @@ index 52810bba03b0c2916ae84d5b1642740cc2d7a2e6..65575d432df5e8e27f8285dcf6dd77e4
if (!Client())
return;
@@ -413,6 +409,10 @@ void LocalFrame::Detach(FrameDetachType type) {
@@ -361,6 +357,10 @@ void LocalFrame::Detach(FrameDetachType type) {
// Notify ScriptController that the frame is closing, since its cleanup ends
// up calling back to LocalFrameClient via WindowProxy.
GetScriptController().ClearForClose();

View file

@ -5,10 +5,10 @@ Subject: blink_world_context.patch
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 437e8b22c0f589df3eb41ba8628092c3146b1f8c..0ff6b21fd5a9e49254f283dcbab0b2be9668b296 100644
index e2f071b74c17c4d8854a66c461e6f3fa34ee5eaf..03f725429382a3b2ebc9e73600dc1b92168592b1 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -438,6 +438,9 @@ class WebLocalFrame : public WebFrame {
@@ -466,6 +466,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
@ -19,10 +19,10 @@ index 437e8b22c0f589df3eb41ba8628092c3146b1f8c..0ff6b21fd5a9e49254f283dcbab0b2be
// 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 082b055a570c9d6ec944b3310f54934e65fbe6a0..345d97f888b522c17c755f48e43e7a699ca78472 100644
index fbadba8e0f240ce48ba26ad01573a97203a123ab..ac062b3967e61def6484bb266b55e6006bb0fcdd 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
@@ -874,6 +874,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -885,6 +885,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@ -37,10 +37,10 @@ index 082b055a570c9d6ec944b3310f54934e65fbe6a0..345d97f888b522c17c755f48e43e7a69
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 feb4b14bc8e52c8335e93d133506ecd6226c051d..95d1cc2c91ca01ec95dc3f63aa5f2546a7074095 100644
index 9b07d3bc3e50775225fafc020f6264c6b3f4cd15..8420f56040c87643365d40bd17ff6071e81eb4f8 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
@@ -145,6 +145,8 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -146,6 +146,8 @@ class CORE_EXPORT WebLocalFrameImpl final
int argc,
v8::Local<v8::Value> argv[]) override;
v8::Local<v8::Context> MainWorldScriptContext() const override;

View file

@ -5,10 +5,10 @@ Subject: browser_compositor_mac.patch
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index 46be85eea4b52b191d9e717fd34408a6c2445199..4c816b7021f87873a524e0dc2384146193b86e3c 100644
index 7dc490ea5607bc61344d763d73b008c9be43280a..df136ec5c30db5146e5d1dd34e2f5ff55377af59 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@@ -60,6 +60,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
@ -17,7 +17,7 @@ index 46be85eea4b52b191d9e717fd34408a6c2445199..4c816b7021f87873a524e0dc23841461
// Ensure that the currect compositor frame be cleared (even if it is
// potentially visible).
void ClearCompositorFrame();
@@ -69,6 +71,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@@ -70,6 +72,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// no valid frame is available.
const gfx::CALayerParams* GetLastCALayerParams() const;
@ -26,10 +26,10 @@ index 46be85eea4b52b191d9e717fd34408a6c2445199..4c816b7021f87873a524e0dc23841461
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
void OnDidNotProduceFrame(const viz::BeginFrameAck& ack);
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index 92afcc77910610e53378f55adc003cc1bdf3109a..42bd6fd7c169de36c775471c68b456f1386ff666 100644
index fb23caccdd1dc0280ba2039937222679b6b460d8..d1739539e7bf5240c70aece8bcc84bc093ebde3a 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -81,6 +81,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
@@ -79,6 +79,12 @@
DCHECK_EQ(1u, num_erased);
}

View file

@ -5,7 +5,7 @@ Subject: build_gn.patch
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index fcc00ee0e49f101cb1b10629747c4c4fa521776d..3232a0360e94e78621f7f672e3de4bdcc5f7b8d5 100644
index 387fdb2795a832ba8ee1187f3097f736c69e9839..590d457928ced573a7152a129bbfcf01309ee3c1 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

View file

@ -5,10 +5,10 @@ Subject: can_create_window.patch
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 520dcffb53534e76d739cff74ea58d49bdfb682a..783dc705f748bc6c9d3b8630ce12ad39ff2fd7d2 100644
index c5e56bc15cfbf95f7564cc4d080243c48e585f20..30b945c417d04106a05a0d3dcb86e5df87845c0c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3142,6 +3142,38 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3163,6 +3163,38 @@ void RenderFrameHostImpl::CreateNewWindow(
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
params->target_url.possibly_invalid_spec());
@ -47,7 +47,7 @@ index 520dcffb53534e76d739cff74ea58d49bdfb682a..783dc705f748bc6c9d3b8630ce12ad39
bool no_javascript_access = false;
// Filter out URLs to which navigation is disallowed from this context.
@@ -3170,6 +3202,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3191,6 +3223,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_.GetURL(), params->window_container_type,
params->target_url, params->referrer, params->frame_name,
params->disposition, *params->features,
@ -56,10 +56,10 @@ index 520dcffb53534e76d739cff74ea58d49bdfb682a..783dc705f748bc6c9d3b8630ce12ad39
&no_javascript_access);
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index e3b04edb5a301115d894190a64e734eb2c8b3499..254f94016b97620cfbc102cbbc7677cfcfe38e22 100644
index e9cb49ebc81d7b9babe25a0a9c9ddfdf1db843d9..23776e0911f2315b60451d132ddd3cd002a241a2 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -313,6 +313,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
@@ -300,6 +300,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
params->target_url = GURL("about:blank");
@ -68,7 +68,7 @@ index e3b04edb5a301115d894190a64e734eb2c8b3499..254f94016b97620cfbc102cbbc7677cf
std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
mojom::CreateNewWindowReplyPtr) {}));
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index fb4732e6e666044233716fc3ae629dedad7b2618..804086522994b038c86a31e7acdcffc1e039c260 100644
index c2ce967c17ac6a61b3aeb6e26f88212211f7a9f4..8c8d149b9c0de26e050b196a1a2a1bf6e953f121 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -12,6 +12,8 @@ import "content/public/common/resource_type.mojom";
@ -80,7 +80,7 @@ index fb4732e6e666044233716fc3ae629dedad7b2618..804086522994b038c86a31e7acdcffc1
import "mojo/public/mojom/base/string16.mojom";
import "mojo/public/mojom/base/unguessable_token.mojom";
import "services/network/public/mojom/url_loader.mojom";
@@ -157,6 +159,24 @@ interface FrameFactory {
@@ -168,6 +170,24 @@ interface FrameFactory {
CreateFrame(int32 frame_routing_id, Frame& frame);
};
@ -105,7 +105,7 @@ index fb4732e6e666044233716fc3ae629dedad7b2618..804086522994b038c86a31e7acdcffc1
struct CreateNewWindowParams {
// True if this open request came in the context of a user gesture.
//
@@ -196,6 +216,10 @@ struct CreateNewWindowParams {
@@ -207,6 +227,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@ -117,10 +117,10 @@ index fb4732e6e666044233716fc3ae629dedad7b2618..804086522994b038c86a31e7acdcffc1
// 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 2a896c7072caae655be1902b536d9172448abddb..bb54b89bef5c6f32e7b4a056336c85494e2a04de 100644
index 8e652e4b66f08ff86c3184adf0ef9704fab0d11c..12411003ad4d54576117cc719bff804da1706170 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -435,6 +435,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -453,6 +453,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -130,10 +130,10 @@ index 2a896c7072caae655be1902b536d9172448abddb..bb54b89bef5c6f32e7b4a056336c8549
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 fd5d62fee1172b07a692fcf6ce06a30096d25b03..3be31602689cb93b965729cc4e35cf6d23a8ec2f 100644
index bc2b501331e9d628c5285eee003ca3b55f3cb98f..89674a18276e34eebc0038e588ea4629a4eaca6c 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -162,6 +162,7 @@ class RenderFrameHost;
@@ -169,6 +169,7 @@ class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
class ResourceContext;
@ -141,7 +141,7 @@ index fd5d62fee1172b07a692fcf6ce06a30096d25b03..3be31602689cb93b965729cc4e35cf6d
class ServiceManagerConnection;
class SiteInstance;
class SpeechRecognitionManagerDelegate;
@@ -706,6 +707,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -734,6 +735,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -151,10 +151,10 @@ index fd5d62fee1172b07a692fcf6ce06a30096d25b03..3be31602689cb93b965729cc4e35cf6d
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 03d9cda9f95daa369101b6f922e0978061e0225f..edad9fc3198ca12bd326c9f407a62866373e3b29 100644
index 215c4a750f046939cb59ba8f53059eb4c3e35ef6..0e6199a8f594fd6c7384147c541e6c06a263f51e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -79,6 +79,7 @@
@@ -78,6 +78,7 @@
#include "content/renderer/ime_event_guard.h"
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/loader/request_extra_data.h"
@ -162,7 +162,7 @@ index 03d9cda9f95daa369101b6f922e0978061e0225f..edad9fc3198ca12bd326c9f407a62866
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/media/stream/media_stream_device_observer.h"
#include "content/renderer/media/video_capture_impl_manager.h"
@@ -1270,6 +1271,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
@@ -1421,6 +1422,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@ -210,10 +210,10 @@ index 03d9cda9f95daa369101b6f922e0978061e0225f..edad9fc3198ca12bd326c9f407a62866
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index fe0e3720ea5d60d65ecbbc3836bc87785997a513..4a31617b5a898b0f6d7e25cc05992d36862678a0 100644
index 7da9182635afa02226a0848d35d7ec372f4fc785..048e1126a31cf5bcaf9e0203af4a0c449db190f5 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -276,6 +276,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
@@ -279,6 +279,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -223,7 +223,7 @@ index fe0e3720ea5d60d65ecbbc3836bc87785997a513..4a31617b5a898b0f6d7e25cc05992d36
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
index fa458cf0c92d6f75ecd71e296ba1af88ace400dc..cdd95a1d88e582a31aca43cd2fc9001113dcde1c 100644
index c601d6e4b28dfb4216b2d7072ba1ac9dd7345f42..00bbd237ff8afd6567218363423538b9e38ae1b0 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.h
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
@@ -66,6 +66,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {

View file

@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 5c38d0b1ce7c6d395126b6cc428467d31bb3c0a5..4ffaf2a3301eec188b1b40b06b2152f17b4c7641 100644
index 7826495469120f46d1bd8529139f7567f45138ef..166e5a31d5f36876b339c5cf66527fc88e7c26af 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -15,7 +15,9 @@
@ -20,7 +20,7 @@ index 5c38d0b1ce7c6d395126b6cc428467d31bb3c0a5..4ffaf2a3301eec188b1b40b06b2152f1
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -185,12 +187,14 @@ static SupportedCodecs GetSupportedCodecs(
@@ -187,12 +189,14 @@ static SupportedCodecs GetSupportedCodecs(
// Returns persistent-license session support.
static EmeSessionTypeSupport GetPersistentLicenseSupport(
bool supported_by_the_cdm) {

View file

@ -15,7 +15,7 @@ code was around 2012-2013, and this is purely UI, I don't think they have
automated tests for it).
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index f57c1ded416a7a642bdf8502daeb40afe539903b..59fdd948c3c5e57374beef801b96f5bfd1343b1c 100644
index c0c7c21131c3dd8d197ad1808142915704406d9d..43b5e57e91a451e79c3f77450d99cffc222842fd 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -4,7 +4,7 @@
@ -44,11 +44,10 @@ index f57c1ded416a7a642bdf8502daeb40afe539903b..59fdd948c3c5e57374beef801b96f5bf
// Shows or hides the Task Manager. |browser| can be NULL when called from Ash.
// Returns a pointer to the underlying TableModel, which can be ignored, or used
// for testing.
@@ -129,11 +130,11 @@ void ShowBookmarkAppDialog(content::WebContents* web_contents,
void ShowPWAInstallDialog(content::WebContents* web_contents,
const WebApplicationInfo& web_app_info,
AppInstallationAcceptanceCallback callback);
-
@@ -138,10 +139,11 @@ void ShowPWAInstallDialog(content::WebContents* web_contents,
// user interaction.
void SetAutoAcceptPWAInstallDialogForTesting(bool auto_accept);
+#endif
// Shows a color chooser that reports to the given WebContents.
content::ColorChooser* ShowColorChooser(content::WebContents* web_contents,
@ -58,7 +57,7 @@ index f57c1ded416a7a642bdf8502daeb40afe539903b..59fdd948c3c5e57374beef801b96f5bf
#if defined(OS_MACOSX)
// Bridging methods that show/hide the toolkit-views based Task Manager on Mac.
@@ -301,13 +302,13 @@ void ShowChromeCleanerRebootPrompt(
@@ -310,13 +312,13 @@ void ShowChromeCleanerRebootPrompt(
safe_browsing::ChromeCleanerRebootDialogController* dialog_controller);
#endif // OS_WIN

View file

@ -18,7 +18,7 @@ diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/
index f612ba2fb7952654663cbce596c43b0b65d5ea29..77c2c68e6f9bfec3fc887e2119243cee1321cd17 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -20,6 +20,26 @@ using extensions::GlobalShortcutListenerMac;
@@ -20,6 +20,26 @@
namespace extensions {
@ -92,7 +92,7 @@ diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerat
index cd595b0c017d6e36a5d94f7c99fe0a098a52b067..941c1a76a1c3ebe542aebcc9dc301d19bab47057 100644
--- a/ui/base/accelerators/media_keys_listener_mac.mm
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
@@ -30,6 +30,12 @@ ui::KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
@@ -30,6 +30,12 @@
case NX_KEYTYPE_NEXT:
case NX_KEYTYPE_FAST:
return ui::VKEY_MEDIA_NEXT_TRACK;
@ -105,7 +105,7 @@ index cd595b0c017d6e36a5d94f7c99fe0a098a52b067..941c1a76a1c3ebe542aebcc9dc301d19
}
return ui::VKEY_UNKNOWN;
}
@@ -180,7 +186,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy,
@@ -180,7 +186,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&

View file

@ -5,10 +5,10 @@ Subject: compositor_delegate.patch
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 511d805187b15325f72c574ad37fb43e4e5e2df6..5fb01fee0378ac807ee4fde6d4bea8d76db75d42 100644
index 642fff3b4367f0fe684d99cdcd4aee7d1a21cb40..45faeed249c0d92d8e146290fefddd5cf8f4f643 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -494,10 +494,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
@@ -493,10 +493,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
// surfaces as they are not following the correct mode.
DisableGpuCompositing(compositor.get());
}
@ -32,10 +32,10 @@ index 511d805187b15325f72c574ad37fb43e4e5e2df6..5fb01fee0378ac807ee4fde6d4bea8d7
} else {
DCHECK(context_provider);
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index e0ec33400b179a600d95501fb93826075ffc52eb..29ba88a504c33d850c7a3425bd7d874ac3323fe1 100644
index a1b6716fc79f06216edf150a4e34f678a0da1518..89a1c426e9a48504082a3119f837e3d5f22d45a3 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -24,6 +24,7 @@
@@ -25,6 +25,7 @@
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "components/viz/common/surfaces/local_surface_id.h"
#include "components/viz/host/host_frame_sink_client.h"
@ -43,7 +43,7 @@ index e0ec33400b179a600d95501fb93826075ffc52eb..29ba88a504c33d850c7a3425bd7d874a
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
@@ -199,6 +200,15 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -200,6 +201,15 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
};
@ -59,7 +59,7 @@ index e0ec33400b179a600d95501fb93826075ffc52eb..29ba88a504c33d850c7a3425bd7d874a
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -239,6 +249,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -240,6 +250,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -69,7 +69,7 @@ index e0ec33400b179a600d95501fb93826075ffc52eb..29ba88a504c33d850c7a3425bd7d874a
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -461,6 +474,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -463,6 +476,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;

View file

@ -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 eb942391306e86e8ee8dc2584c63440b10ec76bd..9111cf18b7fc8fb67e7ee65e3cd76bd1e713aee8 100644
index 5cea69cfba0058041766ff25b32afbe6cfb6d59d..0d427b35f0f4762fc74f5aceac3923f98a2134f7 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1571,7 +1571,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1582,7 +1582,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
}
base::RunLoop run_loop;

View file

@ -1,86 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 18 Oct 2018 17:06:46 -0700
Subject: crashpad_http_status.patch
backport of crashpad f540abb506
diff --git a/third_party/crashpad/crashpad/util/net/http_transport.h b/third_party/crashpad/crashpad/util/net/http_transport.h
index f91a55612a2ffc2f4a78ff48ceba6174adc58cbf..acd4e442462b031dd304f303cdaa3664f5cffb64 100644
--- a/third_party/crashpad/crashpad/util/net/http_transport.h
+++ b/third_party/crashpad/crashpad/util/net/http_transport.h
@@ -90,7 +90,7 @@ class HTTPTransport {
//! if the response body is not required.
//!
//! \return Whether or not the request was successful, defined as returning
- //! a HTTP status 200 (OK) code.
+ //! a HTTP status code in the range 200-203 (inclusive).
virtual bool ExecuteSynchronously(std::string* response_body) = 0;
protected:
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
index 8d5f78cc6efc8b8e349958f51c78921a8c163c4e..a433bb357da5865144ade7d3663b1c9b36199f8e 100644
--- a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
+++ b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
@@ -293,7 +293,7 @@ bool HTTPTransportMac::ExecuteSynchronously(std::string* response_body) {
return false;
}
NSInteger http_status = [http_response statusCode];
- if (http_status != 200) {
+ if (http_status < 200 || http_status > 203) {
LOG(ERROR) << base::StringPrintf("HTTP status %ld",
implicit_cast<long>(http_status));
return false;
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
index f0e2dc14a8a487b5960d700be57100c9bed4f271..34d8deeb5c25f6b49fd0acadce67a3816869d3da 100644
--- a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
+++ b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
@@ -457,10 +457,18 @@ bool ReadResponseLine(Stream* stream) {
LOG(ERROR) << "ReadLine";
return false;
}
- static constexpr const char kHttp10[] = "HTTP/1.0 200 ";
- static constexpr const char kHttp11[] = "HTTP/1.1 200 ";
- return StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
- StartsWith(response_line, kHttp11, strlen(kHttp11));
+ static constexpr const char kHttp10[] = "HTTP/1.0 ";
+ static constexpr const char kHttp11[] = "HTTP/1.1 ";
+ if (!(StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
+ StartsWith(response_line, kHttp11, strlen(kHttp11))) ||
+ response_line.size() < strlen(kHttp10) + 3 ||
+ response_line.at(strlen(kHttp10) + 3) != ' ') {
+ return false;
+ }
+ unsigned int http_status = 0;
+ return base::StringToUint(response_line.substr(strlen(kHttp10), 3),
+ &http_status) &&
+ http_status >= 200 && http_status <= 203;
}
bool ReadResponseHeaders(Stream* stream, HTTPHeaders* headers) {
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_test.cc b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
index 7b5f41dfd1e18b212d7dd349cff8f4396e20dbc3..d73dc99217e08f7c84ded50868cbef02141a6b9b 100644
--- a/third_party/crashpad/crashpad/util/net/http_transport_test.cc
+++ b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
@@ -137,7 +137,7 @@ class HTTPTransportTestFixture : public MultiprocessExec {
std::string response_body;
bool success = transport->ExecuteSynchronously(&response_body);
- if (response_code_ == 200) {
+ if (response_code_ >= 200 && response_code_ <= 203) {
EXPECT_TRUE(success);
std::string expect_response_body = random_string + "\r\n";
EXPECT_EQ(response_body, expect_response_body);
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_win.cc b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
index 18d343ccef0396ee6679f4b5fd8316c3109003f4..2919bc11d0ba4bf84a11e146bf2961b830db35fe 100644
--- a/third_party/crashpad/crashpad/util/net/http_transport_win.cc
+++ b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
@@ -375,7 +375,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
return false;
}
- if (status_code != 200) {
+ if (status_code < 200 || status_code > 203) {
LOG(ERROR) << base::StringPrintf("HTTP status %lu", status_code);
return false;
}

View file

@ -59,7 +59,7 @@ index 3f80e73535c8b4a2bcff08821e3585306f691c8b..bf40b94ad24c0621cbe093002c335569
}
diff --git a/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
index 0e7c40b732ec283e006b2e3517c42e699d7e3102..7c513d95a586d8ac80e691aa89abaf49793e9a18 100644
index be183011e7f4e0af6f7676ac8a343ef36d2e7bc2..8b40c554912754b05d3bc5dc4889667f87935a0a 100644
--- a/third_party/blink/renderer/platform/wtf/text/string_impl.h
+++ b/third_party/blink/renderer/platform/wtf/text/string_impl.h
@@ -258,21 +258,21 @@ class WTF_EXPORT StringImpl {

View file

@ -133,19 +133,18 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5
protected:
virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 0c9ba953cb3c268930fb101105c22416ed3cae08..c2482774f0747a0300d72d7ef05ed429caaf7d19 100644
index f5f62407f0d6dbeb91db4d446b0260ecb5c66f28..818d2fee48c793b2ece7f761d7835a9077bf2e70 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -5,11 +5,15 @@
#include "chrome/browser/media/webrtc/native_desktop_media_list.h"
@@ -6,13 +6,14 @@
#include "base/hash.h"
+#include "base/single_thread_task_runner.h"
#include "base/single_thread_task_runner.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task_scheduler/post_task.h"
+#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "base/task/post_task.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "chrome/browser/media/webrtc/desktop_media_list_observer.h"
-#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
@ -153,148 +152,3 @@ index 0c9ba953cb3c268930fb101105c22416ed3cae08..c2482774f0747a0300d72d7ef05ed429
#include "media/base/video_util.h"
#include "third_party/libyuv/include/libyuv/scale_argb.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -76,11 +80,13 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
class NativeDesktopMediaList::Worker
: public webrtc::DesktopCapturer::Callback {
public:
- Worker(base::WeakPtr<NativeDesktopMediaList> media_list,
+ Worker(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ base::WeakPtr<NativeDesktopMediaList> media_list,
DesktopMediaID::Type type,
std::unique_ptr<webrtc::DesktopCapturer> capturer);
~Worker() override;
+ void Start();
void Refresh(const DesktopMediaID::Id& view_dialog_id);
void RefreshThumbnails(const std::vector<DesktopMediaID>& native_ids,
@@ -93,6 +99,9 @@ class NativeDesktopMediaList::Worker
void OnCaptureResult(webrtc::DesktopCapturer::Result result,
std::unique_ptr<webrtc::DesktopFrame> frame) override;
+ // Task runner used for capturing operations.
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+
base::WeakPtr<NativeDesktopMediaList> media_list_;
DesktopMediaID::Type type_;
@@ -106,17 +115,27 @@ class NativeDesktopMediaList::Worker
};
NativeDesktopMediaList::Worker::Worker(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
base::WeakPtr<NativeDesktopMediaList> media_list,
DesktopMediaID::Type type,
std::unique_ptr<webrtc::DesktopCapturer> capturer)
- : media_list_(media_list), type_(type), capturer_(std::move(capturer)) {
- capturer_->Start(this);
+ : task_runner_(task_runner),
+ media_list_(media_list),
+ type_(type),
+ capturer_(std::move(capturer)) {}
+
+NativeDesktopMediaList::Worker::~Worker() {
+ DCHECK(task_runner_->BelongsToCurrentThread());
}
-NativeDesktopMediaList::Worker::~Worker() {}
+void NativeDesktopMediaList::Worker::Start() {
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ capturer_->Start(this);
+}
void NativeDesktopMediaList::Worker::Refresh(
const DesktopMediaID::Id& view_dialog_id) {
+ DCHECK(task_runner_->BelongsToCurrentThread());
std::vector<SourceDescription> result;
webrtc::DesktopCapturer::SourceList sources;
@@ -163,6 +182,7 @@ void NativeDesktopMediaList::Worker::Refresh(
void NativeDesktopMediaList::Worker::RefreshThumbnails(
const std::vector<DesktopMediaID>& native_ids,
const gfx::Size& thumbnail_size) {
+ DCHECK(task_runner_->BelongsToCurrentThread());
ImageHashesMap new_image_hashes;
// Get a thumbnail for each native source.
@@ -210,17 +230,30 @@ NativeDesktopMediaList::NativeDesktopMediaList(
std::unique_ptr<webrtc::DesktopCapturer> capturer)
: DesktopMediaListBase(base::TimeDelta::FromMilliseconds(
kDefaultNativeDesktopMediaListUpdatePeriod)),
+ thread_("DesktopMediaListCaptureThread"),
weak_factory_(this) {
type_ = type;
- capture_task_runner_ = base::CreateSequencedTaskRunnerWithTraits(
- {base::MayBlock(), base::TaskPriority::USER_VISIBLE});
- worker_.reset(
- new Worker(weak_factory_.GetWeakPtr(), type, std::move(capturer)));
+#if defined(OS_WIN) || defined(OS_MACOSX)
+ // On Windows/OSX the thread must be a UI thread.
+ base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_UI;
+#else
+ base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT;
+#endif
+ thread_.StartWithOptions(base::Thread::Options(thread_type, 0));
+
+ worker_.reset(new Worker(thread_.task_runner(), weak_factory_.GetWeakPtr(),
+ type, std::move(capturer)));
+
+ thread_.task_runner()->PostTask(
+ FROM_HERE,
+ base::BindOnce(&Worker::Start, base::Unretained(worker_.get())));
}
NativeDesktopMediaList::~NativeDesktopMediaList() {
- capture_task_runner_->DeleteSoon(FROM_HERE, worker_.release());
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ thread_.task_runner()->DeleteSoon(FROM_HERE, worker_.release());
+ thread_.Stop();
}
void NativeDesktopMediaList::Refresh() {
@@ -230,7 +263,7 @@ void NativeDesktopMediaList::Refresh() {
new_aura_thumbnail_hashes_.clear();
#endif
- capture_task_runner_->PostTask(
+ thread_.task_runner()->PostTask(
FROM_HERE,
base::BindOnce(&Worker::Refresh, base::Unretained(worker_.get()),
view_dialog_id_.id));
@@ -280,7 +313,7 @@ void NativeDesktopMediaList::RefreshForAuraWindows(
#if defined(USE_AURA)
pending_native_thumbnail_capture_ = true;
#endif
- capture_task_runner_->PostTask(
+ thread_.task_runner()->PostTask(
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
base::Unretained(worker_.get()), native_ids,
thumbnail_size_));
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.h b/chrome/browser/media/webrtc/native_desktop_media_list.h
index e6f0e17b05ee4dc45827dc2dd00d484201f74646..75c9ca04ce481ab79615515da948c29d449865dc 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.h
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.h
@@ -8,7 +8,7 @@
#include <memory>
#include "base/memory/weak_ptr.h"
-#include "base/sequenced_task_runner.h"
+#include "base/threading/thread.h"
#include "chrome/browser/media/webrtc/desktop_media_list_base.h"
#include "content/public/browser/desktop_media_id.h"
#include "ui/gfx/image/image.h"
@@ -44,12 +44,7 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
gfx::Image image);
#endif
- // Task runner used for the |worker_|.
- scoped_refptr<base::SequencedTaskRunner> capture_task_runner_;
-
- // An object that does all the work of getting list of sources on a background
- // thread (see |capture_task_runner_|). Destroyed on |capture_task_runner_|
- // after the model is destroyed.
+ base::Thread thread_;
std::unique_ptr<Worker> worker_;
#if defined(USE_AURA)

View file

@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index d5f442f71da7ad3b7087af40967d6df0579803f5..a8f39b0601157dc75d35460eccff67f36bc07941 100644
index 54eb0fcd0bf79bef4c7bfbd07bea27b005e73f61..90a11451be65a152f7bcc77eef360b1b41e41a28 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -281,6 +281,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -282,6 +282,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
} // namespace
@ -29,7 +29,7 @@ index d5f442f71da7ad3b7087af40967d6df0579803f5..a8f39b0601157dc75d35460eccff67f3
// A scoping class that prevents a window from being able to redraw in response
// to invalidations that may occur within it for the lifetime of the object.
//
@@ -332,6 +336,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
@@ -333,6 +337,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
cancel_unlock_(false),
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
::IsWindow(hwnd_) &&
@ -37,7 +37,7 @@ index d5f442f71da7ad3b7087af40967d6df0579803f5..a8f39b0601157dc75d35460eccff67f3
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -940,6 +945,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
@@ -933,6 +938,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
hwnd());
}
@ -49,10 +49,10 @@ index d5f442f71da7ad3b7087af40967d6df0579803f5..a8f39b0601157dc75d35460eccff67f3
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 91afedec8e2951e3f0176fce2e84261a3846d218..fa514d102538e141f48ff6af5f5c8fc4d6da17b0 100644
index 593c3c0e95b50c9847994af705c053586e78689f..43e4a26502d837972d8acc68a1e7e7550766ddf6 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -181,6 +181,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
@@ -182,6 +182,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
typedef std::set<DWORD> TouchIDs;
enum class DwmFrameState { OFF, ON };
@ -62,7 +62,7 @@ index 91afedec8e2951e3f0176fce2e84261a3846d218..fa514d102538e141f48ff6af5f5c8fc4
HICON GetDefaultWindowIcon() const override;
HICON GetSmallWindowIcon() const override;
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
index 1b2d98a857385d31b5f401d685fd9524da228726..dd080180aebda193ef885bf7f41587802787a3c6 100644
index b3f670dddf8936e29932345ef0516318b904d0ef..a63d727930a43c680ef3672921e63c35fc34191d 100644
--- a/ui/views/win/hwnd_message_handler_delegate.h
+++ b/ui/views/win/hwnd_message_handler_delegate.h
@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {

View file

@ -10,10 +10,10 @@ We should revisit this bug after upgrading to newer versions of Chrome,
this patch was introduced in Chrome 66.
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index b06a4b9242d30869f9b37fee1dc3ecbe7dcc06d4..b7793aaa094ad342fa15491653baac268a89d524 100644
index bad4c9fc4ebb19e6155ef7aeb3dfea3416611500..a08cbd5b2d5aa5e6ce903b75ef919084ad5a6135 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -286,6 +286,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
@@ -260,6 +260,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
void RenderFrameProxyHost::OnDetach() {
if (frame_tree_node_->render_manager()->ForInnerDelegate()) {

View file

@ -5,10 +5,10 @@ Subject: disable_hidden.patch
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 9ab96c3f933b7ca0c8a7da396bd6015e620f2e81..28879dc5e9bb3f391513da6a7ad829244b39799d 100644
index 437b43ade73d0a154be0bf4aa14c29a9081b04d0..70e985b7b13031c760d2e791930b1361586a1707 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -712,6 +712,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -718,6 +718,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@ -19,7 +19,7 @@ index 9ab96c3f933b7ca0c8a7da396bd6015e620f2e81..28879dc5e9bb3f391513da6a7ad82924
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 4af5870e7c40056b98e67f71c2c037490f2634f2..f2e19fe92e56d5d98a3ea0491a719c899b0cdcfe 100644
index c2d8cd562433ebdbb3372cae530c8967edb37225..c1e59acbfb0392833ddbcc4da60664c3eb51c7d6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -154,6 +154,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl

View file

@ -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 5bfe30b8b88073b83c8128b889298bd9af5938f3..70129284e60b20258b2e5d3506f93600a2628fc2 100644
index e628c1ab8242d5c2fd63617e3a0816b14b2fef90..a2311194b1bbfc8e6d0d768c199b6f19a02f0fe9 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -3508,7 +3508,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
@@ -3592,7 +3592,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);

View file

@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68.
Remove the patch during the Chromium 69 upgrade.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index d5d8e48305ba20926415a3e94f8732baf327a14b..070c6be426f4affcfb3a08199f8f1bd71ebd5f52 100644
index 7b47402ebe6a27215b54853182b21abfddf67af8..68bf39ea6aed6f84825b2d850d3e5375e8cc2923 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1790,7 +1790,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
@@ -1726,7 +1726,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
"graphics/paint/drawing_display_item_test.cc",
"graphics/paint/drawing_recorder_test.cc",
"graphics/paint/float_clip_rect_test.cc",

View file

@ -7,7 +7,7 @@ Expose URLRequestContextGetter::{Add,Remove}Observer.
This patch should be removed once we switch to using the net service (cc @robo)
diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
index 7a2dcd9de423cca8e39f84e7f6839eefd86c11ae..494526c843b9e39eba46785618960c3e94d06866 100644
index def76d3902f30ae1384ae5f629fa116b3975fa86..e5ee0bfa93f497f18bdb3ad7cd51a6726dc87f3e 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -79,11 +79,16 @@ class NET_EXPORT URLRequestContextGetter

View file

@ -5,10 +5,10 @@ Subject: gin_enable_disable_v8_platform.patch
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index e3a23cf30e42e11da1880c4ef13daf254b931d4b..e099fd3f03e56bbbf3ceab45edb8f4b8eb0b2b0f 100644
index 4491b392412caac052bf9e41c70a28086ada8a17..8ec7775b78b3645dbac5ee518404ca9a70122153 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -116,9 +116,10 @@ IsolateHolder::~IsolateHolder() {
@@ -122,9 +122,10 @@ IsolateHolder::~IsolateHolder() {
void IsolateHolder::Initialize(ScriptMode mode,
V8ExtrasMode v8_extras_mode,
v8::ArrayBuffer::Allocator* allocator,
@ -22,10 +22,10 @@ index e3a23cf30e42e11da1880c4ef13daf254b931d4b..e099fd3f03e56bbbf3ceab45edb8f4b8
g_reference_table = reference_table;
}
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index a70ad1ce51a9e1ba3f4152bde9f1bb097ffe6341..84cf66e6e9cdbfcdc3d8f0a1f0c122e5994ef1c2 100644
index 6945a60181c420106b1a1defe2a2149b70a80d82..535b0caa02f89f8a0fde841057d35e3834ea087f 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -83,7 +83,8 @@ class GIN_EXPORT IsolateHolder {
@@ -97,7 +97,8 @@ class GIN_EXPORT IsolateHolder {
static void Initialize(ScriptMode mode,
V8ExtrasMode v8_extras_mode,
v8::ArrayBuffer::Allocator* allocator,
@ -36,7 +36,7 @@ index a70ad1ce51a9e1ba3f4152bde9f1bb097ffe6341..84cf66e6e9cdbfcdc3d8f0a1f0c122e5
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index be2b9149e4407a7a946aa9fd240781fe25e9a51e..816e56aa4f6becbc8840ca567b30e874d72825fb 100644
index cf51b27dd999391e28a3d69c2694d90d61ea214f..50ba87af55fd69dcf0ade1a1736e89ae13b4482f 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -236,12 +236,14 @@ LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
@ -54,8 +54,8 @@ index be2b9149e4407a7a946aa9fd240781fe25e9a51e..816e56aa4f6becbc8840ca567b30e874
+ if (create_v8_platform)
+ v8::V8::InitializePlatform(V8Platform::Get());
if (base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
static const char optimize[] = "--opt";
if (!base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
// We avoid explicitly passing --opt if kV8OptimizeJavascript is enabled
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 6f3265ba4d06e70930630432bf739f89847d0b3c..29f28bebbdcde5a7f1c7b31a625d30f1b8079c39 100644
--- a/gin/v8_initializer.h

View file

@ -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 b/tools/gritsettings/resource_ids
index efa6e5c90b88c25f412ad4e49c94f82a87f0f456..a40476bb9c8794f1db05b930e80ad483759a3508 100644
index 4d9d81bcc3fdd37a7d45fafa4a1fdf85528d6f91..637d6f842d08ec92b9dcddc0722cef8254cd8f87 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -407,6 +407,11 @@
@@ -420,6 +420,11 @@
"includes": [28900],
},

View file

@ -6,10 +6,10 @@ Subject: gtk_visibility.patch
Allow electron to depend on GTK in the GN build.
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
index deae4d3455a8b54292dd3abc0a316f9ca60b4104..5f5db2fd6e5ee8532e5fa796988ea4ed58265b0d 100644
index a2b40d82674eec5c20f705ace36cf590d46b307a..98b93a08b9a0bdbbd68925e94bf4247666b69cc4 100644
--- a/build/config/linux/gtk/BUILD.gn
+++ b/build/config/linux/gtk/BUILD.gn
@@ -18,6 +18,7 @@ group("gtk") {
@@ -26,6 +26,7 @@ group("gtk") {
visibility = [
"//chrome/test:interactive_ui_tests",
"//chrome/test:unit_tests",

View file

@ -8,20 +8,20 @@ needs to register on an isolate so that it can be used later
down in the initialization process of an isolate.
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index e099fd3f03e56bbbf3ceab45edb8f4b8eb0b2b0f..4b362843e4f8f3a1e2abfa152a51554b1d36dd96 100644
index 8ec7775b78b3645dbac5ee518404ca9a70122153..c82ca4d00398cb01ffea20b8d8d937329e764e45 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -46,7 +46,8 @@ IsolateHolder::IsolateHolder(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
@@ -52,7 +52,8 @@ IsolateHolder::IsolateHolder(
AccessMode access_mode,
AllowAtomicsWaitMode atomics_wait_mode,
IsolateType isolate_type,
- IsolateCreationMode isolate_creation_mode)
+ IsolateCreationMode isolate_creation_mode,
+ v8::Isolate* isolate)
: access_mode_(access_mode) {
: access_mode_(access_mode), isolate_type_(isolate_type) {
DCHECK(task_runner);
DCHECK(task_runner->BelongsToCurrentThread());
@@ -54,7 +55,11 @@ IsolateHolder::IsolateHolder(
@@ -60,7 +61,11 @@ IsolateHolder::IsolateHolder(
v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first";
@ -35,13 +35,13 @@ index e099fd3f03e56bbbf3ceab45edb8f4b8eb0b2b0f..4b362843e4f8f3a1e2abfa152a51554b
new PerIsolateData(isolate_, allocator, access_mode_, task_runner));
if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) {
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 84cf66e6e9cdbfcdc3d8f0a1f0c122e5994ef1c2..cc0d65e4e4be5818d526c0a46a60e1165697cac0 100644
index 535b0caa02f89f8a0fde841057d35e3834ea087f..c68d45722b50654fb92efeea28f5a0d4c9018b49 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -66,7 +66,8 @@ class GIN_EXPORT IsolateHolder {
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
@@ -80,7 +80,8 @@ class GIN_EXPORT IsolateHolder {
AccessMode access_mode,
AllowAtomicsWaitMode atomics_wait_mode,
IsolateType isolate_type,
- IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal);
+ IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
+ v8::Isolate* isolate = nullptr);

View file

@ -6,7 +6,7 @@ Subject: libgtkui_export.patch
Export libgtkui symbols for the GN component build.
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
index d9f245070249f5f153bd8fe11e0a5e718c7d3629..a0f033c3e3f7f3996897f5f969b2a209d7d5cf3f 100644
index 1efb064df26488d9d893e1e58cb17110c10501f3..bb1aea692a356c206baf2750ed4c98fa86d39fb9 100644
--- a/chrome/browser/ui/libgtkui/gtk_util.h
+++ b/chrome/browser/ui/libgtkui/gtk_util.h
@@ -11,6 +11,7 @@
@ -58,18 +58,18 @@ index d9f245070249f5f153bd8fe11e0a5e718c7d3629..a0f033c3e3f7f3996897f5f969b2a209
// Renders the border from the style context created by
// GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
diff --git a/chrome/browser/ui/libgtkui/skia_utils_gtk.h b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
index e05fbe9d8b2fe537a5eecbd3642dcc9eb848f3d7..3afca9a72ab69fed0144cfff8159aff5a480c4f5 100644
index bd6ed68a11b0b6c08962f688c799bd0f6b8a8d0e..b1184475e0ab9f381dc3c78b1092e2e0ec59d60b 100644
--- a/chrome/browser/ui/libgtkui/skia_utils_gtk.h
+++ b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
@@ -7,6 +7,7 @@
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
#include <stdint.h>
+#include "chrome/browser/ui/libgtkui/libgtkui_export.h"
#include "third_party/skia/include/core/SkColor.h"
typedef struct _GdkColor GdkColor;
@@ -41,7 +42,7 @@ const SkBitmap GdkPixbufToImageSkia(GdkPixbuf* pixbuf);
#if !GTK_CHECK_VERSION(3, 90, 0)
@@ -48,7 +49,7 @@ const SkBitmap GdkPixbufToImageSkia(GdkPixbuf* pixbuf);
// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so
// it is an expensive operation. The returned GdkPixbuf will have a refcount of
// 1, and the caller is responsible for unrefing it when done.

View file

@ -6,10 +6,10 @@ Subject: mas-audiodeviceduck.patch
Removes usage of the AudioDeviceDuck private API.
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index 53586b888d82b9602e3f76b84072a1e6a7df1ec0..c1d750dbf32d9c56d557e5bf5ff5d63a3abe12ef 100644
index c0579e95374a12c5fd19f8c32c85ef0aab365ea1..5a619362fef5f03b448c5a35b5106f6f50bf8ff5 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -31,19 +31,23 @@
@@ -32,19 +32,23 @@
namespace {
extern "C" {

View file

@ -9,7 +9,7 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e25fe7ca21 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -26,7 +26,6 @@ CFTypeID SecKeyGetTypeID();
@@ -26,7 +26,6 @@
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
@ -17,7 +17,7 @@ index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e2
#endif
} // extern "C"
@@ -325,8 +324,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
@@ -325,8 +324,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
@ -27,7 +27,7 @@ index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e2
return ns_val;
}
@@ -394,9 +392,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
@@ -394,9 +392,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
return (CTFontRef)(cf_val);
}

View file

@ -7,10 +7,10 @@ Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus
private API.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index f14c045d47add3159e9099a8bdb511b233a2911b..9c8751a6fe0bcd0c69cc47dbbcf4fcc8a5c6684f 100644
index f589d015d71e486bad5f9d267b1f779b0b53d28b..2397d722c12d1f57d75d38045b198813d578ea78 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -274,8 +274,10 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -273,8 +273,10 @@ int GpuMain(const MainFunctionParams& parameters) {
std::unique_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
main_message_loop.reset(new base::MessageLoop(std::move(pump)));

View file

@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
extern "C" {
// Kill ring calls. Would be better to use NSKillRing.h, but that's not
@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing();
@@ -39,38 +40,53 @@
void _NSNewKillRingSequence();
void _NSSetKillRingToYankedState();
}
@ -92,7 +92,7 @@ index 7a1260db0a139f9f3f8a823af2c220f36162812a..bf9cf7046e2fc9cdfee5b92f2a348185
namespace blink {
@@ -73,10 +75,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
@@ -73,10 +75,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
// behavior change while remaining a fragile solution.
// https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
if (!use_ns_text_field_cell) {
@ -105,7 +105,7 @@ index 7a1260db0a139f9f3f8a823af2c220f36162812a..bf9cf7046e2fc9cdfee5b92f2a348185
return false;
}
@@ -162,10 +166,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
@@ -162,10 +166,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
const PaintInfo& paint_info,
const IntRect& r) {
LocalCurrentGraphicsContext local_context(paint_info.context, r);

View file

@ -38,10 +38,10 @@ index 44c85b5ad571c39c4580cb9d0cdf08f694c1dfb4..1714c403edf21092e43192f25cf0c19f
// 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 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518325ef70a 100644
index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964bba90d0c 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -135,6 +135,7 @@ NSDictionary* attributeToMethodNameMap = nil;
@@ -135,6 +135,7 @@
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
@ -49,7 +49,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
extern "C" {
// The following are private accessibility APIs required for cursor navigation
@@ -341,6 +342,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(
@@ -341,6 +342,7 @@ void AddMisspelledTextAttributes(
AddMisspelledTextAttributes(text_only_objects, attributed_text);
return [attributed_text attributedSubstringFromRange:range];
}
@ -57,7 +57,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(
@@ -595,7 +597,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -595,7 +597,9 @@ + (void)initialize {
{NSAccessibilityDOMIdentifierAttribute, @"domIdentifier"},
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@ -67,7 +67,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -630,13 +634,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -630,13 +634,17 @@ + (void)initialize {
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@ -85,7 +85,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1114,6 +1122,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -1116,6 +1124,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled];
}
@ -93,7 +93,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1124,6 +1133,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -1126,6 +1135,7 @@ - (id)endTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@ -101,7 +101,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -2029,6 +2039,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2034,6 +2044,7 @@ - (NSValue*)selectedTextRange {
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@ -109,7 +109,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
@@ -2061,6 +2072,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2066,6 +2077,7 @@ - (id)selectedTextMarkerRange {
anchorAffinity, *focusObject,
focusOffset, focusAffinity));
}
@ -117,7 +117,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
- (NSValue*)size {
if (![self instanceActive])
@@ -2093,6 +2105,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2098,6 +2110,7 @@ - (NSString*)sortDirection {
return nil;
}
@ -125,7 +125,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2103,6 +2116,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2108,6 +2121,7 @@ - (id)startTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@ -133,7 +133,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
// Returns a subrole based upon the role.
- (NSString*) subrole {
@@ -2405,12 +2419,14 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2413,12 +2427,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
@ -148,7 +148,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2527,6 +2543,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2535,6 +2551,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -156,7 +156,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
@@ -2704,6 +2721,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2712,6 +2729,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
NSString* text = GetTextForTextMarkerRange(parameter);
return [NSNumber numberWithInt:[text length]];
}
@ -164,7 +164,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2741,6 +2759,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2749,6 +2767,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -172,7 +172,7 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
if ([attribute isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
BrowserAccessibilityPositionInstance position =
@@ -2820,6 +2839,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -2828,6 +2847,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
return @(child->GetIndexInParent());
}
@ -181,10 +181,10 @@ index 07e9862b76a920438a779f22d67d3a45ab39abf7..efa52aa9de2f819f28109978c8cef518
return nil;
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 8e32a08226079c6d7515b8e784babacb3226ecd6..93bb7273684fa529bdc6049af2ed379f8b059397 100644
index 09cb7f8a55d1d85abbe88a2bfe76ff4b9c8f253b..18e262218fe657cde910e4b3eee7a8b524b7b5e8 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -437,6 +437,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
@@ -459,6 +459,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@ -192,7 +192,7 @@ index 8e32a08226079c6d7515b8e784babacb3226ecd6..93bb7273684fa529bdc6049af2ed379f
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -444,6 +445,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
@@ -466,6 +467,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@ -201,26 +201,23 @@ index 8e32a08226079c6d7515b8e784babacb3226ecd6..93bb7273684fa529bdc6049af2ed379f
}
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index 1e2cc38d3868ceccf8e45f5f82f57bcaa478f982..daa934c345e2686fd2174b7721d0f69a2d094692 100644
index e2122fb5fe931c911f92e709d1a643cd575972f3..da6847eea755a0b564fcd7daa36c4badc014c7f3 100644
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
@@ -22,6 +22,7 @@
#include "sandbox/mac/seatbelt.h"
@@ -23,10 +23,12 @@
#include "sandbox/mac/system_services.h"
#include "services/service_manager/sandbox/mac/sandbox_mac.h"
+#ifndef MAS_BUILD
extern "C" {
void CGSSetDenyWindowServerConnections(bool);
void CGSShutdownServerConnections();
@@ -30,6 +31,7 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus(
uint64_t flags,
bool (^connection_allowed)(CFDictionaryRef));
};
+#endif
namespace content {
@@ -38,6 +40,7 @@ namespace {
@@ -35,6 +37,7 @@
// This disconnects from the window server, and then indicates that Chrome
// should continue execution without access to launchservicesd.
void DisconnectWindowServer() {
@ -228,16 +225,16 @@ index 1e2cc38d3868ceccf8e45f5f82f57bcaa478f982..daa934c345e2686fd2174b7721d0f69a
// Now disconnect from WindowServer, after all objects have been warmed up.
// Shutting down the connection requires connecting to WindowServer,
// so do this before actually engaging the sandbox. This may cause two log
@@ -54,6 +57,7 @@ void DisconnectWindowServer() {
0, ^bool(CFDictionaryRef options) {
return false;
});
@@ -43,6 +46,7 @@ void DisconnectWindowServer() {
CGSShutdownServerConnections();
sandbox::DisableLaunchServices();
+#endif
}
// You are about to read a pretty disgusting hack. In a static initializer,
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 8b2092ec78f9f6bc1bd4c8af21ada74538f54d29..4f2ee8e2809790df68aedcee0946263143c7e758 100644
index 24a63be8a4be4f74f78fec810490d16cffaf43c1..414423de009d14ac6ac7bab2a260b3e0d7085d1f 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -34,6 +34,7 @@
@ -248,7 +245,7 @@ index 8b2092ec78f9f6bc1bd4c8af21ada74538f54d29..4f2ee8e2809790df68aedcee09462631
extern "C" {
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
@@ -47,6 +48,7 @@ extern "C" {
@@ -47,6 +48,7 @@
// [4] https://support.apple.com/kb/PH25091
void IOBluetoothPreferenceSetControllerPowerState(int state);
}
@ -256,7 +253,7 @@ index 8b2092ec78f9f6bc1bd4c8af21ada74538f54d29..4f2ee8e2809790df68aedcee09462631
namespace {
@@ -120,8 +122,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
@@ -120,8 +122,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@ -267,7 +264,7 @@ index 8b2092ec78f9f6bc1bd4c8af21ada74538f54d29..4f2ee8e2809790df68aedcee09462631
should_update_name_(true),
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
@@ -314,8 +318,12 @@ bool BluetoothAdapterMac::IsLowEnergyAvailable() {
@@ -317,8 +321,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
@ -281,10 +278,10 @@ index 8b2092ec78f9f6bc1bd4c8af21ada74538f54d29..4f2ee8e2809790df68aedcee09462631
void BluetoothAdapterMac::RemovePairingDelegateInternal(
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index 585ad87c6cb45d199bec8ed6e2430139546c83c2..4305c2e67dccb94a6cacd0664783906473f219e9 100644
index 6b7eccaf55c1b81a8db03c96f9c4353716fa8eed..7011139d73253a9f6771f0be4e6c8827493a64ea 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -196,6 +196,12 @@ source_set("audio") {
@@ -202,6 +202,12 @@ source_set("audio") {
"mac/scoped_audio_unit.cc",
"mac/scoped_audio_unit.h",
]
@ -422,23 +419,3 @@ index 9073364142e8f98c8872d9b5509f92f433e06624..2356add74dfae98299a4e2b207aa26fc
default:
NOTREACHED();
return nullptr;
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index 69c5f1f44d7e39e8480319b3da02725b5cb89eea..8841b59f6b70ac4687adfde61a1fba1424e57e48 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -43,6 +43,7 @@
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/dialog_delegate.h"
+#ifndef MAS_BUILD
extern "C" {
typedef int32_t CGSConnection;
@@ -52,6 +53,7 @@ CGError CGSSetWindowBackgroundBlurRadius(CGSConnection connection,
int radius);
}
+#endif
namespace {
constexpr auto kUIPaintTimeout = base::TimeDelta::FromSeconds(5);
} // namespace

View file

@ -7,7 +7,7 @@ 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/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc
index d91b54a4d2a15f4d48f6e82488e0c27c68c5abdb..7f946a5a04c97635f783aeecebc13fc20b26631e 100644
index 78508c8b6f1cd0b66f89337a60e3c4daabbe6513..e3f7d339a7c1b75d2d0fecd81b1c238da2233f80 100644
--- a/content/browser/cache_storage/cache_storage.cc
+++ b/content/browser/cache_storage/cache_storage.cc
@@ -132,7 +132,7 @@ class CacheStorage::CacheLoader {

View file

@ -6,7 +6,7 @@ Subject: pass RenderProcessHost through to PlatformNotificationService
this is so Electron can identify which renderer a notification came from
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
index cbcd2b5369fc513bed8190a83431826cba4e7637..1b4066649d926f18c0f1286243bfde848d80f1e3 100644
index 73c5d6b436e0a842d9e18f65d6174ff1ce736deb..85dc547425bbe7b1e2c4575ff8b10d18989d9ad1 100644
--- a/content/browser/notifications/blink_notification_service_impl.cc
+++ b/content/browser/notifications/blink_notification_service_impl.cc
@@ -40,9 +40,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@ -64,10 +64,10 @@ index 618c7bd88cde563eaaf93914039b5fb6d81db514..be08e89b5c6d57abf6b61ed9ee4b1c53
mojo::MakeRequest(&notification_service_ptr));
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 627e8dbd251d952f1567847775d8147e78e697b9..48c290470e4854a5e17c70bbfe178a34ffe7d73f 100644
index 13ece81608b6eddd3350c8aef870aa71abd4c7c8..0d7f7731609d690f30da205ff267a0728d00e778 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -122,12 +122,13 @@ void PlatformNotificationContextImpl::ShutdownOnIO() {
@@ -126,12 +126,13 @@ void PlatformNotificationContextImpl::ShutdownOnIO() {
}
void PlatformNotificationContextImpl::CreateService(
@ -84,10 +84,10 @@ index 627e8dbd251d952f1567847775d8147e78e697b9..48c290470e4854a5e17c70bbfe178a34
void PlatformNotificationContextImpl::RemoveService(
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index 7ea92b626202fcc3c1a830e74549ef87c206c4cd..faa3a1d8069f2d87c22cb40f98bc1d96db557464 100644
index 653f487b0b0e01de7cdda8483f081550a9077e98..da9e5f53d07eaaf11525efd996be9420f0189a88 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -21,6 +21,7 @@
@@ -22,6 +22,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/platform_notification_context.h"
@ -106,7 +106,7 @@ index 7ea92b626202fcc3c1a830e74549ef87c206c4cd..faa3a1d8069f2d87c22cb40f98bc1d96
// Removes |service| from the list of owned services, for example because the
diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
index 896f1b27ded7a73c62ec16d11418dacb0631d976..20a1f86a36fdefe3eeeb56a56eff874e2d6422fd 100644
index c3a8bdc572de68e824756f71b1386f2b2058bc01..2a340aa0f629f581ec400c89bea7e706fd73d79b 100644
--- a/content/browser/renderer_interface_binders.cc
+++ b/content/browser/renderer_interface_binders.cc
@@ -168,7 +168,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@ -117,12 +117,12 @@ index 896f1b27ded7a73c62ec16d11418dacb0631d976..20a1f86a36fdefe3eeeb56a56eff874e
+ ->CreateService(host, origin, std::move(request));
}));
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&BackgroundFetchServiceImpl::Create));
base::BindRepeating(&BackgroundFetchServiceImpl::CreateForWorker));
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
index 228fc30240c5251c0a4182f085b41c189e28365d..fd3e20c5335a09ba5bae31a76cc4a2cc3ad0a2f0 100644
index 0e9ce4383087415d8cd77e5b5e196492845a93cc..672df69c849b0ecbe46a08e9d8b0b34b375d5588 100644
--- a/content/public/browser/platform_notification_service.h
+++ b/content/public/browser/platform_notification_service.h
@@ -21,6 +21,7 @@ class GURL;
@@ -22,6 +22,7 @@ class GURL;
namespace content {
class BrowserContext;
@ -130,7 +130,7 @@ index 228fc30240c5251c0a4182f085b41c189e28365d..fd3e20c5335a09ba5bae31a76cc4a2cc
struct NotificationResources;
struct PlatformNotificationData;
@@ -38,6 +39,7 @@ class CONTENT_EXPORT PlatformNotificationService {
@@ -39,6 +40,7 @@ class CONTENT_EXPORT PlatformNotificationService {
// Displays the notification described in |notification_data| to the user.
// This method must be called on the UI thread.
virtual void DisplayNotification(
@ -139,7 +139,7 @@ index 228fc30240c5251c0a4182f085b41c189e28365d..fd3e20c5335a09ba5bae31a76cc4a2cc
const std::string& notification_id,
const GURL& origin,
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
index 28dc2651a3269a4e7483d7e84a25d85f98083fcf..646817070e7fd831eb6caff5a369357dce2cccec 100644
index b345a7442d2c64b814548dbfaf88d944a434122e..93b6962c5cac6fd915fbfbc7566fa77d836b45c5 100644
--- a/content/test/mock_platform_notification_service.cc
+++ b/content/test/mock_platform_notification_service.cc
@@ -20,6 +20,7 @@ MockPlatformNotificationService::MockPlatformNotificationService() = default;
@ -151,10 +151,10 @@ index 28dc2651a3269a4e7483d7e84a25d85f98083fcf..646817070e7fd831eb6caff5a369357d
const std::string& notification_id,
const GURL& origin,
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
index baf24f9effc9569f070757832681a82e62322d30..98a128e5d24933fbf98a5cfdda90b0611fce63d8 100644
index 8741d95ee8b01ff2fe0448d77f1c4fa8fa476376..d7f5fc10a654e87d17e383ae68bfb10740337468 100644
--- a/content/test/mock_platform_notification_service.h
+++ b/content/test/mock_platform_notification_service.h
@@ -42,6 +42,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
@@ -43,6 +43,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
// PlatformNotificationService implementation.
void DisplayNotification(

View file

@ -282,7 +282,7 @@ diff --git a/components/printing/common/print_messages.h b/components/printing/c
index d29bb6aedecd228e4bc02c84b86cce7151f33746..b489694b2701bddcfa95e187f5fcbf65d9a8ae8c 100644
--- a/components/printing/common/print_messages.h
+++ b/components/printing/common/print_messages.h
@@ -367,7 +367,10 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
@@ -363,7 +363,10 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
#if BUILDFLAG(ENABLE_PRINTING)
// Tells the RenderFrame to switch the CSS to print media type, renders every
// requested pages and switch back the CSS to display media type.
@ -452,7 +452,7 @@ diff --git a/components/printing/renderer/print_render_frame_helper.h b/componen
index 6e2d7e1467b7bc179b1a0fc30dd656de612708cb..8b1516ce5e11d915efdf06cc75f334cd92ce7d99 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -186,7 +186,9 @@ class PrintRenderFrameHelper
@@ -187,7 +187,9 @@ class PrintRenderFrameHelper
bool OnMessageReceived(const IPC::Message& message) override;
// Message handlers ---------------------------------------------------------
@ -463,7 +463,7 @@ index 6e2d7e1467b7bc179b1a0fc30dd656de612708cb..8b1516ce5e11d915efdf06cc75f334cd
void OnPrintForSystemDialog();
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void OnInitiatePrintPreview(bool has_selection);
@@ -238,7 +240,10 @@ class PrintRenderFrameHelper
@@ -239,7 +241,10 @@ class PrintRenderFrameHelper
// WARNING: |this| may be gone after this method returns.
void Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,

View file

@ -5,10 +5,10 @@ Subject: render_widget_host_view_base.patch
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 5561b7a1f3863a0e5b8d02c886bd9bd563095fa9..913b24cff3b2d41545e1d607f45762b8e884fd20 100644
index fae4c74c977bb32836bf315c3cf77cfe3499af7a..06030ddb6db221c52e665ddb86e71189e95f72a6 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -567,6 +567,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
@@ -582,6 +582,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
return frame_sink_id.is_valid() ? frame_sink_id : GetFrameSinkId();
}
@ -25,7 +25,7 @@ index 5561b7a1f3863a0e5b8d02c886bd9bd563095fa9..913b24cff3b2d41545e1d607f45762b8
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 8ed6ffd3a284fe58fe5e80a473f6d22f6b5bf8f7..dd7fdbbdee59658d674f93d3a5b769b6081d1813 100644
index 08454f68a01d204902d4023ac321793431ef4e0e..3dec5957125b68990bb3d539cb2a05a26e8d26d6 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -22,8 +22,10 @@
@ -39,7 +39,7 @@ index 8ed6ffd3a284fe58fe5e80a473f6d22f6b5bf8f7..dd7fdbbdee59658d674f93d3a5b769b6
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/input_event_ack_state.h"
#include "content/public/common/screen_info.h"
@@ -84,10 +86,12 @@ class CursorManager;
@@ -83,10 +85,12 @@ class CursorManager;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver;
@ -62,7 +62,7 @@ index 8ed6ffd3a284fe58fe5e80a473f6d22f6b5bf8f7..dd7fdbbdee59658d674f93d3a5b769b6
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -351,6 +358,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -358,6 +365,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

View file

@ -5,10 +5,10 @@ Subject: render_widget_host_view_mac.patch
diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d7405cae8eee 100644
index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c23c9cbfc 100644
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
@@ -174,6 +174,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -181,6 +181,11 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@ -20,7 +20,7 @@ index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d740
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -354,6 +359,9 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -364,6 +369,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -30,7 +30,7 @@ index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d740
return [self acceptsMouseEventsWhenInactive];
}
@@ -688,6 +696,10 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -726,6 +734,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);
@ -41,7 +41,7 @@ index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d740
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
localClient_->ForwardKeyboardEvent(event, latency_info);
@@ -1460,9 +1472,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -1498,9 +1510,11 @@ - (id)accessibilityFocusedUIElement {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@ -53,7 +53,7 @@ index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d740
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1471,7 +1485,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
@@ -1509,7 +1523,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,
@ -66,7 +66,7 @@ index 8b84322baa808f66044361d1033ec63805856227..70d244e01b75f98a6ed580475710d740
return validAttributesForMarkedText_.get();
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 0703dd02c90106a541acf173ec770e18e01c8841..7186a054cf559c64bb6ed410adcba724284d5735 100644
index 7e3a9aa6adc3ce0e3989279d2cc54f3dcb7eb40c..87705f669e022722f4e718532b44fad7780b1862 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -54,6 +54,7 @@

View file

@ -53,10 +53,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 a47af42a5a5afc1560f11ee0ccfa5fc177745caa..db8311121e755eb955ff05dee61a9706ae747977 100644
index 4865a69fe984b428c4b6591d11d778e6c2669d2d..e8795d76f895580a398f748724b55eb5848a3528 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1640,6 +1640,11 @@ if (is_chrome_branded && !is_android) {
@@ -1638,6 +1638,11 @@ if (is_chrome_branded && !is_android) {
}
}
@ -68,7 +68,7 @@ index a47af42a5a5afc1560f11ee0ccfa5fc177745caa..db8311121e755eb955ff05dee61a9706
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1661,6 +1666,7 @@ chrome_paks("packed_resources") {
@@ -1659,6 +1664,7 @@ chrome_paks("packed_resources") {
]
}
}

View file

@ -6,7 +6,7 @@ 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 c078565cef71d6a27f276b7a34dd9d060ea079d4..5c31ab7654d0168d232e9974105573fa01543aed 100644
index b36daaee097a56a5180cc79a6dcf730bc22afdce..2ec1bd2b81d64874fba60b4994c2dd215f4ddc42 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1610,7 +1610,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {

View file

@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch
Allows populating security tab info for devtools in Electron.
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c6400f535 100644
index c88e2729738d28ba626e14dd95924522bca2c336..a017ea4b37a39f6d65636f3c1aecc43838b80d4f 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -13,17 +13,23 @@
@ -42,9 +42,9 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
#endif
@@ -81,7 +87,9 @@ bool IsOriginSecureWithWhitelist(
@@ -79,7 +85,9 @@ bool IsOriginSecureWithWhitelist(
DEFINE_WEB_CONTENTS_USER_DATA_KEY(SecurityStateTabHelper);
} // namespace
+#if 0
using safe_browsing::SafeBrowsingUIManager;
@ -52,7 +52,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
SecurityStateTabHelper::SecurityStateTabHelper(
content::WebContents* web_contents)
@@ -89,8 +97,11 @@ SecurityStateTabHelper::SecurityStateTabHelper(
@@ -87,8 +95,11 @@ SecurityStateTabHelper::SecurityStateTabHelper(
logged_http_warning_on_current_navigation_(false),
is_incognito_(false) {
content::BrowserContext* context = web_contents->GetBrowserContext();
@ -66,7 +66,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
is_incognito_ = true;
}
}
@@ -175,6 +186,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
@@ -173,6 +184,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
}
@ -74,7 +74,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
// Security indicator UI study (https://crbug.com/803501): Show a message in
// the console to reduce developer confusion about the experimental UI
// treatments for HTTPS pages with EV certificates.
@@ -202,6 +214,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
@@ -200,6 +212,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
"Validation is still valid.");
}
}
@ -82,7 +82,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
}
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
@@ -275,6 +288,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -273,6 +286,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
web_contents()->GetController().GetVisibleEntry();
if (!entry)
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
@ -90,7 +90,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
safe_browsing::SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
if (!sb_service)
@@ -340,6 +354,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -341,6 +355,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
break;
}
}
@ -98,7 +98,7 @@ index 58066f3a532bf227f0445fe0d04a092e4ba6a4ff..a1643c6492e30b81a01105cc0c52483c
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
}
@@ -360,15 +375,19 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
@@ -361,15 +376,19 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
const {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();

View file

@ -7,10 +7,10 @@ v8_context_snapshot_generator is a build time executable.
The patch adds the config.
diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn
index b119ec095c7b1b55277a8d6784be35508ac37094..47df8af5ef68bf8e3fb4fa4f22f7d008c4921dd5 100644
index 771fc0df366c6461f18940546992b3efe97c4186..2cf5730fd721d3dba97ad43562516c75cf1fc157 100644
--- a/tools/v8_context_snapshot/BUILD.gn
+++ b/tools/v8_context_snapshot/BUILD.gn
@@ -114,6 +114,7 @@ if (use_v8_context_snapshot) {
@@ -109,6 +109,7 @@ if (use_v8_context_snapshot) {
configs += [
"//v8:external_startup_data",
":disable_icf",

View file

@ -81,4 +81,4 @@ index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014
+ print "Got symbol_info for %s." % (potential_symbol_file)
if symbol_info == binary_info:
mkdir_p(os.path.dirname(output_path))
shutil.copyfile(potential_symbol_file, output_path)
shutil.copyfile(potential_symbol_file, output_path)

View file

@ -5,10 +5,10 @@ Subject: web_contents.patch
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 26384f823b511ca720ae474e950d75fd19b65111..64ad6ca91d9331a09d09f7e29b7c24a0c12852a2 100644
index 499c8c0a2e899d9c2a35be461cc8d247f42a6f17..a9e95f9b18bbd5327536499c58362167fa01a583 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1931,6 +1931,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1940,6 +1940,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -21,7 +21,7 @@ index 26384f823b511ca720ae474e950d75fd19b65111..64ad6ca91d9331a09d09f7e29b7c24a0
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1946,6 +1952,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1955,6 +1961,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
&render_view_host_delegate_view_);
}
}
@ -30,7 +30,7 @@ index 26384f823b511ca720ae474e950d75fd19b65111..64ad6ca91d9331a09d09f7e29b7c24a0
CHECK(view_.get());
diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
index 44c68ed25b664b40b12dd843a18f7fe18d9cdfa9..c7b0c747fa4132a076719f7a4b3aad84f526aee3 100644
index 12f6817499eff069f4bc52a775fe1275a332881c..f20fe106c4cb443be8cf4311e531418eb4c80b5c 100644
--- a/content/browser/web_contents/web_contents_view_guest.cc
+++ b/content/browser/web_contents/web_contents_view_guest.cc
@@ -67,21 +67,27 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
@ -44,7 +44,7 @@ index 44c68ed25b664b40b12dd843a18f7fe18d9cdfa9..c7b0c747fa4132a076719f7a4b3aad84
// view hierarchy. We add this view as embedder's child here.
// This would go in WebContentsViewGuest::CreateView, but that is too early to
// access embedder_web_contents(). Therefore, we do it here.
if (features::IsAshInBrowserProcess())
if (!features::IsUsingWindowService())
- parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
+ if (parent_view->GetNativeView() != platform_view_->GetNativeView())
+ parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
@ -55,7 +55,7 @@ index 44c68ed25b664b40b12dd843a18f7fe18d9cdfa9..c7b0c747fa4132a076719f7a4b3aad84
#if defined(USE_AURA)
+ if (!platform_view_->GetNativeView())
+ return;
if (features::IsAshInBrowserProcess()) {
if (!features::IsUsingWindowService()) {
- old_parent_view->GetNativeView()->RemoveChild(
- platform_view_->GetNativeView());
+ if (old_parent_view->GetNativeView() != platform_view_->GetNativeView())
@ -92,10 +92,10 @@ index 44c68ed25b664b40b12dd843a18f7fe18d9cdfa9..c7b0c747fa4132a076719f7a4b3aad84
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 0f82f91e437c495b92662c9816225687430ec8a4..0deb4d93fffbd7392cc1a391d9503946434ad1ba 100644
index 786eecfcb70cd5145a29f9dc89765930739e0d63..0916329b2bf483381065476108978683ec2e6bf9 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -76,9 +76,12 @@ class BrowserPluginGuestDelegate;
@@ -77,9 +77,12 @@ class BrowserPluginGuestDelegate;
class InterstitialPage;
class RenderFrameHost;
class RenderViewHost;
@ -108,7 +108,7 @@ index 0f82f91e437c495b92662c9816225687430ec8a4..0deb4d93fffbd7392cc1a391d9503946
struct CustomContextMenuContext;
struct DropData;
struct MHTMLGenerationParams;
@@ -215,6 +218,10 @@ class WebContents : public PageNavigator,
@@ -216,6 +219,10 @@ class WebContents : public PageNavigator,
kInitializeAndWarmupRendererProcess,
} desired_renderer_state;

View file

@ -5,10 +5,10 @@ Subject: webgl_context_attributes.patch
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index a9b86c68fe5098be3f2b2c902dccd38f893c8800..46931503ec2bdeed0667defaee7593249d887bbf 100644
index 4a594bd98bcdd9d13bee61011883075de2d23495..a91f06ffb8782630714a88d1d3d00eca0c2c0f7f 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -997,8 +997,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
@@ -1040,8 +1040,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
attributes.sample_buffers = 0;
attributes.bind_generates_resource = false;
attributes.enable_raster_interface = web_attributes.enable_raster_interface;
@ -22,11 +22,11 @@ index a9b86c68fe5098be3f2b2c902dccd38f893c8800..46931503ec2bdeed0667defaee759324
attributes.fail_if_major_perf_caveat =
web_attributes.fail_if_major_performance_caveat;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index f927253a7e0b2ddb2fbcc0958634e7a41b988be9..12ada20ec3a3c9cffb9c95d56d379b93efe38580 100644
index 3e8fae9161252cf0cfb95f81596996822026f514..362a2978452e758c8f74739bb5c635e8be9b834f 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -500,6 +500,7 @@ class BLINK_PLATFORM_EXPORT Platform {
kGLES3ContextType, // GLES 3.0 context
@@ -531,6 +531,7 @@ class BLINK_PLATFORM_EXPORT Platform {
kWebGPUContextType, // WebGPU context
};
struct ContextAttributes {
+ bool prefer_integrated_gpu = false;

View file

@ -5,10 +5,10 @@ Subject: webview_cross_drag.patch
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 713b17948ef79d8d6a2980e647078a215e023339..cd2d022ff53e9976ee350b67988e4f7a82a51915 100644
index e471459007af1b03f477f6df8c963cc0916b1a66..3df843acdba8470352f90829e502ad10e1616dfe 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -609,6 +609,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
@@ -622,6 +622,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
bool WebContentsViewAura::IsValidDragTarget(
RenderWidgetHostImpl* target_rwh) const {
@ -20,7 +20,7 @@ diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser
index cec3bd8a97b8b9bcab176a9bd2c296ec12aba838..7a2b4462bd44176e8e8389499f8c3d5fea647fa0 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -348,6 +348,7 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint
@@ -348,6 +348,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
}
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {

View file

@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:49:13 -0700
Subject: webview_reattach.patch
Backports https://chromium-review.googlesource.com/c/chromium/src/+/1161391
Fixes webview not working after renderer process restarted.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 64ad6ca91d9331a09d09f7e29b7c24a0c12852a2..ec3d1ccbad7e3e4184205f87b6b3fb7dcd4c07f2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4886,6 +4886,12 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
view_->RenderViewHostChanged(old_host, new_host);
+ // If this is an inner WebContents that has swapped views, we need to reattach
+ // it to its outer WebContents.
+ if (node_.outer_web_contents())
+ ReattachToOuterWebContentsFrame();
+
+
// Ensure that the associated embedder gets cleared after a RenderViewHost
// gets swapped, so we don't reuse the same embedder next time a
// RenderViewHost is attached to this WebContents.

View file

@ -6,7 +6,7 @@ Subject: windows_cc_wrapper.patch
Allow use of cc_wrapper (eg sccache).
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index eb3e2b2b377dde31e062be46837bf509ecab0325..5c014b190e121619056aa2eb7301887d47490d57 100644
index 3c6c9d05d2c86adca43a7a71ab6d2634a49fc4d3..da3eb53291aa3978de0ec0a482a5b7ddb57db0f5 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
@ -32,7 +32,7 @@ index eb3e2b2b377dde31e062be46837bf509ecab0325..5c014b190e121619056aa2eb7301887d
}
# Copy the VS runtime DLL for the default toolchain to the root build directory
@@ -392,7 +399,7 @@ if (win_build_host_cpu != "x64") {
@@ -377,7 +384,7 @@ if (win_build_host_cpu != "x64") {
msvc_toolchain("win_clang_" + win_build_host_cpu) {
environment = "environment." + win_build_host_cpu
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
@ -41,7 +41,7 @@ index eb3e2b2b377dde31e062be46837bf509ecab0325..5c014b190e121619056aa2eb7301887d
sys_include_flags = "${build_cpu_toolchain_data.include_flags_imsvc}"
if (host_os != "win") {
# For win cross build.
@@ -441,7 +448,7 @@ template("win_x64_toolchains") {
@@ -426,7 +433,7 @@ template("win_x64_toolchains") {
msvc_toolchain("win_clang_" + target_name) {
environment = "environment.x64"
prefix = rebase_path("$clang_base_path/bin", root_build_dir)

View file

@ -5,10 +5,10 @@ Subject: worker_context_will_destroy.patch
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index a2dc7a811e7511e272b58662e2339d77308489a9..5cbfe0e0bef3bf70994c443548f81eb9b9d60e4b 100644
index f1c9cc5997cb5e285bd552d58434de7a4b1d2467..86f2215b9d78374569572c6d087a2102506d3dcb 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -377,6 +377,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -383,6 +383,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@ -21,10 +21,10 @@ index a2dc7a811e7511e272b58662e2339d77308489a9..5cbfe0e0bef3bf70994c443548f81eb9
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 46931503ec2bdeed0667defaee7593249d887bbf..1c2ae455038483d9b492723e43d4d66b65c57577 100644
index a91f06ffb8782630714a88d1d3d00eca0c2c0f7f..291081cf0d428cbef12f99e9296e4b52ce89eca4 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -1108,6 +1108,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -1187,6 +1187,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -38,10 +38,10 @@ index 46931503ec2bdeed0667defaee7593249d887bbf..1c2ae455038483d9b492723e43d4d66b
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index bebcd933b8ce52892be3c083c838de846ae72377..49d981cc18eaceeae0bc5760996651f995cc7837 100644
index b3bde113adbd7a7586981c42c28da5a939ed688f..892f1e653a656ebdab3fda066af0814c991842c3 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -201,6 +201,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -208,6 +208,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -50,10 +50,10 @@ index bebcd933b8ce52892be3c083c838de846ae72377..49d981cc18eaceeae0bc5760996651f9
// Disables the WebSandboxSupport implementation for testing.
// Tests that do not set up a full sandbox environment should call
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 12ada20ec3a3c9cffb9c95d56d379b93efe38580..0e1555e5a3c94dc5323f4d6644e69a9ec011aaea 100644
index 362a2978452e758c8f74739bb5c635e8be9b834f..9730bc3d13721a12ee490d38213c753b130b6d07 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -626,6 +626,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -673,6 +673,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -62,10 +62,10 @@ index 12ada20ec3a3c9cffb9c95d56d379b93efe38580..0e1555e5a3c94dc5323f4d6644e69a9e
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 6b4a2ce05520c19c77fa3ddf135e83ef8783b3be..2ba97d5ec53ac4693024bb047e6c256dff0a99be 100644
index 0e1ce1e2ffc9283fa2d23bb7d74b96fbfbf7bf2e..e6789645fb05645d0328685f1e544f0f981d747c 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -514,6 +514,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -529,6 +529,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
SetExitCode(ExitCode::kGracefullyTerminated);
}