Update to Chromium revision 9cedf753 (#418732)

- Simplify usage of OnBeforePluginLoad (issue #2015)
- Switch crash reporting from crashpad to breakpad on Windows and OS X.
  Adds a new chrome_elf.dll dependency on Windows (issue #1995)
- Remove CefTextfield::GetPlaceholderTextColor() method which is no
  longer supported by Chromium.
This commit is contained in:
Marshall Greenblatt
2016-10-17 14:14:44 -04:00
parent a1fc6f1ad0
commit 07d12b78e1
101 changed files with 943 additions and 843 deletions

View File

@@ -234,13 +234,6 @@ patches = [
'name': 'chrome_widevine',
'path': '../',
},
{
# Remove references to crashpad from chrome/ code on Mac. This avoids
# linker conflicts with breakpad.
# TODO(cef/chrome): Remove this patch once crashpad is supported.
'name': 'chrome_crashpad_mac',
'path': '../',
},
{
# Make some methods of ProfileManager virtual.
# Allow CEF to intercept GetBrowserContext*InIncognito functions.
@@ -257,9 +250,16 @@ patches = [
'path': '../',
},
{
# Fix debug assertion on right-click context menu.
# https://codereview.chromium.org/2288083002
'name': 'webkit_eventhandler_2288083002',
# Pass the render process id to PluginServiceFilter::IsPluginAvailable.
# https://bugs.chromium.org/p/chromium/issues/detail?id=626728#c15
'name': 'render_frame_message_filter_626728',
'path': '../',
},
{
# Don't add TestDesktopScreenX11 dependency on Linux.
# Revert ui_controls_factory_desktop_aurax11.cc changes from
# https://codereview.chromium.org/2327623002
'name': 'ui_views_test_640741',
'path': '../',
},
]

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 75651c4..e422ae7 100644
index 8d92b06..618d23e 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -59,9 +59,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
@@ -56,9 +56,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
@@ -15,7 +15,7 @@ index 75651c4..e422ae7 100644
void SwapCompositorFrame(uint32_t output_surface_id,
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 3619d4d..89adf27 100644
index 219effe..5122a99 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -198,6 +198,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {

View File

@@ -1,8 +1,8 @@
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
index 64e1be3..834a4dc 100644
index cdb2d17..fb53fa6 100644
--- render_widget_host_view_guest.cc
+++ render_widget_host_view_guest.cc
@@ -243,6 +243,9 @@ void RenderWidgetHostViewGuest::Destroy() {
@@ -242,6 +242,9 @@ void RenderWidgetHostViewGuest::Destroy() {
}
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {

View File

@@ -1,5 +1,5 @@
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
index d0a39e2..8fa0e1e 100644
index 6d06122..bc964c7 100644
--- browser/browser_plugin/browser_plugin_guest.cc
+++ browser/browser_plugin/browser_plugin_guest.cc
@@ -28,7 +28,7 @@
@@ -11,7 +11,7 @@ index d0a39e2..8fa0e1e 100644
#include "content/common/browser_plugin/browser_plugin_constants.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/content_constants_internal.h"
@@ -289,20 +289,19 @@ void BrowserPluginGuest::InitInternal(
@@ -292,20 +292,19 @@ void BrowserPluginGuest::InitInternal(
guest_window_rect_ = params.view_rect;
if (owner_web_contents_ != owner_web_contents) {
@@ -36,7 +36,7 @@ index d0a39e2..8fa0e1e 100644
}
RendererPreferences* renderer_prefs =
@@ -755,11 +754,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -758,11 +757,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
->GetWidget()
->Init();
GetWebContents()->GetMainFrame()->Init();

View File

@@ -1,41 +0,0 @@
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index 0e9c5ae..28fc90a 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -182,7 +182,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit() {
ChromeBrowserMainPartsPosix::PostProfileInit();
g_browser_process->metrics_service()->RecordBreakpadRegistration(
- crash_reporter::GetUploadsEnabled());
+ false);
// TODO(calamity): Make this gated on first_run::IsChromeFirstRun() in M45.
content::BrowserThread::PostAfterStartupTask(
diff --git chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
index d62973e..fc2dfa4 100644
--- chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
+++ chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
@@ -75,8 +75,6 @@ void CrashUploadListCrashpad::LoadUploadList(
// database lives in the .exe, so we need to grab a pointer to a helper in the
// exe to get our reports list.
GetReportsThunk(&reports);
-#else
- crash_reporter::GetReports(&reports);
#endif
for (const crash_reporter::Report& report : reports) {
diff --git chrome/browser/google/google_update_settings_posix.cc chrome/browser/google/google_update_settings_posix.cc
index d053b1e..cdecb1a 100644
--- chrome/browser/google/google_update_settings_posix.cc
+++ chrome/browser/google/google_update_settings_posix.cc
@@ -63,10 +63,6 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
// static
bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
-#if defined(OS_MACOSX)
- crash_reporter::SetUploadConsent(consented);
-#endif
-
base::FilePath consent_dir;
PathService::Get(chrome::DIR_USER_DATA, &consent_dir);
if (!base::DirectoryExists(consent_dir))

View File

@@ -1,5 +1,5 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index 4325cec..7cb8a86 100644
index eb4d107..0f5dfee 100644
--- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc
@@ -76,7 +76,7 @@

View File

@@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 9af7049..87f1b01 100644
index 128cb43..fb72012 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -199,6 +199,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -198,6 +198,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
std::unique_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
@@ -17,7 +17,7 @@ index 9af7049..87f1b01 100644
if (shell::ShellIsRemote()) {
NOTREACHED();
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index b73eb86..81957b2 100644
index 1ab836b..1f7a82a 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -18,6 +18,7 @@
@@ -46,7 +46,7 @@ index b73eb86..81957b2 100644
// 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
@@ -220,6 +232,9 @@ class COMPOSITOR_EXPORT Compositor
@@ -217,6 +229,9 @@ class COMPOSITOR_EXPORT Compositor
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -56,7 +56,7 @@ index b73eb86..81957b2 100644
// 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
@@ -403,6 +418,8 @@ class COMPOSITOR_EXPORT Compositor
@@ -400,6 +415,8 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactory* context_factory_;

View File

@@ -1,8 +1,8 @@
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
index b7bafaf..09d1d07 100644
index bb040a6..c801841 100644
--- public/renderer/content_renderer_client.cc
+++ public/renderer/content_renderer_client.cc
@@ -99,7 +99,6 @@ bool ContentRendererClient::AllowPopup() {
@@ -100,7 +100,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
@@ -10,7 +10,7 @@ index b7bafaf..09d1d07 100644
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
@@ -112,6 +111,7 @@ bool ContentRendererClient::HandleNavigation(
@@ -113,6 +112,7 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
@@ -19,10 +19,10 @@ index b7bafaf..09d1d07 100644
return false;
}
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index b7b042f..69a62f2 100644
index 752ae2d..de04432 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -204,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -208,7 +208,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
@@ -30,7 +30,7 @@ index b7b042f..69a62f2 100644
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
@@ -220,6 +219,7 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -224,6 +223,7 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationPolicy default_policy,
bool is_redirect);
@@ -39,10 +39,10 @@ index b7b042f..69a62f2 100644
// built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index 95165ff..608409e 100644
index e74b334..2fe1e1a 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -4917,7 +4917,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4972,7 +4972,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
(pending_navigation_params_ &&
!pending_navigation_params_->request_params.redirects.empty());
@@ -50,7 +50,7 @@ index 95165ff..608409e 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation(
@@ -4926,7 +4925,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4981,7 +4980,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
is_redirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@@ -1,21 +1,20 @@
diff --git .gn .gn
index 1e0e3bd..9e70917 100644
index 2034420..1675275 100644
--- .gn
+++ .gn
@@ -231,6 +231,8 @@ exec_script_whitelist = [
@@ -238,6 +238,7 @@ exec_script_whitelist = [
"//build/toolchain/win/BUILD.gn",
"//build/util/branding.gni",
"//build/util/version.gni",
+ "//cef/BUILD.gn",
+ "//cef/libcef/common/extensions/api/schemas.gni",
"//chrome/android/BUILD.gn",
"//chrome/browser/BUILD.gn",
"//chrome/browser/chromeos/BUILD.gn",
"//chromeos/BUILD.gn",
# TODO(dgn): Layer violation but breaks the build otherwise, see
diff --git BUILD.gn BUILD.gn
index acc203c..49113a4 100644
index 6aad399..9c42f8e 100644
--- BUILD.gn
+++ BUILD.gn
@@ -265,6 +265,7 @@ group("both_gn_and_gyp") {
@@ -270,6 +270,7 @@ group("both_gn_and_gyp") {
# and whether there should be other targets that are iOS-only and missing.
deps += [
"//cc:cc_unittests",
@@ -56,10 +55,10 @@ index 5bfa9a7..5e6e05d 100644
+ "studio path")
}
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
index 0d0975d..cfb5d3f 100644
index fbc201e..299156d 100644
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
@@ -127,11 +127,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
@@ -126,11 +126,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
script_path = os.path.normpath(os.path.join(
os.environ['GYP_MSVS_OVERRIDE_PATH'],
'VC/vcvarsall.bat'))
@@ -81,7 +80,7 @@ index 0d0975d..cfb5d3f 100644
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 829e718..89361a0 100755
index 9c55984..d44d116 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -74,11 +74,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@@ -104,7 +103,7 @@ index 829e718..89361a0 100755
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
diff --git chrome/BUILD.gn chrome/BUILD.gn
index aa67e96..e2af2f3 100644
index 87d4743..dc21a56 100644
--- chrome/BUILD.gn
+++ chrome/BUILD.gn
@@ -709,7 +709,7 @@ if (is_win) {
@@ -117,10 +116,10 @@ index aa67e96..e2af2f3 100644
outputs = [
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
index b9a1d95..54d7677 100644
index f4a3caf..8ae7639 100644
--- chrome/chrome_repack_locales.gni
+++ chrome/chrome_repack_locales.gni
@@ -189,9 +189,9 @@ template("chrome_repack_locales") {
@@ -188,9 +188,9 @@ template("chrome_repack_locales") {
if (defined(invoker.output_dir)) {
output = "${invoker.output_dir}/${output_locale}.pak"
} else if (is_mac || is_ios) {

View File

@@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index f5f641d..c052709 100644
index 4b6f6ad..0d17c1c 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@

View File

@@ -1,8 +1,8 @@
diff --git input_method_win.cc input_method_win.cc
index 4ec5a84..7c99e6c 100644
index 8975069..858bc9b 100644
--- input_method_win.cc
+++ input_method_win.cc
@@ -635,8 +635,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
@@ -642,8 +642,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
// receiving keyboard input as long as it is an active window. This works well
// even when the |attached_window_handle| becomes active but has not received
// WM_FOCUS yet.

View File

@@ -1,5 +1,5 @@
diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc
index a58e021..2a20447 100644
index 0b62a81..e34d210 100644
--- mime_handler_view_guest.cc
+++ mime_handler_view_guest.cc
@@ -134,6 +134,8 @@ void MimeHandlerViewGuest::CreateWebContents(

View File

@@ -1,5 +1,5 @@
diff --git base/network_delegate.h base/network_delegate.h
index 2deb9c58..0896a36 100644
index 36bdde9..f1ee1ae 100644
--- base/network_delegate.h
+++ base/network_delegate.h
@@ -36,6 +36,7 @@ namespace net {
@@ -10,7 +10,7 @@ index 2deb9c58..0896a36 100644
class HttpRequestHeaders;
class HttpResponseHeaders;
class ProxyInfo;
@@ -111,6 +112,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
@@ -115,6 +116,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
@@ -45,10 +45,10 @@ index 1940399..bf8722c 100644
friend class GZipUnitTest;
friend class SdchFilterChainingTest;
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
index 259a2d8..c1d02cc 100644
index eadeb4b..2341297 100644
--- url_request/url_request_job.cc
+++ url_request/url_request_job.cc
@@ -498,6 +498,9 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -495,6 +495,9 @@ void URLRequestJob::NotifyHeadersComplete() {
if (request_->status().is_success())
filter_ = SetupFilter();

View File

@@ -1,12 +1,13 @@
diff --git url_request.h url_request.h
index 73e02d9..5a20709 100644
index 7a810a7..08d6331 100644
--- url_request.h
+++ url_request.h
@@ -648,10 +648,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// or after the response headers are received.
void GetConnectionAttempts(ConnectionAttempts* out) const;
@@ -651,10 +651,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Returns the error status of the request.
// Do not use! Going to be protected!
const URLRequestStatus& status() const { return status_; }
- protected:
+
// Allow the URLRequestJob class to control the is_pending() flag.
void set_is_pending(bool value) { is_pending_ = value; }

View File

@@ -1,8 +1,8 @@
diff --git BUILD.gn BUILD.gn
index ca2338f..a5e62a2 100644
index ccb1e0c..0e3b185 100644
--- BUILD.gn
+++ BUILD.gn
@@ -172,6 +172,10 @@ static_library("pdfium") {
@@ -181,6 +181,10 @@ static_library("pdfium") {
} else {
libs += [ "freetype" ]
}
@@ -14,18 +14,18 @@ index ca2338f..a5e62a2 100644
static_library("test_support") {
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index dee71ac..e2563bc 100644
index 76540fc..5b2e2d0 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -28,6 +28,7 @@
#include "fpdfsdk/include/fsdk_mgr.h"
@@ -29,6 +29,7 @@
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_pauseadapter.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
+#include "fxjs/include/fxjs_v8.h"
#include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h"
#include "third_party/base/numerics/safe_conversions_impl.h"
@@ -296,6 +297,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
@@ -297,6 +298,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
#endif // PDF_ENABLE_XFA
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index 5627e6f..b3ed37a 100644
index cb5c7d5..a1f606f 100644
--- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h
@@ -213,6 +213,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -202,6 +202,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@@ -11,10 +11,10 @@ index 5627e6f..b3ed37a 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index b856339..e71b819 100644
index 3e53ef5..133fcdd 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -175,6 +175,7 @@ WebPreferences::WebPreferences()
@@ -174,6 +174,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
@@ -23,10 +23,10 @@ index b856339..e71b819 100644
inert_visual_viewport(false),
record_whole_document(false),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index f9b778b..35f1967 100644
index 3733fb1..1b54799 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -188,6 +188,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -187,6 +187,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
@@ -35,10 +35,10 @@ index f9b778b..35f1967 100644
bool inert_visual_viewport;
bool record_whole_document;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index c544c288..3ab4478 100644
index f06587d..27702eb 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -1491,6 +1491,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1477,6 +1477,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);

View File

@@ -1,5 +1,5 @@
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
index d22384c..cb9d457 100644
index 448bb72..aa98dda 100644
--- prefs_tab_helper.cc
+++ prefs_tab_helper.cc
@@ -11,8 +11,8 @@
@@ -12,7 +12,7 @@ index d22384c..cb9d457 100644
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -424,12 +424,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
@@ -422,12 +422,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
GetInstance()->GetServiceForBrowserContext(profile, true));
}
@@ -27,7 +27,7 @@ index d22384c..cb9d457 100644
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
"PrefWatcher",
@@ -450,6 +448,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
@@ -448,6 +446,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
}
};

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index b43b88b..7779496 100644
index 4552193..dbf30ae 100644
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -9,7 +9,9 @@
@@ -12,7 +12,7 @@ index b43b88b..7779496 100644
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/ui/cocoa/applescript/apple_event_util.h"
#include "chrome/browser/ui/cocoa/applescript/error_applescript.h"
@@ -227,11 +229,15 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
@@ -224,11 +226,15 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
- (void)handlesPrintScriptCommand:(NSScriptCommand*)command {
AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT);
@@ -166,7 +166,7 @@ index a019144..af8839d 100644
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
index 22207f3..5924464 100644
index 7fa310f..8946ba9 100644
--- components/printing/renderer/print_web_view_helper.cc
+++ components/printing/renderer/print_web_view_helper.cc
@@ -86,6 +86,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
@@ -205,7 +205,7 @@ index 22207f3..5924464 100644
// Disable scaling when either:
// - The PDF specifies disabling scaling.
@@ -371,7 +369,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
@@ -378,7 +376,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
}
#endif
@@ -213,7 +213,7 @@ index 22207f3..5924464 100644
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
bool fit_to_paper_size = false;
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
@@ -413,7 +410,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
@@ -421,7 +418,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
}
return blink::WebPrintScalingOptionFitToPrintableArea;
}
@@ -221,7 +221,7 @@ index 22207f3..5924464 100644
PrintMsg_Print_Params CalculatePrintParamsForCss(
blink::WebLocalFrame* frame,
@@ -497,7 +493,6 @@ blink::WebView* FrameReference::view() {
@@ -505,7 +501,6 @@ blink::WebView* FrameReference::view() {
return view_;
}
@@ -229,7 +229,7 @@ index 22207f3..5924464 100644
// static - Not anonymous so that platform implementations can use it.
void PrintWebViewHelper::PrintHeaderAndFooter(
blink::WebCanvas* canvas,
@@ -557,7 +552,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
@@ -565,7 +560,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
web_view->close();
frame->close();
}
@@ -237,7 +237,7 @@ index 22207f3..5924464 100644
// static - Not anonymous so that platform implementations can use it.
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
@@ -843,6 +837,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
@@ -851,6 +845,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
print_for_preview_(false),
delegate_(std::move(delegate)),
print_node_in_progress_(false),
@@ -245,7 +245,7 @@ index 22207f3..5924464 100644
is_loading_(false),
is_scripted_preview_delayed_(false),
ipc_nesting_level_(0),
@@ -901,10 +896,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
@@ -909,10 +904,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
return;
if (g_is_preview_enabled) {
@@ -256,7 +256,7 @@ index 22207f3..5924464 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
Print(frame, blink::WebNode(), true);
@@ -928,14 +921,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
@@ -936,14 +929,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -271,7 +271,7 @@ index 22207f3..5924464 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -990,7 +979,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
@@ -998,7 +987,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
}
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -279,7 +279,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1055,7 +1043,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
@@ -1063,7 +1051,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
@@ -287,7 +287,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1080,7 +1067,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
@@ -1088,7 +1075,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@@ -295,7 +295,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -1241,7 +1227,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
@@ -1249,7 +1235,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
return true;
}
@@ -304,7 +304,7 @@ index 22207f3..5924464 100644
bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1271,7 +1257,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -1279,7 +1265,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@@ -313,7 +313,7 @@ index 22207f3..5924464 100644
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1301,7 +1287,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
@@ -1309,7 +1295,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
@@ -321,7 +321,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1316,7 +1301,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
@@ -1324,7 +1309,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
is_scripted_printing_blocked_ = blocked;
}
@@ -329,7 +329,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
if (ipc_nesting_level_ > 1)
return;
@@ -1327,7 +1311,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1335,7 +1319,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.isNull()) {
@@ -339,7 +339,7 @@ index 22207f3..5924464 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1335,7 +1321,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1343,7 +1329,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@@ -347,7 +347,7 @@ index 22207f3..5924464 100644
bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false;
@@ -1361,11 +1346,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
@@ -1369,11 +1354,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
// its |context_menu_node_|.
@@ -360,7 +360,7 @@ index 22207f3..5924464 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
blink::WebNode duplicate_node(node);
@@ -1431,7 +1414,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1439,7 +1422,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@@ -368,7 +368,7 @@ index 22207f3..5924464 100644
case FAIL_PREVIEW:
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@@ -1443,7 +1425,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1451,7 +1433,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
print_preview_context_.Failed(notify_browser_of_print_failure_);
break;
@@ -376,7 +376,7 @@ index 22207f3..5924464 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1575,7 +1556,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1583,7 +1564,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@@ -384,7 +384,7 @@ index 22207f3..5924464 100644
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1684,7 +1664,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
@@ -1692,7 +1672,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
return true;
}
@@ -392,7 +392,7 @@ index 22207f3..5924464 100644
#if defined(ENABLE_BASIC_PRINTING)
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
@@ -1793,7 +1772,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1801,7 +1780,6 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
@@ -400,7 +400,7 @@ index 22207f3..5924464 100644
if (params.params.display_header_footer) {
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
// |printingMinimumShrinkFactor| from Blink.
@@ -1808,7 +1786,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1816,7 +1794,6 @@ void PrintWebViewHelper::PrintPageInternal(
scale_factor / fudge_factor, page_layout_in_points,
params.params);
}
@@ -408,7 +408,7 @@ index 22207f3..5924464 100644
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,
@@ -1844,7 +1821,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
@@ -1852,7 +1829,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
return true;
}
@@ -416,7 +416,7 @@ index 22207f3..5924464 100644
void PrintWebViewHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -1972,7 +1948,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
@@ -1980,7 +1956,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}

View File

@@ -0,0 +1,13 @@
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 4558e89..6e9a472 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -484,7 +484,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
std::vector<WebPluginInfo> plugins;
- int child_process_id = -1;
+ int child_process_id = render_process_id_;
int routing_id = MSG_ROUTING_NONE;
GURL policy_url =
main_frame_origin.unique() ? GURL() : GURL(main_frame_origin.Serialize());

View File

@@ -1,5 +1,5 @@
diff --git render_view_host_impl.h render_view_host_impl.h
index e550b57..81743c8 100644
index ca857d5..f3f54fa 100644
--- render_view_host_impl.h
+++ render_view_host_impl.h
@@ -200,6 +200,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,

View File

@@ -1,8 +1,8 @@
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
index ecfcc9c..6bb0eda 100644
index 2461641..7dfad416 100644
--- render_widget_host_view_mac.mm
+++ render_widget_host_view_mac.mm
@@ -467,9 +467,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
@@ -460,9 +460,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// Paint this view host with |background_color_| when there is no content
// ready to draw.
background_layer_.reset([[CALayer alloc] init]);

View File

@@ -1,9 +1,9 @@
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
index d47d2d0..e6a5d9d 100644
index ad5e301..c64325b 100644
--- renderer_preferences_util.cc
+++ renderer_preferences_util.cc
@@ -26,7 +26,8 @@
#include "ui/views/controls/textfield/textfield.h"
@@ -30,7 +30,8 @@
#include "ui/base/cocoa/defaults_utils.h"
#endif
-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
@@ -12,8 +12,8 @@ index d47d2d0..e6a5d9d 100644
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "ui/views/linux_ui/linux_ui.h"
@@ -120,7 +121,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0;
@@ -130,7 +131,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
prefs->caret_blink_interval = interval.InSecondsF();
#endif
-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)

View File

@@ -74,10 +74,10 @@ index 6ca86e7..cf081e4 100644
CHECK(GetUserData(kMojoWasInitialized))
<< "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
index 127b0c0..9dce5af 100644
index a5de8d5..8cd64b3 100644
--- content/browser/devtools/protocol/service_worker_handler.cc
+++ content/browser/devtools/protocol/service_worker_handler.cc
@@ -523,10 +523,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
@@ -503,10 +503,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
if (!base::StringToInt64(registration_id, &id))
return CreateInvalidVersionIdErrorResponse();
@@ -91,10 +91,10 @@ index 127b0c0..9dce5af 100644
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 7d69ab0..91d968a 100644
index 1bab21a4..81156a8 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -653,7 +653,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
@@ -664,7 +664,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
@@ -103,7 +103,7 @@ index 7d69ab0..91d968a 100644
bool is_for_guests_only)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -978,6 +978,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
@@ -998,6 +998,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -126,7 +126,7 @@ index 7d69ab0..91d968a 100644
AddFilter(new ResourceSchedulerFilter(GetID()));
MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
@@ -992,8 +1008,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1012,8 +1028,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
new RenderMessageFilter(
GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), media_internals,
@@ -137,7 +137,7 @@ index 7d69ab0..91d968a 100644
AddFilter(render_message_filter.get());
render_frame_message_filter_ = new RenderFrameMessageFilter(
@@ -1024,9 +1040,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1044,9 +1060,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
resource_message_filter_ = new ResourceMessageFilter(
GetID(), PROCESS_TYPE_RENDERER,
@@ -149,7 +149,7 @@ index 7d69ab0..91d968a 100644
storage_partition_impl_->GetHostZoomLevelContext(),
get_contexts_callback);
@@ -1051,14 +1067,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1071,14 +1087,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
AddFilter(new VideoCaptureHost(media_stream_manager));
@@ -167,7 +167,7 @@ index 7d69ab0..91d968a 100644
blob_storage_context.get()));
#if defined(ENABLE_WEBRTC)
@@ -1110,14 +1124,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1130,14 +1144,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
new CacheStorageDispatcherHost();
@@ -184,7 +184,7 @@ index 7d69ab0..91d968a 100644
AddFilter(service_worker_filter.get());
AddFilter(new SharedWorkerMessageFilter(
@@ -1125,12 +1138,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1145,12 +1158,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
WorkerStoragePartition(
storage_partition_impl_->GetURLRequestContext(),
storage_partition_impl_->GetMediaURLRequestContext(),
@@ -200,7 +200,7 @@ index 7d69ab0..91d968a 100644
message_port_message_filter_.get()));
#if defined(ENABLE_WEBRTC)
@@ -1145,11 +1158,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1165,11 +1178,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
GetID(), storage_partition_impl_->GetQuotaManager(),
GetContentClient()->browser()->CreateQuotaPermissionContext()));
@@ -213,7 +213,7 @@ index 7d69ab0..91d968a 100644
resource_context, service_worker_context, browser_context);
AddFilter(notification_message_filter_.get());
@@ -1158,7 +1168,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1178,7 +1188,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new HistogramMessageFilter());
AddFilter(new MemoryMessageFilter(this));
AddFilter(new PushMessagingMessageFilter(
@@ -222,7 +222,7 @@ index 7d69ab0..91d968a 100644
#if defined(OS_ANDROID)
AddFilter(new ScreenOrientationMessageFilterAndroid());
#endif
@@ -1167,6 +1177,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1187,6 +1197,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
void RenderProcessHostImpl::RegisterMojoInterfaces() {
std::unique_ptr<shell::InterfaceRegistry> registry(
new shell::InterfaceRegistry);
@@ -234,7 +234,7 @@ index 7d69ab0..91d968a 100644
#if defined(OS_ANDROID)
interface_registry_android_ =
InterfaceRegistryAndroid::Create(registry.get());
@@ -1194,8 +1209,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -1220,8 +1235,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
AddUIThreadInterface(
registry.get(),
base::Bind(&PlatformNotificationContextImpl::CreateService,
@@ -245,10 +245,10 @@ index 7d69ab0..91d968a 100644
AddUIThreadInterface(
registry.get(),
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index 7fb91a6..503e6ba 100644
index f9e74e7..a49359f 100644
--- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h
@@ -75,7 +75,6 @@ class RenderWidgetHostImpl;
@@ -78,7 +78,6 @@ class RenderWidgetHostImpl;
class RenderWidgetHostViewFrameSubscriber;
class ResourceMessageFilter;
class StoragePartition;
@@ -256,8 +256,8 @@ index 7fb91a6..503e6ba 100644
namespace mojom {
class StoragePartitionService;
@@ -109,7 +108,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
public ui::GpuSwitchingObserver {
@@ -114,7 +113,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
public:
RenderProcessHostImpl(BrowserContext* browser_context,
- StoragePartitionImpl* storage_partition_impl,
@@ -265,7 +265,7 @@ index 7fb91a6..503e6ba 100644
bool is_for_guests_only);
~RenderProcessHostImpl() override;
@@ -468,7 +467,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -498,7 +497,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
BrowserContext* browser_context_;
// Owned by |browser_context_|.
@@ -275,7 +275,7 @@ index 7fb91a6..503e6ba 100644
// The observers watching our lifetime.
base::ObserverList<RenderProcessHostObserver> observers_;
diff --git content/browser/site_instance_impl.cc content/browser/site_instance_impl.cc
index 8978640..a1e4cdd 100644
index a55d786..9e0de6a 100644
--- content/browser/site_instance_impl.cc
+++ content/browser/site_instance_impl.cc
@@ -116,9 +116,8 @@ RenderProcessHost* SiteInstanceImpl::GetProcess() {
@@ -424,3 +424,30 @@ index 909b370..8c6f09d 100644
protected:
virtual ~StoragePartition() {}
};
diff --git extensions/browser/guest_view/web_view/web_ui/BUILD.gn extensions/browser/guest_view/web_view/web_ui/BUILD.gn
index 9b26c41..e9f4a0c 100644
--- extensions/browser/guest_view/web_view/web_ui/BUILD.gn
+++ extensions/browser/guest_view/web_view/web_ui/BUILD.gn
@@ -3,6 +3,10 @@
# found in the LICENSE file.
source_set("web_ui") {
+ deps = [
+ "//content/public/common",
+ ]
+
sources = [
"web_ui_url_fetcher.cc",
"web_ui_url_fetcher.h",
diff --git extensions/common/api/BUILD.gn extensions/common/api/BUILD.gn
index 0276c57..ca1d6f6 100644
--- extensions/common/api/BUILD.gn
+++ extensions/common/api/BUILD.gn
@@ -98,6 +98,7 @@ group("api") {
public_deps = [
":generated_api",
":mojom",
+ "//content/public/common",
]
}

View File

@@ -0,0 +1,15 @@
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 2be0e63..343176d 100644
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -146,10 +146,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
aura::test::QueryLatestMousePositionRequestInHost(host);
host->ConvertPointFromHost(&root_current_location);
- auto screen = views::test::TestDesktopScreenX11::GetInstance();
- DCHECK_EQ(screen, display::Screen::GetScreen());
- screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y));
-
if (root_location != root_current_location && button_down_mask == 0) {
// Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer()

View File

@@ -1,8 +1,8 @@
diff --git controls/button/menu_button.cc controls/button/menu_button.cc
index 4b562c5..17e2d3b 100644
index 38fc310..fdd8a13 100644
--- controls/button/menu_button.cc
+++ controls/button/menu_button.cc
@@ -197,7 +197,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
@@ -195,7 +195,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
gfx::Size MenuButton::GetPreferredSize() const {
gfx::Size prefsize = LabelButton::GetPreferredSize();
if (show_menu_marker_) {
@@ -11,7 +11,7 @@ index 4b562c5..17e2d3b 100644
kMenuMarkerPaddingRight,
0);
}
@@ -324,7 +324,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
@@ -322,7 +322,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
gfx::Size s = size();
if (show_menu_marker_) {
@@ -20,7 +20,7 @@ index 4b562c5..17e2d3b 100644
kMenuMarkerPaddingRight);
}
@@ -412,4 +412,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
@@ -411,4 +411,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return monitor_bounds.right() - 1;
}

View File

@@ -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 c681785..fc49f2d 100644
index 72004fe..ff7ba8c7 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -747,6 +747,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
@@ -17,7 +17,7 @@ index c681785..fc49f2d 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index b41c4f1..f52b243 100644
index a8e8627..2ec202f 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -44,6 +44,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
@@ -40,7 +40,7 @@ index b41c4f1..f52b243 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 c69e9b8..d1d4f3f 100644
index b68718d..5b209ca 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -107,6 +107,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -91,7 +91,7 @@ index f772f64..7d13f9f 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 d02a06c0..e5982e0 100644
index 964fe4a..b878661 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@@ -169,10 +169,10 @@ index 884df90..518a69c 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 5327938..e8345de 100644
index 38a416b..6343597 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -174,6 +174,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -194,6 +194,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false),
should_maximize_after_map_(false),
use_argb_visual_(false),
@@ -180,17 +180,17 @@ index 5327938..e8345de 100644
drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -182,7 +183,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
custom_window_shape_(false),
urgency_hint_set_(false),
activatable_(true),
- close_widget_factory_(this) {
@@ -206,7 +207,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
has_pointer_(false),
has_window_focus_(false),
has_pointer_focus_(false),
- close_widget_factory_(this) {}
+ close_widget_factory_(this),
+ xwindow_destroyed_(false) {
}
+ xwindow_destroyed_(false) {}
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
@@ -392,7 +394,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
window()->ClearProperty(kHostForRootWindow);
@@ -542,7 +544,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@@ -200,7 +200,7 @@ index 5327938..e8345de 100644
xwindow_ = None;
desktop_native_widget_aura_->OnHostClosed();
@@ -541,6 +544,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -683,6 +686,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@@ -209,7 +209,7 @@ index 5327938..e8345de 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -1005,6 +1010,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
@@ -1205,6 +1210,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
}
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
@@ -218,7 +218,7 @@ index 5327938..e8345de 100644
return bounds_in_pixels_;
}
@@ -1064,6 +1071,8 @@ void DesktopWindowTreeHostX11::SetBounds(
@@ -1264,6 +1271,8 @@ void DesktopWindowTreeHostX11::SetBounds(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
@@ -227,7 +227,7 @@ index 5327938..e8345de 100644
return bounds_in_pixels_.origin();
}
@@ -1175,9 +1184,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1382,9 +1391,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
None;
}
@@ -244,7 +244,7 @@ index 5327938..e8345de 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -1809,6 +1824,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -2013,6 +2028,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@@ -252,14 +252,14 @@ index 5327938..e8345de 100644
+ xwindow_destroyed_ = true;
+ CloseNow();
+ break;
case FocusIn:
case FocusOut:
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
OnFocusEvent(xev->type == FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index b9ba521..7478c1a 100644
index 07e35ca..7746296 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -86,6 +86,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -83,6 +83,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// internal list of open windows.
static void CleanUpWindowList(void (*func)(aura::Window* window));
@@ -272,7 +272,7 @@ index b9ba521..7478c1a 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(aura::Window* content_window,
@@ -271,6 +277,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -290,6 +296,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_;
@@ -282,7 +282,7 @@ index b9ba521..7478c1a 100644
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -310,6 +319,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -329,6 +338,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
@@ -293,7 +293,7 @@ index b9ba521..7478c1a 100644
DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -362,6 +375,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -414,6 +427,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
@@ -303,69 +303,8 @@ index b9ba521..7478c1a 100644
DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
};
diff --git ui/views/widget/desktop_aura/x11_desktop_handler.cc ui/views/widget/desktop_aura/x11_desktop_handler.cc
index aa3c234..021bd01 100644
--- ui/views/widget/desktop_aura/x11_desktop_handler.cc
+++ ui/views/widget/desktop_aura/x11_desktop_handler.cc
@@ -33,6 +33,30 @@ views::X11DesktopHandler* g_handler = NULL;
namespace views {
+namespace {
+
+bool IsParentOfWindow(XDisplay* xdisplay,
+ ::Window potential_parent,
+ ::Window window) {
+ ::Window parent_win, root_win;
+ Window* child_windows;
+ unsigned int num_child_windows;
+ while (window) {
+ if (!XQueryTree(xdisplay, window, &root_win, &parent_win,
+ &child_windows, &num_child_windows)) {
+ break;
+ }
+ if(child_windows)
+ XFree(child_windows);
+ if (parent_win == potential_parent)
+ return true;
+ window = parent_win;
+ }
+ return false;
+}
+
+} // namespace
+
// static
X11DesktopHandler* X11DesktopHandler::get() {
if (!g_handler)
@@ -88,7 +112,11 @@ void X11DesktopHandler::ActivateWindow(::Window window) {
// in an active X window.
}
- if (wm_supports_active_window_) {
+ DesktopWindowTreeHostX11* host =
+ DesktopWindowTreeHostX11::GetHostForXID(window);
+ const bool has_external_parent = host && host->has_external_parent();
+
+ if (wm_supports_active_window_ && !has_external_parent) {
DCHECK_EQ(gfx::GetXDisplay(), xdisplay_);
// If the window is not already active, send a hint to activate it
@@ -213,8 +241,10 @@ uint32_t X11DesktopHandler::DispatchEvent(const ui::PlatformEvent& event) {
::Window window;
if (ui::GetXIDProperty(x_root_window_, "_NET_ACTIVE_WINDOW", &window) &&
window) {
- x_active_window_ = window;
- OnActiveWindowChanged(window, ACTIVE);
+ if (!IsParentOfWindow(xdisplay_, window, current_window_)) {
+ x_active_window_ = window;
+ OnActiveWindowChanged(window, ACTIVE);
+ }
} else {
x_active_window_ = None;
}
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index ca92c5b..f628c39 100644
index 4b3db3f..103bba3 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.cc chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index d7e2677..71436d2 100644
index f50fdf9..9e59835 100644
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -204,7 +204,9 @@ bool OffscreenTab::ShouldCreateWebContents(
@@ -214,7 +214,9 @@ bool OffscreenTab::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -14,10 +14,10 @@ index d7e2677..71436d2 100644
// Disallow creating separate WebContentses. The WebContents implementation
// uses this to spawn new windows/tabs, which is also not allowed for
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.h chrome/browser/extensions/api/tab_capture/offscreen_tab.h
index 712c117..4dc59be 100644
index e639319..5f75a9a 100644
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.h
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.h
@@ -149,7 +149,9 @@ class OffscreenTab : protected content::WebContentsDelegate,
@@ -148,7 +148,9 @@ class OffscreenTab : protected content::WebContentsDelegate,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -29,7 +29,7 @@ index 712c117..4dc59be 100644
void EnterFullscreenModeForTab(content::WebContents* contents,
const GURL& origin) final;
diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc
index ff3f72d..6647f76 100644
index 5e4b3add..7a21502 100644
--- chrome/browser/prerender/prerender_contents.cc
+++ chrome/browser/prerender/prerender_contents.cc
@@ -131,7 +131,9 @@ class PrerenderContents::WebContentsDelegateImpl
@@ -44,10 +44,10 @@ index ff3f72d..6647f76 100644
// window.opener property, terminate prerendering.
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 93b36dc..b25c512 100644
index b9b1da9..dde8843 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -1616,7 +1616,9 @@ bool Browser::ShouldCreateWebContents(
@@ -1580,7 +1580,9 @@ bool Browser::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -59,10 +59,10 @@ index 93b36dc..b25c512 100644
// If a BackgroundContents is created, suppress the normal WebContents.
return !MaybeCreateBackgroundContents(
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 693e84d..be1f1dd 100644
index dae2e25..b32308c 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -617,7 +617,9 @@ class Browser : public TabStripModelObserver,
@@ -613,7 +613,9 @@ class Browser : public TabStripModelObserver,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -74,10 +74,10 @@ index 693e84d..be1f1dd 100644
int opener_render_frame_id,
const std::string& frame_name,
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 51f3bba..dead593 100644
index be05e4a4c..58d5f4a 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -1543,6 +1543,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1557,6 +1557,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name = params.main_frame_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@@ -90,7 +90,7 @@ index 51f3bba..dead593 100644
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1575,6 +1581,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1589,6 +1595,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::move(view_),
&render_view_host_delegate_view_));
}
@@ -98,7 +98,7 @@ index 51f3bba..dead593 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2028,11 +2035,14 @@ void WebContentsImpl::CreateNewWindow(
@@ -2042,11 +2049,14 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@@ -114,13 +114,13 @@ index 51f3bba..dead593 100644
if (route_id != MSG_ROUTING_NONE &&
!RenderViewHost::FromID(render_process_id, route_id)) {
// If the embedder didn't create a WebContents for this route, we need to
@@ -2056,6 +2066,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -2070,6 +2080,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.opener_render_process_id = render_process_id;
create_params.opener_render_frame_id = params.opener_render_frame_id;
create_params.opener_suppressed = params.opener_suppressed;
+ create_params.view = view;
+ create_params.delegate_view = delegate_view;
if (params.disposition == NEW_BACKGROUND_TAB)
if (params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB)
create_params.initially_hidden = true;
create_params.renderer_initiated_creation =
diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc
@@ -139,7 +139,7 @@ index fa0afb5..d677b31 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index efa8ae5..8ea0055 100644
index 163a2ad..63e116e 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -55,8 +55,10 @@ class PageState;
@@ -165,10 +165,10 @@ index efa8ae5..8ea0055 100644
// Creates a new WebContents.
diff --git content/public/browser/web_contents_delegate.cc content/public/browser/web_contents_delegate.cc
index df97348..8e2168e 100644
index 399255a..cde5fd3 100644
--- content/public/browser/web_contents_delegate.cc
+++ content/public/browser/web_contents_delegate.cc
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
@@ -147,7 +147,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -180,10 +180,10 @@ index df97348..8e2168e 100644
}
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 2816c4d..387821f 100644
index b7d17d2..c5b66e0 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;
@@ -41,9 +41,11 @@ class JavaScriptDialogManager;
class PageState;
class RenderFrameHost;
class RenderViewHost;
@@ -195,7 +195,7 @@ index 2816c4d..387821f 100644
struct ColorSuggestion;
struct ContextMenuParams;
struct DropData;
@@ -307,7 +309,9 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -310,7 +312,9 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -207,10 +207,10 @@ index 2816c4d..387821f 100644
// Notifies the delegate about the creation of a new WebContents. This
// typically happens when popups are created.
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.cc extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 6c9ff47..75b91bf 100644
index c02aace..67b9bd8 100644
--- extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
@@ -201,7 +201,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -237,7 +237,7 @@ index e0309f7..f6a3878 100644
// content::WebContentsObserver implementation.
void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
diff --git ui/keyboard/content/keyboard_ui_content.cc ui/keyboard/content/keyboard_ui_content.cc
index cd6a2ab..ef2c820 100644
index d08fd23..3ec515c 100644
--- ui/keyboard/content/keyboard_ui_content.cc
+++ ui/keyboard/content/keyboard_ui_content.cc
@@ -64,7 +64,9 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,

View File

@@ -1,15 +0,0 @@
diff --git third_party/WebKit/Source/core/input/EventHandler.cpp third_party/WebKit/Source/core/input/EventHandler.cpp
index 9c49350..aa5e6a9 100644
--- third_party/WebKit/Source/core/input/EventHandler.cpp
+++ third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2039,6 +2039,10 @@ WebInputEventResult EventHandler::sendContextMenuEvent(const PlatformMouseEvent&
LayoutPoint positionInContents = v->rootFrameToContents(event.position());
HitTestRequest request(HitTestRequest::Active);
MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(request, positionInContents, event);
+ // Since |Document::prepareMouseEvent()| modifies layout tree for setting
+ // hover element, we need to update layout tree for requirement of
+ // |SelectionController::sendContextMenuEvent()|.
+ m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
selectionController().sendContextMenuEvent(mev, positionInContents);

View File

@@ -1,8 +1,8 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index f274fb4..2aa6a17 100644
index f081d46..eaedd72 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -873,7 +873,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
@@ -869,7 +869,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
{
notifyPopupOpeningObservers();
@@ -12,10 +12,10 @@ index f274fb4..2aa6a17 100644
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index cae232a..2ed1596 100644
index 5b4dacf..aec9256 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -417,6 +417,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
@@ -416,6 +416,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
, m_enableFakePageScaleAnimationForTesting(false)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
@@ -23,7 +23,7 @@ index cae232a..2ed1596 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -4092,9 +4093,14 @@ void WebViewImpl::pageScaleFactorChanged()
@@ -4095,9 +4096,14 @@ void WebViewImpl::pageScaleFactorChanged()
m_client->pageScaleFactorChanged();
}
@@ -40,10 +40,10 @@ index cae232a..2ed1596 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index 26e93e7..86240c7 100644
index a69995d..de1bec7 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -388,7 +388,8 @@ public:
@@ -384,7 +384,8 @@ public:
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@@ -53,7 +53,7 @@ index 26e93e7..86240c7 100644
bool shouldAutoResize() const
{
@@ -683,6 +684,8 @@ private:
@@ -679,6 +680,8 @@ private:
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;
@@ -63,7 +63,7 @@ index 26e93e7..86240c7 100644
bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h
index bba44bc..345f5c2 100644
index 89a9582..2ba00bd 100644
--- public/web/WebView.h
+++ public/web/WebView.h
@@ -438,6 +438,7 @@ public: