Update to Chromium revision 6e53600d (#386251)

- Remove |accept_lang| parameter from CefJSDialogHandler::OnJSDialog
  and CefFormatUrlForSecurityDisplay (see https://crbug.com/336973#c36).
- Remove remaining NPAPI-related code including functions from
  cef_web_plugin.h (see https://crbug.com/493212#c55).
- Mac: 10.7+ deployment target is now required for client applications.
- Mac: Remove CefBrowserHost::SetWindowVisibility (issue #1375). No
  replacement is required for windowed rendering. Use WasHidden for
  off-screen rendering.
- Windows: Visual Studio 2015 Update 2 is now required when building
  CEF/Chromium.
This commit is contained in:
Marshall Greenblatt
2016-04-27 16:38:52 -04:00
parent 3c957f9257
commit e7ddc933c9
215 changed files with 869 additions and 1537 deletions

View File

@@ -12,9 +12,6 @@ patches = [
'path': '../tools/gritsettings/',
},
{
# Fix Xcode 4 build on OS X Lion.
# http://codereview.chromium.org/8086022/
#
# Disable use of the sysroot image for CEF because it does not include
# the GTK dependency required by cefclient. It would be nice to enable
# this functionality in the future. See http://crbug.com/504446.
@@ -23,19 +20,19 @@ patches = [
},
{
# Support loading of password protected zip archives.
# http://code.google.com/p/chromiumembedded/issues/detail?id=496
# https://bitbucket.org/chromiumembedded/cef/issues/496
'name': 'zlib',
'path': '../third_party/zlib/',
},
{
# Avoid MessageLoop assertion on OS X.
# http://code.google.com/p/chromiumembedded/issues/detail?id=443
# https://bitbucket.org/chromiumembedded/cef/issues/443
'name': 'message_loop_443',
'path': '../base/message_loop/',
},
{
# Fix ninja output for localization directories on OS X.
# http://code.google.com/p/gyp/issues/detail?id=331
# https://bugs.chromium.org/p/gyp/issues/detail?id=331
'name': 'gyp_331',
'path': '../tools/gyp/pylib/',
},
@@ -46,13 +43,13 @@ patches = [
},
{
# Fix export of UnderlayOpenGLHostingWindow for 64-bit OS X builds.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1051
# https://bitbucket.org/chromiumembedded/cef/issues/1051
'name': 'underlay_1051',
'path': '../ui/base/cocoa/',
},
{
# Allow specification of a parent window handle for Widget creation.
# https://code.google.com/p/chromiumembedded/issues/detail?id=180
# https://bitbucket.org/chromiumembedded/cef/issues/180
#
# Fix multiple handling of WM_MOUSEWHEEL messages on Windows.
# https://bitbucket.org/chromiumembedded/cef/issues/1481
@@ -69,25 +66,25 @@ patches = [
},
{
# Allow continued use of ContentRendererClient::HandleNavigation.
# https://code.google.com/p/chromiumembedded/issues/detail?id=1129
# https://bitbucket.org/chromiumembedded/cef/issues/1129
'name': 'content_nav_1129',
'path': '../content/',
},
{
# Allow specification of a custom WebContentsView.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
# https://bitbucket.org/chromiumembedded/cef/issues/1257
'name': 'public_browser_1257',
'path': '../content/public/browser/',
},
{
# Allow creation of a custom SoftwareOutputDevice.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1368
# https://bitbucket.org/chromiumembedded/cef/issues/1368
'name': 'compositor_1368',
'path': '../',
},
{
# Allow specification of a custom WebContentsView.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
# https://bitbucket.org/chromiumembedded/cef/issues/1257
'name': 'browser_web_contents_1257',
'path': '../content/browser/web_contents/',
},
@@ -95,19 +92,19 @@ patches = [
# Allow specification of a custom WebContentsView.
# This change is required due to chrome_browser_process_stub.h indirectly
# including chrome/browser/ui/browser.h on OS X.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
# https://bitbucket.org/chromiumembedded/cef/issues/1257
'name': 'chrome_browser_1257',
'path': '../chrome/browser/',
},
{
# Allow specification of a custom WebContentsView.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
# https://bitbucket.org/chromiumembedded/cef/issues/1257
'name': 'ui_webview_1257',
'path': '../ui/views/controls/webview/',
},
{
# Allow specification of a custom WebContentsView.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
# https://bitbucket.org/chromiumembedded/cef/issues/1257
'name': 'extensions_1257',
'path': '../extensions/',
},
@@ -127,7 +124,7 @@ patches = [
},
{
# Allow customization of the WebView background color.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1161
# https://bitbucket.org/chromiumembedded/cef/issues/1161
# https://codereview.chromium.org/228603007/
'name': 'prefs_content_1161',
'path': '../content/',
@@ -141,7 +138,7 @@ patches = [
{
# Fix AtExitManager assertion on SpellcheckServiceFactory destruction during
# Windows multi-threaded message loop shutdown.
# https://code.google.com/p/chromiumembedded/issues/detail?id=137
# https://bitbucket.org/chromiumembedded/cef/issues/137
'name': 'spellcheck_137',
'path': '../chrome/browser/spellchecker/',
},
@@ -155,7 +152,7 @@ patches = [
{
# Make URLRequest::set_is_pending() public so that it can be called from
# CefRequestInterceptor::MaybeInterceptResponse().
# https://code.google.com/p/chromiumembedded/issues/detail?id=1327
# https://bitbucket.org/chromiumembedded/cef/issues/1327
'name': 'net_urlrequest_1327',
'path': '../net/url_request/',
},
@@ -168,7 +165,7 @@ patches = [
{
# Support loading of newer system Flash installations on OS X.
# https://bitbucket.org/chromiumembedded/cef/issue/1586
# https://code.google.com/p/chromium/issues/detail?id=470737
# https://bugs.chromium.org/p/chromium/issues/detail?id=470737
'name': 'chrome_pepper_flash_1586',
'path': '../chrome/common/',
},
@@ -222,7 +219,7 @@ patches = [
{
# Fix missing check for defined(ENABLE_THEMES) in
# renderer_preferences_util.cc on Linux.
# https://code.google.com/p/chromium/issues/detail?id=545103
# https://bugs.chromium.org/p/chromium/issues/detail?id=545103
'name': 'renderer_preferences_util_545103',
'path': '../chrome/browser/',
},
@@ -235,7 +232,7 @@ patches = [
{
# Fix crash while printing on Windows by properly initializing V8 in the PDF
# module.
# https://code.google.com/p/chromium/issues/detail?id=549365#c17
# https://bugs.chromium.org/p/chromium/issues/detail?id=549365#c17
'name': 'pdfium_print_549365',
'path': '../third_party/pdfium/',
},
@@ -253,9 +250,9 @@ patches = [
'path': '../ui/views/',
},
{
# Fix VS2015 Update 2 RC compile error.
# https://bugs.chromium.org/p/chromium/issues/detail?id=440500#c322
'name': 'gpu_service_440500',
'path': '../gpu/command_buffer/service/',
# Expose RenderViewHostImpl swapped-out state.
# https://bitbucket.org/chromiumembedded/cef/issues/1392
'name': 'render_view_host_impl_1392',
'path': '../content/browser/renderer_host/',
},
]

View File

@@ -1,5 +1,5 @@
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
index 1312e52..3d1656c 100644
index 41e31c0..509ebd8 100644
--- render_widget_host_view_guest.cc
+++ render_widget_host_view_guest.cc
@@ -191,6 +191,9 @@ void RenderWidgetHostViewGuest::Destroy() {

View File

@@ -1,5 +1,5 @@
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
index 007c977..069e8d4 100644
index ad4474f..d0318065 100644
--- browser/browser_plugin/browser_plugin_guest.cc
+++ browser/browser_plugin/browser_plugin_guest.cc
@@ -28,7 +28,7 @@
@@ -36,7 +36,7 @@ index 007c977..069e8d4 100644
}
RendererPreferences* renderer_prefs =
@@ -754,11 +753,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -749,11 +748,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
->GetWidget()
->Init();
GetWebContents()->GetMainFrame()->Init();

View File

@@ -1,8 +1,8 @@
diff --git web_contents_impl.cc web_contents_impl.cc
index 4c9db9e..0f1429a 100644
index 61d8bf3..0cee4d7 100644
--- web_contents_impl.cc
+++ web_contents_impl.cc
@@ -1391,32 +1391,40 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1412,32 +1412,40 @@ 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);
@@ -62,7 +62,7 @@ index 4c9db9e..0f1429a 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -1852,11 +1860,14 @@ void WebContentsImpl::CreateNewWindow(
@@ -1867,11 +1875,14 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@@ -78,7 +78,7 @@ index 4c9db9e..0f1429a 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
@@ -1880,6 +1891,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -1895,6 +1906,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;

View File

@@ -1,5 +1,5 @@
diff --git common.gypi common.gypi
index 5f389b2..b8725d5 100644
index 1aad5054..5bccbed 100644
--- common.gypi
+++ common.gypi
@@ -9,6 +9,9 @@
@@ -12,7 +12,7 @@ index 5f389b2..b8725d5 100644
# Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary
@@ -95,7 +98,10 @@
@@ -96,7 +99,10 @@
# depending on the packages installed on the local machine. Set this
# to 0 to build against locally installed headers and libraries (e.g.
# if packaging for a linux distro)
@@ -24,16 +24,3 @@ index 5f389b2..b8725d5 100644
# Override buildtype to select the desired build flavor.
# Dev - everyday build for development/testing
diff --git mac/strip_save_dsym mac/strip_save_dsym
index c9cf226..0dedbe3 100755
--- mac/strip_save_dsym
+++ mac/strip_save_dsym
@@ -48,7 +48,7 @@ def macho_archs(macho):
"bundle"]
macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")"
- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho],
+ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho],
stdout=subprocess.PIPE)
archs = []

View File

@@ -1,8 +1,8 @@
diff --git ui/browser.cc ui/browser.cc
index 1595e86..e9c7cce 100644
index b9d1732..7754dd9 100644
--- ui/browser.cc
+++ ui/browser.cc
@@ -1722,7 +1722,9 @@ bool Browser::ShouldCreateWebContents(
@@ -1729,7 +1729,9 @@ bool Browser::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -14,10 +14,10 @@ index 1595e86..e9c7cce 100644
// If a BackgroundContents is created, suppress the normal WebContents.
return !MaybeCreateBackgroundContents(
diff --git ui/browser.h ui/browser.h
index f9a8392..ce76798 100644
index 3cb7401..e41d498 100644
--- ui/browser.h
+++ ui/browser.h
@@ -604,7 +604,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,

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 1d05689..139e7f4 100644
index 9a4ad65..5a6d428 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -131,6 +131,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
@@ -130,6 +130,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
scoped_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
@@ -17,7 +17,7 @@ index 1d05689..139e7f4 100644
if (IsRunningInMojoShell()) {
return scoped_ptr<cc::SoftwareOutputDevice>(
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 5222b41..04856b6 100644
index acae0be..90ff7e1 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -17,6 +17,7 @@
@@ -56,7 +56,7 @@ index 5222b41..04856b6 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
@@ -344,6 +359,8 @@ class COMPOSITOR_EXPORT Compositor
@@ -346,6 +361,8 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactory* context_factory_;

View File

@@ -1,56 +1,56 @@
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
index d32eccc..17e3e38 100644
index a1389fc..6dcaabb 100644
--- public/renderer/content_renderer_client.cc
+++ public/renderer/content_renderer_client.cc
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
-#ifdef OS_ANDROID
-#if defined(OS_ANDROID)
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation(
bool is_redirect) {
@@ -111,6 +110,7 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
-#endif
bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
const GURL& url,
+#if defined(OS_ANDROID)
bool ContentRendererClient::ShouldUseMediaPlayerForURL(const GURL& url) {
return false;
}
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index 880550c..3a59f3b 100644
index 0fab037..848a8f7 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -198,7 +198,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -200,7 +200,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
-#ifdef OS_ANDROID
-#if defined(OS_ANDROID)
// 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
@@ -213,7 +212,6 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationType type,
@@ -216,6 +215,7 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationPolicy default_policy,
bool is_redirect);
-#endif
// Returns true if we should fork a new process for the given navigation.
// If |send_referrer| is set to false (which is the default), no referrer
+#if defined(OS_ANDROID)
// Indicates if the Android MediaPlayer should be used instead of Chrome's
// 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 6d9f299..b90bf05 100644
index af44d57..93a57ff 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -4703,7 +4703,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4697,7 +4697,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
(pending_navigation_params_ &&
!pending_navigation_params_->request_params.redirects.empty());
-#ifdef OS_ANDROID
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
@@ -4713,7 +4712,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
if (GetContentClient()->renderer()->HandleNavigation(
@@ -4706,7 +4705,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
is_redirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@@ -1,5 +1,5 @@
diff --git pepper_flash_file_message_filter.cc pepper_flash_file_message_filter.cc
index 3059dd7..b327be5 100644
index 6f03077..c61fed3 100644
--- pepper_flash_file_message_filter.cc
+++ pepper_flash_file_message_filter.cc
@@ -55,7 +55,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter(

View File

@@ -1,5 +1,5 @@
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
index a3d8c7c..1ad97bc 100644
index 57eb9c2..275632a 100644
--- browser/guest_view/extension_options/extension_options_guest.cc
+++ browser/guest_view/extension_options/extension_options_guest.cc
@@ -202,7 +202,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(

View File

@@ -1,20 +0,0 @@
diff --git texture_manager.h texture_manager.h
index 2485146..b31c3b9 100644
--- texture_manager.h
+++ texture_manager.h
@@ -17,6 +17,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "gpu/command_buffer/service/feature_info.h"
+#include "gpu/command_buffer/service/gl_stream_texture_image.h"
#include "gpu/command_buffer/service/gl_utils.h"
#include "gpu/command_buffer/service/memory_tracking.h"
#include "gpu/command_buffer/service/sampler_manager.h"
@@ -28,7 +29,6 @@ namespace gpu {
namespace gles2 {
class GLES2Decoder;
-class GLStreamTextureImage;
struct ContextState;
struct DecoderFramebufferState;
class Display;

View File

@@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index c8dc083..7773a93b 100644
index b790c72..fca33586 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@

View File

@@ -1,8 +1,8 @@
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
index ffb3a85..02e0947 100644
index edac48d..3bcc3b9 100644
--- gyp/generator/ninja.py
+++ gyp/generator/ninja.py
@@ -747,7 +747,16 @@ class NinjaWriter(object):
@@ -760,7 +760,16 @@ class NinjaWriter(object):
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)

View File

@@ -1,8 +1,8 @@
diff --git input_method_win.cc input_method_win.cc
index 9b04a8d..f0578e7 100644
index 47160e5..1de804e 100644
--- input_method_win.cc
+++ input_method_win.cc
@@ -618,8 +618,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
@@ -629,8 +629,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,8 +1,8 @@
diff --git message_loop.cc message_loop.cc
index 04aa9a8..ec302b6 100644
index 01e7512..e3fcc0d 100644
--- message_loop.cc
+++ message_loop.cc
@@ -139,12 +139,6 @@ MessageLoop::~MessageLoop() {
@@ -140,12 +140,6 @@ MessageLoop::~MessageLoop() {
// may be current.
DCHECK((pump_ && current() == this) || (!pump_ && current() != this));

View File

@@ -1,5 +1,5 @@
diff --git base/network_delegate.h base/network_delegate.h
index 509a87b..c05483c 100644
index 81d8190..3405e31 100644
--- base/network_delegate.h
+++ base/network_delegate.h
@@ -35,6 +35,7 @@ namespace net {
@@ -10,7 +10,7 @@ index 509a87b..c05483c 100644
class HttpRequestHeaders;
class HttpResponseHeaders;
class ProxyInfo;
@@ -111,6 +112,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
@@ -109,6 +110,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
@@ -45,7 +45,7 @@ index 31d08d4..1de8e84 100644
friend class GZipUnitTest;
friend class SdchFilterChainingTest;
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
index cbefc9e..06a0123 100644
index 239ab4b..03a5be1 100644
--- url_request/url_request_job.cc
+++ url_request/url_request_job.cc
@@ -447,6 +447,9 @@ void URLRequestJob::NotifyHeadersComplete() {

View File

@@ -1,8 +1,8 @@
diff --git url_request.h url_request.h
index d3b0b7a..0adec6f 100644
index fcbc445..e424814 100644
--- url_request.h
+++ url_request.h
@@ -675,10 +675,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
@@ -664,10 +664,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// or after the response headers are received.
void GetConnectionAttempts(ConnectionAttempts* out) const;

View File

@@ -1,16 +1,16 @@
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 4630ac1..9b5b36f 100644
index e5a53da..7e3311a 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -16,6 +16,7 @@
@@ -18,6 +18,7 @@
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/fsdk_rendercontext.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
+#include "fpdfsdk/include/jsapi/fxjs_v8.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
#include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h"
#include "third_party/base/numerics/safe_conversions_impl.h"
@@ -263,6 +264,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
@@ -266,6 +267,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 b0cf1d1..15285c0 100644
index ae29c73..2b9c996 100644
--- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h
@@ -195,6 +195,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -196,6 +196,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,39 +11,39 @@ index b0cf1d1..15285c0 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 c0563f5..4118b5a 100644
index c1cdd19..33af607 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -157,6 +157,7 @@ WebPreferences::WebPreferences()
@@ -156,6 +156,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
+ base_background_color(0xFFFFFFFF), // Color::white
v8_cache_options(V8_CACHE_OPTIONS_DEFAULT),
inert_visual_viewport(false),
cookie_enabled(true),
record_whole_document(false),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index 636f7a2..1936bed 100644
index 7b72351..7513ce2 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -174,6 +174,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -173,6 +173,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
+ uint32_t base_background_color;
V8CacheOptions v8_cache_options;
bool inert_visual_viewport;
bool record_whole_document;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index 9c56520..754ac04 100644
index ae2d8ec..f90fba7 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -1545,6 +1545,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1483,6 +1483,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);
+ if (GetWebFrameWidget())
+ GetWebFrameWidget()->setBaseBackgroundColor(prefs.base_background_color);
#if defined(OS_MACOSX) && !defined(OS_IOS)
DCHECK(compositor_deps);
bool is_elastic_overscroll_enabled =
}
void RenderViewImpl::OnForceRedraw(int id) {

View File

@@ -16,10 +16,10 @@ index e1a107a..1601811 100644
}
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git printing/common/print_messages.h printing/common/print_messages.h
index 771a4c5..1d8c5ca 100644
index 5cccd00..3a847b7 100644
--- printing/common/print_messages.h
+++ printing/common/print_messages.h
@@ -70,7 +70,6 @@ struct PrintMsg_PrintPages_Params {
@@ -71,7 +71,6 @@ struct PrintMsg_PrintPages_Params {
std::vector<int> pages;
};
@@ -27,7 +27,7 @@ index 771a4c5..1d8c5ca 100644
struct PrintHostMsg_RequestPrintPreview_Params {
PrintHostMsg_RequestPrintPreview_Params();
~PrintHostMsg_RequestPrintPreview_Params();
@@ -89,7 +88,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
@@ -90,7 +89,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
printing::DuplexMode duplex;
printing::PageRanges page_ranges;
};
@@ -35,7 +35,7 @@ index 771a4c5..1d8c5ca 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
@@ -176,7 +174,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
@@ -177,7 +175,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
IPC_STRUCT_TRAITS_MEMBER(to)
IPC_STRUCT_TRAITS_END()
@@ -43,7 +43,7 @@ index 771a4c5..1d8c5ca 100644
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
IPC_STRUCT_TRAITS_MEMBER(webnode_only)
@@ -197,7 +194,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
@@ -198,7 +195,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
// Specifies page range to be printed.
IPC_STRUCT_TRAITS_MEMBER(page_ranges)
IPC_STRUCT_TRAITS_END()
@@ -51,7 +51,7 @@ index 771a4c5..1d8c5ca 100644
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
IPC_STRUCT_TRAITS_MEMBER(content_width)
@@ -217,7 +213,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
@@ -218,7 +214,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
IPC_STRUCT_TRAITS_MEMBER(pages)
IPC_STRUCT_TRAITS_END()
@@ -59,7 +59,7 @@ index 771a4c5..1d8c5ca 100644
// Parameters to describe a rendered document.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
// A shared memory handle to metafile data.
@@ -271,7 +266,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
@@ -272,7 +267,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
// Indicates whether the existing preview data needs to be cleared or not.
IPC_STRUCT_MEMBER(bool, clear_preview_data)
IPC_STRUCT_END()
@@ -67,7 +67,7 @@ index 771a4c5..1d8c5ca 100644
// Parameters to describe a rendered page.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
@@ -309,22 +303,20 @@ IPC_STRUCT_END()
@@ -310,22 +304,20 @@ IPC_STRUCT_END()
// Messages sent from the browser to the renderer.
@@ -92,7 +92,7 @@ index 771a4c5..1d8c5ca 100644
#if defined(ENABLE_BASIC_PRINTING)
// Tells the render view to switch the CSS to print media type, renders every
@@ -343,13 +335,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
@@ -344,13 +336,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked,
bool /* blocked */)
@@ -106,7 +106,7 @@ index 771a4c5..1d8c5ca 100644
// Messages sent from the renderer to the browser.
@@ -409,7 +399,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
@@ -410,7 +400,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
int /* fd in browser */) // Used only by Chrome OS.
#endif // defined(OS_ANDROID)
@@ -114,7 +114,7 @@ index 771a4c5..1d8c5ca 100644
// Asks the browser to do print preview.
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
PrintHostMsg_RequestPrintPreview_Params /* params */)
@@ -443,7 +432,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
@@ -444,7 +433,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
// The memory handle in this message is already valid in the browser process.
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
PrintHostMsg_DidPreviewDocument_Params /* params */)
@@ -122,7 +122,7 @@ index 771a4c5..1d8c5ca 100644
// This is sent when there are invalid printer settings.
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -452,7 +440,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -453,7 +441,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
int /* document cookie */)
@@ -130,16 +130,16 @@ index 771a4c5..1d8c5ca 100644
// Tell the browser print preview failed.
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
int /* document cookie */)
@@ -479,4 +466,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
@@ -480,4 +467,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
// Notify the browser to set print presets based on source PDF document.
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
index 823c957..51d8aa5 100644
index 9ee4cd9..719060c 100644
--- printing/renderer/print_web_view_helper.cc
+++ printing/renderer/print_web_view_helper.cc
@@ -80,6 +80,9 @@ const double kMinDpi = 1.0;
@@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
#if defined(ENABLE_PRINT_PREVIEW)
bool g_is_preview_enabled = true;
@@ -149,7 +149,7 @@ index 823c957..51d8aa5 100644
const char kPageLoadScriptFormat[] =
"document.open(); document.write(%s); document.close();";
@@ -94,9 +97,6 @@ void ExecuteScript(blink::WebFrame* frame,
@@ -97,9 +100,6 @@ void ExecuteScript(blink::WebFrame* frame,
std::string script = base::StringPrintf(script_format, json.c_str());
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
}
@@ -159,7 +159,7 @@ index 823c957..51d8aa5 100644
int GetDPI(const PrintMsg_Print_Params* print_params) {
#if defined(OS_MACOSX)
@@ -306,7 +306,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@@ -309,7 +309,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
return plugin && plugin->supportsPaginatedPrint();
}
@@ -167,7 +167,7 @@ index 823c957..51d8aa5 100644
// Returns true if the current destination printer is PRINT_TO_PDF.
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
bool print_to_pdf = false;
@@ -328,7 +327,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebFrame* frame,
@@ -331,7 +330,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebFrame* frame,
}
return frame_has_custom_page_size_style;
}
@@ -175,7 +175,7 @@ index 823c957..51d8aa5 100644
// Disable scaling when either:
// - The PDF specifies disabling scaling.
@@ -375,7 +373,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
@@ -378,7 +376,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
}
#endif
@@ -183,7 +183,7 @@ index 823c957..51d8aa5 100644
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
bool fit_to_paper_size = false;
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
@@ -417,7 +414,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
@@ -420,7 +417,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
}
return blink::WebPrintScalingOptionFitToPrintableArea;
}
@@ -191,7 +191,7 @@ index 823c957..51d8aa5 100644
PrintMsg_Print_Params CalculatePrintParamsForCss(
blink::WebFrame* frame,
@@ -501,7 +497,6 @@ blink::WebView* FrameReference::view() {
@@ -504,7 +500,6 @@ blink::WebView* FrameReference::view() {
return view_;
}
@@ -199,7 +199,7 @@ index 823c957..51d8aa5 100644
// static - Not anonymous so that platform implementations can use it.
void PrintWebViewHelper::PrintHeaderAndFooter(
blink::WebCanvas* canvas,
@@ -557,7 +552,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
@@ -560,7 +555,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
web_view->close();
frame->close();
}
@@ -207,7 +207,7 @@ index 823c957..51d8aa5 100644
// static - Not anonymous so that platform implementations can use it.
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
@@ -833,6 +827,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
@@ -840,6 +834,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
print_for_preview_(false),
delegate_(std::move(delegate)),
print_node_in_progress_(false),
@@ -215,7 +215,7 @@ index 823c957..51d8aa5 100644
is_loading_(false),
is_scripted_preview_delayed_(false),
ipc_nesting_level_(0),
@@ -891,10 +886,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
@@ -898,10 +893,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
return;
if (g_is_preview_enabled) {
@@ -226,7 +226,7 @@ index 823c957..51d8aa5 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
Print(frame, blink::WebNode(), true);
@@ -918,14 +911,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
@@ -925,14 +918,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)
@@ -241,7 +241,7 @@ index 823c957..51d8aa5 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -977,7 +966,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
@@ -984,7 +973,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
}
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -249,7 +249,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1042,7 +1030,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
@@ -1049,7 +1037,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
@@ -257,7 +257,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1067,7 +1054,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
@@ -1074,7 +1061,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@@ -265,7 +265,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -1228,7 +1214,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
@@ -1235,7 +1221,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
return true;
}
@@ -274,7 +274,7 @@ index 823c957..51d8aa5 100644
bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1257,7 +1243,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -1264,7 +1250,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@@ -283,7 +283,7 @@ index 823c957..51d8aa5 100644
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1287,7 +1273,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
@@ -1294,7 +1280,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
@@ -291,7 +291,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1302,7 +1287,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
@@ -1309,7 +1294,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
is_scripted_printing_blocked_ = blocked;
}
@@ -299,7 +299,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
if (ipc_nesting_level_ > 1)
return;
@@ -1313,7 +1297,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1320,7 +1304,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.isNull()) {
@@ -309,7 +309,7 @@ index 823c957..51d8aa5 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1321,7 +1307,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1328,7 +1314,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@@ -317,7 +317,7 @@ index 823c957..51d8aa5 100644
bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false;
@@ -1347,11 +1332,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
@@ -1354,11 +1339,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
// its |context_menu_node_|.
@@ -330,7 +330,7 @@ index 823c957..51d8aa5 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
blink::WebNode duplicate_node(node);
@@ -1417,7 +1400,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1424,7 +1407,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@@ -338,7 +338,7 @@ index 823c957..51d8aa5 100644
case FAIL_PREVIEW:
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@@ -1429,7 +1411,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1436,7 +1418,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
print_preview_context_.Failed(notify_browser_of_print_failure_);
break;
@@ -346,7 +346,7 @@ index 823c957..51d8aa5 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1561,7 +1542,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1568,7 +1549,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@@ -354,7 +354,7 @@ index 823c957..51d8aa5 100644
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1670,7 +1650,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
@@ -1677,7 +1657,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
return true;
}
@@ -362,15 +362,15 @@ index 823c957..51d8aa5 100644
#if defined(ENABLE_BASIC_PRINTING)
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
@@ -1778,7 +1757,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1785,7 +1764,6 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
-#if defined(ENABLE_PRINT_PREVIEW)
if (params.params.display_header_footer) {
// TODO(thestig): Figure out why Linux needs this. The value may be
// |printingMinimumShrinkFactor|.
@@ -1793,7 +1771,6 @@ void PrintWebViewHelper::PrintPageInternal(
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
// |printingMinimumShrinkFactor| from Blink.
@@ -1800,7 +1778,6 @@ void PrintWebViewHelper::PrintPageInternal(
scale_factor / fudge_factor, page_layout_in_points,
params.params);
}
@@ -378,7 +378,7 @@ index 823c957..51d8aa5 100644
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,
@@ -1829,7 +1806,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
@@ -1836,7 +1813,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
return true;
}
@@ -386,7 +386,7 @@ index 823c957..51d8aa5 100644
void PrintWebViewHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -1957,7 +1933,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
@@ -1964,7 +1940,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}

View File

@@ -1,8 +1,8 @@
diff --git web_contents.cc web_contents.cc
index d4b5fd0..b804902 100644
index 69190cf..05d2250 100644
--- web_contents.cc
+++ web_contents.cc
@@ -26,7 +26,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
@@ -28,7 +28,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
initially_hidden(false),
guest_delegate(nullptr),
context(nullptr),
@@ -14,16 +14,15 @@ index d4b5fd0..b804902 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git web_contents.h web_contents.h
index 9dd14bf..7c7b7c9 100644
index 7c46c73..1315ac11 100644
--- web_contents.h
+++ web_contents.h
@@ -54,9 +54,11 @@ class PageState;
@@ -55,8 +55,10 @@ class PageState;
class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
+class RenderViewHostDelegateView;
class RenderWidgetHostView;
class SiteInstance;
class WebContentsDelegate;
+class WebContentsView;
struct CustomContextMenuContext;
@@ -41,7 +40,7 @@ index 9dd14bf..7c7b7c9 100644
// Creates a new WebContents.
diff --git web_contents_delegate.cc web_contents_delegate.cc
index c937d66..4ce571f 100644
index fede931..09e6323 100644
--- web_contents_delegate.cc
+++ web_contents_delegate.cc
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
@@ -56,7 +55,7 @@ index c937d66..4ce571f 100644
}
diff --git web_contents_delegate.h web_contents_delegate.h
index 2c2ac76..8f87caf 100644
index 074333a..3a8c277 100644
--- web_contents_delegate.h
+++ web_contents_delegate.h
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;

View File

@@ -0,0 +1,12 @@
diff --git render_view_host_impl.h render_view_host_impl.h
index 4ec87ca..6919986 100644
--- render_view_host_impl.h
+++ render_view_host_impl.h
@@ -193,6 +193,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
void set_is_swapped_out(bool is_swapped_out) {
is_swapped_out_ = is_swapped_out;
}
+ bool is_swapped_out() const { return is_swapped_out_; }
// TODO(creis): Remove as part of http://crbug.com/418265.
bool is_waiting_for_close_ack() const { return is_waiting_for_close_ack_; }

View File

@@ -1,8 +1,8 @@
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
index 96e472e..4d61084 100644
index 09859f1..0c546e5 100644
--- render_widget_host_view_mac.mm
+++ render_widget_host_view_mac.mm
@@ -534,9 +534,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
@@ -537,9 +537,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,5 +1,5 @@
diff --git supports_user_data.h supports_user_data.h
index ab40c1b..2b145e8 100644
index a9f1c93..48d88fa 100644
--- supports_user_data.h
+++ supports_user_data.h
@@ -33,9 +33,9 @@ class BASE_EXPORT SupportsUserData {

View File

@@ -1,5 +1,5 @@
diff --git controls/button/menu_button.cc controls/button/menu_button.cc
index 41921b9..a9c2e79 100644
index 4d1a1b9..7854bb0 100644
--- controls/button/menu_button.cc
+++ controls/button/menu_button.cc
@@ -199,7 +199,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
@@ -56,7 +56,7 @@ index 696a941..ce5abcd 100644
// The time is used for simulating menu behavior for the menu button; that
// is, if the menu is shown and the button is pressed, we need to close the
diff --git view.h view.h
index 897160e..415f194 100644
index a85ef3d..42bd451 100644
--- view.h
+++ view.h
@@ -18,6 +18,7 @@
@@ -67,7 +67,7 @@ index 897160e..415f194 100644
#include "build/build_config.h"
#include "ui/accessibility/ax_enums.h"
#include "ui/base/accelerators/accelerator.h"
@@ -111,7 +112,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -112,7 +113,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::LayerOwner,
public ui::AcceleratorTarget,
public ui::EventTarget,

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 27e1809..b522166 100644
index 29e1eef0..2d3408d 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -778,6 +778,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
@@ -674,6 +674,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
}
}
#endif
@@ -17,18 +17,18 @@ index 27e1809..b522166 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 9cdceb5..250911d0 100644
index febe516..208bdad 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -378,6 +378,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
@@ -47,6 +47,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
current_device_scale_factor_(0),
current_display_rotation_(gfx::Display::ROTATE_0),
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
+ has_external_parent_(false),
renderer_frame_number_(0),
text_input_state_(new TextInputState()),
weak_factory_(this) {}
@@ -588,6 +589,10 @@ void RenderWidgetHostViewBase::EndFrameSubscription() {
@@ -300,6 +301,10 @@ void RenderWidgetHostViewBase::EndFrameSubscription() {
NOTREACHED();
}
@@ -40,10 +40,10 @@ index 9cdceb5..250911d0 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 1cace30..d5ca100 100644
index c11775b..535caa2 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -98,6 +98,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -97,6 +97,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void BeginFrameSubscription(
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
void EndFrameSubscription() override;
@@ -51,7 +51,7 @@ index 1cace30..d5ca100 100644
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
@@ -461,6 +462,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -444,6 +445,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// renderer.
bool pinch_zoom_enabled_;
@@ -63,7 +63,7 @@ index 1cace30..d5ca100 100644
void FlushInput();
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 7c749a2..df2a254 100644
index 99459ad..bc1d7e7 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -159,6 +159,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
@@ -78,7 +78,7 @@ index 7c749a2..df2a254 100644
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index a8e088c..838b6a0 100644
index 4df7b7f..3427925 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
+++ ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -32,6 +32,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching(
@@ -91,7 +91,7 @@ index a8e088c..838b6a0 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 92cc44e..2a59948 100644
index fa9ea48..8e9ec16 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@@ -114,9 +114,9 @@ index 92cc44e..2a59948 100644
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
+ }
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
@@ -627,6 +632,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -631,6 +636,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
return native_widget_delegate_->CanActivate();
}
@@ -127,7 +127,7 @@ index 92cc44e..2a59948 100644
bool DesktopWindowTreeHostWin::WantsMouseEventsWhenInactive() const {
return wants_mouse_events_when_inactive_;
}
@@ -801,11 +810,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -805,11 +814,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -146,10 +146,10 @@ index 92cc44e..2a59948 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index dee68df..af6f960 100644
index 3465112..28822c6 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -135,6 +135,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -136,6 +136,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
bool CanMaximize() const override;
bool CanMinimize() const override;
bool CanActivate() const override;
@@ -157,9 +157,9 @@ index dee68df..af6f960 100644
bool WantsMouseEventsWhenInactive() const override;
bool WidgetSizeIsClientSize() const override;
bool IsModal() const override;
@@ -244,6 +245,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// Init time, before the Widget has created the NonClientView.
bool has_non_client_view_;
@@ -248,6 +249,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
+ // True if the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
@@ -365,7 +365,7 @@ index 5ab84f9..c4095fa 100644
x_active_window_ = None;
}
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 4c44b65..bf0314e 100644
index ffafd0d..e4a12ba 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)
@@ -388,7 +388,7 @@ index 4c44b65..bf0314e 100644
observer_manager_(this) {
}
@@ -307,7 +310,8 @@ void Widget::Init(const InitParams& in_params) {
@@ -291,7 +294,8 @@ void Widget::Init(const InitParams& in_params) {
InitParams params = in_params;
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -398,7 +398,7 @@ index 4c44b65..bf0314e 100644
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
params.type != views::Widget::InitParams::TYPE_WINDOW &&
@@ -369,7 +373,12 @@ void Widget::Init(const InitParams& in_params) {
@@ -353,7 +357,12 @@ void Widget::Init(const InitParams& in_params) {
Minimize();
} else if (params.delegate) {
SetContentsView(params.delegate->GetContentsView());
@@ -413,10 +413,10 @@ index 4c44b65..bf0314e 100644
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 3512453..4442e8e 100644
index 0ceaf82..7faed82 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -228,12 +228,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -230,12 +230,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// rendered, and that the client area should be equivalent to the window
// area. Only used on some platforms (Windows and Linux).
bool remove_standard_frame;
@@ -434,7 +434,7 @@ index 3512453..4442e8e 100644
// Specifies the initial bounds of the Widget. Default is empty, which means
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
@@ -744,6 +749,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -735,6 +740,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
bool movement_disabled() const { return movement_disabled_; }
void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; }
@@ -445,7 +445,7 @@ index 3512453..4442e8e 100644
// Returns the work area bounds of the screen the Widget belongs to.
gfx::Rect GetWorkAreaBoundsInScreen() const;
@@ -958,6 +967,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -949,6 +958,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// disabled.
bool movement_disabled_;
@@ -473,10 +473,10 @@ index ca561b6..7940b5a 100644
}
case Widget::InitParams::TYPE_CONTROL:
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 1f4bf47..ddd9bb4 100644
index 74d5cd6..19d208e 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -859,6 +859,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
@@ -838,6 +838,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
} else {
style &= ~WS_MINIMIZEBOX;
}
@@ -485,7 +485,7 @@ index 1f4bf47..ddd9bb4 100644
SetWindowLong(hwnd(), GWL_STYLE, style);
}
@@ -2439,8 +2441,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -2433,8 +2435,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
active_mouse_tracking_flags_ = 0;
} else if (event.type() == ui::ET_MOUSEWHEEL) {
// Reroute the mouse wheel to the window under the pointer if applicable.
@@ -501,10 +501,10 @@ index 1f4bf47..ddd9bb4 100644
// There are cases where the code handling the message destroys the window,
diff --git ui/views/win/hwnd_message_handler_delegate.h ui/views/win/hwnd_message_handler_delegate.h
index 3e68197..c3ea88f 100644
index 007157a..78fa051 100644
--- ui/views/win/hwnd_message_handler_delegate.h
+++ ui/views/win/hwnd_message_handler_delegate.h
@@ -45,6 +45,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
@@ -57,6 +57,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
virtual bool CanMinimize() const = 0;
virtual bool CanActivate() const = 0;

View File

@@ -1,21 +1,21 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index 59079de..819fb66 100644
index 821b3de..fa8898f 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -873,7 +873,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
@@ -879,7 +879,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
{
notifyPopupOpeningObservers();
- if (WebViewImpl::useExternalPopupMenus())
+ if (m_webView->useExternalPopupMenus())
return adoptRefWillBeNoop(new ExternalPopupMenu(frame, select, *m_webView));
return new ExternalPopupMenu(frame, select, *m_webView);
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index c95ff4c..e17f16b 100644
index e906bb7..40965ed 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -417,6 +417,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
@@ -416,6 +416,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_enableFakePageScaleAnimationForTesting(false)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
@@ -23,7 +23,7 @@ index c95ff4c..e17f16b 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -4090,9 +4091,14 @@ void WebViewImpl::pageScaleFactorChanged()
@@ -4120,9 +4121,14 @@ void WebViewImpl::pageScaleFactorChanged()
m_client->pageScaleFactorChanged();
}
@@ -40,7 +40,7 @@ index c95ff4c..e17f16b 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index c250a64..5daba9d 100644
index 12d658a..354438c 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -390,7 +390,8 @@ public:
@@ -53,7 +53,7 @@ index c250a64..5daba9d 100644
bool shouldAutoResize() const
{
@@ -687,6 +688,8 @@ private:
@@ -688,6 +689,8 @@ private:
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;