From 35f9cc3377237901df1e9f0421a511f7784c07a8 Mon Sep 17 00:00:00 2001 From: GrabzIt Date: Fri, 18 Aug 2017 15:45:52 +0100 Subject: [PATCH] Update to Cef Version 59.0.0 Note that there is one breaking change as offscreen windows are now automatically transparent due to this cef change: https://bitbucket.org/chromiumembedded/cef/commits/3f71138d64586d774f645a6db5283b5205ea9df4 To make a offscreen window non-transparent you need to set the background colour as shown below were it is set to white: browserSettings.BackgroundColor = 0255255255; --- .../CefSharp.BrowserSubprocess.Core.vcxproj | 16 ++++++++++------ ...fSharp.BrowserSubprocess.Core.vcxproj.filters | 4 ++-- CefSharp.BrowserSubprocess.Core/packages.config | 2 +- CefSharp.Core/CefSharp.Core.vcxproj | 13 +++++++++---- CefSharp.Core/CefSharp.Core.vcxproj.filters | 4 ++-- CefSharp.Core/ManagedCefBrowserAdapter.cpp | 5 ++--- CefSharp.Core/WindowInfo.h | 16 ++-------------- CefSharp.Core/packages.config | 2 +- .../CefSharp.OffScreen.Example.csproj | 14 +++++++++++--- CefSharp.OffScreen.Example/packages.config | 4 ++-- .../CefSharp.WinForms.Example.csproj | 14 +++++++++++--- CefSharp.WinForms.Example/packages.config | 4 ++-- CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj | 14 +++++++++++--- CefSharp.Wpf.Example/packages.config | 4 ++-- CefSharp/IWindowInfo.cs | 7 ++----- CefSharp/Properties/AssemblyInfo.cs | 4 ++-- 16 files changed, 72 insertions(+), 55 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index 534f697702..53edc2a5e6 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -1,6 +1,6 @@  - + Debug @@ -66,9 +66,7 @@ - - 0c266be5 - + true ..\CefSharp.snk @@ -221,11 +219,17 @@ - + - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters index 31675b397c..881c585fc9 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters @@ -153,9 +153,9 @@ - + - + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config index 541a37dd8f..27d2fec6f2 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.config +++ b/CefSharp.BrowserSubprocess.Core/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj index 5785fb80c0..c6ddc274aa 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj +++ b/CefSharp.Core/CefSharp.Core.vcxproj @@ -1,6 +1,6 @@  - + Debug @@ -67,7 +67,6 @@ <_ProjectFileVersion>11.0.51106.1 - 892d6872 bin\$(Platform)\$(Configuration)\ @@ -329,11 +328,17 @@ - + - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters index ac0b7860ea..5fe799855f 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj.filters +++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters @@ -284,9 +284,9 @@ - + - + \ No newline at end of file diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core/ManagedCefBrowserAdapter.cpp index fcb14df9cb..b24e329df4 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core/ManagedCefBrowserAdapter.cpp @@ -25,12 +25,11 @@ void ManagedCefBrowserAdapter::CreateOffscreenBrowser(IntPtr windowHandle, Brows auto hwnd = static_cast(windowHandle.ToPointer()); CefWindowInfo window; - auto transparent = browserSettings->OffScreenTransparentBackground.GetValueOrDefault(true); - window.SetAsWindowless(hwnd, transparent); + window.SetAsWindowless(hwnd); CefString addressNative = StringUtils::ToNative(address); if (!CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative, - *browserSettings->_browserSettings, requestContext)) + *browserSettings->_browserSettings, *requestContext)) { throw gcnew InvalidOperationException("Failed to create offscreen browser. Call Cef.Initialize() first."); } diff --git a/CefSharp.Core/WindowInfo.h b/CefSharp.Core/WindowInfo.h index c55118eb1e..bceb5cb2ec 100644 --- a/CefSharp.Core/WindowInfo.h +++ b/CefSharp.Core/WindowInfo.h @@ -131,18 +131,6 @@ namespace CefSharp } } - virtual property bool TransparentPaintingEnabled - { - bool get() - { - return _windowInfo->transparent_painting_enabled == 1; - } - void set(bool transparentPaintingEnabled) - { - _windowInfo->transparent_painting_enabled = transparentPaintingEnabled; - } - } - virtual property bool WindowlessRenderingEnabled { bool get() @@ -170,9 +158,9 @@ namespace CefSharp _windowInfo->SetAsPopup((HWND)parentHandle.ToPointer(), StringUtils::ToNative(windowName)); } - virtual void SetAsWindowless(IntPtr parentHandle, bool transparent) + virtual void SetAsWindowless(IntPtr parentHandle) { - _windowInfo->SetAsWindowless((HWND)parentHandle.ToPointer(), transparent); + _windowInfo->SetAsWindowless((HWND)parentHandle.ToPointer()); } CefWindowInfo* GetWindowInfo() diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config index 541a37dd8f..27d2fec6f2 100644 --- a/CefSharp.Core/packages.config +++ b/CefSharp.Core/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 6d9f98c4dc..de20e193d8 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -13,7 +13,8 @@ 512 - 8b6c24fc + + true @@ -95,6 +96,13 @@ - - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/CefSharp.OffScreen.Example/packages.config b/CefSharp.OffScreen.Example/packages.config index 902e78d742..087e9d9641 100644 --- a/CefSharp.OffScreen.Example/packages.config +++ b/CefSharp.OffScreen.Example/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index 5df5edb7c7..defc2c6368 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -21,7 +21,8 @@ 3.5 Client - 5f632012 + + x64 @@ -185,6 +186,13 @@ - - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/CefSharp.WinForms.Example/packages.config b/CefSharp.WinForms.Example/packages.config index 902e78d742..087e9d9641 100644 --- a/CefSharp.WinForms.Example/packages.config +++ b/CefSharp.WinForms.Example/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 66bab1acf3..3c406485f8 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -21,7 +21,8 @@ 3.5 Client - a03680f0 + + true @@ -187,6 +188,13 @@ - - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/CefSharp.Wpf.Example/packages.config b/CefSharp.Wpf.Example/packages.config index 6b0debf223..0192952678 100644 --- a/CefSharp.Wpf.Example/packages.config +++ b/CefSharp.Wpf.Example/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/CefSharp/IWindowInfo.cs b/CefSharp/IWindowInfo.cs index c50072b3bf..d44e521db2 100644 --- a/CefSharp/IWindowInfo.cs +++ b/CefSharp/IWindowInfo.cs @@ -15,7 +15,6 @@ public interface IWindowInfo : IDisposable uint Style { get; set; } uint ExStyle { get; set; } IntPtr ParentWindowHandle { get; set; } - bool TransparentPaintingEnabled { get; set; } bool WindowlessRenderingEnabled { get; set; } IntPtr WindowHandle { get; set; } @@ -24,13 +23,11 @@ public interface IWindowInfo : IDisposable /// /// Create the browser using windowless (off-screen) rendering. - /// No window will be created for the browser and all rendering will occur via the CefRenderHandler interface. + /// No window will be created for the browser and all rendering will occur via the CefRenderHandler interface. This window will automatically be transparent unless a colored backgrond is set in the browser settings. /// /// Value will be used to identify monitor info and to act as the parent window for dialogs, context menus, etc. /// If not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly. - /// If is true a transparent background color will be used (RGBA=0x00000000). - /// If is false the background will be white and opaque. /// In order to create windowless browsers the CefSettings.windowless_rendering_enabled value must be set to true. - void SetAsWindowless(IntPtr parentHandle, bool transparent); + void SetAsWindowless(IntPtr parentHandle); } } diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 75bc8a239d..70149e2abc 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -34,8 +34,8 @@ public static class AssemblyInfo public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "58.0.0"; - public const string AssemblyFileVersion = "58.0.0.0"; + public const string AssemblyVersion = "59.0.0"; + public const string AssemblyFileVersion = "59.0.0.0"; public const string AssemblyCopyright = "Copyright © 2010-2017 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;