diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 919a269fd..b4155ed1e 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': '59d4494849b405682265ed5d3f5164573b9a939b', + 'chromium_checkout': 'c03558c9998c74e25c302a1f5e9e164b572b9373', } diff --git a/cef.gyp b/cef.gyp index 479f543c2..d2e73f724 100644 --- a/cef.gyp +++ b/cef.gyp @@ -866,6 +866,7 @@ # zip_analyzer_results.h via chrome_utility_messages.h '<(DEPTH)/chrome/chrome.gyp:safe_browsing_proto', '<(DEPTH)/components/components.gyp:crash_component_breakpad_mac_to_be_deleted', + '<(DEPTH)/components/components.gyp:devtools_http_handler', '<(DEPTH)/components/components.gyp:keyed_service_content', '<(DEPTH)/components/components.gyp:keyed_service_core', '<(DEPTH)/components/components.gyp:navigation_interception', @@ -1303,7 +1304,7 @@ 'libcef/browser/window_x11.h', ], }], - ['os_posix == 1 and OS != "mac" and android_webview_build != 1', { + ['os_posix == 1 and OS != "mac"', { 'dependencies': [ '<(DEPTH)/components/components.gyp:breakpad_host', ], diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index be594cd8a..4fa1605a9 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -479,7 +479,7 @@ CefRefPtr CefBrowserHostImpl::CreateInternal( #if defined(OS_LINUX) || defined(OS_ANDROID) content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs(); CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, - (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(true), NULL))); + (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL))); prefs->should_antialias_text = params.antialiasing; prefs->use_subpixel_positioning = params.subpixel_positioning; prefs->hinting = params.hinting; @@ -2183,14 +2183,6 @@ bool CefBrowserHostImpl::TakeFocus(content::WebContents* source, return false; } -void CefBrowserHostImpl::WebContentsFocused(content::WebContents* contents) { - if (client_.get()) { - CefRefPtr handler = client_->GetFocusHandler(); - if (handler.get()) - handler->OnGotFocus(this); - } -} - bool CefBrowserHostImpl::HandleContextMenu( const content::ContextMenuParams& params) { if (!menu_creator_.get()) @@ -2641,6 +2633,14 @@ bool CefBrowserHostImpl::OnMessageReceived(const IPC::Message& message) { return handled; } +void CefBrowserHostImpl::OnWebContentsFocused() { + if (client_.get()) { + CefRefPtr handler = client_->GetFocusHandler(); + if (handler.get()) + handler->OnGotFocus(this); + } +} + bool CefBrowserHostImpl::Send(IPC::Message* message) { if (CEF_CURRENTLY_ON_UIT()) { if (queue_messages_) { diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index bd5da2521..fde73c367 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -363,7 +363,6 @@ class CefBrowserHostImpl : public CefBrowserHost, bool* proceed_to_fire_unload) override; bool TakeFocus(content::WebContents* source, bool reverse) override; - void WebContentsFocused(content::WebContents* contents) override; bool HandleContextMenu( const content::ContextMenuParams& params) override; bool PreHandleKeyboardEvent( @@ -451,6 +450,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void DidUpdateFaviconURL( const std::vector& candidates) override; bool OnMessageReceived(const IPC::Message& message) override; + void OnWebContentsFocused() override; // Override to provide a thread safe implementation. bool Send(IPC::Message* message) override; diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index bd3608f1d..e339c454b 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -45,6 +45,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/storage_quota_params.h" #include "content/public/common/web_preferences.h" +#include "gin/v8_initializer.h" #include "third_party/WebKit/public/web/WebWindowFeatures.h" #include "ui/base/ui_base_switches.h" #include "url/gurl.h" @@ -642,6 +643,15 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( arraysize(kSwitchNames)); } +#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(V8_USE_EXTERNAL_STARTUP_DATA) + if (process_type != switches::kZygoteProcess) { + command_line->AppendSwitch(switches::kV8NativesPassedByFD); + command_line->AppendSwitch(switches::kV8SnapshotPassedByFD); + } +#endif // V8_USE_EXTERNAL_STARTUP_DATA +#endif // OS_POSIX && !OS_MACOSX + #if defined(OS_LINUX) if (process_type == switches::kZygoteProcess) { // Propagate the following switches to the zygone command line (along with @@ -902,6 +912,21 @@ void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, content::FileDescriptorInfo* mappings) { +#if defined(V8_USE_EXTERNAL_STARTUP_DATA) + if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { + int v8_natives_fd = -1; + int v8_snapshot_fd = -1; + if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, + &v8_snapshot_fd)) { + v8_natives_fd_.reset(v8_natives_fd); + v8_snapshot_fd_.reset(v8_snapshot_fd); + } + } + DCHECK(v8_natives_fd_.get() != -1 && v8_snapshot_fd_.get() != -1); + mappings->Share(kV8NativesDataDescriptor, v8_natives_fd_.get()); + mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get()); +#endif // V8_USE_EXTERNAL_STARTUP_DATA + int crash_signal_fd = GetCrashSignalFD(command_line); if (crash_signal_fd >= 0) { mappings->Share(kCrashDumpSignal, crash_signal_fd); diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index ed89d8b1f..86f59fb56 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -168,6 +168,11 @@ class CefContentBrowserClient : public content::ContentBrowserClient { scoped_ptr resource_dispatcher_host_delegate_; +#if defined(OS_POSIX) && !defined(OS_MACOSX) + base::ScopedFD v8_natives_fd_; + base::ScopedFD v8_snapshot_fd_; +#endif + base::Lock browser_info_lock_; // Access must be protected by |browser_info_lock_|. diff --git a/libcef/browser/devtools_delegate.cc b/libcef/browser/devtools_delegate.cc index 5ab22b926..2931c69bc 100644 --- a/libcef/browser/devtools_delegate.cc +++ b/libcef/browser/devtools_delegate.cc @@ -17,7 +17,7 @@ #include "base/strings/utf_string_conversions.h" #include "content/public/browser/devtools_agent_host.h" #include "base/time/time.h" -#include "content/public/browser/devtools_http_handler.h" +#include "content/public/browser/devtools_frontend_host.h" #include "content/public/browser/devtools_target.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/navigation_entry.h" @@ -42,7 +42,7 @@ const char kTargetTypeOther[] = "other"; const int kBackLog = 10; class TCPServerSocketFactory - : public content::DevToolsHttpHandler::ServerSocketFactory { + : public devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory { public: TCPServerSocketFactory(const std::string& address, uint16 port) : address_(address), port_(port) { @@ -65,10 +65,11 @@ class TCPServerSocketFactory DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); }; -scoped_ptr +scoped_ptr CreateSocketFactory(uint16 port) { - return scoped_ptr( - new TCPServerSocketFactory("127.0.0.1", port)); + return scoped_ptr< + devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory>( + new TCPServerSocketFactory("127.0.0.1", port)); } class Target : public content::DevToolsTarget { @@ -137,11 +138,15 @@ bool Target::Close() const { // CefDevToolsDelegate CefDevToolsDelegate::CefDevToolsDelegate(uint16 port) { - devtools_http_handler_.reset(content::DevToolsHttpHandler::Start( + devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler( CreateSocketFactory(port), std::string(), this, - base::FilePath())); + new CefDevToolsManagerDelegate(), + base::FilePath(), + base::FilePath(), + std::string(), + CefContentClient::Get()->GetUserAgent())); } CefDevToolsDelegate::~CefDevToolsDelegate() { @@ -152,7 +157,8 @@ void CefDevToolsDelegate::Stop() { // Release the reference before deleting the handler. Deleting the handler // will delete |this| and no members of |this| should be accessed after that // call. - content::DevToolsHttpHandler* handler = devtools_http_handler_.release(); + devtools_http_handler::DevToolsHttpHandler* handler = + devtools_http_handler_.release(); delete handler; } @@ -161,12 +167,9 @@ std::string CefDevToolsDelegate::GetDiscoveryPageHTML() { IDR_CEF_DEVTOOLS_DISCOVERY_PAGE, ui::SCALE_FACTOR_NONE).as_string(); } -bool CefDevToolsDelegate::BundlesFrontendResources() { - return true; -} - -base::FilePath CefDevToolsDelegate::GetDebugFrontendDir() { - return base::FilePath(); +std::string CefDevToolsDelegate::GetFrontendResource( + const std::string& path) { + return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); } std::string CefDevToolsDelegate::GetChromeDevToolsURL() { diff --git a/libcef/browser/devtools_delegate.h b/libcef/browser/devtools_delegate.h index 8d0161bb5..de67d6de9 100644 --- a/libcef/browser/devtools_delegate.h +++ b/libcef/browser/devtools_delegate.h @@ -12,16 +12,17 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "components/devtools_http_handler/devtools_http_handler.h" +#include "components/devtools_http_handler/devtools_http_handler_delegate.h" #include "content/public/browser/devtools_agent_host.h" -#include "content/public/browser/devtools_http_handler.h" -#include "content/public/browser/devtools_http_handler_delegate.h" #include "content/public/browser/devtools_manager_delegate.h" namespace content { class RenderViewHost; } -class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate { +class CefDevToolsDelegate : + public devtools_http_handler::DevToolsHttpHandlerDelegate { public: explicit CefDevToolsDelegate(uint16 port); ~CefDevToolsDelegate() override; @@ -31,14 +32,13 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate { // DevToolsHttpHandlerDelegate overrides. std::string GetDiscoveryPageHTML() override; - bool BundlesFrontendResources() override; - base::FilePath GetDebugFrontendDir() override; + std::string GetFrontendResource(const std::string& path) override; // Returns the chrome-devtools URL. std::string GetChromeDevToolsURL(); private: - scoped_ptr devtools_http_handler_; + scoped_ptr devtools_http_handler_; DISALLOW_COPY_AND_ASSIGN(CefDevToolsDelegate); }; diff --git a/libcef/browser/devtools_frontend.cc b/libcef/browser/devtools_frontend.cc index 42e0b1e24..56d36add4 100644 --- a/libcef/browser/devtools_frontend.cc +++ b/libcef/browser/devtools_frontend.cc @@ -17,7 +17,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/devtools_http_handler.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" @@ -251,6 +250,22 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( new ResponseWriter(weak_factory_.GetWeakPtr(), stream_id))); fetcher->Start(); return; + } else if (method == "getPreferences") { + SendMessageAck(request_id, &preferences_); + return; + } else if (method == "setPreference") { + std::string name; + std::string value; + if (!params->GetString(0, &name) || + !params->GetString(1, &value)) { + return; + } + preferences_.SetStringWithoutPathExpansion(name, value); + } else if (method == "removePreference") { + std::string name; + if (!params->GetString(0, &name)) + return; + preferences_.RemoveWithoutPathExpansion(name, nullptr); } else { return; } diff --git a/libcef/browser/devtools_frontend.h b/libcef/browser/devtools_frontend.h index a0f996c23..ec58073c5 100644 --- a/libcef/browser/devtools_frontend.h +++ b/libcef/browser/devtools_frontend.h @@ -12,6 +12,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" +#include "base/values.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_frontend_host.h" #include "content/public/browser/web_contents_observer.h" @@ -64,6 +65,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver, bool replaced) override; void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, const std::string& message) override; + base::DictionaryValue* preferences() { return &preferences_; } // WebContentsObserver overrides void RenderViewCreated(content::RenderViewHost* render_view_host) override; @@ -87,6 +89,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver, scoped_ptr frontend_host_; using PendingRequestsMap = std::map; PendingRequestsMap pending_requests_; + base::DictionaryValue preferences_; base::WeakPtrFactory weak_factory_; DISALLOW_COPY_AND_ASSIGN(CefDevToolsFrontend); diff --git a/libcef/browser/javascript_dialog_manager.cc b/libcef/browser/javascript_dialog_manager.cc index 6e8ce3103..83e360188 100644 --- a/libcef/browser/javascript_dialog_manager.cc +++ b/libcef/browser/javascript_dialog_manager.cc @@ -208,7 +208,7 @@ void CefJavaScriptDialogManager::CancelActiveAndPendingDialogs( #endif } -void CefJavaScriptDialogManager::WebContentsDestroyed( +void CefJavaScriptDialogManager::ResetDialogState( content::WebContents* web_contents) { } diff --git a/libcef/browser/javascript_dialog_manager.h b/libcef/browser/javascript_dialog_manager.h index 221050743..fa02a67ac 100644 --- a/libcef/browser/javascript_dialog_manager.h +++ b/libcef/browser/javascript_dialog_manager.h @@ -41,7 +41,7 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager { void CancelActiveAndPendingDialogs( content::WebContents* web_contents) override; - void WebContentsDestroyed( + void ResetDialogState( content::WebContents* web_contents) override; // Called by the CefJavaScriptDialog when it closes. diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index d5c1a6241..c16099e4b 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -541,13 +541,13 @@ void AccessorSetterCallbackImpl( } } -v8::Local CallV8Function(v8::Local context, - v8::Local function, - v8::Local receiver, - int argc, - v8::Local args[], - v8::Isolate* isolate) { - v8::Local func_rv; +v8::MaybeLocal CallV8Function(v8::Local context, + v8::Local function, + v8::Local receiver, + int argc, + v8::Local args[], + v8::Isolate* isolate) { + v8::MaybeLocal func_rv; // Execute the function call using the ScriptController so that inspector // instrumentation works. @@ -954,14 +954,14 @@ bool CefV8ContextImpl::Eval(const CefString& code, retval = NULL; exception = NULL; - v8::Local func_rv = + v8::MaybeLocal func_rv = CallV8Function(context, func, obj, 1, &code_val, handle_->isolate()); if (try_catch.HasCaught()) { exception = new CefV8ExceptionImpl(try_catch.Message()); return false; } else if (!func_rv.IsEmpty()) { - retval = new CefV8ValueImpl(isolate, func_rv); + retval = new CefV8ValueImpl(isolate, func_rv.ToLocalChecked()); } return true; } @@ -1999,12 +1999,12 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( v8::TryCatch try_catch; try_catch.SetVerbose(true); - v8::Local func_rv = + v8::MaybeLocal func_rv = CallV8Function(context_local, func, recv, argc, argv, handle_->isolate()); if (!HasCaught(try_catch) && !func_rv.IsEmpty()) - retval = new CefV8ValueImpl(isolate, func_rv); + retval = new CefV8ValueImpl(isolate, func_rv.ToLocalChecked()); } if (argv) diff --git a/libcef/renderer/webkit_glue.h b/libcef/renderer/webkit_glue.h index b7d8a427c..d18c707c3 100644 --- a/libcef/renderer/webkit_glue.h +++ b/libcef/renderer/webkit_glue.h @@ -10,12 +10,6 @@ #include "base/basictypes.h" #include "third_party/skia/include/core/SkColor.h" -namespace v8 { -class Context; -template class Handle; -class Isolate; -} - namespace blink { class WebFrame; class WebNode; diff --git a/libcef/resources/cef_strings.grd b/libcef/resources/cef_strings.grd index dc68c80bd..b8967af54 100644 --- a/libcef/resources/cef_strings.grd +++ b/libcef/resources/cef_strings.grd @@ -327,6 +327,11 @@ need to be translated for each locale.--> The selected printer is not available or not installed correctly. Check your printer or try selecting another printer. + + + EMF Convertor + + diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index 92053b4bc..d3c8fb3e5 100644 --- a/patch/patches/browser_web_contents_1257.patch +++ b/patch/patches/browser_web_contents_1257.patch @@ -1,5 +1,5 @@ diff --git web_contents_impl.cc web_contents_impl.cc -index 24122cd..52cd0c6 100644 +index 3ce4b68..465b5e1 100644 --- web_contents_impl.cc +++ web_contents_impl.cc @@ -1205,22 +1205,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { @@ -48,7 +48,7 @@ index 24122cd..52cd0c6 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1551,6 +1558,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1556,6 +1563,9 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -58,7 +58,7 @@ index 24122cd..52cd0c6 100644 if (delegate_ && !delegate_->ShouldCreateWebContents(this, route_id, -@@ -1559,7 +1569,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1564,7 +1574,9 @@ void WebContentsImpl::CreateNewWindow( params.frame_name, params.target_url, partition_id, @@ -69,7 +69,7 @@ index 24122cd..52cd0c6 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 -@@ -1579,6 +1591,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -1584,6 +1596,8 @@ void WebContentsImpl::CreateNewWindow( create_params.main_frame_routing_id = main_frame_route_id; create_params.opener = this; create_params.opener_suppressed = params.opener_suppressed; diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 1f04f5cb8..ad52e0267 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git common.gypi common.gypi -index dccdfec..65b9540 100644 +index 7c3074b..53e5f64 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 318e41779..83ee3e197 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 50b6506..cc6a201 100644 +index 8ba7764..16e15da 100644 --- ui/browser.cc +++ ui/browser.cc -@@ -1592,7 +1592,9 @@ bool Browser::ShouldCreateWebContents( +@@ -1596,7 +1596,9 @@ bool Browser::ShouldCreateWebContents( const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, @@ -14,10 +14,10 @@ index 50b6506..cc6a201 100644 // If a BackgroundContents is created, suppress the normal WebContents. return !MaybeCreateBackgroundContents(route_id, diff --git ui/browser.h ui/browser.h -index 49c3962..4fac697 100644 +index f5d2c62..d8af427 100644 --- ui/browser.h +++ ui/browser.h -@@ -587,7 +587,9 @@ class Browser : public TabStripModelObserver, +@@ -590,7 +590,9 @@ class Browser : public TabStripModelObserver, const base::string16& 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 8b150368e..1a0751a09 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 4fc6a67..ed42b09 100644 +index f2d1b39..faf1f48 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -130,6 +130,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { +@@ -131,6 +131,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { scoped_ptr CreateSoftwareOutputDevice( ui::Compositor* compositor) { @@ -17,7 +17,7 @@ index 4fc6a67..ed42b09 100644 return scoped_ptr(new SoftwareOutputDeviceWin( compositor)); diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 5a6d932..07bd025 100644 +index cf115b0..cddbaa0 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -15,6 +15,7 @@ @@ -28,7 +28,7 @@ index 5a6d932..07bd025 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" -@@ -145,6 +146,17 @@ class COMPOSITOR_EXPORT CompositorBeginFrameObserver { +@@ -147,6 +148,17 @@ class COMPOSITOR_EXPORT CompositorBeginFrameObserver { virtual void OnSendBeginFrame(const cc::BeginFrameArgs& args) = 0; }; @@ -46,7 +46,7 @@ index 5a6d932..07bd025 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 -@@ -166,6 +178,9 @@ class COMPOSITOR_EXPORT Compositor +@@ -168,6 +180,9 @@ class COMPOSITOR_EXPORT Compositor // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -56,7 +56,7 @@ index 5a6d932..07bd025 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 -@@ -322,6 +337,8 @@ class COMPOSITOR_EXPORT Compositor +@@ -324,6 +339,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 9fa9a4d07..7dab8b543 100644 --- a/patch/patches/content_nav_1129.patch +++ b/patch/patches/content_nav_1129.patch @@ -19,7 +19,7 @@ index 6e66fe3..32957fc 100644 bool ContentRendererClient::ShouldFork(blink::WebFrame* frame, const GURL& url, diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h -index ca4d51d..5df0485 100644 +index e4e8f03..f4392d9 100644 --- public/renderer/content_renderer_client.h +++ public/renderer/content_renderer_client.h @@ -193,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient { @@ -39,10 +39,10 @@ index ca4d51d..5df0485 100644 // 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 diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc -index 88b26d2..07ed0cb 100644 +index 3cf9e9b..21cebc8 100644 --- renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc -@@ -4076,7 +4076,6 @@ void RenderFrameImpl::OnCommitNavigation( +@@ -4186,7 +4186,6 @@ void RenderFrameImpl::OnFailedNavigation( WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( RenderFrame* render_frame, const NavigationPolicyInfo& info) { @@ -50,7 +50,7 @@ index 88b26d2..07ed0cb 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (info.urlRequest.url() != GURL(kSwappedOutURL) && -@@ -4091,7 +4090,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( +@@ -4201,7 +4200,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( info.isRedirect)) { return blink::WebNavigationPolicyIgnore; } diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index d96c76f59..e117bca8a 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git resource_ids resource_ids -index a0c369d..bea28d8 100644 +index d56ba05..e754058 100644 --- resource_ids +++ resource_ids @@ -14,6 +14,12 @@ diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 717a82ba1..8ce0c475a 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -35,10 +35,10 @@ index 8d25487..23b25ae 100644 bool slimming_paint_enabled; diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc -index c9cbd66..8124639 100644 +index 66d2c0d..1502e0a 100644 --- renderer/render_view_impl.cc +++ renderer/render_view_impl.cc -@@ -932,6 +932,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -950,6 +950,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, settings->setJavaEnabled(prefs.java_enabled); diff --git a/patch/patches/public_browser_1257.patch b/patch/patches/public_browser_1257.patch index 8d007ed60..8677f6878 100644 --- a/patch/patches/public_browser_1257.patch +++ b/patch/patches/public_browser_1257.patch @@ -52,7 +52,7 @@ index 4380412..a67739d 100644 // Creates a new WebContents. diff --git web_contents_delegate.cc web_contents_delegate.cc -index 0e48d7c..aa46ad9 100644 +index d4028fb..285f0c3 100644 --- web_contents_delegate.cc +++ web_contents_delegate.cc @@ -133,7 +133,9 @@ bool WebContentsDelegate::ShouldCreateWebContents( @@ -67,10 +67,10 @@ index 0e48d7c..aa46ad9 100644 } diff --git web_contents_delegate.h web_contents_delegate.h -index 1367f0b..7da1128 100644 +index ef73451..17374f1 100644 --- web_contents_delegate.h +++ web_contents_delegate.h -@@ -36,9 +36,11 @@ class DownloadItem; +@@ -37,9 +37,11 @@ class DownloadItem; class JavaScriptDialogManager; class PageState; class RenderViewHost; @@ -82,7 +82,7 @@ index 1367f0b..7da1128 100644 struct ColorSuggestion; struct ContextMenuParams; struct DropData; -@@ -294,7 +296,9 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -292,7 +294,9 @@ class CONTENT_EXPORT WebContentsDelegate { const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, diff --git a/patch/patches/render_process_host_1429.patch b/patch/patches/render_process_host_1429.patch index ce7dc47d9..059006134 100644 --- a/patch/patches/render_process_host_1429.patch +++ b/patch/patches/render_process_host_1429.patch @@ -1,8 +1,8 @@ diff --git render_process_host_impl.cc render_process_host_impl.cc -index 91dd8b3..3cba806 100644 +index 1e20d8e..6c0f5f4 100644 --- render_process_host_impl.cc +++ render_process_host_impl.cc -@@ -2089,6 +2089,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, +@@ -2111,6 +2111,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, #endif RemoveUserData(kSessionStorageHolderKey); @@ -11,7 +11,7 @@ index 91dd8b3..3cba806 100644 IDMap::iterator iter(&listeners_); while (!iter.IsAtEnd()) { iter.GetCurrentValue()->OnMessageReceived( -@@ -2098,8 +2100,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, +@@ -2120,8 +2122,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, iter.Advance(); } diff --git a/patch/patches/spellcheck_137.patch b/patch/patches/spellcheck_137.patch index ed458667d..c3645da77 100644 --- a/patch/patches/spellcheck_137.patch +++ b/patch/patches/spellcheck_137.patch @@ -1,8 +1,8 @@ diff --git spellcheck_factory.cc spellcheck_factory.cc -index 7d7e1df..b623657 100644 +index bd4ac1f..ce1d28e 100644 --- spellcheck_factory.cc +++ spellcheck_factory.cc -@@ -15,6 +15,13 @@ +@@ -16,6 +16,13 @@ #include "content/public/browser/render_process_host.h" #include "ui/base/l10n/l10n_util.h" @@ -16,7 +16,7 @@ index 7d7e1df..b623657 100644 // static SpellcheckService* SpellcheckServiceFactory::GetForContext( content::BrowserContext* context) { -@@ -37,7 +44,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId( +@@ -38,7 +45,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId( // static SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() { diff --git a/patch/patches/ui_webview_1257.patch b/patch/patches/ui_webview_1257.patch index a3cdb1a4c..43b918313 100644 --- a/patch/patches/ui_webview_1257.patch +++ b/patch/patches/ui_webview_1257.patch @@ -1,8 +1,8 @@ diff --git web_dialog_view.cc web_dialog_view.cc -index 8fe27bf..04bd1a6 100644 +index 4a5a114..b28fb3c 100644 --- web_dialog_view.cc +++ web_dialog_view.cc -@@ -339,7 +339,9 @@ bool WebDialogView::ShouldCreateWebContents( +@@ -340,7 +340,9 @@ bool WebDialogView::ShouldCreateWebContents( const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, diff --git a/patch/patches/views_widget_180.patch b/patch/patches/views_widget_180.patch index 8449882a3..c7db4818a 100644 --- a/patch/patches/views_widget_180.patch +++ b/patch/patches/views_widget_180.patch @@ -43,7 +43,7 @@ index b53fc7f..0b24d2a 100644 if (input_method) input_method->OnBlur(); diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc -index 1316b8b..588e591 100644 +index 125e8f0..275e0d8 100644 --- desktop_aura/desktop_window_tree_host_x11.cc +++ desktop_aura/desktop_window_tree_host_x11.cc @@ -153,7 +153,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -108,7 +108,7 @@ index 1316b8b..588e591 100644 bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.height(), 0, // border width -@@ -1717,6 +1729,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -1719,6 +1731,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -153,10 +153,10 @@ index 94d4b1b..2609f46 100644 }; diff --git widget.cc widget.cc -index 8893d8c..e517828 100644 +index 64e131e..aec1b43 100644 --- widget.cc +++ widget.cc -@@ -111,6 +111,7 @@ Widget::InitParams::InitParams() +@@ -110,6 +110,7 @@ Widget::InitParams::InitParams() use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), parent(NULL), @@ -164,7 +164,7 @@ index 8893d8c..e517828 100644 native_widget(NULL), desktop_window_tree_host(NULL), layer_type(ui::LAYER_TEXTURED), -@@ -134,6 +135,7 @@ Widget::InitParams::InitParams(Type type) +@@ -133,6 +134,7 @@ Widget::InitParams::InitParams(Type type) use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), parent(NULL), @@ -172,7 +172,7 @@ index 8893d8c..e517828 100644 native_widget(NULL), desktop_window_tree_host(NULL), layer_type(ui::LAYER_TEXTURED), -@@ -308,7 +310,7 @@ void Widget::Init(const InitParams& in_params) { +@@ -307,7 +309,7 @@ void Widget::Init(const InitParams& in_params) { InitParams params = in_params; params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -181,7 +181,7 @@ index 8893d8c..e517828 100644 if (params.opacity == views::Widget::InitParams::INFER_OPACITY && params.type != views::Widget::InitParams::TYPE_WINDOW && -@@ -371,7 +373,12 @@ void Widget::Init(const InitParams& in_params) { +@@ -370,7 +372,12 @@ void Widget::Init(const InitParams& in_params) { Minimize(); } else if (params.delegate) { SetContentsView(params.delegate->GetContentsView()); diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 0c471fb00..4d8ec7661 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 606a744..4003e49 100644 +index b47a0c6..1c59701 100644 --- Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp -@@ -775,7 +775,7 @@ bool ChromeClientImpl::hasOpenedPopup() const +@@ -754,7 +754,7 @@ bool ChromeClientImpl::hasOpenedPopup() const PassRefPtrWillBeRawPtr ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) { @@ -12,10 +12,10 @@ index 606a744..4003e49 100644 if (RuntimeEnabledFeatures::htmlPopupMenuEnabled() && RuntimeEnabledFeatures::pagePopupEnabled()) diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp -index aa9c0c5..9f14208 100644 +index ee49268..ce794e9 100644 --- Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp -@@ -396,6 +396,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) +@@ -394,6 +394,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) , m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationUseAnchor(false) , m_contextMenuAllowed(false) @@ -23,7 +23,7 @@ index aa9c0c5..9f14208 100644 , m_doingDragAndDrop(false) , m_ignoreInputEvents(false) , m_compositorDeviceScaleFactorOverride(0) -@@ -4036,9 +4037,14 @@ void WebViewImpl::pageScaleFactorChanged() +@@ -4006,9 +4007,14 @@ void WebViewImpl::pageScaleFactorChanged() m_client->pageScaleFactorChanged(); } @@ -40,10 +40,10 @@ index aa9c0c5..9f14208 100644 void WebViewImpl::startDragging(LocalFrame* frame, diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h -index cf3f40e..f6acc16 100644 +index 285d824..765a2dd 100644 --- Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h -@@ -394,7 +394,8 @@ public: +@@ -391,7 +391,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 cf3f40e..f6acc16 100644 bool contextMenuAllowed() const { -@@ -688,6 +689,8 @@ private: +@@ -685,6 +686,8 @@ private: bool m_contextMenuAllowed; @@ -63,10 +63,10 @@ index cf3f40e..f6acc16 100644 bool m_ignoreInputEvents; diff --git public/web/WebView.h public/web/WebView.h -index a7e9f99..f671362 100644 +index be2c85b..1e0057e 100644 --- public/web/WebView.h +++ public/web/WebView.h -@@ -403,6 +403,7 @@ public: +@@ -395,6 +395,7 @@ public: // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void setUseExternalPopupMenus(bool);