From a60bb077a398bca2ac685ae419aa27c810653881 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 6 Jul 2016 15:34:09 -0400 Subject: [PATCH] Update to Chromium revision 68623971 (#403382) --- BUILD.gn | 74 +++++------ CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- libcef/browser/chrome_browser_process_stub.cc | 6 + libcef/browser/chrome_browser_process_stub.h | 2 + libcef/browser/content_browser_client.cc | 23 +++- libcef/browser/content_browser_client.h | 2 +- .../extensions/extensions_browser_client.cc | 6 - .../extensions/extensions_browser_client.h | 2 - .../browser_platform_delegate_native_linux.cc | 16 +++ .../browser_platform_delegate_native_win.cc | 19 +++ .../net/url_request_context_getter_impl.cc | 10 ++ .../osr/render_widget_host_view_osr.cc | 118 ++++++++++++------ .../browser/osr/render_widget_host_view_osr.h | 15 ++- .../osr/render_widget_host_view_osr_mac.mm | 41 +++--- .../printing/print_view_manager_base.cc | 3 +- libcef/browser/resource_context.cc | 3 +- libcef/browser/resource_context.h | 4 +- .../resource_dispatcher_host_delegate.cc | 7 ++ .../resource_dispatcher_host_delegate.h | 2 + libcef/browser/views/textfield_impl.cc | 2 +- libcef/common/request_impl.cc | 8 ++ libcef/renderer/media/cef_key_systems.cc | 4 - libcef/utility/content_utility_client.cc | 8 +- libcef/utility/content_utility_client.h | 2 +- patch/patch.cfg | 15 ++- patch/patches/browser_compositor_mac.patch | 29 +++++ .../browser_frame_host_guest_1687.patch | 4 +- patch/patches/browser_plugin_guest_1565.patch | 2 +- patch/patches/browser_web_contents_1257.patch | 10 +- patch/patches/build.patch | 2 +- patch/patches/chrome_browser_1257.patch | 8 +- patch/patches/compositor_1368.patch | 12 +- patch/patches/content_nav_1129.patch | 12 +- patch/patches/extensions_1257.patch | 2 +- patch/patches/gn_config.patch | 51 +++----- patch/patches/gritsettings.patch | 6 +- patch/patches/gyp_build_626150.patch | 17 +++ .../patches/message_loop_443_1992243003.patch | 8 +- patch/patches/mime_handler_view_1565.patch | 2 +- patch/patches/net_filter_515.patch | 4 +- patch/patches/net_urlrequest_1327.patch | 4 +- patch/patches/pdfium_print_549365.patch | 4 +- patch/patches/prefs_content_1161.patch | 16 +-- .../print_header_footer_1478_1565.patch | 46 +++---- patch/patches/public_browser_1257.patch | 2 +- .../patches/render_view_host_impl_1392.patch | 4 +- .../render_widget_host_1070383005.patch | 4 +- patch/patches/spellcheck_137.patch | 2 +- patch/patches/views_1749.patch | 8 +- .../views_widget_180_1481_1677_1749.patch | 32 ++--- patch/patches/webkit_popups.patch | 20 +-- patch/patches/zlib.patch | 2 +- tests/unittests/os_rendering_unittest.cc | 4 +- tools/gclient_hook.py | 3 +- tools/make_distrib.py | 6 +- 55 files changed, 437 insertions(+), 283 deletions(-) create mode 100644 patch/patches/browser_compositor_mac.patch create mode 100644 patch/patches/gyp_build_626150.patch diff --git a/BUILD.gn b/BUILD.gn index f0276a57d..114833f23 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1367,7 +1367,24 @@ if (is_mac) { ":libcef_static", ] - ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] + # Both the main app executable and helper executables need to link the + # framework. Because they are at different directory depths, using + # @executable_path as the install_name would require using install_name_tool + # on one of the executables. However install_name_tool only operates + # in-place, which is problematic to express in GN. Instead, use rpath-based + # loading. + ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ] + + if (is_component_build) { + # Set up the rpath for the framework so that it can find dylibs in the + # root output directory. The framework is at + # $app_name.app/Contents/Frameworks/$output_name.framework/$output_name + # so use loader_path to go back to the root output directory. + ldflags += [ + "-rpath", + "@loader_path/../../../..", + ] + } info_plist_target = ":cef_framework_plist" } @@ -1560,56 +1577,14 @@ if (is_mac) { ldflags = [ # The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/ - # so set rpath up to the base. + # so set rpath up to Contents/ so that the loader can find Frameworks/. "-rpath", - "@loader_path/../../../../../..", + "@executable_path/../../../..", ] info_plist_target = ":${app_name}_helper_plist" } - # The install_name_tool can only operate in-place, rather than producing a - # unique output. Use the xcrun wrapper script to write a fake stamp output - # file. After :cef_helper_app has been built and bundled, this - # will run, modifying the executable in the bundle and writing out the - # --stamp specified. This will change the mtime on the executable, but - # because the stamp will also be updated, the - # :cef_framework_bundle_data will re-copy the output. This only - # works because nothing else depends on the output of - # :cef_helper_app. - # TODO(rsesek): After GYP is gone, re-write cef_main to be like - # chrome_main and use dlopen() instead of a linked framework. - action("${app_name}_fix_helper_link_framework") { - testonly = app_testonly - script = "//build/config/mac/xcrun.py" - - inputs = [ - "$root_out_dir/$app_helper_name.app/Contents/MacOS/$app_helper_name", - ] - - stamp_file = "$target_out_dir/xcrun_$target_name.stamp" - outputs = [ - stamp_file, - ] - - # TODO(rsesek): Figure out something like GYP's postbuilds to allow - # install_name_tool to operate in-place . - args = [ - "--stamp", - rebase_path(stamp_file, root_build_dir), - - # xcrun arguments: - "install_name_tool", - "-change", - "@executable_path/../Frameworks/$cef_framework_name.framework/$cef_framework_name", - "@executable_path/../../../$cef_framework_name.framework/$cef_framework_name", - ] + rebase_path(inputs, root_build_dir) - - public_deps = [ - ":${app_name}_helper_app", - ] - } - bundle_data("${app_name}_framework_bundle_data") { testonly = app_testonly sources = [ @@ -1619,7 +1594,7 @@ if (is_mac) { public_deps = [ ":cef_framework+link", - ":${app_name}_fix_helper_link_framework", + ":${app_name}_helper_app", ] outputs = [ @@ -1654,6 +1629,13 @@ if (is_mac) { libs = invoker.libs } + ldflags = [ + # The main app is at $app_name.app/Contents/MacOS/$app_name + # so set rpath up to Contents/ so that the loader can find Frameworks/. + "-rpath", + "@executable_path/../", + ] + info_plist_target = ":${app_name}_plist" } } diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 83f3b7eeb..b51fc2872 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': '318e6f543c58eeeac93b122030041139da7e1e6a', + 'chromium_checkout': '68623971be0cfc492a2cb0427d7f478e7b214c24', } diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 03c594891..7051d33bf 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -208,6 +208,12 @@ safe_browsing::ClientSideDetectionService* return NULL; } +subresource_filter::RulesetService* + ChromeBrowserProcessStub::subresource_filter_ruleset_service() { + NOTIMPLEMENTED(); + return NULL; +} + #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) void ChromeBrowserProcessStub::StartAutoupdateTimer() { } diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index d7d7d4a21..cf03450a8 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -72,6 +72,8 @@ class ChromeBrowserProcessStub : public BrowserProcess { safe_browsing::SafeBrowsingService* safe_browsing_service() override; safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() override; + subresource_filter::RulesetService* + subresource_filter_ruleset_service() override; #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) void StartAutoupdateTimer() override; diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 5b24140d9..f7b0ef1ad 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -51,6 +51,7 @@ #include "content/public/browser/browser_url_handler.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/client_certificate_delegate.h" +#include "content/public/browser/geolocation_delegate.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/page_navigator.h" #include "content/public/browser/quota_permission_context.h" @@ -116,6 +117,23 @@ class CefAccessTokenStore : public content::AccessTokenStore { DISALLOW_COPY_AND_ASSIGN(CefAccessTokenStore); }; +// A provider of services for geolocation. +class CefGeolocationDelegate : public content::GeolocationDelegate { + public: + explicit CefGeolocationDelegate(net::URLRequestContextGetter* system_context) + : system_context_(system_context) {} + + content::AccessTokenStore* CreateAccessTokenStore() override { + return new CefAccessTokenStore(system_context_); + } + + private: + net::URLRequestContextGetter* system_context_; + + DISALLOW_COPY_AND_ASSIGN(CefGeolocationDelegate); +}; + + class CefQuotaCallbackImpl : public CefRequestCallback { public: explicit CefQuotaCallbackImpl( @@ -674,8 +692,9 @@ void CefContentBrowserClient::SelectClientCertificate( } } -content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() { - return new CefAccessTokenStore( +content::GeolocationDelegate* + CefContentBrowserClient::CreateGeolocationDelegate() { + return new CefGeolocationDelegate( browser_main_parts_->browser_context()->request_context().get()); } diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index e1a4996e2..d19fd17d9 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -66,7 +66,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, std::unique_ptr delegate) override; - content::AccessTokenStore* CreateAccessTokenStore() override; + content::GeolocationDelegate* CreateGeolocationDelegate() override; bool CanCreateWindow(const GURL& opener_url, const GURL& opener_top_level_frame_url, const GURL& source_origin, diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 5eafbf348..f71ccc8d8 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -170,12 +170,6 @@ bool CefExtensionsBrowserClient::IsLoggedInAsPublicAccount() { return false; } -ApiActivityMonitor* CefExtensionsBrowserClient::GetApiActivityMonitor( - BrowserContext* context) { - // CEF doesn't monitor API function calls or events. - return NULL; -} - ExtensionSystemProvider* CefExtensionsBrowserClient::GetExtensionSystemFactory() { return CefExtensionSystemFactory::GetInstance(); diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index c47b18f56..829c1a4b9 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -64,8 +64,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { void PermitExternalProtocolHandler() override; bool IsRunningInForcedAppMode() override; bool IsLoggedInAsPublicAccount() override; - ApiActivityMonitor* GetApiActivityMonitor( - content::BrowserContext* context) override; ExtensionSystemProvider* GetExtensionSystemFactory() override; void RegisterExtensionFunctions( ExtensionFunctionRegistry* registry) const override; diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index c49f2c94e..2a7525185 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -21,6 +21,11 @@ #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/renderer_preferences.h" +#include "ui/events/keycodes/dom/dom_key.h" +#include "ui/events/keycodes/dom/keycode_converter.h" +#include "ui/events/keycodes/keyboard_code_conversion_x.h" +#include "ui/events/keycodes/keyboard_code_conversion_xkb.h" +#include "ui/events/keycodes/keysym_to_unicode.h" #include "ui/gfx/font_render_params.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" #include "ui/views/widget/widget.h" @@ -268,6 +273,17 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateKeyEvent( NOTREACHED(); } + // Populate DOM values that will be passed to JavaScript handlers via + // KeyboardEvent. + result.domCode = + static_cast(ui::KeycodeConverter::NativeKeycodeToDomCode( + key_event.native_key_code)); + int keysym = ui::XKeysymForWindowsKeyCode( + static_cast(key_event.windows_key_code), + !!(key_event.modifiers & EVENTFLAG_SHIFT_DOWN)); + base::char16 ch = ui::GetUnicodeCharacterFromXKeySym(keysym); + result.domKey = static_cast(ui::XKeySymToDomKey(keysym, ch)); + result.text[0] = key_event.character; result.unmodifiedText[0] = key_event.unmodified_character; diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index 4faf70321..22d19f73d 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -25,6 +25,10 @@ #include "ui/base/win/shell.h" #include "ui/display/display.h" #include "ui/display/screen.h" +#include "ui/events/keycodes/dom/dom_key.h" +#include "ui/events/keycodes/dom/keycode_converter.h" +#include "ui/events/keycodes/keyboard_code_conversion_win.h" +#include "ui/events/keycodes/platform_key_map_win.h" #include "ui/gfx/win/hwnd_util.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" #include "ui/views/widget/widget.h" @@ -382,6 +386,21 @@ void CefBrowserPlatformDelegateNativeWin::TranslateKeyEvent( NOTREACHED(); } + // Populate DOM values that will be passed to JavaScript handlers via + // KeyboardEvent. + result.domCode = + static_cast(ui::KeycodeConverter::NativeKeycodeToDomCode( + key_event.native_key_code)); + if (result.type == blink::WebInputEvent::Char) { + result.domKey = ui::DomKey::FromCharacter(key_event.windows_key_code); + } else { + // TODO(cef): CefKeyEvent does not currently pass extended key status (see + // WM_KEYDOWN docs) which would be necessary to pass EF_IS_EXTENDED_KEY as + // the |flags| parameter to DomKeyFromKeyboardCode(). + result.domKey = ui::PlatformKeyMap::DomKeyFromKeyboardCode( + ui::KeyboardCodeForWindowsKeyCode(key_event.windows_key_code), 0); + } + if (result.type == blink::WebInputEvent::Char || result.type == blink::WebInputEvent::RawKeyDown) { result.text[0] = result.windowsKeyCode; diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index f967dd26e..53929850c 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -34,6 +34,8 @@ #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" #include "net/cert/cert_verifier.h" +#include "net/cert/ct_policy_enforcer.h" +#include "net/cert/multi_log_ct_verifier.h" #include "net/cookies/cookie_monster.h" #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" #include "net/dns/host_resolver.h" @@ -207,6 +209,10 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); storage_->set_transport_security_state( base::WrapUnique(new net::TransportSecurityState)); + storage_->set_cert_transparency_verifier( + base::WrapUnique(new net::MultiLogCTVerifier)); + storage_->set_ct_policy_enforcer( + base::WrapUnique(new net::CTPolicyEnforcer)); std::unique_ptr system_proxy_service = ProxyServiceFactory::CreateProxyService( @@ -257,6 +263,10 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { url_request_context_->cert_verifier(); network_session_params.transport_security_state = url_request_context_->transport_security_state(); + network_session_params.cert_transparency_verifier = + url_request_context_->cert_transparency_verifier(); + network_session_params.ct_policy_enforcer = + url_request_context_->ct_policy_enforcer(); network_session_params.channel_id_service = url_request_context_->channel_id_service(); network_session_params.proxy_service = diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 1068d8350..f995aa85a 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -104,7 +104,7 @@ class CefResizeLock : public content::ResizeLock { protected: void LockCompositor() override { ResizeLock::LockCompositor(); - compositor_lock_ = host_->compositor()->GetCompositorLock(); + compositor_lock_ = host_->GetCompositor()->GetCompositorLock(); } void CancelLock() { @@ -451,8 +451,10 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( : transparent_(transparent), scale_factor_(kDefaultScaleFactor), frame_rate_threshold_ms_(0), - delegated_frame_host_(new content::DelegatedFrameHost(this)), +#if !defined(OS_MACOSX) compositor_widget_(gfx::kNullAcceleratedWidget), + delegated_frame_host_(new content::DelegatedFrameHost(this)), +#endif software_output_device_(NULL), hold_resize_(false), pending_resize_(false), @@ -477,38 +479,48 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( content::RenderViewHost::From(render_widget_host_)); } +#if !defined(OS_MACOSX) root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); +#endif PlatformCreateCompositorWidget(); + #if !defined(OS_MACOSX) // On OS X the ui::Compositor is created/owned by the platform view. compositor_.reset( new ui::Compositor(content::GetContextFactory(), base::ThreadTaskRunnerHandle::Get())); compositor_->SetAcceleratedWidget(compositor_widget_); -#endif compositor_->SetDelegate(this); compositor_->SetRootLayer(root_layer_.get()); +#endif if (browser_impl_.get()) ResizeRootLayer(); } CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() { +#if defined(OS_MACOSX) + if (is_showing_) + browser_compositor_->SetRenderWidgetHostIsHidden(true); +#else // Marking the DelegatedFrameHost as removed from the window hierarchy is // necessary to remove all connections to its old ui::Compositor. if (is_showing_) delegated_frame_host_->WasHidden(); delegated_frame_host_->ResetCompositor(); +#endif PlatformDestroyCompositorWidget(); if (copy_frame_generator_.get()) copy_frame_generator_.reset(NULL); +#if !defined(OS_MACOSX) delegated_frame_host_.reset(NULL); compositor_.reset(NULL); root_layer_.reset(NULL); +#endif DCHECK(parent_host_view_ == NULL); DCHECK(popup_host_view_ == NULL); @@ -572,7 +584,7 @@ bool CefRenderWidgetHostViewOSR::HasFocus() const { } bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() const { - return delegated_frame_host_->CanCopyToBitmap(); + return GetDelegatedFrameHost()->CanCopyToBitmap(); } void CefRenderWidgetHostViewOSR::Show() { @@ -580,10 +592,16 @@ void CefRenderWidgetHostViewOSR::Show() { return; is_showing_ = true; - if (render_widget_host_) - render_widget_host_->WasShown(ui::LatencyInfo()); + +#if defined(OS_MACOSX) + browser_compositor_->SetRenderWidgetHostIsHidden(false); +#else delegated_frame_host_->SetCompositor(compositor_.get()); delegated_frame_host_->WasShown(ui::LatencyInfo()); +#endif + + if (render_widget_host_) + render_widget_host_->WasShown(ui::LatencyInfo()); } void CefRenderWidgetHostViewOSR::Hide() { @@ -595,8 +613,14 @@ void CefRenderWidgetHostViewOSR::Hide() { if (render_widget_host_) render_widget_host_->WasHidden(); - delegated_frame_host_->WasHidden(); - delegated_frame_host_->ResetCompositor(); + +#if defined(OS_MACOSX) + browser_compositor_->SetRenderWidgetHostIsHidden(true); +#else + GetDelegatedFrameHost()->WasHidden(); + GetDelegatedFrameHost()->ResetCompositor(); +#endif + is_showing_ = false; } @@ -639,11 +663,11 @@ void CefRenderWidgetHostViewOSR::UnlockMouse() { void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( uint32_t output_surface_id, - std::unique_ptr frame) { + cc::CompositorFrame frame) { TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::OnSwapCompositorFrame"); - if (frame->metadata.root_scroll_offset != last_scroll_offset_) { - last_scroll_offset_ = frame->metadata.root_scroll_offset; + if (frame.metadata.root_scroll_offset != last_scroll_offset_) { + last_scroll_offset_ = frame.metadata.root_scroll_offset; if (!is_scroll_offset_changed_pending_) { // Send the notification asnychronously. @@ -653,7 +677,7 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( } } - if (frame->delegated_frame_data) { + if (frame.delegated_frame_data) { if (software_output_device_) { if (!begin_frame_timer_.get()) { // If BeginFrame scheduling is enabled SoftwareOutputDevice activity @@ -664,8 +688,13 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( // The compositor will draw directly to the SoftwareOutputDevice which // then calls OnPaint. +#if defined(OS_MACOSX) + browser_compositor_->SwapCompositorFrame(output_surface_id, + std::move(frame)); +#else delegated_frame_host_->SwapDelegatedFrame(output_surface_id, std::move(frame)); +#endif } else { if (!copy_frame_generator_.get()) { copy_frame_generator_.reset( @@ -675,14 +704,19 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( // Determine the damage rectangle for the current frame. This is the same // calculation that SwapDelegatedFrame uses. cc::RenderPass* root_pass = - frame->delegated_frame_data->render_pass_list.back().get(); + frame.delegated_frame_data->render_pass_list.back().get(); gfx::Size frame_size = root_pass->output_rect.size(); gfx::Rect damage_rect = gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect)); damage_rect.Intersect(gfx::Rect(frame_size)); +#if defined(OS_MACOSX) + browser_compositor_->SwapCompositorFrame(output_surface_id, + std::move(frame)); +#else delegated_frame_host_->SwapDelegatedFrame(output_surface_id, std::move(frame)); +#endif // Request a copy of the last compositor frame which will eventually call // OnPaint asynchronously. @@ -694,7 +728,7 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( } void CefRenderWidgetHostViewOSR::ClearCompositorFrame() { - delegated_frame_host_->ClearDelegatedFrame(); + GetDelegatedFrameHost()->ClearDelegatedFrame(); } void CefRenderWidgetHostViewOSR::InitAsPopup( @@ -835,7 +869,7 @@ void CefRenderWidgetHostViewOSR::SetTooltipText( } gfx::Size CefRenderWidgetHostViewOSR::GetRequestedRendererSize() const { - return delegated_frame_host_->GetRequestedRendererSize(); + return GetDelegatedFrameHost()->GetRequestedRendererSize(); } gfx::Size CefRenderWidgetHostViewOSR::GetPhysicalBackingSize() const { @@ -853,7 +887,7 @@ void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface( const gfx::Size& dst_size, const content::ReadbackRequestCallback& callback, const SkColorType color_type) { - delegated_frame_host_->CopyFromCompositingSurface( + GetDelegatedFrameHost()->CopyFromCompositingSurface( src_subrect, dst_size, callback, color_type); } @@ -861,21 +895,21 @@ void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame( const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) { - delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( + GetDelegatedFrameHost()->CopyFromCompositingSurfaceToVideoFrame( src_subrect, target, callback); } bool CefRenderWidgetHostViewOSR::CanCopyToVideoFrame() const { - return delegated_frame_host_->CanCopyToVideoFrame(); + return GetDelegatedFrameHost()->CanCopyToVideoFrame(); } void CefRenderWidgetHostViewOSR::BeginFrameSubscription( std::unique_ptr subscriber) { - delegated_frame_host_->BeginFrameSubscription(std::move(subscriber)); + GetDelegatedFrameHost()->BeginFrameSubscription(std::move(subscriber)); } void CefRenderWidgetHostViewOSR::EndFrameSubscription() { - delegated_frame_host_->EndFrameSubscription(); + GetDelegatedFrameHost()->EndFrameSubscription(); } bool CefRenderWidgetHostViewOSR::HasAcceleratedSurface( @@ -921,13 +955,6 @@ void CefRenderWidgetHostViewOSR::GetScreenInfo(blink::WebScreenInfo* results) { *results = webScreenInfoFrom(screen_info); } -bool CefRenderWidgetHostViewOSR::GetScreenColorProfile( - std::vector* color_profile) { - DCHECK(color_profile->empty()); - // TODO(cef): Maybe expose this method to the client? - return false; -} - gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() { if (!browser_impl_.get()) return gfx::Rect(); @@ -998,7 +1025,7 @@ void CefRenderWidgetHostViewOSR::OnSetNeedsBeginFrames(bool enabled) { std::unique_ptr CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice( ui::Compositor* compositor) { - DCHECK_EQ(compositor_.get(), compositor); + DCHECK_EQ(GetCompositor(), compositor); DCHECK(!copy_frame_generator_); DCHECK(!software_output_device_); software_output_device_ = new CefSoftwareOutputDeviceOSR( @@ -1014,7 +1041,7 @@ int CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGpuMemoryBufferClientId() } ui::Layer* CefRenderWidgetHostViewOSR::DelegatedFrameHostGetLayer() const { - return root_layer_.get(); + return GetRootLayer(); } bool CefRenderWidgetHostViewOSR::DelegatedFrameHostIsVisible() const { @@ -1035,7 +1062,7 @@ SkColor CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGutterColor( gfx::Size CefRenderWidgetHostViewOSR::DelegatedFrameHostDesiredSizeInDIP() const { - return root_layer_->bounds().size(); + return GetRootLayer()->bounds().size(); } bool CefRenderWidgetHostViewOSR::DelegatedFrameCanCreateResizeLock() const { @@ -1045,7 +1072,7 @@ bool CefRenderWidgetHostViewOSR::DelegatedFrameCanCreateResizeLock() const { std::unique_ptr CefRenderWidgetHostViewOSR::DelegatedFrameHostCreateResizeLock( bool defer_compositor_lock) { - const gfx::Size& desired_size = root_layer_->bounds().size(); + const gfx::Size& desired_size = GetRootLayer()->bounds().size(); return std::unique_ptr(new CefResizeLock( this, desired_size, @@ -1094,7 +1121,11 @@ void CefRenderWidgetHostViewOSR::SetBeginFrameSource( bool CefRenderWidgetHostViewOSR::InstallTransparency() { if (transparent_) { SetBackgroundColor(SkColor()); +#if defined(OS_MACOSX) + browser_compositor_->SetHasTransparentBackground(true); +#else compositor_->SetHostHasTransparentBackground(true); +#endif return true; } return false; @@ -1110,7 +1141,7 @@ void CefRenderWidgetHostViewOSR::WasResized() { ResizeRootLayer(); if (render_widget_host_) render_widget_host_->WasResized(); - delegated_frame_host_->WasResized(); + GetDelegatedFrameHost()->WasResized(); } void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() { @@ -1306,6 +1337,21 @@ void CefRenderWidgetHostViewOSR::RemoveGuestHostView( guest_host_views_.erase(guest_host); } +#if !defined(OS_MACOSX) +ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const { + return compositor_.get(); +} + +content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost() + const { + return delegated_frame_host_.get(); +} + +ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const { + return root_layer_.get(); +} +#endif // !defined(OS_MACOSX) + void CefRenderWidgetHostViewOSR::SetFrameRate() { CefRefPtr browser; if (parent_host_view_) { @@ -1325,7 +1371,7 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() { frame_rate_threshold_ms_ = 1000 / frame_rate; // Configure the VSync interval for the browser process. - compositor_->vsync_manager()->SetAuthoritativeVSyncInterval( + GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval( base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_)); if (copy_frame_generator_.get()) { @@ -1375,14 +1421,14 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() { else size = popup_position_.size(); - if (!scaleFactorDidChange && size == root_layer_->bounds().size()) + if (!scaleFactorDidChange && size == GetRootLayer()->bounds().size()) return; const gfx::Size& size_in_pixels = gfx::ConvertSizeToPixel(scale_factor_, size); - root_layer_->SetBounds(gfx::Rect(size)); - compositor_->SetScaleAndSize(scale_factor_, size_in_pixels); + GetRootLayer()->SetBounds(gfx::Rect(size)); + GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels); } bool CefRenderWidgetHostViewOSR::IsFramePending() { diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 535b01c62..1c1bc324b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -120,9 +120,8 @@ class CefRenderWidgetHostViewOSR #endif // defined(OS_MACOSX) // RenderWidgetHostViewBase implementation. - void OnSwapCompositorFrame( - uint32_t output_surface_id, - std::unique_ptr frame) override; + void OnSwapCompositorFrame(uint32_t output_surface_id, + cc::CompositorFrame frame) override; void ClearCompositorFrame() override; void InitAsPopup(content::RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) override; @@ -163,7 +162,6 @@ class CefRenderWidgetHostViewOSR void EndFrameSubscription() override; bool HasAcceleratedSurface(const gfx::Size& desired_size) override; void GetScreenInfo(blink::WebScreenInfo* results) override; - bool GetScreenColorProfile(std::vector* color_profile) override; gfx::Rect GetBoundsInRootWindow() override; content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager( @@ -266,11 +264,14 @@ class CefRenderWidgetHostViewOSR child_host_view_ = popup_view; } - ui::Compositor* compositor() const { return compositor_.get(); } + ui::Compositor* GetCompositor() const; content::RenderWidgetHostImpl* render_widget_host() const { return render_widget_host_; } private: + content::DelegatedFrameHost* GetDelegatedFrameHost() const; + ui::Layer* GetRootLayer() const; + void SetFrameRate(); void SetDeviceScaleFactor(); void ResizeRootLayer(); @@ -323,10 +324,12 @@ class CefRenderWidgetHostViewOSR float scale_factor_; int frame_rate_threshold_ms_; - std::unique_ptr delegated_frame_host_; +#if !defined(OS_MACOSX) std::unique_ptr compositor_; gfx::AcceleratedWidget compositor_widget_; + std::unique_ptr delegated_frame_host_; std::unique_ptr root_layer_; +#endif #if defined(OS_WIN) std::unique_ptr window_; diff --git a/libcef/browser/osr/render_widget_host_view_osr_mac.mm b/libcef/browser/osr/render_widget_host_view_osr_mac.mm index 8d5d1ed80..16549d6a3 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_mac.mm +++ b/libcef/browser/osr/render_widget_host_view_osr_mac.mm @@ -63,7 +63,7 @@ class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView { ui::AcceleratedWidgetMac* CefRenderWidgetHostViewOSR::GetAcceleratedWidgetMac() const { if (browser_compositor_) - return browser_compositor_->accelerated_widget_mac(); + return browser_compositor_->GetAcceleratedWidgetMac(); return nullptr; } @@ -307,6 +307,19 @@ void CefRenderWidgetHostViewOSR::DestroyNSTextInputOSR() { text_input_context_osr_mac_ = NULL; } +ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const { + return browser_compositor_->GetCompositor(); +} + +content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost() + const { + return browser_compositor_->GetDelegatedFrameHost(); +} + +ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const { + return browser_compositor_->GetRootLayer(); +} + void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { // Create a borderless non-visible 1x1 window. window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1) @@ -321,39 +334,23 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { [content_view setLayer:background_layer_]; [content_view setWantsLayer:YES]; - browser_compositor_ = content::BrowserCompositorMac::Create(); accelerated_widget_helper_ = new AcceleratedWidgetMacNSViewHelper(this); - - compositor_.reset(browser_compositor_->compositor()); - compositor_->SetRootLayer(root_layer_.get()); - browser_compositor_->accelerated_widget_mac()->SetNSView( - accelerated_widget_helper_); - browser_compositor_->compositor()->SetVisible(true); - - // CEF needs the browser compositor to remain responsive whereas normal - // rendering on OS X does not. This effectively reverts the changes from - // https://crbug.com/463988#c6 - compositor_->SetLocksWillTimeOut(true); - browser_compositor_->Unsuspend(); + browser_compositor_.reset(new content::BrowserCompositorMac( + accelerated_widget_helper_, this, render_widget_host_->is_hidden(), + true)); } void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() { DCHECK(window_); - // Compositor is owned by and will be freed by BrowserCompositorMac. - ui::Compositor* compositor = compositor_.release(); - ALLOW_UNUSED_LOCAL(compositor); + browser_compositor_->Destroy(); [window_ close]; window_ = nil; [background_layer_ release]; background_layer_ = nil; - browser_compositor_->accelerated_widget_mac()->ResetNSView(); - browser_compositor_->compositor()->SetVisible(false); - browser_compositor_->compositor()->SetScaleAndSize(1.0, gfx::Size(0, 0)); - browser_compositor_->compositor()->SetRootLayer(NULL); - content::BrowserCompositorMac::Recycle(std::move(browser_compositor_)); + browser_compositor_.reset(); delete accelerated_widget_helper_; accelerated_widget_helper_ = nullptr; diff --git a/libcef/browser/printing/print_view_manager_base.cc b/libcef/browser/printing/print_view_manager_base.cc index c5ecaffb2..296d12506 100644 --- a/libcef/browser/printing/print_view_manager_base.cc +++ b/libcef/browser/printing/print_view_manager_base.cc @@ -11,6 +11,7 @@ #include "base/auto_reset.h" #include "base/bind.h" #include "base/location.h" +#include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" @@ -428,7 +429,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { { base::MessageLoop::ScopedNestableTaskAllower allow( base::MessageLoop::current()); - base::MessageLoop::current()->Run(); + base::RunLoop().Run(); } bool success = true; diff --git a/libcef/browser/resource_context.cc b/libcef/browser/resource_context.cc index aa9932948..5956ce6dc 100644 --- a/libcef/browser/resource_context.cc +++ b/libcef/browser/resource_context.cc @@ -54,7 +54,8 @@ net::URLRequestContext* CefResourceContext::GetRequestContext() { return getter_->GetURLRequestContext(); } -std::unique_ptr CefResourceContext::CreateClientCertStore() { +std::unique_ptr + CefResourceContext::CreateClientCertStore() { #if defined(USE_NSS_CERTS) return std::unique_ptr(new net::ClientCertStoreNSS( net::ClientCertStoreNSS::PasswordDelegateFactory())); diff --git a/libcef/browser/resource_context.h b/libcef/browser/resource_context.h index 7baf5ab33..0d07c9446 100644 --- a/libcef/browser/resource_context.h +++ b/libcef/browser/resource_context.h @@ -10,6 +10,7 @@ #include "content/public/browser/resource_context.h" #include "extensions/browser/info_map.h" +#include "net/ssl/client_cert_store.h" class CefURLRequestContextGetter; @@ -31,7 +32,8 @@ class CefResourceContext : public content::ResourceContext { // ResourceContext implementation. net::HostResolver* GetHostResolver() override; net::URLRequestContext* GetRequestContext() override; - std::unique_ptr CreateClientCertStore() override; + + std::unique_ptr CreateClientCertStore(); void set_url_request_context_getter( scoped_refptr getter); diff --git a/libcef/browser/resource_dispatcher_host_delegate.cc b/libcef/browser/resource_dispatcher_host_delegate.cc index 2d00f2caf..9a3fca3ac 100644 --- a/libcef/browser/resource_dispatcher_host_delegate.cc +++ b/libcef/browser/resource_dispatcher_host_delegate.cc @@ -208,3 +208,10 @@ void CefResourceDispatcherHostDelegate::OnRequestRedirected( response->head.headers->AddHeader("Access-Control-Allow-Credentials: true"); } } + +std::unique_ptr + CefResourceDispatcherHostDelegate::CreateClientCertStore( + content::ResourceContext* resource_context) { + return static_cast(resource_context)-> + CreateClientCertStore(); +} diff --git a/libcef/browser/resource_dispatcher_host_delegate.h b/libcef/browser/resource_dispatcher_host_delegate.h index e82ac6f80..74b7f48f6 100644 --- a/libcef/browser/resource_dispatcher_host_delegate.h +++ b/libcef/browser/resource_dispatcher_host_delegate.h @@ -42,6 +42,8 @@ class CefResourceDispatcherHostDelegate net::URLRequest* request, content::ResourceContext* resource_context, content::ResourceResponse* response) override; + std::unique_ptr CreateClientCertStore( + content::ResourceContext* resource_context) override; private: struct StreamTargetInfo { diff --git a/libcef/browser/views/textfield_impl.cc b/libcef/browser/views/textfield_impl.cc index 18b029b12..a04d7f315 100644 --- a/libcef/browser/views/textfield_impl.cc +++ b/libcef/browser/views/textfield_impl.cc @@ -162,7 +162,7 @@ bool CefTextfieldImpl::IsCommandEnabled(int command_id) { void CefTextfieldImpl::ExecuteCommand(int command_id) { CEF_REQUIRE_VALID_RETURN_VOID(); if (root_view()->IsCommandIdEnabled(command_id)) - root_view()->ExecuteCommand(command_id); + root_view()->ExecuteCommand(command_id, ui::EF_NONE); } void CefTextfieldImpl::ClearEditHistory() { diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index a32c2e31a..147e9f33b 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -438,6 +438,14 @@ void CefRequestImpl::Set(net::URLRequest* request) { case net::URLRequest::NEVER_CLEAR_REFERRER: referrer_policy_ = REFERRER_POLICY_ALWAYS; break; + case net::URLRequest::ORIGIN: + referrer_policy_ = REFERRER_POLICY_ORIGIN; + break; + case net::URLRequest::NO_REFERRER: + referrer_policy_ = REFERRER_POLICY_NEVER; + break; + case net::URLRequest::MAX_REFERRER_POLICY: + break; } } diff --git a/libcef/renderer/media/cef_key_systems.cc b/libcef/renderer/media/cef_key_systems.cc index c6281a5ea..afe8dd76e 100644 --- a/libcef/renderer/media/cef_key_systems.cc +++ b/libcef/renderer/media/cef_key_systems.cc @@ -17,8 +17,6 @@ #include "media/base/eme_constants.h" #include "media/base/key_system_properties.h" -#include "media/media_features.h" - #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. // The following must be after widevine_cdm_version.h. @@ -118,10 +116,8 @@ static void AddPepperBasedWidevine( #if defined(USE_PROPRIETARY_CODECS) if (codecs[i] == kCdmSupportedCodecAvc1) supported_codecs |= media::EME_CODEC_MP4_AVC1; -#if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING) if (codecs[i] == kCdmSupportedCodecVp9) supported_codecs |= media::EME_CODEC_MP4_VP9; -#endif #endif // defined(USE_PROPRIETARY_CODECS) } diff --git a/libcef/utility/content_utility_client.cc b/libcef/utility/content_utility_client.cc index 718e4cba9..f88575302 100644 --- a/libcef/utility/content_utility_client.cc +++ b/libcef/utility/content_utility_client.cc @@ -10,8 +10,8 @@ #include "build/build_config.h" #include "chrome/common/chrome_utility_messages.h" #include "chrome/utility/utility_message_handler.h" -#include "content/public/common/service_registry.h" #include "net/proxy/mojo_proxy_resolver_factory_impl.h" +#include "services/shell/public/cpp/interface_registry.h" #if defined(OS_WIN) #include "libcef/utility/printing_handler.h" @@ -51,8 +51,8 @@ bool CefContentUtilityClient::OnMessageReceived( return handled; } -void CefContentUtilityClient::RegisterMojoServices( - content::ServiceRegistry* registry) { - registry->AddService( +void CefContentUtilityClient::ExposeInterfacesToBrowser( + shell::InterfaceRegistry* registry) { + registry->AddInterface( base::Bind(CreateProxyResolverFactory)); } diff --git a/libcef/utility/content_utility_client.h b/libcef/utility/content_utility_client.h index 84f4a9264..45ec78179 100644 --- a/libcef/utility/content_utility_client.h +++ b/libcef/utility/content_utility_client.h @@ -17,7 +17,7 @@ class CefContentUtilityClient : public content::ContentUtilityClient { ~CefContentUtilityClient() override; bool OnMessageReceived(const IPC::Message& message) override; - void RegisterMojoServices(content::ServiceRegistry* registry) override; + void ExposeInterfacesToBrowser(shell::InterfaceRegistry* registry) override; private: typedef ScopedVector Handlers; diff --git a/patch/patch.cfg b/patch/patch.cfg index b94596146..4353b077c 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -25,9 +25,6 @@ patches = [ # Use a unique output path for the compile_xibs template on Mac. # https://bugs.chromium.org/p/chromium/issues/detail?id=623237 # - # Fix broken GN configuration for enable_print_preview = false on Mac. - # https://bugs.chromium.org/p/chromium/issues/detail?id=617477 - # # Support custom VS toolchain on Windows. # https://bugs.chromium.org/p/chromium/issues/detail?id=623342 'name': 'gn_config', @@ -275,4 +272,16 @@ patches = [ 'name': 'render_view_host_impl_1392', 'path': '../content/browser/renderer_host/', }, + { + # Fix GYP build error on Linux. + # https://bugs.chromium.org/p/chromium/issues/detail?id=626150 + # TODO(cef): Remove this patch when GYP support is removed. + 'name': 'gyp_build_626150', + 'path': '../', + }, + { + # Expose ui::Compositor via BrowserCompositorMac for OSR. + 'name': 'browser_compositor_mac', + 'path': '../', + }, ] diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch new file mode 100644 index 000000000..05357d9df --- /dev/null +++ b/patch/patches/browser_compositor_mac.patch @@ -0,0 +1,29 @@ +diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h +index 552a56b..2a817d8 100644 +--- content/browser/renderer_host/browser_compositor_view_mac.h ++++ content/browser/renderer_host/browser_compositor_view_mac.h +@@ -52,6 +52,7 @@ class BrowserCompositorMac { + + // This may return nullptr, if this has detached itself from its + // ui::Compositor. ++ ui::Compositor* GetCompositor(); + ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac(); + + 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 e9faa0a..931a92f 100644 +--- content/browser/renderer_host/browser_compositor_view_mac.mm ++++ content/browser/renderer_host/browser_compositor_view_mac.mm +@@ -186,6 +186,12 @@ void BrowserCompositorMac::Destroy() { + g_spare_recyclable_compositor.Get().reset(); + } + ++ui::Compositor* BrowserCompositorMac::GetCompositor() { ++ if (recyclable_compositor_) ++ return recyclable_compositor_->compositor(); ++ return nullptr; ++} ++ + ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() { + if (recyclable_compositor_) + return recyclable_compositor_->accelerated_widget_mac(); diff --git a/patch/patches/browser_frame_host_guest_1687.patch b/patch/patches/browser_frame_host_guest_1687.patch index 6b8f5db0c..0147bcd18 100644 --- a/patch/patches/browser_frame_host_guest_1687.patch +++ b/patch/patches/browser_frame_host_guest_1687.patch @@ -1,8 +1,8 @@ diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc -index 2f7ff29..49389ce 100644 +index b4557c2..6cb6c5a 100644 --- render_widget_host_view_guest.cc +++ render_widget_host_view_guest.cc -@@ -215,6 +215,9 @@ void RenderWidgetHostViewGuest::Destroy() { +@@ -243,6 +243,9 @@ void RenderWidgetHostViewGuest::Destroy() { } gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index bbda696ee..2c9cf896c 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -1,5 +1,5 @@ diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc -index 826c644..f52fd25 100644 +index 2f6fd0e..ab23a3c 100644 --- browser/browser_plugin/browser_plugin_guest.cc +++ browser/browser_plugin/browser_plugin_guest.cc @@ -28,7 +28,7 @@ diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index 6fd58ade9..115d12e1b 100644 --- a/patch/patches/browser_web_contents_1257.patch +++ b/patch/patches/browser_web_contents_1257.patch @@ -1,8 +1,8 @@ diff --git web_contents_impl.cc web_contents_impl.cc -index 7754791..8aebfcd 100644 +index db8263e..07f1989 100644 --- web_contents_impl.cc +++ web_contents_impl.cc -@@ -1498,6 +1498,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1502,6 +1502,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); @@ -15,7 +15,7 @@ index 7754791..8aebfcd 100644 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -1530,6 +1536,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1534,6 +1540,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::move(view_), &render_view_host_delegate_view_)); } @@ -23,7 +23,7 @@ index 7754791..8aebfcd 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1973,11 +1980,14 @@ void WebContentsImpl::CreateNewWindow( +@@ -1977,11 +1984,14 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -39,7 +39,7 @@ index 7754791..8aebfcd 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 -@@ -2001,6 +2011,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -2005,6 +2015,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; diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 13037140b..e6a20c02e 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git common.gypi common.gypi -index 203247d..2991dfc 100644 +index f5d107d..e38c4ee 100644 --- common.gypi +++ common.gypi @@ -9,6 +9,9 @@ diff --git a/patch/patches/chrome_browser_1257.patch b/patch/patches/chrome_browser_1257.patch index f9f0d6164..12c876516 100644 --- a/patch/patches/chrome_browser_1257.patch +++ b/patch/patches/chrome_browser_1257.patch @@ -1,8 +1,8 @@ diff --git ui/browser.cc ui/browser.cc -index 14a9336..6f26daf 100644 +index b10b2df..a47dd18 100644 --- ui/browser.cc +++ ui/browser.cc -@@ -1614,7 +1614,9 @@ bool Browser::ShouldCreateWebContents( +@@ -1618,7 +1618,9 @@ bool Browser::ShouldCreateWebContents( const std::string& frame_name, const GURL& target_url, const std::string& partition_id, @@ -14,10 +14,10 @@ index 14a9336..6f26daf 100644 // If a BackgroundContents is created, suppress the normal WebContents. return !MaybeCreateBackgroundContents( diff --git ui/browser.h ui/browser.h -index 01f2880..e741e21 100644 +index 693e84d..be1f1dd 100644 --- ui/browser.h +++ ui/browser.h -@@ -616,7 +616,9 @@ class Browser : public TabStripModelObserver, +@@ -617,7 +617,9 @@ class Browser : public TabStripModelObserver, const std::string& frame_name, const GURL& target_url, const std::string& partition_id, diff --git a/patch/patches/compositor_1368.patch b/patch/patches/compositor_1368.patch index 648d0210b..c5e1c6dba 100644 --- a/patch/patches/compositor_1368.patch +++ b/patch/patches/compositor_1368.patch @@ -1,8 +1,8 @@ diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index 6fdb92e..5405306 100644 +index 841fea0..8939665 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -184,6 +184,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { +@@ -189,6 +189,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { std::unique_ptr GpuProcessTransportFactory::CreateSoftwareOutputDevice( ui::Compositor* compositor) { @@ -17,7 +17,7 @@ index 6fdb92e..5405306 100644 if (shell::ShellIsRemote()) { return std::unique_ptr( diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index a6245da..edfdeb5c 100644 +index ee39c59..8f6082b 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -17,6 +17,7 @@ @@ -28,7 +28,7 @@ index a6245da..edfdeb5c 100644 #include "cc/surfaces/surface_sequence.h" #include "cc/trees/layer_tree_host_client.h" #include "cc/trees/layer_tree_host_single_thread_client.h" -@@ -156,6 +157,17 @@ class COMPOSITOR_EXPORT CompositorLock +@@ -179,6 +180,17 @@ class COMPOSITOR_EXPORT CompositorLock DISALLOW_COPY_AND_ASSIGN(CompositorLock); }; @@ -46,7 +46,7 @@ index a6245da..edfdeb5c 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 -@@ -176,6 +188,9 @@ class COMPOSITOR_EXPORT Compositor +@@ -199,6 +211,9 @@ class COMPOSITOR_EXPORT Compositor // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -56,7 +56,7 @@ index a6245da..edfdeb5c 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 -@@ -345,6 +360,8 @@ class COMPOSITOR_EXPORT Compositor +@@ -368,6 +383,8 @@ class COMPOSITOR_EXPORT Compositor ui::ContextFactory* context_factory_; diff --git a/patch/patches/content_nav_1129.patch b/patch/patches/content_nav_1129.patch index 6adcf2588..3a424ab7d 100644 --- a/patch/patches/content_nav_1129.patch +++ b/patch/patches/content_nav_1129.patch @@ -19,10 +19,10 @@ index 4ad49c8..f1fa7ab 100644 return false; } diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h -index 579335b..2248549 100644 +index 9ad5aef..957ef88 100644 --- public/renderer/content_renderer_client.h +++ public/renderer/content_renderer_client.h -@@ -201,7 +201,6 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -204,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient { // Returns true if a popup window should be allowed. virtual bool AllowPopup(); @@ -30,7 +30,7 @@ index 579335b..2248549 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 -@@ -217,6 +216,7 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -220,6 +219,7 @@ class CONTENT_EXPORT ContentRendererClient { blink::WebNavigationPolicy default_policy, bool is_redirect); @@ -39,10 +39,10 @@ index 579335b..2248549 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 5f3ab60..b6f503f 100644 +index e4abcb5..399348c 100644 --- renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc -@@ -4867,7 +4867,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( +@@ -4901,7 +4901,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( (pending_navigation_params_ && !pending_navigation_params_->request_params.redirects.empty()); @@ -50,7 +50,7 @@ index 5f3ab60..b6f503f 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (GetContentClient()->renderer()->HandleNavigation( -@@ -4876,7 +4875,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( +@@ -4910,7 +4909,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( is_redirect)) { return blink::WebNavigationPolicyIgnore; } diff --git a/patch/patches/extensions_1257.patch b/patch/patches/extensions_1257.patch index 6935fd3a0..baf395402 100644 --- a/patch/patches/extensions_1257.patch +++ b/patch/patches/extensions_1257.patch @@ -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 85bd364..60e936c 100644 +index 3849b7e..a974f34 100644 --- browser/guest_view/extension_options/extension_options_guest.cc +++ browser/guest_view/extension_options/extension_options_guest.cc @@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents( diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 84f7dffc0..53f07e64f 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 3bd6bc4..0abf820 100644 +index 29bfe8c..a1e2af6 100644 --- .gn +++ .gn -@@ -247,6 +247,8 @@ exec_script_whitelist = [ +@@ -249,6 +249,8 @@ exec_script_whitelist = [ "//build/toolchain/win/BUILD.gn", "//build/util/branding.gni", "//build/util/version.gni", @@ -12,10 +12,10 @@ index 3bd6bc4..0abf820 100644 "//chrome/browser/BUILD.gn", "//chrome/browser/chromeos/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 0a7fe56..467f536 100644 +index 23e67d9..c3d4ec6 100644 --- BUILD.gn +++ BUILD.gn -@@ -206,6 +206,7 @@ group("both_gn_and_gyp") { +@@ -259,6 +259,7 @@ group("both_gn_and_gyp") { # and whether there should be other targets that are iOS-only and missing. deps += [ "//cc:cc_unittests", @@ -36,9 +36,8 @@ index 9d33d91..d460e86 100644 # Whether we are using the rlz library or not. Platforms like Android send # rlz codes for searches but do not use the library. - diff --git build/config/mac/base_rules.gni build/config/mac/base_rules.gni -index 76610cc..7d17aba 100644 +index 109710d..d2c442e 100644 --- build/config/mac/base_rules.gni +++ build/config/mac/base_rules.gni @@ -366,13 +366,13 @@ template("compile_xibs") { @@ -58,7 +57,7 @@ index 76610cc..7d17aba 100644 } } diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni -index 05b369f..8be3a47 100644 +index 5bfa9a7..5e6e05d 100644 --- build/config/win/visual_studio_version.gni +++ build/config/win/visual_studio_version.gni @@ -12,9 +12,8 @@ declare_args() { @@ -73,7 +72,7 @@ index 05b369f..8be3a47 100644 # Full path to the Windows SDK, not including a backslash at the end. # This value is the default location, override if you have a different -@@ -33,12 +32,11 @@ if (visual_studio_path == "") { +@@ -28,12 +27,11 @@ if (visual_studio_path == "") { visual_studio_path = toolchain_data.vs_path windows_sdk_path = toolchain_data.sdk_path visual_studio_version = toolchain_data.vs_version @@ -114,10 +113,10 @@ index d58cb85..fd608ba 100644 diff --git chrome/BUILD.gn chrome/BUILD.gn -index fa6cd4c..eaab973 100644 +index 1c26c3f..556dd64 100644 --- chrome/BUILD.gn +++ chrome/BUILD.gn -@@ -647,7 +647,7 @@ if (is_win) { +@@ -651,7 +651,7 @@ if (is_win) { ] foreach(locale, locales_as_mac_outputs) { @@ -143,30 +142,18 @@ index 9601dd4..9a7734a 100644 } diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index a3dcae8..ea60e17 100644 +index 699f56f..e2659fc 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn -@@ -76,7 +76,7 @@ action("archive") { - inputs = [ - "$root_out_dir/chrome.exe", - "$root_out_dir/chrome.dll", -- "$root_out_dir/locales/en-US.pak", -+ "$root_out_dir/chrome/locales/en-US.pak", - "$root_out_dir/setup.exe", - release_file, - ] -diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index e0f20cf..ba7aa8f 100644 ---- chrome/test/BUILD.gn -+++ chrome/test/BUILD.gn -@@ -1428,7 +1428,6 @@ if (!is_android) { - if (!enable_print_preview) { - sources -= [ - "../browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc", -- "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc", - "../browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc", - "../browser/printing/print_preview_dialog_controller_browsertest.cc", - "../browser/printing/print_preview_pdf_generated_browsertest.cc", +@@ -125,7 +125,7 @@ template("generate_mini_installer") { + inputs = [ + "$chrome_dll_file", + "$root_out_dir/chrome.exe", +- "$root_out_dir/locales/en-US.pak", ++ "$root_out_dir/chrome/locales/en-US.pak", + "$root_out_dir/setup.exe", + release_file, + ] diff --git tools/grit/repack.gni tools/grit/repack.gni index 42087f9..7dd1520 100644 --- tools/grit/repack.gni diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index ce6f16fa3..655ea89d6 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git resource_ids resource_ids -index bac636f2..979a58f0 100644 +index f45f57f..42754a9 100644 --- resource_ids +++ resource_ids @@ -14,6 +14,12 @@ @@ -7,10 +7,10 @@ index bac636f2..979a58f0 100644 "SRCDIR": "../..", + "cef/libcef/resources/cef_resources.grd": { -+ "includes": [27500], ++ "includes": [31500], + }, + "cef/libcef/resources/cef_strings.grd": { -+ "messages": [28000], ++ "messages": [32000], + }, "chrome/browser/browser_resources.grd": { "includes": [400], diff --git a/patch/patches/gyp_build_626150.patch b/patch/patches/gyp_build_626150.patch new file mode 100644 index 000000000..a65e8a22c --- /dev/null +++ b/patch/patches/gyp_build_626150.patch @@ -0,0 +1,17 @@ +diff --git components/webmessaging.gypi components/webmessaging.gypi +index 1ea14fb..8020b74 100644 +--- components/webmessaging.gypi ++++ components/webmessaging.gypi +@@ -48,12 +48,6 @@ + 'target_name': 'webmessaging_mojo_bindings_for_blink', + 'type': 'static_library', + 'sources': [ '<@(mojom_files)' ], +- 'dependencies': [ +- '../url/url.gyp:url_mojom_for_blink', +- ], +- 'export_dependent_settings': [ +- '../url/url.gyp:url_mojom_for_blink', +- ], + 'variables': { + 'for_blink': 'true', + 'mojom_typemaps': [ diff --git a/patch/patches/message_loop_443_1992243003.patch b/patch/patches/message_loop_443_1992243003.patch index a8be46edc..15845819a 100644 --- a/patch/patches/message_loop_443_1992243003.patch +++ b/patch/patches/message_loop_443_1992243003.patch @@ -1,5 +1,5 @@ diff --git message_loop.cc message_loop.cc -index 2d6e2a5..7509494 100644 +index 9d37691..c8ff77e 100644 --- message_loop.cc +++ message_loop.cc @@ -143,12 +143,6 @@ MessageLoop::~MessageLoop() { @@ -26,7 +26,7 @@ index 2d6e2a5..7509494 100644 message_histogram_(NULL), run_loop_(NULL), diff --git message_loop.h message_loop.h -index 11d8712..bddc532 100644 +index 1230f41..1eadc1e 100644 --- message_loop.h +++ message_loop.h @@ -373,6 +373,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { @@ -46,7 +46,7 @@ index 11d8712..bddc532 100644 // Can only be called from the thread that owns the MessageLoop. bool is_running() const; -@@ -511,6 +521,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { +@@ -520,6 +530,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { // insider a (accidentally induced?) nested message pump. bool nestable_tasks_allowed_; @@ -60,7 +60,7 @@ index 11d8712..bddc532 100644 // if type_ is TYPE_CUSTOM and pump_ is null. MessagePumpFactoryCallback pump_factory_; diff --git message_pump_win.cc message_pump_win.cc -index 499d2d8..9002e15 100644 +index de20bdc..29c4504 100644 --- message_pump_win.cc +++ message_pump_win.cc @@ -474,20 +474,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { diff --git a/patch/patches/mime_handler_view_1565.patch b/patch/patches/mime_handler_view_1565.patch index d3ca64715..d6a7da56e 100644 --- a/patch/patches/mime_handler_view_1565.patch +++ b/patch/patches/mime_handler_view_1565.patch @@ -1,5 +1,5 @@ diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc -index ec15087..7b4a51f 100644 +index 13f7dc3..acbc1ca 100644 --- mime_handler_view_guest.cc +++ mime_handler_view_guest.cc @@ -134,6 +134,8 @@ void MimeHandlerViewGuest::CreateWebContents( diff --git a/patch/patches/net_filter_515.patch b/patch/patches/net_filter_515.patch index fcc1aefe1..22eea251d 100644 --- a/patch/patches/net_filter_515.patch +++ b/patch/patches/net_filter_515.patch @@ -45,10 +45,10 @@ index 78b8c34..387bea5 100644 friend class GZipUnitTest; friend class SdchFilterChainingTest; diff --git url_request/url_request_job.cc url_request/url_request_job.cc -index b9c8646..f1ed586 100644 +index dc42edf..fb3ecf1 100644 --- url_request/url_request_job.cc +++ url_request/url_request_job.cc -@@ -444,6 +444,9 @@ void URLRequestJob::NotifyHeadersComplete() { +@@ -503,6 +503,9 @@ void URLRequestJob::NotifyHeadersComplete() { if (request_->status().is_success()) filter_ = SetupFilter(); diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 474cddee9..11f601011 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,8 +1,8 @@ diff --git url_request.h url_request.h -index a4dba71..bde4569 100644 +index 85eb2e4..08bb463 100644 --- url_request.h +++ url_request.h -@@ -648,10 +648,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), +@@ -654,10 +654,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), // or after the response headers are received. void GetConnectionAttempts(ConnectionAttempts* out) const; diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index 032bfdaed..e54e17378 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,5 +1,5 @@ diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp -index 43ca318..ca42502 100644 +index 646fb46..42e8bdf 100644 --- fpdfsdk/fpdfview.cpp +++ fpdfsdk/fpdfview.cpp @@ -20,6 +20,7 @@ @@ -10,7 +10,7 @@ index 43ca318..ca42502 100644 #include "public/fpdf_ext.h" #include "public/fpdf_progressive.h" #include "third_party/base/numerics/safe_conversions_impl.h" -@@ -291,6 +292,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() { +@@ -288,6 +289,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() { #endif // PDF_ENABLE_XFA CPDF_ModuleMgr::Destroy(); CFX_GEModule::Destroy(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 37de2163e..9037ca2e7 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h -index c58e881..ccce3c1 100644 +index da2c4d1..9e777de 100644 --- public/common/common_param_traits_macros.h +++ public/common/common_param_traits_macros.h -@@ -208,6 +208,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -212,6 +212,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 c58e881..ccce3c1 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 21411ea..2555544 100644 +index f070324..c204659 100644 --- public/common/web_preferences.cc +++ public/common/web_preferences.cc -@@ -167,6 +167,7 @@ WebPreferences::WebPreferences() +@@ -177,6 +177,7 @@ WebPreferences::WebPreferences() pinch_overlay_scrollbar_thickness(0), use_solid_color_scrollbars(false), navigate_on_drag_drop(true), @@ -23,10 +23,10 @@ index 21411ea..2555544 100644 inert_visual_viewport(false), record_whole_document(false), diff --git public/common/web_preferences.h public/common/web_preferences.h -index b30f22a9..7779d08 100644 +index 3fb1a79..b97ab57 100644 --- public/common/web_preferences.h +++ public/common/web_preferences.h -@@ -178,6 +178,7 @@ struct CONTENT_EXPORT WebPreferences { +@@ -189,6 +189,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 b30f22a9..7779d08 100644 bool inert_visual_viewport; bool record_whole_document; diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc -index bec4737..ea6262b 100644 +index be61076..6397124 100644 --- renderer/render_view_impl.cc +++ renderer/render_view_impl.cc -@@ -1468,6 +1468,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal( +@@ -1466,6 +1466,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal( blink::WebView* web_view, CompositorDependencies* compositor_deps) { ApplyWebPreferences(prefs, web_view); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 18c868e32..0d2fd3402 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -136,7 +136,7 @@ index 705211b..a524333 100644 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 fa79d1a..3cf2f1d 100644 +index b25340c..47d419e 100644 --- printing/renderer/print_web_view_helper.cc +++ printing/renderer/print_web_view_helper.cc @@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f; @@ -199,7 +199,7 @@ index fa79d1a..3cf2f1d 100644 // static - Not anonymous so that platform implementations can use it. void PrintWebViewHelper::PrintHeaderAndFooter( blink::WebCanvas* canvas, -@@ -560,7 +555,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter( +@@ -561,7 +556,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter( web_view->close(); frame->close(); } @@ -207,7 +207,7 @@ index fa79d1a..3cf2f1d 100644 // static - Not anonymous so that platform implementations can use it. float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame, -@@ -840,6 +834,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view, +@@ -842,6 +836,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 fa79d1a..3cf2f1d 100644 is_loading_(false), is_scripted_preview_delayed_(false), ipc_nesting_level_(0), -@@ -898,10 +893,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame, +@@ -900,10 +895,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame, return; if (g_is_preview_enabled) { @@ -226,7 +226,7 @@ index fa79d1a..3cf2f1d 100644 } else { #if defined(ENABLE_BASIC_PRINTING) Print(frame, blink::WebNode(), true); -@@ -925,14 +918,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) { +@@ -927,14 +920,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 fa79d1a..3cf2f1d 100644 IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked, SetScriptedPrintBlocked) IPC_MESSAGE_UNHANDLED(handled = false) -@@ -988,7 +977,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() { +@@ -990,7 +979,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() { } #endif // defined(ENABLE_BASIC_PRINTING) @@ -249,7 +249,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::OnPrintForPrintPreview( const base::DictionaryValue& job_settings) { CHECK_LE(ipc_nesting_level_, 1); -@@ -1053,7 +1041,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview( +@@ -1055,7 +1043,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview( DidFinishPrinting(FAIL_PRINT); } } @@ -257,7 +257,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout( const PageSizeMargins& page_layout_in_points, -@@ -1078,7 +1065,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo( +@@ -1080,7 +1067,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -265,7 +265,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) return; -@@ -1239,7 +1225,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() { +@@ -1241,7 +1227,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() { return true; } @@ -274,7 +274,7 @@ index fa79d1a..3cf2f1d 100644 bool PrintWebViewHelper::RenderPreviewPage( int page_number, const PrintMsg_Print_Params& print_params) { -@@ -1269,7 +1255,7 @@ bool PrintWebViewHelper::RenderPreviewPage( +@@ -1271,7 +1257,7 @@ bool PrintWebViewHelper::RenderPreviewPage( } return PreviewPageRendered(page_number, draft_metafile.get()); } @@ -283,7 +283,7 @@ index fa79d1a..3cf2f1d 100644 bool PrintWebViewHelper::FinalizePrintReadyDocument() { DCHECK(!is_print_ready_metafile_sent_); -@@ -1299,7 +1285,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() { +@@ -1301,7 +1287,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() { Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params)); return true; } @@ -291,7 +291,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1314,7 +1299,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) { +@@ -1316,7 +1301,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) { is_scripted_printing_blocked_ = blocked; } @@ -299,7 +299,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { if (ipc_nesting_level_ > 1) return; -@@ -1325,7 +1309,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { +@@ -1327,7 +1311,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.isNull()) { @@ -309,7 +309,7 @@ index fa79d1a..3cf2f1d 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1333,7 +1319,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { +@@ -1335,7 +1321,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { ? PRINT_PREVIEW_USER_INITIATED_SELECTION : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); } @@ -317,7 +317,7 @@ index fa79d1a..3cf2f1d 100644 bool PrintWebViewHelper::IsPrintingEnabled() { bool result = false; -@@ -1359,11 +1344,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) { +@@ -1361,11 +1346,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 fa79d1a..3cf2f1d 100644 } else { #if defined(ENABLE_BASIC_PRINTING) blink::WebNode duplicate_node(node); -@@ -1429,7 +1412,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { +@@ -1431,7 +1414,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -338,7 +338,7 @@ index fa79d1a..3cf2f1d 100644 case FAIL_PREVIEW: int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; -@@ -1441,7 +1423,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { +@@ -1443,7 +1425,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { } print_preview_context_.Failed(notify_browser_of_print_failure_); break; @@ -346,7 +346,7 @@ index fa79d1a..3cf2f1d 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1573,7 +1554,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1575,7 +1556,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -354,7 +354,7 @@ index fa79d1a..3cf2f1d 100644 bool PrintWebViewHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1682,7 +1662,6 @@ bool PrintWebViewHelper::UpdatePrintSettings( +@@ -1684,7 +1664,6 @@ bool PrintWebViewHelper::UpdatePrintSettings( return true; } @@ -362,7 +362,7 @@ index fa79d1a..3cf2f1d 100644 #if defined(ENABLE_BASIC_PRINTING) bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame, -@@ -1790,7 +1769,6 @@ void PrintWebViewHelper::PrintPageInternal( +@@ -1792,7 +1771,6 @@ void PrintWebViewHelper::PrintPageInternal( MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile); @@ -370,7 +370,7 @@ index fa79d1a..3cf2f1d 100644 if (params.params.display_header_footer) { // TODO(thestig): Figure out why Linux needs this. It is almost certainly // |printingMinimumShrinkFactor| from Blink. -@@ -1805,7 +1783,6 @@ void PrintWebViewHelper::PrintPageInternal( +@@ -1807,7 +1785,6 @@ void PrintWebViewHelper::PrintPageInternal( scale_factor / fudge_factor, page_layout_in_points, params.params); } @@ -378,7 +378,7 @@ index fa79d1a..3cf2f1d 100644 float webkit_scale_factor = RenderPageContent(frame, params.page_number, canvas_area, content_area, -@@ -1841,7 +1818,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem( +@@ -1843,7 +1820,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem( return true; } @@ -386,7 +386,7 @@ index fa79d1a..3cf2f1d 100644 void PrintWebViewHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -1969,7 +1945,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number, +@@ -1971,7 +1947,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number, Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params)); return true; } diff --git a/patch/patches/public_browser_1257.patch b/patch/patches/public_browser_1257.patch index 9fbce17b0..61c5bef2a 100644 --- a/patch/patches/public_browser_1257.patch +++ b/patch/patches/public_browser_1257.patch @@ -14,7 +14,7 @@ index fa0afb5..d677b31 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git web_contents.h web_contents.h -index 90b647e..9fcedc0 100644 +index 9ccb6fe..d8561f9 100644 --- web_contents.h +++ web_contents.h @@ -55,8 +55,10 @@ class PageState; diff --git a/patch/patches/render_view_host_impl_1392.patch b/patch/patches/render_view_host_impl_1392.patch index f38e2e6b2..875e8e609 100644 --- a/patch/patches/render_view_host_impl_1392.patch +++ b/patch/patches/render_view_host_impl_1392.patch @@ -1,8 +1,8 @@ diff --git render_view_host_impl.h render_view_host_impl.h -index 495ee21..952ddc8 100644 +index 5f850f2..1cae2ee 100644 --- render_view_host_impl.h +++ render_view_host_impl.h -@@ -196,6 +196,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost, +@@ -200,6 +200,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost, void set_is_swapped_out(bool is_swapped_out) { is_swapped_out_ = is_swapped_out; } diff --git a/patch/patches/render_widget_host_1070383005.patch b/patch/patches/render_widget_host_1070383005.patch index c2413eccf..d749fb98a 100644 --- a/patch/patches/render_widget_host_1070383005.patch +++ b/patch/patches/render_widget_host_1070383005.patch @@ -1,8 +1,8 @@ diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm -index 68b3476..5fd78d0 100644 +index b7991fa..7e27615 100644 --- render_widget_host_view_mac.mm +++ render_widget_host_view_mac.mm -@@ -575,9 +575,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget, +@@ -573,9 +573,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]); diff --git a/patch/patches/spellcheck_137.patch b/patch/patches/spellcheck_137.patch index 9aa8547df..7305ad5af 100644 --- a/patch/patches/spellcheck_137.patch +++ b/patch/patches/spellcheck_137.patch @@ -1,5 +1,5 @@ diff --git spellcheck_factory.cc spellcheck_factory.cc -index 3fd085b..b2705bf 100644 +index deabf96..3d34032 100644 --- spellcheck_factory.cc +++ spellcheck_factory.cc @@ -16,6 +16,13 @@ diff --git a/patch/patches/views_1749.patch b/patch/patches/views_1749.patch index 8539e7ba6..b428d7998 100644 --- a/patch/patches/views_1749.patch +++ b/patch/patches/views_1749.patch @@ -1,8 +1,8 @@ diff --git controls/button/menu_button.cc controls/button/menu_button.cc -index 20b3452..ec73e01 100644 +index b891849..a41dc85 100644 --- controls/button/menu_button.cc +++ controls/button/menu_button.cc -@@ -195,7 +195,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) { +@@ -198,7 +198,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 20b3452..ec73e01 100644 kMenuMarkerPaddingRight, 0); } -@@ -324,7 +324,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() { +@@ -327,7 +327,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() { gfx::Size s = size(); if (show_menu_marker_) { @@ -20,7 +20,7 @@ index 20b3452..ec73e01 100644 kMenuMarkerPaddingRight); } -@@ -412,4 +412,10 @@ int MenuButton::GetMaximumScreenXCoordinate() { +@@ -415,4 +415,10 @@ int MenuButton::GetMaximumScreenXCoordinate() { return monitor_bounds.right() - 1; } diff --git a/patch/patches/views_widget_180_1481_1677_1749.patch b/patch/patches/views_widget_180_1481_1677_1749.patch index 3a829d05b..999bd28b6 100644 --- a/patch/patches/views_widget_180_1481_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1677_1749.patch @@ -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 f65febf0..9ffc653 100644 +index d9b97ff..9ac9883 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -770,6 +770,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() { +@@ -769,6 +769,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() { } } #endif @@ -17,7 +17,7 @@ index f65febf0..9ffc653 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 c4b9d14..c8f8cb2 100644 +index 0b34ce0..de4eae7 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -42,6 +42,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase() @@ -40,7 +40,7 @@ index c4b9d14..c8f8cb2 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 772dca1..d28c177 100644 +index f6a25c1..eceab0b 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -101,6 +101,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, @@ -51,7 +51,7 @@ index 772dca1..d28c177 100644 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. -@@ -455,6 +456,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, +@@ -456,6 +457,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, // destroyed before the RWHV is destroyed. TextInputManager* text_input_manager_; @@ -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 fd8de8f..e7750f7 100644 +index de96b63..ed0ba73 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( @@ -146,7 +146,7 @@ index fd8de8f..e7750f7 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 e568375..6865670 100644 +index e71604d..937bf91 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -137,6 +137,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -157,7 +157,7 @@ index e568375..6865670 100644 bool WantsMouseEventsWhenInactive() const override; bool WidgetSizeIsClientSize() const override; bool IsModal() const override; -@@ -250,6 +251,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -251,6 +252,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -169,7 +169,7 @@ index e568375..6865670 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 586d36d..76c8f1e 100644 +index 82ba30c..c27b201 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( @@ -227,8 +227,8 @@ index 586d36d..76c8f1e 100644 return bounds_in_pixels_.origin(); } -@@ -1151,9 +1160,15 @@ void DesktopWindowTreeHostX11::InitX11Window( - use_argb_visual_ = true; +@@ -1154,9 +1163,15 @@ void DesktopWindowTreeHostX11::InitX11Window( + None; } + gfx::AcceleratedWidget parent_widget = params.parent_widget; @@ -244,7 +244,7 @@ index 586d36d..76c8f1e 100644 bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.height(), 0, // border width -@@ -1784,6 +1799,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -1787,6 +1802,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -473,10 +473,10 @@ index b843416..8b81a51 100644 } case Widget::InitParams::TYPE_CONTROL: diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index d8c14ee..ca22040 100644 +index b035fd3..81dd204 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -855,6 +855,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() { +@@ -866,6 +866,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() { } else { style &= ~WS_MINIMIZEBOX; } @@ -485,7 +485,7 @@ index d8c14ee..ca22040 100644 SetWindowLong(hwnd(), GWL_STYLE, style); } -@@ -2500,8 +2502,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2522,8 +2524,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,7 +501,7 @@ index d8c14ee..ca22040 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 631f359..9a59aff 100644 +index f9e027d..5483352 100644 --- ui/views/win/hwnd_message_handler_delegate.h +++ ui/views/win/hwnd_message_handler_delegate.h @@ -57,6 +57,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index fe9ffc719..5f0ae6c80 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp -index f3d796c..bc0ee90 100644 +index 6b3b603..0530199 100644 --- Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp -@@ -881,7 +881,7 @@ bool ChromeClientImpl::hasOpenedPopup() const +@@ -883,7 +883,7 @@ bool ChromeClientImpl::hasOpenedPopup() const PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { notifyPopupOpeningObservers(); @@ -12,10 +12,10 @@ index f3d796c..bc0ee90 100644 DCHECK(RuntimeEnabledFeatures::pagePopupEnabled()); diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp -index 3df57d6..07c2307 100644 +index 3e92e32..049d5d8 100644 --- Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp -@@ -419,6 +419,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) +@@ -422,6 +422,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit , m_enableFakePageScaleAnimationForTesting(false) , m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationUseAnchor(false) @@ -23,7 +23,7 @@ index 3df57d6..07c2307 100644 , m_doingDragAndDrop(false) , m_ignoreInputEvents(false) , m_compositorDeviceScaleFactorOverride(0) -@@ -4110,9 +4111,14 @@ void WebViewImpl::pageScaleFactorChanged() +@@ -4067,9 +4068,14 @@ void WebViewImpl::pageScaleFactorChanged() m_client->pageScaleFactorChanged(); } @@ -40,10 +40,10 @@ index 3df57d6..07c2307 100644 void WebViewImpl::startDragging(LocalFrame* frame, diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h -index 716e264..9726e8f 100644 +index 2c3e9a0..7d6a2dc 100644 --- Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h -@@ -387,7 +387,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 716e264..9726e8f 100644 bool shouldAutoResize() const { -@@ -673,6 +674,8 @@ private: +@@ -675,6 +676,8 @@ private: float m_fakePageScaleAnimationPageScaleFactor; bool m_fakePageScaleAnimationUseAnchor; @@ -63,10 +63,10 @@ index 716e264..9726e8f 100644 bool m_ignoreInputEvents; diff --git public/web/WebView.h public/web/WebView.h -index bca14ae..10b7ff6 100644 +index fe06749..22895f9 100644 --- public/web/WebView.h +++ public/web/WebView.h -@@ -445,6 +445,7 @@ public: +@@ -438,6 +438,7 @@ public: // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void setUseExternalPopupMenus(bool); diff --git a/patch/patches/zlib.patch b/patch/patches/zlib.patch index 9a3a9c9c1..9165c63a8 100644 --- a/patch/patches/zlib.patch +++ b/patch/patches/zlib.patch @@ -1,5 +1,5 @@ diff --git contrib/minizip/unzip.c contrib/minizip/unzip.c -index af59b80..ee3c0fd 100644 +index 2d5f0b1..d3d5476 100644 --- contrib/minizip/unzip.c +++ contrib/minizip/unzip.c @@ -69,7 +69,7 @@ diff --git a/tests/unittests/os_rendering_unittest.cc b/tests/unittests/os_rendering_unittest.cc index 8dc8e3748..85557015f 100644 --- a/tests/unittests/os_rendering_unittest.cc +++ b/tests/unittests/os_rendering_unittest.cc @@ -73,7 +73,7 @@ const CefRect kExpectedRectLI[] = { const CefRect kEditBoxRect(412, 245, 60, 22); const CefRect kNavigateButtonRect(360, 271, 140, 22); const CefRect kSelectRect(467, 22, 75, 20); -const CefRect kExpandedSelectRect(463, 47, 81, 342); +const CefRect kExpandedSelectRect(463, 42, 81, 342); const CefRect kDropDivRect(8, 332, 52, 52); const CefRect kDragDivRect(71, 342, 30, 30); const int kDefaultVerticalScrollbarWidth = 17; @@ -89,7 +89,7 @@ const CefRect kDragDivRect(60, 330, 52, 52); const CefRect kEditBoxRect(434, 246, 60, 20); const CefRect kNavigateButtonRect(380, 271, 140, 22); const CefRect kSelectRect(467, 22, 75, 20); -const CefRect kExpandedSelectRect(463, 47, 81, 342); +const CefRect kExpandedSelectRect(463, 42, 81, 342); const CefRect kDropDivRect(8, 332, 52, 52); const CefRect kDragDivRect(71, 342, 30, 30); const int kDefaultVerticalScrollbarWidth = 14; diff --git a/tools/gclient_hook.py b/tools/gclient_hook.py index cd7d07c69..a06919292 100644 --- a/tools/gclient_hook.py +++ b/tools/gclient_hook.py @@ -44,6 +44,8 @@ print "\nGenerating CEF project files..." use_gn = bool(int(os.environ.get('CEF_USE_GN', '0'))) gn_args = {} +custom_toolchain = False + if platform == 'windows': # Force use of the locally installed version of Visual Studio. if not 'DEPOT_TOOLS_WIN_TOOLCHAIN' in os.environ: @@ -61,7 +63,6 @@ if platform == 'windows': # set INCLUDE= # set PATH= # set LIB= - custom_toolchain = False if bool(int(os.environ.get('WIN_CUSTOM_TOOLCHAIN', '0'))): required_vars = [ 'GYP_MSVS_VERSION', diff --git a/tools/make_distrib.py b/tools/make_distrib.py index c1bba45f1..bada1ea8c 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -514,7 +514,9 @@ if platform == 'windows': 'libGLESv2.dll', 'natives_blob.bin', 'snapshot_blob.bin', - 'widevinecdmadapter.dll', + # Should match the output path from src/media/cdm_paths.gypi. + 'WidevineCdm\\_platform_specific\\win_%s\\widevinecdmadapter.dll' % \ + ('x64' if options.x64build else 'x86'), ] libcef_dll_file = 'libcef.dll.lib' @@ -537,7 +539,7 @@ if platform == 'windows': make_dir(dst_dir, options.quiet) copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet) for binary in binaries: - copy_file(os.path.join(build_dir, binary), os.path.join(dst_dir, binary), options.quiet) + copy_file(os.path.join(build_dir, binary), os.path.join(dst_dir, os.path.basename(binary)), options.quiet) copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \ options.quiet) combine_libs(build_dir, sandbox_libs, os.path.join(dst_dir, 'cef_sandbox.lib'));