mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d3e36d052c | ||
|
a27bbfaa0e | ||
|
45d779dc24 | ||
|
185623100e | ||
|
c368dbf5ad | ||
|
238e9184b4 | ||
|
514ced40ce | ||
|
36f9eab712 | ||
|
628b9db317 | ||
|
636f29b188 | ||
|
7b00e05714 | ||
|
5340bb0700 | ||
|
a4b18ef01c | ||
|
c3a31f5f3e | ||
|
71574ceb11 | ||
|
e21d57d8b3 | ||
|
64c0c9fc4c | ||
|
5bf920a639 | ||
|
141869aa17 |
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '9ef2aa869bc7bc0c089e255d698cca6e47d6b038',
|
||||
'chromium_checkout': 'refs/tags/67.0.3396.79',
|
||||
}
|
||||
|
@@ -159,7 +159,6 @@
|
||||
'tests/shared/browser/main_message_loop_std.cc',
|
||||
'tests/shared/browser/main_message_loop_std.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
],
|
||||
'shared_sources_common': [
|
||||
'tests/shared/common/client_app.cc',
|
||||
|
@@ -86,7 +86,8 @@ if(OS_LINUX)
|
||||
-Werror # Treat warnings as errors
|
||||
-Wno-missing-field-initializers # Don't warn about missing field initializers
|
||||
-Wno-unused-parameter # Don't warn about unused parameters
|
||||
-Wno-error=comment # Don't complain about code in ascii art
|
||||
-Wno-error=comment # Don't warn about code in comments
|
||||
-Wno-comment # Don't warn about code in comments
|
||||
)
|
||||
list(APPEND CEF_C_COMPILER_FLAGS
|
||||
-std=c99 # Use the C99 language standard
|
||||
@@ -336,12 +337,15 @@ if(OS_WINDOWS)
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX)
|
||||
# Check if the current MSVC version is compatible with the cef_sandbox.lib
|
||||
# static library.
|
||||
# static library. For a list of all version numbers see
|
||||
# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering
|
||||
list(APPEND supported_msvc_versions
|
||||
1900 # VS2015 and updates 1, 2, & 3
|
||||
1910 # VS2017 version 15.1 & 15.2
|
||||
1911 # VS2017 version 15.3 & 15.4
|
||||
1912 # VS2017 version 15.5
|
||||
1913 # VS2017 version 15.6
|
||||
1914 # VS2017 version 15.7
|
||||
)
|
||||
list(FIND supported_msvc_versions ${MSVC_VERSION} _index)
|
||||
if (${_index} EQUAL -1)
|
||||
|
@@ -1590,10 +1590,13 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetFrameForRequest(
|
||||
content::ResourceRequestInfo::ForRequest(request);
|
||||
if (!info)
|
||||
return nullptr;
|
||||
// The value of |IsMainFrame| is unreliable when |IsDownload| returns true.
|
||||
// The value of |IsMainFrame| is unreliable in these cases.
|
||||
const bool is_main_frame_state_flaky =
|
||||
info->IsDownload() ||
|
||||
info->GetResourceType() == content::RESOURCE_TYPE_XHR;
|
||||
return GetOrCreateFrame(info->GetRenderFrameID(), info->GetFrameTreeNodeId(),
|
||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||
info->IsMainFrame(), info->IsDownload(),
|
||||
info->IsMainFrame(), is_main_frame_state_flaky,
|
||||
base::string16(), GURL());
|
||||
}
|
||||
|
||||
@@ -3224,7 +3227,7 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetOrCreateFrame(
|
||||
int frame_tree_node_id,
|
||||
int64 parent_frame_id,
|
||||
bool is_main_frame,
|
||||
bool is_download,
|
||||
bool is_main_frame_state_flaky,
|
||||
base::string16 frame_name,
|
||||
const GURL& frame_url) {
|
||||
// We need either a valid |frame_id| or a valid |frame_tree_node_id|.
|
||||
@@ -3245,13 +3248,13 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetOrCreateFrame(
|
||||
|
||||
if (frame_id < 0) {
|
||||
// With PlzNavigate the renderer process representation might not exist yet.
|
||||
if ((is_main_frame || is_download) &&
|
||||
if ((is_main_frame || is_main_frame_state_flaky) &&
|
||||
main_frame_id_ != CefFrameHostImpl::kInvalidFrameId) {
|
||||
// Operating in the main frame. Continue using the existing main frame
|
||||
// object until the new renderer process representation is created.
|
||||
frame_id = main_frame_id_;
|
||||
} else {
|
||||
if (is_main_frame || is_download) {
|
||||
if (is_main_frame || is_main_frame_state_flaky) {
|
||||
// Always use the same pending object for the main frame.
|
||||
frame_tree_node_id = kMainFrameTreeNodeId;
|
||||
}
|
||||
@@ -3319,7 +3322,7 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetOrCreateFrame(
|
||||
}
|
||||
}
|
||||
|
||||
if (!frame_created && !is_download)
|
||||
if (!frame_created && !is_main_frame_state_flaky)
|
||||
frame->SetAttributes(is_main_frame, url, name, parent_frame_id);
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
|
@@ -586,13 +586,13 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
// if PlzNavigate is disabled; or >= 0 otherwise. |parent_frame_id| will be
|
||||
// CefFrameHostImpl::kUnspecifiedFrameId if unknown. In cases where |frame_id|
|
||||
// is < 0 either the existing main frame object or a pending object will be
|
||||
// returned depending on current state. If |is_download| is true then the
|
||||
// value of |is_main_frame| cannot be relied on.
|
||||
// returned depending on current state. If |is_main_frame_state_flaky| is true
|
||||
// then the value of |is_main_frame| cannot be relied on.
|
||||
CefRefPtr<CefFrame> GetOrCreateFrame(int64 frame_id,
|
||||
int frame_tree_node_id,
|
||||
int64 parent_frame_id,
|
||||
bool is_main_frame,
|
||||
bool is_download,
|
||||
bool is_main_frame_state_flaky,
|
||||
base::string16 frame_name,
|
||||
const GURL& frame_url);
|
||||
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/path_service.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_service.h"
|
||||
#include "chrome/browser/plugins/plugin_info_host_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -761,6 +762,10 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
}
|
||||
}
|
||||
|
||||
std::string CefContentBrowserClient::GetApplicationLocale() {
|
||||
return g_browser_process->GetApplicationLocale();
|
||||
}
|
||||
|
||||
content::QuotaPermissionContext*
|
||||
CefContentBrowserClient::CreateQuotaPermissionContext() {
|
||||
return new CefQuotaPermissionContext();
|
||||
|
@@ -60,6 +60,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
content::BrowserContext* context2) override;
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) override;
|
||||
std::string GetApplicationLocale() override;
|
||||
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
|
||||
void GetQuotaSettings(
|
||||
content::BrowserContext* context,
|
||||
|
@@ -100,7 +100,7 @@ int ResponseWriter::Finish(int net_error,
|
||||
}
|
||||
|
||||
static std::string GetFrontendURL() {
|
||||
return base::StringPrintf("%s://%s/inspector.html",
|
||||
return base::StringPrintf("%s://%s/devtools_app.html",
|
||||
content::kChromeDevToolsScheme,
|
||||
scheme::kChromeDevToolsHost);
|
||||
}
|
||||
|
@@ -1296,9 +1296,11 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
osr_util::ClampFrameRate(browser->settings().windowless_frame_rate);
|
||||
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
||||
|
||||
// Configure the VSync interval for the browser process.
|
||||
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
if (GetCompositor()) {
|
||||
// Configure the VSync interval for the browser process.
|
||||
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
|
||||
if (copy_frame_generator_.get()) {
|
||||
copy_frame_generator_->set_frame_rate_threshold_us(
|
||||
@@ -1364,8 +1366,10 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
local_surface_id_ = local_surface_id_allocator_.GenerateId();
|
||||
|
||||
GetRootLayer()->SetBounds(gfx::Rect(size));
|
||||
GetCompositor()->SetScaleAndSize(current_device_scale_factor_, size_in_pixels,
|
||||
local_surface_id_);
|
||||
if (GetCompositor()) {
|
||||
GetCompositor()->SetScaleAndSize(current_device_scale_factor_,
|
||||
size_in_pixels, local_surface_id_);
|
||||
}
|
||||
PlatformResizeCompositorWidget(size_in_pixels);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
|
@@ -52,7 +52,7 @@ const char kPDFPluginExtension[] = "pdf";
|
||||
const char kPDFPluginDescription[] = "Portable Document Format";
|
||||
const char kPDFPluginOutOfProcessMimeType[] = "application/x-google-chrome-pdf";
|
||||
const uint32_t kPDFPluginPermissions =
|
||||
ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
|
||||
ppapi::PERMISSION_PDF | ppapi::PERMISSION_DEV;
|
||||
|
||||
content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface;
|
||||
content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module;
|
||||
|
@@ -345,7 +345,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||
if (it != frames_.end())
|
||||
return it->second;
|
||||
|
||||
CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame));
|
||||
CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame, frame_id));
|
||||
frames_.insert(std::make_pair(frame_id, framePtr));
|
||||
|
||||
const int64_t parent_id = frame->Parent() == NULL
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_document_loader.h"
|
||||
#include "third_party/blink/public/web/web_frame_content_dumper.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_script_source.h"
|
||||
@@ -34,10 +35,10 @@
|
||||
|
||||
using blink::WebString;
|
||||
|
||||
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, blink::WebLocalFrame* frame)
|
||||
: browser_(browser),
|
||||
frame_(frame),
|
||||
frame_id_(render_frame_util::GetIdentifier(frame)) {}
|
||||
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser,
|
||||
blink::WebLocalFrame* frame,
|
||||
int64_t frame_id)
|
||||
: browser_(browser), frame_(frame), frame_id_(frame_id) {}
|
||||
|
||||
CefFrameImpl::~CefFrameImpl() {}
|
||||
|
||||
@@ -216,6 +217,13 @@ CefString CefFrameImpl::GetURL() {
|
||||
|
||||
if (frame_) {
|
||||
GURL gurl = frame_->GetDocument().Url();
|
||||
if (gurl.is_empty()) {
|
||||
// For popups the main document URL will be empty during loading. Return
|
||||
// the provisional document URL instead.
|
||||
blink::WebDocumentLoader* loader = frame_->GetProvisionalDocumentLoader();
|
||||
if (loader)
|
||||
gurl = loader->GetRequest().Url();
|
||||
}
|
||||
url = gurl.spec();
|
||||
}
|
||||
return url;
|
||||
|
@@ -21,7 +21,9 @@ class WebLocalFrame;
|
||||
// associated renderer WebFrame will close.
|
||||
class CefFrameImpl : public CefFrame {
|
||||
public:
|
||||
CefFrameImpl(CefBrowserImpl* browser, blink::WebLocalFrame* frame);
|
||||
CefFrameImpl(CefBrowserImpl* browser,
|
||||
blink::WebLocalFrame* frame,
|
||||
int64_t frame_id);
|
||||
~CefFrameImpl() override;
|
||||
|
||||
// CefFrame implementation.
|
||||
|
@@ -228,6 +228,11 @@ patches = [
|
||||
# Support CEF changes in chrome/renderer.
|
||||
'name': 'chrome_renderer',
|
||||
},
|
||||
{
|
||||
# Add missing depenencies in chrome/services/media_gallery_util/public/cpp.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=832591
|
||||
'name': 'chrome_services',
|
||||
},
|
||||
{
|
||||
# Don't initialize ExtensionSystemFactory when extensions are disabled.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2359
|
||||
@@ -362,4 +367,14 @@ patches = [
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2398
|
||||
'name': 'mac_gpu_2398',
|
||||
},
|
||||
{
|
||||
# Linux: Use poll instead of select to fix crash during startup.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2466
|
||||
'name': 'linux_poll_2466',
|
||||
},
|
||||
{
|
||||
# Adjust out-of-flow position for rtl container with left-hand scrollbar.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=832569
|
||||
'name': 'blink_rtl_832569',
|
||||
},
|
||||
]
|
||||
|
17
patch/patches/blink_rtl_832569.patch
Normal file
17
patch/patches/blink_rtl_832569.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git third_party/blink/renderer/core/layout/layout_box.cc third_party/blink/renderer/core/layout/layout_box.cc
|
||||
index 4f724b594484..3bb15ddacdd1 100644
|
||||
--- third_party/blink/renderer/core/layout/layout_box.cc
|
||||
+++ third_party/blink/renderer/core/layout/layout_box.cc
|
||||
@@ -3998,6 +3998,12 @@ void LayoutBox::ComputeInlineStaticDistance(
|
||||
LayoutUnit static_position = child->Layer()->StaticInlinePosition() +
|
||||
container_logical_width +
|
||||
container_block->BorderLogicalLeft();
|
||||
+ if (container_block->IsBox() &&
|
||||
+ ToLayoutBox(container_block)
|
||||
+ ->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
|
||||
+ static_position +=
|
||||
+ ToLayoutBox(container_block)->OriginAdjustmentForScrollbars().Width();
|
||||
+ }
|
||||
for (LayoutObject* curr = child->Parent(); curr; curr = curr->Container()) {
|
||||
if (curr->IsBox()) {
|
||||
if (curr == enclosing_box)
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index 091f34477c01..44002b362be7 100644
|
||||
index e7d40839956f..bda09e167c87 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -55,11 +55,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
@@ -17,7 +17,7 @@ index 091f34477c01..44002b362be7 100644
|
||||
void DidCreateNewRendererCompositorFrameSink(
|
||||
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index fac719b0bb6f..0672d1445f39 100644
|
||||
index 3d5a2193bd51..9bdd51d2007d 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
@@ -34,7 +34,7 @@ index fac719b0bb6f..0672d1445f39 100644
|
||||
if (recyclable_compositor_) {
|
||||
return recyclable_compositor_->accelerated_widget_mac()
|
||||
diff --git ui/accelerated_widget_mac/accelerated_widget_mac.mm ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
index 8306398431d9..5ab4fef9ac0f 100644
|
||||
index 97e7b502f15d..44811edbda4c 100644
|
||||
--- ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
+++ ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
@@ -71,6 +71,10 @@ void AcceleratedWidgetMac::SetNSView(AcceleratedWidgetMacNSView* view) {
|
||||
|
@@ -37,7 +37,7 @@ index 15994d5dada4..e19eca0c4369 100644
|
||||
|
||||
attached_ = true;
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index af9c604d5785..81d3071b0f3d 100644
|
||||
index 94e29b878e17..fb546b77d2b7 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -618,7 +618,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@@ -266,19 +266,19 @@ index d05dd5421458..fa13775f0512 100644
|
||||
// a BrowserPlugin even when we are using cross process frames for guests. It
|
||||
// should be removed after resolving https://crbug.com/642826).
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 6861814915c2..766090cd3b06 100644
|
||||
index 57e98ae8a5bb..72f9e29dfcd5 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -192,6 +192,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -193,6 +193,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
+ if (delegate_)
|
||||
+ delegate_->OverrideWebContentsCreateParams(¶ms);
|
||||
callback.Run(WebContents::Create(params));
|
||||
|
||||
registry_.AddInterface(
|
||||
@@ -225,6 +227,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
auto* web_contents = WebContents::Create(params);
|
||||
SetViewType(web_contents, VIEW_TYPE_EXTENSION_GUEST);
|
||||
callback.Run(web_contents);
|
||||
@@ -228,6 +230,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index ac64f5c5cd14..d926502a78a0 100644
|
||||
index e73bbc01264c..7cf4471e4b24 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index 07ebea6a6ebf..d60387aa4cdf 100644
|
||||
index 607dfe4d4c99..27e55b7f6b2d 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -9,8 +9,8 @@ index 07ebea6a6ebf..d60387aa4cdf 100644
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
@@ -16,6 +17,10 @@
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
@@ -17,6 +18,10 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
|
||||
@@ -21,7 +21,7 @@ index 07ebea6a6ebf..d60387aa4cdf 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_service.h"
|
||||
#include "extensions/browser/extension_system.h"
|
||||
@@ -41,8 +46,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
@@ -42,8 +47,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -36,7 +36,7 @@ index 07ebea6a6ebf..d60387aa4cdf 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -86,9 +97,15 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -87,9 +98,15 @@ scoped_refptr<RefcountedKeyedService>
|
||||
/*store_last_modified=*/true));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@@ -1,12 +1,11 @@
|
||||
diff --git chrome/browser/profiles/incognito_helpers.cc chrome/browser/profiles/incognito_helpers.cc
|
||||
index ce4f72b98a05..f7d57b854399 100644
|
||||
index ce4f72b98a05..39f7c3140c6e 100644
|
||||
--- chrome/browser/profiles/incognito_helpers.cc
|
||||
+++ chrome/browser/profiles/incognito_helpers.cc
|
||||
@@ -7,19 +7,42 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -8,18 +8,41 @@
|
||||
|
||||
namespace chrome {
|
||||
+
|
||||
|
||||
+namespace {
|
||||
+BrowserContextIncognitoHelper* g_helper = nullptr;
|
||||
+} // namespace
|
||||
@@ -14,7 +13,7 @@ index ce4f72b98a05..f7d57b854399 100644
|
||||
+void SetBrowserContextIncognitoHelper(BrowserContextIncognitoHelper* helper) {
|
||||
+ g_helper = helper;
|
||||
+}
|
||||
|
||||
+
|
||||
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
|
||||
content::BrowserContext* context) {
|
||||
+ if (g_helper) {
|
||||
|
13
patch/patches/chrome_services.patch
Normal file
13
patch/patches/chrome_services.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git chrome/services/media_gallery_util/public/cpp/BUILD.gn chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
index fcdc1906851d..b6f7112e144e 100644
|
||||
--- chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
+++ chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
@@ -15,6 +15,8 @@ source_set("cpp") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
+ "//media:media_buildflags",
|
||||
+ "//net:buildflags",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//third_party/boringssl",
|
||||
"//third_party/libyuv",
|
@@ -13,7 +13,7 @@ index d15599593511..0f37d5933391 100644
|
||||
#endif
|
||||
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
|
||||
index 55b471ea..6dac055 100644
|
||||
index 55b471ea93f8..6dac0552d66f 100644
|
||||
--- third_party/widevine/cdm/BUILD.gn
|
||||
+++ third_party/widevine/cdm/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
|
@@ -13,7 +13,7 @@ index 4393a8fac233..860715e86900 100644
|
||||
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
|
||||
~ContentServiceManagerMainDelegate() override;
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 5726fbac54bf..46fd0b2bd568 100644
|
||||
index 7f3cf01859a7..74deeb84127f 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -25,6 +25,7 @@ component("controller") {
|
||||
|
@@ -93,10 +93,10 @@ index 0c0c4cbb9efe..4703ce943367 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
|
||||
index f47a05e199ef..3010f016c035 100644
|
||||
index d938013c90b6..5602c2279847 100644
|
||||
--- content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -1552,6 +1552,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
@@ -1557,6 +1557,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
if (GetNavigationHandle()) {
|
||||
GetNavigationHandle()->set_net_error_code(
|
||||
static_cast<net::Error>(params.error_code));
|
||||
@@ -104,7 +104,7 @@ index f47a05e199ef..3010f016c035 100644
|
||||
}
|
||||
|
||||
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
|
||||
@@ -3309,9 +3310,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -3326,9 +3327,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
&QuotaDispatcherHost::CreateForFrame, GetProcess(), routing_id_));
|
||||
|
||||
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
@@ -117,7 +117,7 @@ index f47a05e199ef..3010f016c035 100644
|
||||
// TODO(https://crbug.com/813479): Investigate why we need to explicitly
|
||||
// specify task runner for BrowserThread::IO here.
|
||||
// Bind calls to the BindRegistry should come on to the IO thread by
|
||||
@@ -3588,9 +3589,9 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
@@ -3605,9 +3606,9 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
// however only do this for cross-document navigations, because the
|
||||
// alternative would be redundant effort.
|
||||
network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
|
||||
@@ -130,7 +130,7 @@ index f47a05e199ef..3010f016c035 100644
|
||||
if (subresource_loader_params &&
|
||||
subresource_loader_params->loader_factory_info.is_valid()) {
|
||||
// If the caller has supplied a default URLLoaderFactory override (for
|
||||
@@ -4218,8 +4219,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
@@ -4235,8 +4236,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
// Keep DevTools proxy lasy, i.e. closest to the network.
|
||||
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
|
||||
this, false, &default_factory_request);
|
||||
@@ -141,6 +141,17 @@ index f47a05e199ef..3010f016c035 100644
|
||||
if (g_create_network_factory_callback_for_test.Get().is_null()) {
|
||||
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
|
||||
std::move(default_factory_request), GetProcess()->GetID());
|
||||
@@ -4487,8 +4488,8 @@ void RenderFrameHostImpl::CreateWebSocket(
|
||||
network::mojom::WebSocketRequest request) {
|
||||
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
auto* context = GetSiteInstance()->GetBrowserContext();
|
||||
- auto* storage_partition = static_cast<StoragePartitionImpl*>(
|
||||
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
|
||||
+ auto* storage_partition =
|
||||
+ BrowserContext::GetStoragePartition(context, GetSiteInstance());
|
||||
storage_partition->GetNetworkContext()->CreateWebSocket(
|
||||
std::move(request), process_->GetID(), routing_id_,
|
||||
last_committed_origin_);
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index 80fd7cf89578..8e965cd18a47 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -274,10 +285,10 @@ index 4e11056a3dc9..973ad50975e1 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index 7ee98ee35116..63082b5a8132 100644
|
||||
index cf96a19a4e09..67882fb1b97d 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1387,8 +1387,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -1388,8 +1388,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
|
||||
// Used to get the list of plugins. |main_frame_origin| is used to handle
|
||||
// exceptions for plugin content settings.
|
||||
@@ -288,7 +299,7 @@ index 7ee98ee35116..63082b5a8132 100644
|
||||
url::Origin /* main_frame_origin */,
|
||||
std::vector<content::WebPluginInfo> /* plugins */)
|
||||
|
||||
@@ -1396,9 +1397,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
|
||||
@@ -1397,9 +1398,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
|
||||
// type. If there is no matching plugin, |found| is false.
|
||||
// |actual_mime_type| is the actual mime type supported by the
|
||||
// found plugin.
|
||||
@@ -388,10 +399,10 @@ index 74a031ad10c3..3b3f9e292f4b 100644
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index fede37b7301b..6bda5cfdbcd1 100644
|
||||
index 5efb96acfd76..224ee156df07 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3486,7 +3486,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -3494,7 +3494,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@@ -401,7 +412,7 @@ index fede37b7301b..6bda5cfdbcd1 100644
|
||||
params.mime_type.Utf8(), &found, &info, &mime_type));
|
||||
if (!found)
|
||||
return nullptr;
|
||||
@@ -3847,6 +3848,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
@@ -3855,6 +3856,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
|
||||
void RenderFrameImpl::FrameFocused() {
|
||||
Send(new FrameHostMsg_FrameFocused(routing_id_));
|
||||
@@ -424,7 +435,7 @@ index 089bc9a31881..7c938b4d3c8d 100644
|
||||
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
|
||||
base::Unretained(this)));
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 58008cefd4be..c933ed29f304 100644
|
||||
index c2c62bae127d..c6543410977d 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -842,6 +842,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
@@ -445,7 +456,7 @@ index 58008cefd4be..c933ed29f304 100644
|
||||
for (const WebPluginInfo& plugin : plugins) {
|
||||
builder->AddPlugin(WebString::FromUTF16(plugin.name),
|
||||
WebString::FromUTF16(plugin.desc),
|
||||
@@ -1416,6 +1418,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
|
||||
@@ -1417,6 +1419,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
|
||||
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
|
||||
}
|
||||
|
||||
@@ -531,7 +542,7 @@ index 84bed37848d9..1a66c0757437 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
|
||||
index c58ced83f5a3..b59123565abd 100644
|
||||
index c945e7e32cf2..aa73864ea602 100644
|
||||
--- content/test/test_blink_web_unit_test_support.cc
|
||||
+++ content/test/test_blink_web_unit_test_support.cc
|
||||
@@ -325,6 +325,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
@@ -541,7 +552,7 @@ index c58ced83f5a3..b59123565abd 100644
|
||||
+ bool is_main_frame,
|
||||
const blink::WebSecurityOrigin& mainFrameOrigin,
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
builder->AddPlugin("pdf", "pdf", "pdf-files");
|
||||
builder->AddPlugin("pdf", "pdf", "pdf-files", SkColorSetRGB(38, 38, 38));
|
||||
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
|
||||
index 06ddd5b7b28f..c3371fecff87 100644
|
||||
--- content/test/test_blink_web_unit_test_support.h
|
||||
|
@@ -30,20 +30,20 @@ index 887e13776dd2..de30ebff25e4 100644
|
||||
|
||||
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
||||
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
||||
index bcf172e645a2..a46141ea43e0 100644
|
||||
index bcf172e645a2..f879aa745adf 100644
|
||||
--- chrome/common/crash_keys.h
|
||||
+++ chrome/common/crash_keys.h
|
||||
@@ -16,6 +16,10 @@ class CommandLine;
|
||||
}
|
||||
@@ -17,6 +17,10 @@ class CommandLine;
|
||||
|
||||
namespace crash_keys {
|
||||
+
|
||||
|
||||
+// Returns true if the specified command-line flag should be excluded from
|
||||
+// crash reporting.
|
||||
+bool IsBoringChromeSwitch(const std::string& flag);
|
||||
|
||||
+
|
||||
// Sets the kNumSwitches key and the set of keys named using kSwitchFormat based
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index e66f49a470f8..f2b725efb6fd 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
|
@@ -3,7 +3,7 @@ index 53c7404ef1f9..ac33df7cfe0e 100644
|
||||
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/values.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
@@ -13,7 +13,7 @@ index 53c7404ef1f9..ac33df7cfe0e 100644
|
||||
@@ -79,6 +80,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
if (!web_contents)
|
||||
return;
|
||||
|
||||
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
// If the request was for a prerender, abort the prerender and do not
|
||||
// continue. This is because plugins cancel prerender, see
|
||||
@@ -23,14 +23,14 @@ index 53c7404ef1f9..ac33df7cfe0e 100644
|
||||
return;
|
||||
}
|
||||
+#endif // !BUILDFLAG(ENABLE_CEF)
|
||||
|
||||
|
||||
auto* browser_context = web_contents->GetBrowserContext();
|
||||
StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context);
|
||||
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
|
||||
index 33678d6f3cbf..e16bd447aea2 100644
|
||||
index d7875ac0c044..d369de7e33f1 100644
|
||||
--- content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -898,10 +898,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
||||
@@ -903,10 +903,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
||||
// TODO(alexmos): This check should've been enforced earlier in the
|
||||
// navigation, in chrome::Navigate(). Verify this, and then convert this to
|
||||
// a CHECK and remove the fallback.
|
||||
@@ -46,7 +46,7 @@ index 33678d6f3cbf..e16bd447aea2 100644
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1041,7 +1042,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
@@ -1046,7 +1047,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
|
||||
// Double-check that the new SiteInstance is associated with the right
|
||||
// BrowserContext.
|
||||
@@ -57,7 +57,7 @@ index 33678d6f3cbf..e16bd447aea2 100644
|
||||
// If |new_instance| is a new SiteInstance for a subframe that requires a
|
||||
// dedicated process, set its process reuse policy so that such subframes are
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index a9818834fec3..d21e360bea01 100644
|
||||
index 63cb3851db0a..161cccdf31af 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -366,6 +366,13 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
48
patch/patches/linux_poll_2466.patch
Normal file
48
patch/patches/linux_poll_2466.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||
index c58d6865c27b..6ab39432259d 100644
|
||||
--- base/files/file_path_watcher_linux.cc
|
||||
+++ base/files/file_path_watcher_linux.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "base/files/file_path_watcher.h"
|
||||
|
||||
#include <errno.h>
|
||||
+#include <poll.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <sys/inotify.h>
|
||||
@@ -13,6 +14,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
+#include <array>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
@@ -221,20 +223,15 @@ LazyInstance<InotifyReader>::Leaky g_inotify_reader = LAZY_INSTANCE_INITIALIZER;
|
||||
void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
PlatformThread::SetName("inotify_reader");
|
||||
|
||||
- // Make sure the file descriptors are good for use with select().
|
||||
- CHECK_LE(0, inotify_fd_);
|
||||
- CHECK_GT(FD_SETSIZE, inotify_fd_);
|
||||
+ std::array<pollfd, 1> fdarray
|
||||
+ { {
|
||||
+ { inotify_fd_, POLLIN, 0 }
|
||||
+ } };
|
||||
|
||||
while (true) {
|
||||
- fd_set rfds;
|
||||
- FD_ZERO(&rfds);
|
||||
- FD_SET(inotify_fd_, &rfds);
|
||||
-
|
||||
- // Wait until some inotify events are available.
|
||||
- int select_result =
|
||||
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
|
||||
- if (select_result < 0) {
|
||||
- DPLOG(WARNING) << "select failed";
|
||||
+ int poll_result = HANDLE_EINTR(poll(fdarray.data(), fdarray.size(), -1));
|
||||
+ if (poll_result < 0) {
|
||||
+ DPLOG(WARNING) << "poll failed";
|
||||
return;
|
||||
}
|
||||
|
@@ -33,10 +33,10 @@ index 439d364fc54c..6cbe494e7041 100644
|
||||
// if type_ is TYPE_CUSTOM and pump_ is null.
|
||||
MessagePumpFactoryCallback pump_factory_;
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index b145a1d54a32..9b28169050b2 100644
|
||||
index ca257370fb56..3d9b4cea21ce 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -372,20 +372,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
@@ -370,20 +370,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
}
|
||||
|
||||
bool MessagePumpForUI::ProcessPumpReplacementMessage() {
|
||||
|
@@ -55,10 +55,10 @@ index fb6f4847cfe9..aa4c1cdafb9f 100644
|
||||
|
||||
} // namespace net
|
||||
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
|
||||
index 2f07f68ace0d..8c223aed6210 100644
|
||||
index 3802937bc0c4..941cf0007fd6 100644
|
||||
--- net/http/transport_security_state.cc
|
||||
+++ net/http/transport_security_state.cc
|
||||
@@ -1581,8 +1581,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
@@ -1559,8 +1559,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
sent_expect_ct_reports_cache_.Clear();
|
||||
}
|
||||
|
||||
@@ -72,10 +72,10 @@ index 2f07f68ace0d..8c223aed6210 100644
|
||||
// We consider built-in information to be timely for 10 weeks.
|
||||
return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
|
||||
diff --git net/http/transport_security_state.h net/http/transport_security_state.h
|
||||
index cf034710df38..d53de146034e 100644
|
||||
index 5f7873f76376..bccb857b682d 100644
|
||||
--- net/http/transport_security_state.h
|
||||
+++ net/http/transport_security_state.h
|
||||
@@ -582,6 +582,10 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -593,6 +593,10 @@ class NET_EXPORT TransportSecurityState {
|
||||
// Expect-CT reports.
|
||||
void ClearReportCachesForTesting();
|
||||
|
||||
@@ -86,7 +86,7 @@ index cf034710df38..d53de146034e 100644
|
||||
private:
|
||||
friend class TransportSecurityStateTest;
|
||||
friend class TransportSecurityStateStaticFuzzer;
|
||||
@@ -602,7 +606,7 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -613,7 +617,7 @@ class NET_EXPORT TransportSecurityState {
|
||||
// IsBuildTimely returns true if the current build is new enough ensure that
|
||||
// built in security information (i.e. HSTS preloading and pinning
|
||||
// information) is timely.
|
||||
@@ -95,7 +95,7 @@ index cf034710df38..d53de146034e 100644
|
||||
|
||||
// Helper method for actually checking pins.
|
||||
PKPStatus CheckPublicKeyPinsImpl(
|
||||
@@ -711,6 +715,8 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -722,6 +726,8 @@ class NET_EXPORT TransportSecurityState {
|
||||
// True if public key pinning bypass is enabled for local trust anchors.
|
||||
bool enable_pkp_bypass_for_local_trust_anchors_;
|
||||
|
||||
|
@@ -11,10 +11,10 @@ index 3b72878d9462..02ed570accd6 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
|
||||
index 53bc2c0a9711..d070118f34cf 100644
|
||||
index dcff5cef776a..53d6a85aec31 100644
|
||||
--- content/public/common/web_preferences.cc
|
||||
+++ content/public/common/web_preferences.cc
|
||||
@@ -174,6 +174,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -176,6 +176,7 @@ WebPreferences::WebPreferences()
|
||||
spatial_navigation_enabled(false),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
@@ -35,7 +35,7 @@ index e4fc39c60fd7..f19fccf47261 100644
|
||||
bool record_whole_document;
|
||||
SavePreviousDocumentResources save_previous_document_resources;
|
||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||
index 58cf6da520e2..02ad4c2998bf 100644
|
||||
index 7a866ded50f1..25abbdd7a4e8 100644
|
||||
--- content/renderer/render_view_impl.cc
|
||||
+++ content/renderer/render_view_impl.cc
|
||||
@@ -1209,6 +1209,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 867b83e3be2f..d5e46c884d8f 100644
|
||||
index ebf2d257e64f..db83e9b9af93 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -734,9 +734,11 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
|
||||
@@ -17,7 +17,7 @@ index 867b83e3be2f..d5e46c884d8f 100644
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::WindowTitleChanged() {
|
||||
@@ -1869,6 +1871,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -1881,6 +1883,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
if (frame_sink_id_.is_valid())
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
|
||||
|
@@ -313,10 +313,10 @@ index 5d4aefd16449..b5f99bc43389 100644
|
||||
partition->GetPaymentAppContext();
|
||||
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
index dadd00f56a00..5b61ea4e744d 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -718,11 +718,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
@@ -738,11 +738,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
// Gets the correct render process to use for this SiteInstance.
|
||||
RenderProcessHost* GetProcessHost(SiteInstance* site_instance,
|
||||
bool is_for_guests_only) {
|
||||
@@ -332,7 +332,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
|
||||
// Is this the default storage partition? If it isn't, then just give it its
|
||||
// own non-shared process.
|
||||
@@ -1335,7 +1334,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() {
|
||||
@@ -1355,7 +1354,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() {
|
||||
// static
|
||||
RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
|
||||
BrowserContext* browser_context,
|
||||
@@ -341,7 +341,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
SiteInstance* site_instance,
|
||||
bool is_for_guests_only) {
|
||||
if (g_render_process_host_factory_) {
|
||||
@@ -1344,8 +1343,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
|
||||
@@ -1364,8 +1363,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
|
||||
}
|
||||
|
||||
if (!storage_partition_impl) {
|
||||
@@ -352,7 +352,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
}
|
||||
// If we've made a StoragePartition for guests (e.g., for the <webview> tag),
|
||||
// stash the Site URL on it. This way, when we start a service worker inside
|
||||
@@ -1370,7 +1369,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority =
|
||||
@@ -1390,7 +1389,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority =
|
||||
|
||||
RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
BrowserContext* browser_context,
|
||||
@@ -361,7 +361,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
bool is_for_guests_only)
|
||||
: fast_shutdown_started_(false),
|
||||
deleting_soon_(false),
|
||||
@@ -1403,7 +1402,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
@@ -1423,7 +1422,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
indexed_db_factory_(new IndexedDBDispatcherHost(
|
||||
id_,
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
@@ -371,7 +371,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
ChromeBlobStorageContext::GetFor(browser_context_))),
|
||||
channel_connected_(false),
|
||||
sent_render_process_ready_(false),
|
||||
@@ -1440,7 +1440,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
@@ -1460,7 +1460,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
}
|
||||
|
||||
push_messaging_manager_.reset(new PushMessagingManager(
|
||||
@@ -381,7 +381,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
|
||||
AddObserver(indexed_db_factory_.get());
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -1768,6 +1769,20 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
@@ -1788,6 +1789,20 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
|
||||
void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@@ -402,7 +402,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
AddFilter(new ResourceSchedulerFilter(GetID()));
|
||||
MediaInternals* media_internals = MediaInternals::GetInstance();
|
||||
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
|
||||
@@ -1782,8 +1797,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1802,8 +1817,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
new RenderMessageFilter(
|
||||
GetID(), GetBrowserContext(), request_context.get(),
|
||||
widget_helper_.get(), media_internals,
|
||||
@@ -413,7 +413,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
AddFilter(render_message_filter.get());
|
||||
|
||||
render_frame_message_filter_ = new RenderFrameMessageFilter(
|
||||
@@ -1810,10 +1825,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1830,10 +1845,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
ChromeBlobStorageContext::GetFor(browser_context);
|
||||
|
||||
resource_message_filter_ = new ResourceMessageFilter(
|
||||
@@ -426,7 +426,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
storage_partition_impl_->GetPrefetchURLLoaderService(),
|
||||
std::move(get_contexts_callback),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
@@ -1840,8 +1855,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1860,8 +1875,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
}
|
||||
AddFilter(
|
||||
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
|
||||
@@ -436,7 +436,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
|
||||
@@ -1863,8 +1877,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1883,8 +1897,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter =
|
||||
new ServiceWorkerDispatcherHost(GetID(), resource_context);
|
||||
@@ -446,7 +446,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
AddFilter(service_worker_filter.get());
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@@ -1876,11 +1889,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1896,11 +1909,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(new TraceMessageFilter(GetID()));
|
||||
AddFilter(new ResolveProxyMsgHelper(request_context.get()));
|
||||
|
||||
@@ -459,7 +459,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
resource_context, service_worker_context, browser_context);
|
||||
AddFilter(notification_message_filter_.get());
|
||||
|
||||
@@ -1902,7 +1912,8 @@ void RenderProcessHostImpl::BindCacheStorage(
|
||||
@@ -1922,7 +1932,8 @@ void RenderProcessHostImpl::BindCacheStorage(
|
||||
cache_storage_dispatcher_host_ =
|
||||
base::MakeRefCounted<CacheStorageDispatcherHost>();
|
||||
cache_storage_dispatcher_host_->Init(
|
||||
@@ -469,7 +469,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
}
|
||||
// Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO
|
||||
// thread entirely.
|
||||
@@ -2040,7 +2051,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -2060,7 +2071,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
|
||||
registry->AddInterface(base::BindRepeating(
|
||||
&AppCacheDispatcherHost::Create,
|
||||
@@ -480,7 +480,7 @@ index 3e6f43de2a5d..e5c1d2031173 100644
|
||||
|
||||
AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create));
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
|
||||
index 3a37edd2ac2a..360011cbc76d 100644
|
||||
index 5f6fd5d4c8c5..356e1f86e01f 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.h
|
||||
+++ content/browser/renderer_host/render_process_host_impl.h
|
||||
@@ -89,7 +89,6 @@ class ResourceMessageFilter;
|
||||
@@ -500,7 +500,7 @@ index 3a37edd2ac2a..360011cbc76d 100644
|
||||
SiteInstance* site_instance,
|
||||
bool is_for_guests_only);
|
||||
|
||||
@@ -436,7 +435,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -447,7 +446,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
// Use CreateRenderProcessHost() instead of calling this constructor
|
||||
// directly.
|
||||
RenderProcessHostImpl(BrowserContext* browser_context,
|
||||
@@ -509,7 +509,7 @@ index 3a37edd2ac2a..360011cbc76d 100644
|
||||
bool is_for_guests_only);
|
||||
|
||||
// Initializes a new IPC::ChannelProxy in |channel_|, which will be connected
|
||||
@@ -710,10 +709,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -721,10 +720,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
// called.
|
||||
int instance_id_ = 1;
|
||||
|
||||
|
@@ -295,10 +295,10 @@ index 1d35afeda78f..333f9c0f778d 100644
|
||||
std::unique_ptr<SelectionController> selection_controller_;
|
||||
|
||||
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
|
||||
index 1e6f6cc17281..bcecef51482e 100644
|
||||
index 46713d7170a6..685b0fb33286 100644
|
||||
--- ui/views/controls/menu/menu_controller.cc
|
||||
+++ ui/views/controls/menu/menu_controller.cc
|
||||
@@ -2316,8 +2316,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
|
||||
@@ -2321,8 +2321,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
|
||||
|
||||
void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
MenuItemView* item = pending_state_.item;
|
||||
@@ -313,7 +313,7 @@ index 1e6f6cc17281..bcecef51482e 100644
|
||||
MenuItemView* to_select = NULL;
|
||||
if (item->GetSubmenu()->GetMenuItemCount() > 0)
|
||||
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
|
||||
@@ -2332,8 +2337,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
@@ -2337,8 +2342,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
void MenuController::CloseSubmenu() {
|
||||
MenuItemView* item = state_.item;
|
||||
DCHECK(item);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index ca70db586f53..80cc47fdbb50 100644
|
||||
index 7655a0fe3f5a..56cb7049e1aa 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -371,6 +371,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
|
||||
@@ -370,6 +370,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
|
||||
return screen_info.device_scale_factor;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ index ca70db586f53..80cc47fdbb50 100644
|
||||
return renderer_frame_number_;
|
||||
}
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 895e2dcaf262..8333bd24b192 100644
|
||||
index 8e391207a8a7..f18985045680 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -80,6 +80,7 @@ class BrowserAccessibilityManager;
|
||||
@@ -48,7 +48,7 @@ index 895e2dcaf262..8333bd24b192 100644
|
||||
TouchSelectionControllerClientManager*
|
||||
GetTouchSelectionControllerClientManager() override;
|
||||
|
||||
@@ -423,6 +429,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -428,6 +434,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
// helps to position the full screen widget on the correct monitor.
|
||||
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
|
||||
|
||||
@@ -61,7 +61,7 @@ index 895e2dcaf262..8333bd24b192 100644
|
||||
// Sets the cursor for this view to the one associated with the specified
|
||||
// cursor_type.
|
||||
virtual void UpdateCursor(const WebCursor& cursor) = 0;
|
||||
@@ -590,6 +602,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -598,6 +610,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
|
||||
bool is_currently_scrolling_viewport_;
|
||||
|
||||
@@ -73,7 +73,7 @@ index 895e2dcaf262..8333bd24b192 100644
|
||||
#if defined(USE_AURA)
|
||||
void OnDidScheduleEmbed(int routing_id,
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
index e046d3a5e231..4c9d6059adb9 100644
|
||||
index 69c041eed926..a58a6a83370a 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
@@ -30,6 +30,10 @@
|
||||
@@ -87,7 +87,7 @@ index e046d3a5e231..4c9d6059adb9 100644
|
||||
#if defined(OS_WIN)
|
||||
#include "content/browser/frame_host/render_frame_host_impl.h"
|
||||
#include "content/public/common/context_menu_params.h"
|
||||
@@ -882,6 +886,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
@@ -887,6 +891,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
::SetFocus(hwnd);
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 2f8194254c1a..dbb57b13d465 100644
|
||||
index c8f868bf416e..31e28d7f2f2e 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -85,6 +85,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||
@@ -194,7 +194,7 @@ index 4120d3ae63f5..a02f7320347c 100644
|
||||
// a reference.
|
||||
corewm::TooltipWin* tooltip_;
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index 35ef8238a101..5ea914d301cf 100644
|
||||
index 806360dbc691..985a6c3d7497 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index a45b0e73714b..9581ed604d19 100644
|
||||
index 942a35d355ac..293c05cc909d 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -1783,21 +1783,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1794,21 +1794,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
@@ -45,7 +45,7 @@ index a45b0e73714b..9581ed604d19 100644
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
|
||||
@@ -2398,6 +2407,15 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2409,6 +2418,15 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.renderer_initiated_creation =
|
||||
main_frame_route_id != MSG_ROUTING_NONE;
|
||||
|
||||
@@ -61,7 +61,7 @@ index a45b0e73714b..9581ed604d19 100644
|
||||
WebContentsImpl* new_contents = nullptr;
|
||||
if (!is_guest) {
|
||||
create_params.context = view_->GetNativeView();
|
||||
@@ -2427,7 +2445,7 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2438,7 +2456,7 @@ void WebContentsImpl::CreateNewWindow(
|
||||
// TODO(brettw): It seems bogus that we have to call this function on the
|
||||
// newly created object and give it one of its own member variables.
|
||||
new_view->CreateViewForWidget(
|
||||
@@ -95,7 +95,7 @@ index 53d56abb35a3..d7b955f42ca5 100644
|
||||
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
||||
|
||||
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
|
||||
index be4048f9963d..df3f9af6dbf3 100644
|
||||
index 423362cb2453..d41a454853a0 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -70,9 +70,11 @@ class BrowserPluginGuestDelegate;
|
||||
|
@@ -23,7 +23,7 @@ index d4948345246e..73b7e0b1effe 100644
|
||||
Platform();
|
||||
virtual ~Platform();
|
||||
diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc
|
||||
index c80fedc37a43..3b3cf2d73511 100644
|
||||
index 8c40eef254a8..b9ac9f2a3472 100644
|
||||
--- third_party/blink/renderer/core/dom/dom_implementation.cc
|
||||
+++ third_party/blink/renderer/core/dom/dom_implementation.cc
|
||||
@@ -243,10 +243,11 @@ Document* DOMImplementation::createDocument(const String& type,
|
||||
@@ -75,7 +75,7 @@ index 04520b3a5427..a9a4f345386e 100644
|
||||
}
|
||||
|
||||
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
|
||||
index a825578f8eee..b122d7fbf994 100644
|
||||
index 61c746499547..45fa14d8417f 100644
|
||||
--- third_party/blink/renderer/core/page/page.cc
|
||||
+++ third_party/blink/renderer/core/page/page.cc
|
||||
@@ -153,7 +153,8 @@ Page::Page(PageClients& page_clients)
|
||||
@@ -149,7 +149,7 @@ index a825578f8eee..b122d7fbf994 100644
|
||||
visitor->Trace(use_counter_);
|
||||
visitor->Trace(plugins_changed_observers_);
|
||||
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
|
||||
index e614d62e2eeb..e180d16a7d47 100644
|
||||
index 25cc045b39cc..390f4aa6be7f 100644
|
||||
--- third_party/blink/renderer/core/page/page.h
|
||||
+++ third_party/blink/renderer/core/page/page.h
|
||||
@@ -138,7 +138,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
|
||||
@@ -162,7 +162,7 @@ index e614d62e2eeb..e180d16a7d47 100644
|
||||
|
||||
// Refreshes the browser-side plugin cache.
|
||||
static void RefreshPlugins();
|
||||
@@ -373,7 +374,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
|
||||
@@ -374,7 +375,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
|
||||
// longer needed.
|
||||
Member<Frame> main_frame_;
|
||||
|
||||
@@ -173,10 +173,10 @@ index e614d62e2eeb..e180d16a7d47 100644
|
||||
Member<ValidationMessageClient> validation_message_client_;
|
||||
|
||||
diff --git third_party/blink/renderer/platform/plugins/plugin_data.cc third_party/blink/renderer/platform/plugins/plugin_data.cc
|
||||
index 122ad2b0fa79..869bbf71bc44 100644
|
||||
index 73d10a188b27..8af05af0dc76 100644
|
||||
--- third_party/blink/renderer/platform/plugins/plugin_data.cc
|
||||
+++ third_party/blink/renderer/platform/plugins/plugin_data.cc
|
||||
@@ -79,16 +79,18 @@ void PluginData::Trace(blink::Visitor* visitor) {
|
||||
@@ -83,16 +83,18 @@ void PluginData::Trace(blink::Visitor* visitor) {
|
||||
// static
|
||||
void PluginData::RefreshBrowserSidePluginCache() {
|
||||
PluginListBuilder builder(nullptr);
|
||||
@@ -199,10 +199,10 @@ index 122ad2b0fa79..869bbf71bc44 100644
|
||||
for (PluginInfo* plugin_info : plugins_) {
|
||||
for (MimeClassInfo* mime_class_info : plugin_info->mimes_)
|
||||
diff --git third_party/blink/renderer/platform/plugins/plugin_data.h third_party/blink/renderer/platform/plugins/plugin_data.h
|
||||
index 736a244e720f..2279b0b8dd1e 100644
|
||||
index f1a78d3e0d5f..f6403f5ac018 100644
|
||||
--- third_party/blink/renderer/platform/plugins/plugin_data.h
|
||||
+++ third_party/blink/renderer/platform/plugins/plugin_data.h
|
||||
@@ -95,7 +95,8 @@ class PLATFORM_EXPORT PluginData final
|
||||
@@ -101,7 +101,8 @@ class PLATFORM_EXPORT PluginData final
|
||||
const HeapVector<Member<PluginInfo>>& Plugins() const { return plugins_; }
|
||||
const HeapVector<Member<MimeClassInfo>>& Mimes() const { return mimes_; }
|
||||
const SecurityOrigin* Origin() const { return main_frame_origin_.get(); }
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
|
||||
index e6ab3248281e..645fab919ace 100644
|
||||
index cd3bf3baf8c2..3d9a992a29b3 100644
|
||||
--- third_party/blink/public/web/web_view.h
|
||||
+++ third_party/blink/public/web/web_view.h
|
||||
@@ -357,6 +357,7 @@ class WebView : protected WebWidget {
|
||||
@@ -20,7 +20,7 @@ index e6ab3248281e..645fab919ace 100644
|
||||
|
||||
// Call these methods before and after running a nested, modal event loop
|
||||
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 0d070fb8df7c..de3b889ce29a 100644
|
||||
index 580b48c703ee..190727cd66d1 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
||||
@@ -48,7 +48,7 @@ index 0d070fb8df7c..de3b889ce29a 100644
|
||||
suppress_next_keypress_event_(false),
|
||||
ime_accept_events_(true),
|
||||
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 68fadab79a6e..bc397a361f39 100644
|
||||
index 9a0f4c9718af..866c7780ac6a 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -102,7 +102,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -70,7 +70,7 @@ index 68fadab79a6e..bc397a361f39 100644
|
||||
void SetBaseBackgroundColorOverride(WebColor);
|
||||
void ClearBaseBackgroundColorOverride();
|
||||
void SetBackgroundColorOverride(WebColor);
|
||||
@@ -619,6 +620,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -621,6 +622,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
float fake_page_scale_animation_page_scale_factor_;
|
||||
bool fake_page_scale_animation_use_anchor_;
|
||||
|
||||
@@ -80,12 +80,12 @@ index 68fadab79a6e..bc397a361f39 100644
|
||||
TransformationMatrix device_emulation_transform_;
|
||||
|
||||
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
index 484f950bd065..a0c47c7ea782 100644
|
||||
index 0d4aad182785..dd533b22f92e 100644
|
||||
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
@@ -783,7 +783,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
return nullptr;
|
||||
|
||||
@@ -779,7 +779,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
||||
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
HTMLSelectElement& select) {
|
||||
NotifyPopupOpeningObservers();
|
||||
- if (WebViewImpl::UseExternalPopupMenus())
|
||||
+ if (web_view_->UseExternalPopupMenus())
|
||||
|
@@ -562,7 +562,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate,
|
||||
|
||||
~TestArrayBufferReleaseCallback() { *destructorCalled_ = true; }
|
||||
|
||||
void ReleaseBuffer(void* buffer) { *releaseBufferCalled_ = true; }
|
||||
void ReleaseBuffer(void* buffer) override { *releaseBufferCalled_ = true; }
|
||||
|
||||
IMPLEMENT_REFCOUNTING(TestArrayBufferReleaseCallback);
|
||||
|
||||
@@ -624,7 +624,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate,
|
||||
|
||||
~TestArrayBufferReleaseCallback() {}
|
||||
|
||||
void ReleaseBuffer(void* buffer) {}
|
||||
void ReleaseBuffer(void* buffer) override {}
|
||||
|
||||
IMPLEMENT_REFCOUNTING(TestArrayBufferReleaseCallback);
|
||||
};
|
||||
|
@@ -52,7 +52,7 @@ def backup_file(name):
|
||||
def copy_file(src, dst, quiet=True):
|
||||
""" Copy a file. """
|
||||
try:
|
||||
shutil.copy(src, dst)
|
||||
shutil.copy2(src, dst)
|
||||
if not quiet:
|
||||
sys.stdout.write('Transferring ' + src + ' file.\n')
|
||||
except IOError, (errno, strerror):
|
||||
|
@@ -7,19 +7,27 @@ import os
|
||||
import re
|
||||
import sys
|
||||
from exec_util import exec_cmd
|
||||
from file_util import copy_file, move_file, read_file, remove_file
|
||||
import git_util as git
|
||||
|
||||
backup_ext = '.cefbak'
|
||||
|
||||
|
||||
def msg(message):
|
||||
""" Output a message. """
|
||||
sys.stdout.write('--> ' + message + "\n")
|
||||
|
||||
|
||||
def linebreak():
|
||||
""" Output a line break. """
|
||||
sys.stdout.write('-' * 80 + "\n")
|
||||
|
||||
|
||||
def warn(message):
|
||||
""" Output a warning. """
|
||||
sys.stdout.write('-' * 80 + "\n")
|
||||
linebreak()
|
||||
sys.stdout.write('!!!! WARNING: ' + message + "\n")
|
||||
sys.stdout.write('-' * 80 + "\n")
|
||||
linebreak()
|
||||
|
||||
|
||||
def extract_paths(file):
|
||||
@@ -67,7 +75,7 @@ parser.add_option(
|
||||
action='store_true',
|
||||
dest='resave',
|
||||
default=False,
|
||||
help='re-save existing patch files to pick up manual changes')
|
||||
help='resave existing patch files to pick up manual changes')
|
||||
parser.add_option(
|
||||
'--reapply',
|
||||
action='store_true',
|
||||
@@ -80,6 +88,19 @@ parser.add_option(
|
||||
dest='revert',
|
||||
default=False,
|
||||
help='revert all changes from existing patch files')
|
||||
parser.add_option(
|
||||
'--backup',
|
||||
action='store_true',
|
||||
dest='backup',
|
||||
default=False,
|
||||
help='backup patched files. Used in combination with --revert.')
|
||||
parser.add_option(
|
||||
'--restore',
|
||||
action='store_true',
|
||||
dest='restore',
|
||||
default=False,
|
||||
help='restore backup of patched files that have not changed. If a backup has ' +\
|
||||
'changed the patch file will be resaved. Used in combination with --reapply.')
|
||||
parser.add_option(
|
||||
'--patch',
|
||||
action='extend',
|
||||
@@ -113,6 +134,8 @@ scope = {}
|
||||
execfile(patch_cfg, scope)
|
||||
patches = scope["patches"]
|
||||
|
||||
failed_patches = {}
|
||||
|
||||
# Read each individual patch file.
|
||||
patches_dir = os.path.join(patch_dir, 'patches')
|
||||
for patch in patches:
|
||||
@@ -136,6 +159,9 @@ for patch in patches:
|
||||
# List of paths added by the patch file.
|
||||
added_paths = []
|
||||
|
||||
# True if any backed up files have changed.
|
||||
has_backup_changes = False
|
||||
|
||||
if not options.resave:
|
||||
if not options.reapply:
|
||||
# Revert any changes to existing files in the patch.
|
||||
@@ -143,6 +169,14 @@ for patch in patches:
|
||||
patch_path_abs = os.path.abspath(os.path.join(patch_root_abs, \
|
||||
patch_path))
|
||||
if os.path.exists(patch_path_abs):
|
||||
if options.backup:
|
||||
backup_path_abs = patch_path_abs + backup_ext
|
||||
if not os.path.exists(backup_path_abs):
|
||||
msg('Creating backup of %s' % patch_path_abs)
|
||||
copy_file(patch_path_abs, backup_path_abs)
|
||||
else:
|
||||
msg('Skipping backup of %s' % patch_path_abs)
|
||||
|
||||
msg('Reverting changes to %s' % patch_path_abs)
|
||||
cmd = 'git checkout -- %s' % (patch_path_abs)
|
||||
result = exec_cmd(cmd, patch_root_abs)
|
||||
@@ -158,19 +192,72 @@ for patch in patches:
|
||||
added_paths.append(patch_path_abs)
|
||||
|
||||
if not options.revert:
|
||||
# Chromium files are occasionally (incorrectly) checked in with Windows
|
||||
# line endings. This will cause the patch tool to fail when attempting
|
||||
# to patch those files on Posix systems. Convert any such files to Posix
|
||||
# line endings before applying the patch.
|
||||
converted_files = []
|
||||
for patch_path in patch_paths:
|
||||
patch_path_abs = os.path.abspath(os.path.join(patch_root_abs, \
|
||||
patch_path))
|
||||
if os.path.exists(patch_path_abs):
|
||||
with open(patch_path_abs, 'rb') as fp:
|
||||
contents = fp.read()
|
||||
if "\r\n" in contents:
|
||||
msg('Converting to Posix line endings for %s' % patch_path_abs)
|
||||
converted_files.append(patch_path_abs)
|
||||
contents = contents.replace("\r\n", "\n")
|
||||
with open(patch_path_abs, 'wb') as fp:
|
||||
fp.write(contents)
|
||||
|
||||
# Apply the patch file.
|
||||
msg('Applying patch to %s' % patch_root_abs)
|
||||
patch_string = open(patch_file, 'rb').read()
|
||||
result = exec_cmd('patch -p0', patch_root_abs, patch_string)
|
||||
|
||||
if len(converted_files) > 0:
|
||||
# Restore Windows line endings in converted files so that the diff is
|
||||
# correct if/when the patch file is re-saved.
|
||||
for patch_path_abs in converted_files:
|
||||
with open(patch_path_abs, 'rb') as fp:
|
||||
contents = fp.read()
|
||||
msg('Converting to Windows line endings for %s' % patch_path_abs)
|
||||
contents = contents.replace("\n", "\r\n")
|
||||
with open(patch_path_abs, 'wb') as fp:
|
||||
fp.write(contents)
|
||||
|
||||
if result['err'] != '':
|
||||
raise Exception('Failed to apply patch file: %s' % result['err'])
|
||||
sys.stdout.write(result['out'])
|
||||
if result['out'].find('FAILED') != -1:
|
||||
failed_lines = []
|
||||
for line in result['out'].split('\n'):
|
||||
if line.find('FAILED') != -1:
|
||||
failed_lines.append(line.strip())
|
||||
warn('Failed to apply %s, fix manually and run with --resave' % \
|
||||
patch['name'])
|
||||
failed_patches[patch['name']] = failed_lines
|
||||
continue
|
||||
|
||||
if not options.revert and not options.reapply:
|
||||
if options.restore:
|
||||
# Restore from backup if a backup exists.
|
||||
for patch_path in patch_paths:
|
||||
patch_path_abs = os.path.abspath(os.path.join(patch_root_abs, \
|
||||
patch_path))
|
||||
backup_path_abs = patch_path_abs + backup_ext
|
||||
if os.path.exists(backup_path_abs):
|
||||
if read_file(patch_path_abs) == read_file(backup_path_abs):
|
||||
msg('Restoring backup of %s' % patch_path_abs)
|
||||
remove_file(patch_path_abs)
|
||||
move_file(backup_path_abs, patch_path_abs)
|
||||
else:
|
||||
msg('Discarding backup of %s' % patch_path_abs)
|
||||
remove_file(backup_path_abs)
|
||||
has_backup_changes = True
|
||||
else:
|
||||
msg('No backup of %s' % patch_path_abs)
|
||||
|
||||
if (not options.revert and not options.reapply) or has_backup_changes:
|
||||
msg('Saving changes to %s' % patch_file)
|
||||
if added_paths:
|
||||
# Inform git of the added paths so they appear in the patch file.
|
||||
@@ -181,12 +268,31 @@ for patch in patches:
|
||||
|
||||
# Re-create the patch file.
|
||||
patch_paths_str = ' '.join(patch_paths)
|
||||
cmd = 'git diff --no-prefix --relative --ignore-space-at-eol %s' % patch_paths_str
|
||||
cmd = 'git diff --no-prefix --relative %s' % patch_paths_str
|
||||
result = exec_cmd(cmd, patch_root_abs)
|
||||
if result['err'] != '' and result['err'].find('warning:') != 0:
|
||||
raise Exception('Failed to create patch file: %s' % result['err'])
|
||||
|
||||
if "\r\n" in result['out']:
|
||||
# Patch files should always be saved with Posix line endings.
|
||||
# This will avoid problems when attempting to re-apply the patch
|
||||
# file on Posix systems.
|
||||
msg('Converting to Posix line endings for %s' % patch_file)
|
||||
result['out'] = result['out'].replace("\r\n", "\n")
|
||||
|
||||
f = open(patch_file, 'wb')
|
||||
f.write(result['out'])
|
||||
f.close()
|
||||
else:
|
||||
raise Exception('Patch file does not exist: %s' % patch_file)
|
||||
|
||||
if len(failed_patches) > 0:
|
||||
sys.stdout.write("\n")
|
||||
linebreak()
|
||||
sys.stdout.write("!!!! FAILED PATCHES, fix manually and run with --resave\n")
|
||||
for name in sorted(failed_patches.keys()):
|
||||
sys.stdout.write("%s:\n" % name)
|
||||
for line in failed_patches[name]:
|
||||
sys.stdout.write(" %s\n" % line)
|
||||
linebreak()
|
||||
sys.exit(1)
|
||||
|
Reference in New Issue
Block a user