From 5858399c84f5fa2f2b06b2858fbf310c7d0d3245 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Fri, 31 Oct 2014 16:03:36 +0800
Subject: [PATCH 001/134] Updated project references to CEF 2171.1899
---
CefSharp.Core/CefSharp.Core.vcxproj | 4 ++--
CefSharp.Core/packages.config | 2 +-
CefSharp.Test/CefSharp.Test.csproj | 8 ++++----
CefSharp.Test/packages.config | 4 ++--
.../CefSharp.WinForms.Example.csproj | 8 ++++----
CefSharp.WinForms.Example/packages.config | 4 ++--
CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj | 8 ++++----
CefSharp.Wpf.Example/packages.config | 4 ++--
8 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index c49046cb78..e18785d9fb 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -285,6 +285,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/packages.config b/CefSharp.Core/packages.config
index 03ee03d3d3..96bfbf846f 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.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj
index f24312825e..b5ab0cc2d6 100644
--- a/CefSharp.Test/CefSharp.Test.csproj
+++ b/CefSharp.Test/CefSharp.Test.csproj
@@ -141,9 +141,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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.Test/packages.config b/CefSharp.Test/packages.config
index 0f1da60830..5900dbeeca 100644
--- a/CefSharp.Test/packages.config
+++ b/CefSharp.Test/packages.config
@@ -2,8 +2,8 @@
-
-
+
+
\ 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 b46a2bc08c..29af0b563e 100644
--- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
+++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
@@ -150,9 +150,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 711f25de0c..740f5addb9 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 6a94d60af2..60618ea1f4 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -168,9 +168,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 711f25de0c..740f5addb9 100644
--- a/CefSharp.Wpf.Example/packages.config
+++ b/CefSharp.Wpf.Example/packages.config
@@ -1,5 +1,5 @@

-
-
+
+
\ No newline at end of file
From 0cccb2a1e6d211359d646f417d90d0fa1fd82a2e Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Fri, 31 Oct 2014 16:04:45 +0800
Subject: [PATCH 002/134] Fixed missing parameter for `ShowDevTools()` method,
which now supports parameter `Inspect Element At` which is not yet
implemented in CEFSharp.
---
CefSharp.Core/Internals/RenderClientAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index c552474750..6caefea9c7 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -137,7 +137,7 @@ namespace CefSharp
windowInfo.SetAsPopup(cefHost->GetWindowHandle(), "DevTools");
- cefHost->ShowDevTools(windowInfo, this, settings);
+ cefHost->ShowDevTools(windowInfo, this, settings, CefPoint());
}
}
From c61bc9a762a6ac5ad5e7af159237846ae16cfbe5 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Sun, 2 Nov 2014 21:16:52 +0800
Subject: [PATCH 003/134] Updated build.ps1 version to 2171.1899
---
build.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.ps1 b/build.ps1
index 63ca6c512e..349e4feac9 100644
--- a/build.ps1
+++ b/build.ps1
@@ -5,7 +5,7 @@ param(
[Parameter(Position = 1)]
[string] $Version = "37.0.0",
[Parameter(Position = 2)]
- [string] $RedistVersion = "3.2062.1876"
+ [string] $RedistVersion = "3.2171.1899"
)
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
From a51d46463fab2bca72e68604e5627063fec2a284 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 3 Nov 2014 18:18:12 +1000
Subject: [PATCH 004/134] Whitespace fix
---
CefSharp.Core/Internals/RenderClientAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 6caefea9c7..a7729e7dce 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -137,7 +137,7 @@ namespace CefSharp
windowInfo.SetAsPopup(cefHost->GetWindowHandle(), "DevTools");
- cefHost->ShowDevTools(windowInfo, this, settings, CefPoint());
+ cefHost->ShowDevTools(windowInfo, this, settings, CefPoint());
}
}
From 49fa5abaddec32db01800f5207ec8af0c39e4636 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 3 Nov 2014 18:19:11 +1000
Subject: [PATCH 005/134] Update to correct redist -pre version
---
build.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.ps1 b/build.ps1
index 349e4feac9..67a677417a 100644
--- a/build.ps1
+++ b/build.ps1
@@ -5,7 +5,7 @@ param(
[Parameter(Position = 1)]
[string] $Version = "37.0.0",
[Parameter(Position = 2)]
- [string] $RedistVersion = "3.2171.1899"
+ [string] $RedistVersion = "3.2171.1899-pre0"
)
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
From d62bd687ba58c3934fe58f94edea48ab550ca66e Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 3 Nov 2014 18:19:39 +1000
Subject: [PATCH 006/134] Untabify
---
build.ps1 | 62 +++++++++++++++++++++++++++----------------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/build.ps1 b/build.ps1
index 67a677417a..285c8833fb 100644
--- a/build.ps1
+++ b/build.ps1
@@ -56,8 +56,8 @@ function Die
)
Write-Host
- Write-Error $Message
- exit 1
+ Write-Error $Message
+ exit 1
}
function Warn
@@ -68,8 +68,8 @@ function Warn
)
Write-Host
- Write-Host $Message -ForegroundColor Yellow
- Write-Host
+ Write-Host $Message -ForegroundColor Yellow
+ Write-Host
}
function TernaryReturn
@@ -220,38 +220,38 @@ function Nupkg
# Build packages
. $nuget pack nuget\CefSharp.Common.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget -Properties "RedistVersion=$RedistVersion"
- . $nuget pack nuget\CefSharp.Wpf.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
- . $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+ . $nuget pack nuget\CefSharp.Wpf.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+ . $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
- # Invoke `AfterBuild` script if available (ie. upload packages to myget)
- if(-not (Test-Path $WorkingDir\AfterBuild.ps1)) {
- return
- }
+ # Invoke `AfterBuild` script if available (ie. upload packages to myget)
+ if(-not (Test-Path $WorkingDir\AfterBuild.ps1)) {
+ return
+ }
- . $WorkingDir\AfterBuild.ps1 -Version $Version
+ . $WorkingDir\AfterBuild.ps1 -Version $Version
}
function DownloadNuget()
{
- $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe
+ $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe
if(-not (Test-Path $nuget))
- {
- $client = New-Object System.Net.WebClient;
- $client.DownloadFile('http://nuget.org/nuget.exe', $nuget);
- }
+ {
+ $client = New-Object System.Net.WebClient;
+ $client.DownloadFile('http://nuget.org/nuget.exe', $nuget);
+ }
}
function WriteAssemblyVersion
{
- param()
-
- $Filename = Join-Path $WorkingDir CefSharp\Properties\AssemblyInfo.cs
- $Regex = 'public const string AssemblyVersion = "(.*)"';
-
- $AssemblyInfo = Get-Content $Filename
- $NewString = $AssemblyInfo -replace $Regex, "public const string AssemblyVersion = ""$Version"""
-
- $NewString | Set-Content $Filename -Encoding UTF8
+ param()
+
+ $Filename = Join-Path $WorkingDir CefSharp\Properties\AssemblyInfo.cs
+ $Regex = 'public const string AssemblyVersion = "(.*)"';
+
+ $AssemblyInfo = Get-Content $Filename
+ $NewString = $AssemblyInfo -replace $Regex, "public const string AssemblyVersion = ""$Version"""
+
+ $NewString | Set-Content $Filename -Encoding UTF8
}
DownloadNuget
@@ -262,21 +262,21 @@ WriteAssemblyVersion
switch -Exact ($Target) {
"nupkg"
- {
- VSX v120
+ {
+ VSX v120
VSX v110
Nupkg
}
- "nupkg-only"
- {
+ "nupkg-only"
+ {
Nupkg
}
"vs2013"
- {
+ {
VSX v120
}
"vs2012"
- {
+ {
VSX v110
}
}
\ No newline at end of file
From e2f2b11ed6dba14621e4ca28a4744b9cf4ae2f61 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 3 Nov 2014 19:58:15 +1000
Subject: [PATCH 007/134] Manually apply remaining changes from
https://github.com/cefsharp/CefSharp/pull/507
---
CefSharp/Properties/AssemblyInfo.cs | 4 ++--
NuGet/pack.bat | 4 ----
build.ps1 | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)
delete mode 100644 NuGet/pack.bat
diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs
index afbe14223b..5f87404e98 100644
--- a/CefSharp/Properties/AssemblyInfo.cs
+++ b/CefSharp/Properties/AssemblyInfo.cs
@@ -32,8 +32,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 = "37.0.0.0";
- public const string AssemblyFileVersion = "37.0.0.0";
+ public const string AssemblyVersion = "39.0.0.0";
+ public const string AssemblyFileVersion = "39.0.0.0";
public const string AssemblyCopyright = "Copyright © The CefSharp Authors 2010-2014";
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;
diff --git a/NuGet/pack.bat b/NuGet/pack.bat
deleted file mode 100644
index 8358fc925e..0000000000
--- a/NuGet/pack.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-set version=37.0.0
-NuGet pack CefSharp.Common.nuspec -NoPackageAnalysis -Version %version%
-NuGet pack CefSharp.Wpf.nuspec -NoPackageAnalysis -Version %version%
-NuGet pack CefSharp.WinForms.nuspec -NoPackageAnalysis -Version %version%
diff --git a/build.ps1 b/build.ps1
index 285c8833fb..b6ecb84d84 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "37.0.0",
+ [string] $Version = "39.0.0",
[Parameter(Position = 2)]
[string] $RedistVersion = "3.2171.1899-pre0"
)
From 705da02d7fe8fc44f6a978d63b20b825c40778af Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 30 Sep 2014 15:23:50 +0800
Subject: [PATCH 008/134] Added overridable OnRendering method, to allow parent
app to know when the browser is redrawing/updating
---
CefSharp.Wpf/CefSharp.Wpf.csproj | 2 ++
CefSharp.Wpf/ChromiumWebBrowser.cs | 21 +++++++++++
CefSharp.Wpf/RenderingEventArgs.cs | 26 ++++++++++++++
CefSharp.Wpf/RenderingEventHandler.cs | 13 +++++++
patch.diff | 50 +++++++++++++++++++++++++++
5 files changed, 112 insertions(+)
create mode 100644 CefSharp.Wpf/RenderingEventArgs.cs
create mode 100644 CefSharp.Wpf/RenderingEventHandler.cs
create mode 100644 patch.diff
diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj
index 24a145998c..88ccec3932 100644
--- a/CefSharp.Wpf/CefSharp.Wpf.csproj
+++ b/CefSharp.Wpf/CefSharp.Wpf.csproj
@@ -99,6 +99,8 @@
+
+
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 602b0476cc..7a621d4dac 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -57,6 +57,11 @@ public class ChromiumWebBrowser : ContentControl, IRenderWebBrowser, IWpfWebBrow
public event EventHandler FrameLoadEnd;
public event EventHandler LoadError;
+ ///
+ /// Raised before each render cycle, and allows you to adjust the bitmap before it's rendered/applied
+ ///
+ public event RenderingEventHandler Rendering;
+
public ICommand BackCommand { get; private set; }
public ICommand ForwardCommand { get; private set; }
public ICommand ReloadCommand { get; private set; }
@@ -455,6 +460,7 @@ public ChromiumWebBrowser()
disposables.Add(managedCefBrowserAdapter);
disposables.Add(new DisposableEventWrapper(this, ActualHeightProperty, OnActualSizeChanged));
disposables.Add(new DisposableEventWrapper(this, ActualWidthProperty, OnActualSizeChanged));
+
}
~ChromiumWebBrowser()
@@ -1200,10 +1206,25 @@ void IRenderWebBrowser.ClearBitmap(BitmapInfo bitmapInfo)
bitmapInfo.InteropBitmap = null;
}
+ ///
+ /// Raises Rendering event
+ ///
+ protected virtual void OnRendering(object sender, RenderingEventArgs eventArgs)
+ {
+ if (Rendering != null)
+ {
+ Rendering(this, eventArgs);
+ }
+ }
+
void IRenderWebBrowser.SetBitmap(BitmapInfo bitmapInfo)
{
lock (bitmapInfo.BitmapLock)
{
+ // Inform parents that the browser rendering is updating
+ OnRendering(this, new RenderingEventArgs(bitmapInfo));
+
+ // Now update the WPF image
if (bitmapInfo.IsPopup)
{
bitmapInfo.InteropBitmap = SetBitmapHelper(bitmapInfo,
diff --git a/CefSharp.Wpf/RenderingEventArgs.cs b/CefSharp.Wpf/RenderingEventArgs.cs
new file mode 100644
index 0000000000..e0957aa0ca
--- /dev/null
+++ b/CefSharp.Wpf/RenderingEventArgs.cs
@@ -0,0 +1,26 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using System;
+using CefSharp.Internals;
+
+namespace CefSharp.Wpf
+{
+ ///
+ /// Event arguments to the Rendering event handler set up in IWebBrowser.
+ ///
+ public class RenderingEventArgs : EventArgs
+ {
+ public RenderingEventArgs(BitmapInfo bitmapInfo)
+ {
+ BitmapInfo = bitmapInfo;
+ }
+
+ ///
+ /// The bitmap info being rendered.
+ ///
+ public BitmapInfo BitmapInfo { get; private set; }
+
+ }
+}
diff --git a/CefSharp.Wpf/RenderingEventHandler.cs b/CefSharp.Wpf/RenderingEventHandler.cs
new file mode 100644
index 0000000000..b8c5ff6c88
--- /dev/null
+++ b/CefSharp.Wpf/RenderingEventHandler.cs
@@ -0,0 +1,13 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+namespace CefSharp.Wpf
+{
+ ///
+ /// A delegate type used to listen to Rendgering messages.
+ ///
+ /// The object that raised the event.
+ /// The event arguments.
+ public delegate void RenderingEventHandler(object sender, RenderingEventArgs e);
+}
\ No newline at end of file
diff --git a/patch.diff b/patch.diff
new file mode 100644
index 0000000000..2e153aedbf
--- /dev/null
+++ b/patch.diff
@@ -0,0 +1,50 @@
+From fbc5bf970a720677f8bb5cceb08eeee4d9e5b488 Mon Sep 17 00:00:00 2001
+From: Bodekaer
+Date: Wed, 17 Sep 2014 14:56:59 +0200
+Subject: [PATCH] Fixed #482 WCF timeout issue
+
+---
+ CefSharp/Internals/BrowserProcessServiceHost.cs | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/CefSharp/Internals/BrowserProcessServiceHost.cs b/CefSharp/Internals/BrowserProcessServiceHost.cs
+index 3a97971..efbd413 100644
+--- a/CefSharp/Internals/BrowserProcessServiceHost.cs
++++ b/CefSharp/Internals/BrowserProcessServiceHost.cs
+@@ -5,6 +5,7 @@
+ using System;
+ using System.Net.Security;
+ using System.ServiceModel;
++using System.ServiceModel.Channels;
+ using System.ServiceModel.Description;
+ using System.Threading.Tasks;
+
+@@ -66,11 +67,22 @@ namespace CefSharp.Internals
+ operationContextTaskCompletionSource = null;
+ }
+
+- public static NetNamedPipeBinding CreateBinding()
++ public static CustomBinding CreateBinding()
+ {
+ var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
+ binding.MaxReceivedMessageSize = SixteenMegaBytesInBytes;
+- return binding;
++ binding.ReceiveTimeout = TimeSpan.MaxValue;
++ binding.SendTimeout = TimeSpan.MaxValue;
++ binding.OpenTimeout = TimeSpan.MaxValue;
++ binding.CloseTimeout = TimeSpan.MaxValue;
++
++ // Ensure binding connection stays open indefinitely until closed
++ var customBinding = new CustomBinding(binding);
++ var connectionSettings = customBinding.Elements.Find().ConnectionPoolSettings;
++ connectionSettings.IdleTimeout = TimeSpan.MaxValue;
++ connectionSettings.MaxOutboundConnectionsPerEndpoint = 0;
++
++ return customBinding;
+ }
+ }
+ }
+\ No newline at end of file
+--
+1.8.3.msysgit.0
+
From beb3897141bcfcc8d12510275994f9d3ea9f4bfa Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 12:29:56 +0800
Subject: [PATCH 009/134] Fixed url load issue when assigning URL before
browser is fully loaded
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index fac53f31db..62a83a0d21 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -58,7 +58,7 @@ namespace CefSharp
HWND hwnd = HWND();
CefWindowInfo window;
window.SetAsWindowless(hwnd, TRUE);
- CefString addressNative = StringUtils::ToNative("about:blank");
+ CefString addressNative = StringUtils::ToNative(_address);
if (!CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings, NULL))
From 88b7619901212a54e56548d4fd61428215e54391 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 12:38:57 +0800
Subject: [PATCH 010/134] Cleanup tabs into spaces
#beb3897141bcfcc8d12510275994f9d3ea9f4bfa
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 62a83a0d21..225ba67029 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -58,7 +58,7 @@ namespace CefSharp
HWND hwnd = HWND();
CefWindowInfo window;
window.SetAsWindowless(hwnd, TRUE);
- CefString addressNative = StringUtils::ToNative(_address);
+ CefString addressNative = StringUtils::ToNative(_address);
if (!CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings, NULL))
From a1e5335d6a937156373687da81658504b8b538bb Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 14:15:25 +0800
Subject: [PATCH 011/134] Revert BrowserSubprocess.Core 2062 merge update to
match 2171
---
.../CefSharp.BrowserSubprocess.Core.vcxproj | 6 +++---
CefSharp.BrowserSubprocess.Core/packages.config | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
index 6a9e7882ce..2fb2f63c72 100644
--- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
+++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -66,7 +66,7 @@
- 598202e1
+ f6c01df1
true
@@ -198,6 +198,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config
index f9dacf6924..96bfbf846f 100644
--- a/CefSharp.BrowserSubprocess.Core/packages.config
+++ b/CefSharp.BrowserSubprocess.Core/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
From 35b3bac9d564fb5c5ed7b38cde1e54f6a0a5b216 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 19:02:23 +0800
Subject: [PATCH 012/134] Added support for context menu in WPF
---
CefSharp.Core/Internals/ClientAdapter.cpp | 6 +++---
CefSharp.Wpf/ChromiumWebBrowser.cs | 1 +
CefSharp/IWebBrowser.cs | 5 +++++
CefSharp/IWinFormsWebBrowser.cs | 1 -
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 8cf9f81b4c..1ee292fda6 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -382,10 +382,10 @@ namespace CefSharp
CefRefPtr params, CefRefPtr model)
{
// Something like this...
- auto winFormsWebBrowserControl = dynamic_cast((IWebBrowserInternal^)_browserControl);
- if (winFormsWebBrowserControl == nullptr) return;
+ auto webBrowserControl = dynamic_cast((IWebBrowserInternal^)_browserControl);
+ if (webBrowserControl == nullptr) return;
- IMenuHandler^ handler = winFormsWebBrowserControl->MenuHandler;
+ IMenuHandler^ handler = webBrowserControl->MenuHandler;
if (handler == nullptr) return;
auto result = handler->OnBeforeContextMenu(_browserControl);
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 7a621d4dac..35571aa3ce 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -50,6 +50,7 @@ public class ChromiumWebBrowser : ContentControl, IRenderWebBrowser, IWpfWebBrow
public IRequestHandler RequestHandler { get; set; }
public IDownloadHandler DownloadHandler { get; set; }
public ILifeSpanHandler LifeSpanHandler { get; set; }
+ public IMenuHandler MenuHandler { get; set; }
public event EventHandler ConsoleMessage;
public event EventHandler StatusMessage;
diff --git a/CefSharp/IWebBrowser.cs b/CefSharp/IWebBrowser.cs
index a5192010d1..4b467ea14e 100644
--- a/CefSharp/IWebBrowser.cs
+++ b/CefSharp/IWebBrowser.cs
@@ -105,6 +105,11 @@ public interface IWebBrowser : IDisposable
///
IDownloadHandler DownloadHandler { get; set; }
+ ///
+ /// Implement and assign to handle events related to the browser context menu
+ ///
+ IMenuHandler MenuHandler { get; set; }
+
///
/// A flag that indicates whether the WebBrowser is initialized (true) or not (false).
///
diff --git a/CefSharp/IWinFormsWebBrowser.cs b/CefSharp/IWinFormsWebBrowser.cs
index 78290aa7e1..322efb48ce 100644
--- a/CefSharp/IWinFormsWebBrowser.cs
+++ b/CefSharp/IWinFormsWebBrowser.cs
@@ -10,7 +10,6 @@ namespace CefSharp
// so the dependency would go the wrong way... Has to be here for the time being.
public interface IWinFormsWebBrowser : IWebBrowser
{
- IMenuHandler MenuHandler { get; set; }
event EventHandler NavStateChanged;
event EventHandler TitleChanged;
event EventHandler AddressChanged;
From 901438da055e931c294d4b004378cf794d29323f Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 19:03:02 +0800
Subject: [PATCH 013/134] Added support for context menu parameters. All
supports new spell check feature #222
---
CefSharp.Core/CefSharp.Core.vcxproj | 2 +
CefSharp.Core/CefSharp.Core.vcxproj.filters | 6 +
.../Internals/CefContextMenuParamsWrapper.cpp | 111 ++++++++++++++++++
.../Internals/CefContextMenuParamsWrapper.h | 59 ++++++++++
CefSharp.Core/Internals/ClientAdapter.cpp | 6 +-
CefSharp.WinForms.Example/MenuHandler.cs | 2 +-
.../CefSharp.Wpf.Example.csproj | 1 +
CefSharp.Wpf.Example/Handlers/MenuHandler.cs | 23 ++++
.../Views/BrowserTabView.xaml.cs | 8 +-
CefSharp/CefSharp.csproj | 1 +
CefSharp/IContextMenuParams.cs | 52 ++++++++
CefSharp/IMenuHandler.cs | 2 +-
12 files changed, 268 insertions(+), 5 deletions(-)
create mode 100644 CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
create mode 100644 CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
create mode 100644 CefSharp.Wpf.Example/Handlers/MenuHandler.cs
create mode 100644 CefSharp/IContextMenuParams.cs
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index 554ce62ee4..f8a74eca6e 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -217,6 +217,7 @@
+
@@ -240,6 +241,7 @@
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index e1a242f196..ef7967b7f0 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -53,6 +53,9 @@
Source Files
+
+ Source Files
+
@@ -124,6 +127,9 @@
Header Files
+
+ Header Files
+
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
new file mode 100644
index 0000000000..bd6a44f887
--- /dev/null
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
@@ -0,0 +1,111 @@
+// Copyright © 2010-2014 The CefSharp Project. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#include "Stdafx.h"
+#include "CefContextMenuParamsWrapper.h"
+
+namespace CefSharp
+{
+ namespace Internals
+ {
+
+
+ int CefContextMenuParamsWrapper::YCoord::get()
+ {
+ return _wrappedInfo->GetYCoord();
+ }
+
+ int CefContextMenuParamsWrapper::XCoord::get()
+ {
+ return _wrappedInfo->GetXCoord();
+ }
+
+
+ //// TODO: Implement:
+ ////virtual TypeFlags GetTypeFlags() OVERRIDE;
+
+
+ String^ CefContextMenuParamsWrapper::LinkUrl::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetLinkUrl());
+ }
+
+
+ String^ CefContextMenuParamsWrapper::UnfilteredLinkUrl::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetUnfilteredLinkUrl());
+ }
+
+
+ String^ CefContextMenuParamsWrapper::SourceUrl::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetSourceUrl());
+ }
+
+
+ bool CefContextMenuParamsWrapper::HasImageContents::get()
+ {
+ return _wrappedInfo->HasImageContents();
+ }
+
+
+ String^ CefContextMenuParamsWrapper::PageUrl::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetPageUrl());
+ }
+
+
+ String^ CefContextMenuParamsWrapper::FrameUrl::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetFrameUrl());
+ }
+ String^ CefContextMenuParamsWrapper::FrameCharset::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetFrameCharset());
+ }
+
+
+ //// TODO: Implement:
+ ////virtual MediaType GetMediaType() OVERRIDE;
+ ////virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
+
+
+ String^ CefContextMenuParamsWrapper::SelectionText::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetSelectionText());
+ }
+
+
+ String^ CefContextMenuParamsWrapper::MisspelledWord::get()
+ {
+ return StringUtils::ToClr(_wrappedInfo->GetMisspelledWord());
+ }
+
+ int CefContextMenuParamsWrapper::MisspellingHash::get()
+ {
+ return _wrappedInfo->GetMisspellingHash();
+ }
+
+
+ //// TODO: Implement:
+ ////virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
+
+
+ bool CefContextMenuParamsWrapper::IsEditable::get()
+ {
+ return _wrappedInfo->IsEditable();
+ }
+
+ bool CefContextMenuParamsWrapper::IsSpellCheckEnabled::get()
+ {
+ return _wrappedInfo->IsSpellCheckEnabled();
+ }
+
+
+ //// TODO: Implement:
+ ////virtual EditStateFlags GetEditStateFlags() OVERRIDE;
+
+
+ }
+}
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
new file mode 100644
index 0000000000..0c2c40b71a
--- /dev/null
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
@@ -0,0 +1,59 @@
+// Copyright © 2010-2014 The CefSharp Project. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#pragma once
+
+#include "Stdafx.h"
+#include "MCefRefPtr.h"
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace CefSharp
+{
+ namespace Internals
+ {
+ ref class CefContextMenuParamsWrapper : public IContextMenuParams
+ {
+ MCefRefPtr _wrappedInfo;
+
+ internal:
+ CefContextMenuParamsWrapper(CefRefPtr cefParams) : _wrappedInfo(cefParams) {}
+
+ public:
+ virtual property int YCoord { int get(); }
+ virtual property int XCoord { int get(); }
+
+ // TODO: Implement:
+ //virtual TypeFlags GetTypeFlags() OVERRIDE;
+ virtual property String^ LinkUrl { String^ get(); }
+ virtual property String^ UnfilteredLinkUrl { String^ get(); }
+ virtual property String^ SourceUrl { String^ get(); }
+ virtual property bool HasImageContents { bool get(); }
+ virtual property String^ PageUrl { String^ get(); }
+ virtual property String^ FrameUrl { String^ get(); }
+ virtual property String^ FrameCharset { String^ get(); }
+
+ // TODO: Implement:
+ //virtual MediaType GetMediaType() OVERRIDE;
+ //virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
+
+ virtual property String^ SelectionText { String^ get(); }
+ virtual property String^ MisspelledWord { String^ get(); }
+ virtual property int MisspellingHash { int get(); }
+
+ // TODO: Implement:
+ //virtual property bool GetDictionarySuggestions { String^ get(); }
+ //virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
+
+ virtual property bool IsEditable { bool get(); }
+ virtual property bool IsSpellCheckEnabled { bool get(); }
+
+ // TODO: Implement:
+ //virtual EditStateFlags GetEditStateFlags() OVERRIDE;
+
+
+ };
+ }
+}
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 1ee292fda6..83e66bcd91 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -6,6 +6,7 @@
#include "Internals/CefRequestWrapper.h"
#include "Internals/CefWebPluginInfoWrapper.h"
+#include "Internals/CefContextMenuParamsWrapper.h"
#include "Internals/JavascriptBinding/BindingHandler.h"
#include "Internals/RequestResponse.h"
#include "ClientAdapter.h"
@@ -388,7 +389,10 @@ namespace CefSharp
IMenuHandler^ handler = webBrowserControl->MenuHandler;
if (handler == nullptr) return;
- auto result = handler->OnBeforeContextMenu(_browserControl);
+ // Context menu params
+ CefContextMenuParamsWrapper^ contextMenuParamsWrapper = gcnew CefContextMenuParamsWrapper(params);
+
+ auto result = handler->OnBeforeContextMenu(_browserControl, contextMenuParamsWrapper);
if (!result) {
// The only way I found for preventing the context menu to be displayed is by removing all items. :-)
while (model->GetCount() > 0) {
diff --git a/CefSharp.WinForms.Example/MenuHandler.cs b/CefSharp.WinForms.Example/MenuHandler.cs
index 43b603df17..0850262264 100644
--- a/CefSharp.WinForms.Example/MenuHandler.cs
+++ b/CefSharp.WinForms.Example/MenuHandler.cs
@@ -6,7 +6,7 @@ namespace CefSharp.WinForms.Example
{
internal class MenuHandler : IMenuHandler
{
- public bool OnBeforeContextMenu(IWebBrowser browser)
+ public bool OnBeforeContextMenu(IWebBrowser browser, IContextMenuParams parameters)
{
// Return false if you want to disable the context menu.
return true;
diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
index bdd08c05fd..c758b17b92 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -99,6 +99,7 @@
Designer
+
diff --git a/CefSharp.Wpf.Example/Handlers/MenuHandler.cs b/CefSharp.Wpf.Example/Handlers/MenuHandler.cs
new file mode 100644
index 0000000000..2a14de61d8
--- /dev/null
+++ b/CefSharp.Wpf.Example/Handlers/MenuHandler.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace CefSharp.Wpf.Example.Handlers
+{
+
+ public class MenuHandler : IMenuHandler
+ {
+
+ public bool OnBeforeContextMenu(IWebBrowser browser, IContextMenuParams parameters)
+ {
+
+ Console.WriteLine("Context menu opened");
+ Console.WriteLine(parameters.MisspelledWord);
+
+ return true;
+ }
+
+
+ }
+}
diff --git a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs
index de1be99857..b395b17aa7 100644
--- a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs
+++ b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs
@@ -2,6 +2,7 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+using System;
using System.Windows.Controls;
using System.Windows.Input;
using CefSharp.Example;
@@ -16,18 +17,21 @@ public BrowserTabView()
browser.RequestHandler = new RequestHandler();
browser.RegisterJsObject("bound", new BoundObject());
+
+ browser.MenuHandler = new Handlers.MenuHandler();
}
private void OnTextBoxGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
{
- var textBox = (TextBox) sender;
+ var textBox = (TextBox)sender;
textBox.SelectAll();
}
private void OnTextBoxGotMouseCapture(object sender, MouseEventArgs e)
{
- var textBox = (TextBox) sender;
+ var textBox = (TextBox)sender;
textBox.SelectAll();
}
+
}
}
diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj
index 1a2b963eb6..cead85d646 100644
--- a/CefSharp/CefSharp.csproj
+++ b/CefSharp/CefSharp.csproj
@@ -100,6 +100,7 @@
+
diff --git a/CefSharp/IContextMenuParams.cs b/CefSharp/IContextMenuParams.cs
new file mode 100644
index 0000000000..210e93696a
--- /dev/null
+++ b/CefSharp/IContextMenuParams.cs
@@ -0,0 +1,52 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+namespace CefSharp
+{
+ ///
+ /// Wrapper for the CEF3 CefWebPluginInfo
+ ///
+ public interface IContextMenuParams
+ {
+ int YCoord { get; }
+
+ int XCoord { get; }
+
+
+ // TODO: Implement:
+ //virtual TypeFlags GetTypeFlags() OVERRIDE;
+
+
+ string LinkUrl { get; }
+ string UnfilteredLinkUrl { get; }
+ string SourceUrl { get; }
+ bool HasImageContents { get; }
+ string PageUrl { get; }
+ string FrameUrl { get; }
+ string FrameCharset { get; }
+
+
+ // TODO: Implement:
+ //virtual MediaType GetMediaType() OVERRIDE;
+ //virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
+
+
+ string SelectionText { get; }
+ string MisspelledWord { get; }
+ int MisspellingHash { get; }
+
+ // TODO: Implement:
+ //virtual property bool GetDictionarySuggestions { String^ get(); }
+ //virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
+ bool IsEditable { get; }
+ bool IsSpellCheckEnabled { get; }
+
+
+ // TODO: Implement:
+ //virtual EditStateFlags GetEditStateFlags() OVERRIDE;
+
+
+
+ }
+}
diff --git a/CefSharp/IMenuHandler.cs b/CefSharp/IMenuHandler.cs
index 05c3d3316e..b1fbbc080d 100644
--- a/CefSharp/IMenuHandler.cs
+++ b/CefSharp/IMenuHandler.cs
@@ -6,6 +6,6 @@ namespace CefSharp
{
public interface IMenuHandler
{
- bool OnBeforeContextMenu(IWebBrowser browser);
+ bool OnBeforeContextMenu(IWebBrowser browser, IContextMenuParams parameters);
}
}
From e0984a6aa29ab33d4e30b92927a4052682725d2b Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 19:51:09 +0800
Subject: [PATCH 014/134] Added support for dictionary suggestions in the
context menu #222
---
.../Internals/CefContextMenuParamsWrapper.cpp | 12 ++++++++++++
.../Internals/CefContextMenuParamsWrapper.h | 5 +++--
CefSharp/IContextMenuParams.cs | 7 ++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
index bd6a44f887..c61055aae8 100644
--- a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
@@ -60,6 +60,7 @@ namespace CefSharp
{
return StringUtils::ToClr(_wrappedInfo->GetFrameUrl());
}
+
String^ CefContextMenuParamsWrapper::FrameCharset::get()
{
return StringUtils::ToClr(_wrappedInfo->GetFrameCharset());
@@ -92,6 +93,17 @@ namespace CefSharp
////virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
+ List^ CefContextMenuParamsWrapper::DictionarySuggestions::get()
+ {
+ std::vector& dictionarySuggestions = std::vector();
+ bool result = _wrappedInfo->GetDictionarySuggestions(dictionarySuggestions);
+
+ return StringUtils::ToClr(dictionarySuggestions);
+ }
+
+
+
+
bool CefContextMenuParamsWrapper::IsEditable::get()
{
return _wrappedInfo->IsEditable();
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
index 0c2c40b71a..85d4d79631 100644
--- a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
@@ -43,8 +43,9 @@ namespace CefSharp
virtual property String^ MisspelledWord { String^ get(); }
virtual property int MisspellingHash { int get(); }
- // TODO: Implement:
- //virtual property bool GetDictionarySuggestions { String^ get(); }
+ virtual property List^ DictionarySuggestions { List^ get(); }
+
+
//virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
virtual property bool IsEditable { bool get(); }
diff --git a/CefSharp/IContextMenuParams.cs b/CefSharp/IContextMenuParams.cs
index 210e93696a..71be16e5b6 100644
--- a/CefSharp/IContextMenuParams.cs
+++ b/CefSharp/IContextMenuParams.cs
@@ -2,6 +2,8 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+using System.Collections.Generic;
+
namespace CefSharp
{
///
@@ -36,9 +38,8 @@ public interface IContextMenuParams
string MisspelledWord { get; }
int MisspellingHash { get; }
- // TODO: Implement:
- //virtual property bool GetDictionarySuggestions { String^ get(); }
- //virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
+ List DictionarySuggestions { get; }
+
bool IsEditable { get; }
bool IsSpellCheckEnabled { get; }
From 7b84ac23087178e62c354d9de20ae6e3d13faee3 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 21:58:39 +0800
Subject: [PATCH 015/134] Added support for new Browser.ReplaceMisspelling to
allow you to replace the currently misspelled word with a new one
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 14 ++++++++++++++
CefSharp.WinForms/ChromiumWebBrowser.cs | 7 +++++++
CefSharp.Wpf/ChromiumWebBrowser.cs | 6 ++++++
CefSharp/IWebBrowser.cs | 10 +++++++++-
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 1bdaf8da97..ac1e32297d 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -494,5 +494,19 @@ namespace CefSharp
{
_javaScriptObjectRepository->Register(name, object);
}
+
+
+ void ReplaceMisspelling(String^ word)
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ CefString wordNative = StringUtils::ToNative(word);
+ cefHost->ReplaceMisspelling(wordNative);
+ }
+ }
+
+
};
}
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 570436820a..fd6f5d947b 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -353,5 +353,12 @@ private void OnPaint(object sender, PaintEventArgs e)
managedCefBrowserAdapter.OnPaint(Handle);
}
}
+
+
+ public void ReplaceMisspelling(string word)
+ {
+ managedCefBrowserAdapter.ReplaceMisspelling(word);
+ }
+
}
}
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 35571aa3ce..ccadfc6e69 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1284,5 +1284,11 @@ public Task GetTextAsync()
managedCefBrowserAdapter.GetText(taskStringVisitor);
return taskStringVisitor.Task;
}
+
+ public void ReplaceMisspelling(string word)
+ {
+ managedCefBrowserAdapter.ReplaceMisspelling(word);
+ }
+
}
}
diff --git a/CefSharp/IWebBrowser.cs b/CefSharp/IWebBrowser.cs
index 4b467ea14e..60b1a55df9 100644
--- a/CefSharp/IWebBrowser.cs
+++ b/CefSharp/IWebBrowser.cs
@@ -256,6 +256,14 @@ public interface IWebBrowser : IDisposable
///
/// Explicitly close the developer tools window if one exists for this browser instance.
///
- void CloseDevTools();
+ void CloseDevTools();
+
+ ///
+ /// If a misspelled word is currently selected in an editable node calling
+ /// this method will replace it with the specified |word|.
+ ///
+ /// The new word that will replace the currently selected word.
+ void ReplaceMisspelling(string word);
+
}
}
From e4ca157790e313f9efb10469b8d178308f70f03d Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 21:59:37 +0800
Subject: [PATCH 016/134] Added Browser.AddWordToDictionary() support, to allow
adding custom word to the spell checker dictionary
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 10 ++++++++++
CefSharp.Wpf/ChromiumWebBrowser.cs | 5 +++++
CefSharp/IWebBrowser.cs | 11 ++++++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index ac1e32297d..ef8848842b 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -507,6 +507,16 @@ namespace CefSharp
}
}
+ void AddWordToDictionary(String^ word){
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ CefString wordNative = StringUtils::ToNative(word);
+ cefHost->AddWordToDictionary(wordNative);
+ }
+ }
+
};
}
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index ccadfc6e69..1e236021fe 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1290,5 +1290,10 @@ public void ReplaceMisspelling(string word)
managedCefBrowserAdapter.ReplaceMisspelling(word);
}
+ public void AddWordToDictionary(string word)
+ {
+ managedCefBrowserAdapter.AddWordToDictionary(word);
+ }
+
}
}
diff --git a/CefSharp/IWebBrowser.cs b/CefSharp/IWebBrowser.cs
index 60b1a55df9..cf44956d0d 100644
--- a/CefSharp/IWebBrowser.cs
+++ b/CefSharp/IWebBrowser.cs
@@ -260,10 +260,19 @@ public interface IWebBrowser : IDisposable
///
/// If a misspelled word is currently selected in an editable node calling
- /// this method will replace it with the specified |word|.
+ /// this method will replace it with the specified word.
///
/// The new word that will replace the currently selected word.
void ReplaceMisspelling(string word);
+ ///
+ /// Add the specified word to the spelling dictionary.
+ ///
+ /// The new word that will be added to the dictionary.
+ void AddWordToDictionary(string word);
+
+
+
+
}
}
From 2583a40c25218782d8d8a369d3e1ee87772f82b5 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Tue, 4 Nov 2014 22:03:23 +0800
Subject: [PATCH 017/134] Added new AddWordToDictionary to WinForms as well
(previously only in WPF)
---
CefSharp.WinForms/ChromiumWebBrowser.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index fd6f5d947b..01acf4dfab 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -360,5 +360,11 @@ public void ReplaceMisspelling(string word)
managedCefBrowserAdapter.ReplaceMisspelling(word);
}
+ public void AddWordToDictionary(string word)
+ {
+ managedCefBrowserAdapter.AddWordToDictionary(word);
+ }
+
+
}
}
From f7b8bbea59b689a4478567270822e03827c8f97a Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 5 Nov 2014 11:33:07 +1000
Subject: [PATCH 018/134] Remove patch.diff
---
patch.diff | 50 --------------------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 patch.diff
diff --git a/patch.diff b/patch.diff
deleted file mode 100644
index 2e153aedbf..0000000000
--- a/patch.diff
+++ /dev/null
@@ -1,50 +0,0 @@
-From fbc5bf970a720677f8bb5cceb08eeee4d9e5b488 Mon Sep 17 00:00:00 2001
-From: Bodekaer
-Date: Wed, 17 Sep 2014 14:56:59 +0200
-Subject: [PATCH] Fixed #482 WCF timeout issue
-
----
- CefSharp/Internals/BrowserProcessServiceHost.cs | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/CefSharp/Internals/BrowserProcessServiceHost.cs b/CefSharp/Internals/BrowserProcessServiceHost.cs
-index 3a97971..efbd413 100644
---- a/CefSharp/Internals/BrowserProcessServiceHost.cs
-+++ b/CefSharp/Internals/BrowserProcessServiceHost.cs
-@@ -5,6 +5,7 @@
- using System;
- using System.Net.Security;
- using System.ServiceModel;
-+using System.ServiceModel.Channels;
- using System.ServiceModel.Description;
- using System.Threading.Tasks;
-
-@@ -66,11 +67,22 @@ namespace CefSharp.Internals
- operationContextTaskCompletionSource = null;
- }
-
-- public static NetNamedPipeBinding CreateBinding()
-+ public static CustomBinding CreateBinding()
- {
- var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
- binding.MaxReceivedMessageSize = SixteenMegaBytesInBytes;
-- return binding;
-+ binding.ReceiveTimeout = TimeSpan.MaxValue;
-+ binding.SendTimeout = TimeSpan.MaxValue;
-+ binding.OpenTimeout = TimeSpan.MaxValue;
-+ binding.CloseTimeout = TimeSpan.MaxValue;
-+
-+ // Ensure binding connection stays open indefinitely until closed
-+ var customBinding = new CustomBinding(binding);
-+ var connectionSettings = customBinding.Elements.Find().ConnectionPoolSettings;
-+ connectionSettings.IdleTimeout = TimeSpan.MaxValue;
-+ connectionSettings.MaxOutboundConnectionsPerEndpoint = 0;
-+
-+ return customBinding;
- }
- }
- }
-\ No newline at end of file
---
-1.8.3.msysgit.0
-
From 5f0277033eb770e216ed37fefa7668cfc40e4a7e Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 5 Nov 2014 11:40:42 +1000
Subject: [PATCH 019/134] Remove RenderingEventHandler and replace with generic
EventHandler Take reference to EventHandler in OnRendering before null check
- best practice
---
CefSharp.Wpf/CefSharp.Wpf.csproj | 1 -
CefSharp.Wpf/ChromiumWebBrowser.cs | 7 ++++---
CefSharp.Wpf/RenderingEventHandler.cs | 13 -------------
3 files changed, 4 insertions(+), 17 deletions(-)
delete mode 100644 CefSharp.Wpf/RenderingEventHandler.cs
diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj
index 88ccec3932..3bfe48f298 100644
--- a/CefSharp.Wpf/CefSharp.Wpf.csproj
+++ b/CefSharp.Wpf/CefSharp.Wpf.csproj
@@ -100,7 +100,6 @@
-
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 1e236021fe..f37d926bc3 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -61,7 +61,7 @@ public class ChromiumWebBrowser : ContentControl, IRenderWebBrowser, IWpfWebBrow
///
/// Raised before each render cycle, and allows you to adjust the bitmap before it's rendered/applied
///
- public event RenderingEventHandler Rendering;
+ public event EventHandler Rendering;
public ICommand BackCommand { get; private set; }
public ICommand ForwardCommand { get; private set; }
@@ -1212,9 +1212,10 @@ void IRenderWebBrowser.ClearBitmap(BitmapInfo bitmapInfo)
///
protected virtual void OnRendering(object sender, RenderingEventArgs eventArgs)
{
- if (Rendering != null)
+ var rendering = Rendering;
+ if (rendering != null)
{
- Rendering(this, eventArgs);
+ rendering(this, eventArgs);
}
}
diff --git a/CefSharp.Wpf/RenderingEventHandler.cs b/CefSharp.Wpf/RenderingEventHandler.cs
deleted file mode 100644
index b8c5ff6c88..0000000000
--- a/CefSharp.Wpf/RenderingEventHandler.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
-
-namespace CefSharp.Wpf
-{
- ///
- /// A delegate type used to listen to Rendgering messages.
- ///
- /// The object that raised the event.
- /// The event arguments.
- public delegate void RenderingEventHandler(object sender, RenderingEventArgs e);
-}
\ No newline at end of file
From 66d953d2b3efc25e44c7d98ec8809022cef78d67 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 5 Nov 2014 13:03:00 +1000
Subject: [PATCH 020/134] Split RequestResponse into Request and Response
objects
---
CefSharp.Core/Internals/ClientAdapter.cpp | 12 +++++------
CefSharp.Core/Internals/RequestResponse.h | 8 ++------
CefSharp.Example/RequestHandler.cs | 5 ++---
CefSharp/CefSharp.csproj | 2 +-
CefSharp/IRequestHandler.cs | 5 +++--
CefSharp/IRequestResponse.cs | 25 -----------------------
CefSharp/IResponse.cs | 20 ++++++++++++++++++
7 files changed, 34 insertions(+), 43 deletions(-)
delete mode 100644 CefSharp/IRequestResponse.cs
create mode 100644 CefSharp/IResponse.cs
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 5393b104a3..83641fa0b5 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -258,16 +258,16 @@ namespace CefSharp
return false;
}
- CefRequestWrapper^ wrapper = gcnew CefRequestWrapper(request);
- RequestResponse^ requestResponse = gcnew RequestResponse(wrapper);
+ auto requestWrapper = gcnew CefRequestWrapper(request);
+ auto response = gcnew RequestResponse();
- bool ret = handler->OnBeforeResourceLoad(_browserControl, requestResponse);
+ bool ret = handler->OnBeforeResourceLoad(_browserControl, requestWrapper, response);
- if (requestResponse->Action == ResponseAction::Redirect)
+ if (response->Action == ResponseAction::Redirect)
{
- request->SetURL(StringUtils::ToNative(requestResponse->RedirectUrl));
+ request->SetURL(StringUtils::ToNative(response->RedirectUrl));
}
- else if (requestResponse->Action == ResponseAction::Respond)
+ else if (response->Action == ResponseAction::Respond)
{
throw gcnew NotImplementedException("Respond is not yet supported.");
diff --git a/CefSharp.Core/Internals/RequestResponse.h b/CefSharp.Core/Internals/RequestResponse.h
index 2486a646f6..adf3bbfb2d 100644
--- a/CefSharp.Core/Internals/RequestResponse.h
+++ b/CefSharp.Core/Internals/RequestResponse.h
@@ -22,9 +22,8 @@ namespace CefSharp
Respond
};
- private ref class RequestResponse : IRequestResponse
+ private ref class RequestResponse : IResponse
{
- IRequest^ _request;
Stream^ _responseStream;
String^ _mimeType;
String^ _redirectUrl;
@@ -34,9 +33,7 @@ namespace CefSharp
NameValueCollection^ _responseHeaders;
internal:
- RequestResponse(IRequest^ request) :
- _action(ResponseAction::Continue),
- _request(request)
+ RequestResponse() : _action(ResponseAction::Continue)
{
}
@@ -50,7 +47,6 @@ namespace CefSharp
public:
virtual void Cancel();
- virtual property IRequest^ Request { IRequest^ get() { return _request; } }
virtual void Redirect(String^ url);
virtual void RespondWith(Stream^ stream, String^ mimeType);
virtual void RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders);
diff --git a/CefSharp.Example/RequestHandler.cs b/CefSharp.Example/RequestHandler.cs
index d4853f011d..dc29bfb325 100644
--- a/CefSharp.Example/RequestHandler.cs
+++ b/CefSharp.Example/RequestHandler.cs
@@ -21,14 +21,13 @@ void IRequestHandler.OnPluginCrashed(IWebBrowser browser, string pluginPath)
// TODO: Add your own code here for handling scenarios where a plugin crashed, for one reason or another.
}
- bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequestResponse requestResponse)
+ bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response)
{
- IRequest request = requestResponse.Request;
if (request.Url.StartsWith(ResourceUrl.ToString()))
{
Stream resourceStream = new MemoryStream(Encoding.UTF8.GetBytes(
"Success
This document is loaded from a System.IO.Stream
"));
- requestResponse.RespondWith(resourceStream, "text/html");
+ response.RespondWith(resourceStream, "text/html");
}
return false;
diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj
index cead85d646..295db772a3 100644
--- a/CefSharp/CefSharp.csproj
+++ b/CefSharp/CefSharp.csproj
@@ -89,6 +89,7 @@
+
@@ -130,7 +131,6 @@
-
diff --git a/CefSharp/IRequestHandler.cs b/CefSharp/IRequestHandler.cs
index df10479fe6..1681737dfd 100644
--- a/CefSharp/IRequestHandler.cs
+++ b/CefSharp/IRequestHandler.cs
@@ -29,9 +29,10 @@ public interface IRequestHandler
/// Called before a resource request is loaded.
///
/// the browser object
- /// the request response object - can be modified in this callback
+ /// the request
+ /// the response - can be modified in this callback
/// To cancel loading of the resource return true or false o allow the resource to load normally.
- bool OnBeforeResourceLoad(IWebBrowser browser, IRequestResponse requestResponse);
+ bool OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response);
// TODO: Investigate how we can support in CEF3.
//void OnResourceResponse(IWebBrowser browser, string url, int status, string statusText, string mimeType, WebHeaderCollection headers);
diff --git a/CefSharp/IRequestResponse.cs b/CefSharp/IRequestResponse.cs
deleted file mode 100644
index d50bf3958c..0000000000
--- a/CefSharp/IRequestResponse.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
-
-using System.IO;
-
-namespace CefSharp
-{
- public interface IRequestResponse
- {
- // TODO: Improve these comments.
-
- /// cancel the request, return nothing
- void Cancel();
-
- /// the current request
- IRequest Request { get; }
-
- /// respond with redirection to the provided URL
- void Redirect(string url);
-
- /// respond with data from Stream
- void RespondWith(Stream stream, string mimeType);
- }
-}
diff --git a/CefSharp/IResponse.cs b/CefSharp/IResponse.cs
new file mode 100644
index 0000000000..6fe18230b3
--- /dev/null
+++ b/CefSharp/IResponse.cs
@@ -0,0 +1,20 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using System.IO;
+
+namespace CefSharp
+{
+ public interface IResponse
+ {
+ /// cancel the request, return nothing
+ void Cancel();
+
+ /// respond with redirection to the provided URL
+ void Redirect(string url);
+
+ /// respond with data from Stream
+ void RespondWith(Stream stream, string mimeType);
+ }
+}
From 2d262f68815910b7d4fb2364c54ac0b7538a9d99 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 5 Nov 2014 13:04:41 +1000
Subject: [PATCH 021/134] Rename RequestResponse to Response
---
CefSharp.Core/CefSharp.Core.vcxproj | 4 ++--
CefSharp.Core/CefSharp.Core.vcxproj.filters | 12 ++++++------
CefSharp.Core/Internals/ClientAdapter.cpp | 4 ++--
.../Internals/{RequestResponse.cpp => Response.cpp} | 10 +++++-----
.../Internals/{RequestResponse.h => Response.h} | 4 ++--
5 files changed, 17 insertions(+), 17 deletions(-)
rename CefSharp.Core/Internals/{RequestResponse.cpp => Response.cpp} (75%)
rename CefSharp.Core/Internals/{RequestResponse.h => Response.h} (93%)
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index f8a74eca6e..6f9d469470 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -224,7 +224,7 @@
-
+
@@ -253,7 +253,7 @@
-
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index ef7967b7f0..235bda890f 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -41,9 +41,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -56,6 +53,9 @@
Source Files
+
+ Source Files
+
@@ -115,9 +115,6 @@
Header Files
-
- Header Files
-
Header Files
@@ -130,6 +127,9 @@
Header Files
+
+ Header Files
+
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 83641fa0b5..6fe00694fd 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -8,7 +8,7 @@
#include "Internals/CefWebPluginInfoWrapper.h"
#include "Internals/CefContextMenuParamsWrapper.h"
#include "Internals/JavascriptBinding/BindingHandler.h"
-#include "Internals/RequestResponse.h"
+#include "Internals/Response.h"
#include "ClientAdapter.h"
#include "Cef.h"
#include "DownloadAdapter.h"
@@ -259,7 +259,7 @@ namespace CefSharp
}
auto requestWrapper = gcnew CefRequestWrapper(request);
- auto response = gcnew RequestResponse();
+ auto response = gcnew Response();
bool ret = handler->OnBeforeResourceLoad(_browserControl, requestWrapper, response);
diff --git a/CefSharp.Core/Internals/RequestResponse.cpp b/CefSharp.Core/Internals/Response.cpp
similarity index 75%
rename from CefSharp.Core/Internals/RequestResponse.cpp
rename to CefSharp.Core/Internals/Response.cpp
index 9e1a8b97c0..1223a987a6 100644
--- a/CefSharp.Core/Internals/RequestResponse.cpp
+++ b/CefSharp.Core/Internals/Response.cpp
@@ -3,29 +3,29 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "Stdafx.h"
-#include "RequestResponse.h"
+#include "Response.h"
namespace CefSharp
{
namespace Internals
{
- void RequestResponse::Cancel()
+ void Response::Cancel()
{
_action = ResponseAction::Cancel;
}
- void RequestResponse::Redirect(String^ url)
+ void Response::Redirect(String^ url)
{
_redirectUrl = url;
_action = ResponseAction::Redirect;
}
- void RequestResponse::RespondWith(Stream^ stream, String^ mimeType)
+ void Response::RespondWith(Stream^ stream, String^ mimeType)
{
RespondWith(stream, mimeType, "OK", 200, nullptr);
}
- void RequestResponse::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
+ void Response::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
{
if (String::IsNullOrEmpty(mimeType))
{
diff --git a/CefSharp.Core/Internals/RequestResponse.h b/CefSharp.Core/Internals/Response.h
similarity index 93%
rename from CefSharp.Core/Internals/RequestResponse.h
rename to CefSharp.Core/Internals/Response.h
index adf3bbfb2d..f06bfff5da 100644
--- a/CefSharp.Core/Internals/RequestResponse.h
+++ b/CefSharp.Core/Internals/Response.h
@@ -22,7 +22,7 @@ namespace CefSharp
Respond
};
- private ref class RequestResponse : IResponse
+ private ref class Response : IResponse
{
Stream^ _responseStream;
String^ _mimeType;
@@ -33,7 +33,7 @@ namespace CefSharp
NameValueCollection^ _responseHeaders;
internal:
- RequestResponse() : _action(ResponseAction::Continue)
+ Response() : _action(ResponseAction::Continue)
{
}
From 13349a93cfbcfd45893abdbc9bfb4eff3dabccc1 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 5 Nov 2014 13:54:50 +1000
Subject: [PATCH 022/134] Revert "Split RequestResponse into Request and
Response objects"
This reverts commit 66d953d2b3efc25e44c7d98ec8809022cef78d67.
---
CefSharp.Core/CefSharp.Core.vcxproj | 4 +--
CefSharp.Core/CefSharp.Core.vcxproj.filters | 12 ++++-----
CefSharp.Core/Internals/ClientAdapter.cpp | 14 +++++------
.../{Response.cpp => RequestResponse.cpp} | 10 ++++----
.../{Response.h => RequestResponse.h} | 8 ++++--
CefSharp.Example/RequestHandler.cs | 5 ++--
CefSharp/CefSharp.csproj | 2 +-
CefSharp/IRequestHandler.cs | 5 ++--
CefSharp/IRequestResponse.cs | 25 +++++++++++++++++++
CefSharp/IResponse.cs | 20 ---------------
10 files changed, 57 insertions(+), 48 deletions(-)
rename CefSharp.Core/Internals/{Response.cpp => RequestResponse.cpp} (75%)
rename CefSharp.Core/Internals/{Response.h => RequestResponse.h} (84%)
create mode 100644 CefSharp/IRequestResponse.cs
delete mode 100644 CefSharp/IResponse.cs
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index 6f9d469470..f8a74eca6e 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -224,7 +224,7 @@
-
+
@@ -253,7 +253,7 @@
-
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index 235bda890f..ef7967b7f0 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -41,6 +41,9 @@
Source Files
+
+ Source Files
+
Source Files
@@ -53,9 +56,6 @@
Source Files
-
- Source Files
-
@@ -115,6 +115,9 @@
Header Files
+
+ Header Files
+
Header Files
@@ -127,9 +130,6 @@
Header Files
-
- Header Files
-
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 6fe00694fd..5393b104a3 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -8,7 +8,7 @@
#include "Internals/CefWebPluginInfoWrapper.h"
#include "Internals/CefContextMenuParamsWrapper.h"
#include "Internals/JavascriptBinding/BindingHandler.h"
-#include "Internals/Response.h"
+#include "Internals/RequestResponse.h"
#include "ClientAdapter.h"
#include "Cef.h"
#include "DownloadAdapter.h"
@@ -258,16 +258,16 @@ namespace CefSharp
return false;
}
- auto requestWrapper = gcnew CefRequestWrapper(request);
- auto response = gcnew Response();
+ CefRequestWrapper^ wrapper = gcnew CefRequestWrapper(request);
+ RequestResponse^ requestResponse = gcnew RequestResponse(wrapper);
- bool ret = handler->OnBeforeResourceLoad(_browserControl, requestWrapper, response);
+ bool ret = handler->OnBeforeResourceLoad(_browserControl, requestResponse);
- if (response->Action == ResponseAction::Redirect)
+ if (requestResponse->Action == ResponseAction::Redirect)
{
- request->SetURL(StringUtils::ToNative(response->RedirectUrl));
+ request->SetURL(StringUtils::ToNative(requestResponse->RedirectUrl));
}
- else if (response->Action == ResponseAction::Respond)
+ else if (requestResponse->Action == ResponseAction::Respond)
{
throw gcnew NotImplementedException("Respond is not yet supported.");
diff --git a/CefSharp.Core/Internals/Response.cpp b/CefSharp.Core/Internals/RequestResponse.cpp
similarity index 75%
rename from CefSharp.Core/Internals/Response.cpp
rename to CefSharp.Core/Internals/RequestResponse.cpp
index 1223a987a6..9e1a8b97c0 100644
--- a/CefSharp.Core/Internals/Response.cpp
+++ b/CefSharp.Core/Internals/RequestResponse.cpp
@@ -3,29 +3,29 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "Stdafx.h"
-#include "Response.h"
+#include "RequestResponse.h"
namespace CefSharp
{
namespace Internals
{
- void Response::Cancel()
+ void RequestResponse::Cancel()
{
_action = ResponseAction::Cancel;
}
- void Response::Redirect(String^ url)
+ void RequestResponse::Redirect(String^ url)
{
_redirectUrl = url;
_action = ResponseAction::Redirect;
}
- void Response::RespondWith(Stream^ stream, String^ mimeType)
+ void RequestResponse::RespondWith(Stream^ stream, String^ mimeType)
{
RespondWith(stream, mimeType, "OK", 200, nullptr);
}
- void Response::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
+ void RequestResponse::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
{
if (String::IsNullOrEmpty(mimeType))
{
diff --git a/CefSharp.Core/Internals/Response.h b/CefSharp.Core/Internals/RequestResponse.h
similarity index 84%
rename from CefSharp.Core/Internals/Response.h
rename to CefSharp.Core/Internals/RequestResponse.h
index f06bfff5da..2486a646f6 100644
--- a/CefSharp.Core/Internals/Response.h
+++ b/CefSharp.Core/Internals/RequestResponse.h
@@ -22,8 +22,9 @@ namespace CefSharp
Respond
};
- private ref class Response : IResponse
+ private ref class RequestResponse : IRequestResponse
{
+ IRequest^ _request;
Stream^ _responseStream;
String^ _mimeType;
String^ _redirectUrl;
@@ -33,7 +34,9 @@ namespace CefSharp
NameValueCollection^ _responseHeaders;
internal:
- Response() : _action(ResponseAction::Continue)
+ RequestResponse(IRequest^ request) :
+ _action(ResponseAction::Continue),
+ _request(request)
{
}
@@ -47,6 +50,7 @@ namespace CefSharp
public:
virtual void Cancel();
+ virtual property IRequest^ Request { IRequest^ get() { return _request; } }
virtual void Redirect(String^ url);
virtual void RespondWith(Stream^ stream, String^ mimeType);
virtual void RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders);
diff --git a/CefSharp.Example/RequestHandler.cs b/CefSharp.Example/RequestHandler.cs
index dc29bfb325..d4853f011d 100644
--- a/CefSharp.Example/RequestHandler.cs
+++ b/CefSharp.Example/RequestHandler.cs
@@ -21,13 +21,14 @@ void IRequestHandler.OnPluginCrashed(IWebBrowser browser, string pluginPath)
// TODO: Add your own code here for handling scenarios where a plugin crashed, for one reason or another.
}
- bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response)
+ bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequestResponse requestResponse)
{
+ IRequest request = requestResponse.Request;
if (request.Url.StartsWith(ResourceUrl.ToString()))
{
Stream resourceStream = new MemoryStream(Encoding.UTF8.GetBytes(
"Success
This document is loaded from a System.IO.Stream
"));
- response.RespondWith(resourceStream, "text/html");
+ requestResponse.RespondWith(resourceStream, "text/html");
}
return false;
diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj
index 295db772a3..cead85d646 100644
--- a/CefSharp/CefSharp.csproj
+++ b/CefSharp/CefSharp.csproj
@@ -89,7 +89,6 @@
-
@@ -131,6 +130,7 @@
+
diff --git a/CefSharp/IRequestHandler.cs b/CefSharp/IRequestHandler.cs
index 1681737dfd..df10479fe6 100644
--- a/CefSharp/IRequestHandler.cs
+++ b/CefSharp/IRequestHandler.cs
@@ -29,10 +29,9 @@ public interface IRequestHandler
/// Called before a resource request is loaded.
///
/// the browser object
- /// the request
- /// the response - can be modified in this callback
+ /// the request response object - can be modified in this callback
/// To cancel loading of the resource return true or false o allow the resource to load normally.
- bool OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response);
+ bool OnBeforeResourceLoad(IWebBrowser browser, IRequestResponse requestResponse);
// TODO: Investigate how we can support in CEF3.
//void OnResourceResponse(IWebBrowser browser, string url, int status, string statusText, string mimeType, WebHeaderCollection headers);
diff --git a/CefSharp/IRequestResponse.cs b/CefSharp/IRequestResponse.cs
new file mode 100644
index 0000000000..d50bf3958c
--- /dev/null
+++ b/CefSharp/IRequestResponse.cs
@@ -0,0 +1,25 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using System.IO;
+
+namespace CefSharp
+{
+ public interface IRequestResponse
+ {
+ // TODO: Improve these comments.
+
+ /// cancel the request, return nothing
+ void Cancel();
+
+ /// the current request
+ IRequest Request { get; }
+
+ /// respond with redirection to the provided URL
+ void Redirect(string url);
+
+ /// respond with data from Stream
+ void RespondWith(Stream stream, string mimeType);
+ }
+}
diff --git a/CefSharp/IResponse.cs b/CefSharp/IResponse.cs
deleted file mode 100644
index 6fe18230b3..0000000000
--- a/CefSharp/IResponse.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
-
-using System.IO;
-
-namespace CefSharp
-{
- public interface IResponse
- {
- /// cancel the request, return nothing
- void Cancel();
-
- /// respond with redirection to the provided URL
- void Redirect(string url);
-
- /// respond with data from Stream
- void RespondWith(Stream stream, string mimeType);
- }
-}
From 3b9de609a3376bd67c524007d12e058317068f0a Mon Sep 17 00:00:00 2001
From: amaitland
Date: Thu, 6 Nov 2014 14:30:27 +1000
Subject: [PATCH 023/134] Update build.ps1 to include param for AssemblyVersion
- has problem with -pre tag
---
CefSharp/Properties/AssemblyInfo.cs | 2 +-
build.ps1 | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs
index 5a97b884d8..ac717d4749 100644
--- a/CefSharp/Properties/AssemblyInfo.cs
+++ b/CefSharp/Properties/AssemblyInfo.cs
@@ -33,7 +33,7 @@ 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 = "39.0.0.0";
+ public const string AssemblyVersion = "39.0.0";
public const string AssemblyFileVersion = "39.0.0.0";
public const string AssemblyCopyright = "Copyright © The CefSharp Authors 2010-2014";
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
diff --git a/build.ps1 b/build.ps1
index b6ecb84d84..d95440387f 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,8 +3,10 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "39.0.0",
- [Parameter(Position = 2)]
+ [string] $Version = "39.0.0-pre01",
+ [Parameter(Position = 2)]
+ [string] $AssemblyVersion = "39.0.0",
+ [Parameter(Position = 3)]
[string] $RedistVersion = "3.2171.1899-pre0"
)
@@ -249,7 +251,7 @@ function WriteAssemblyVersion
$Regex = 'public const string AssemblyVersion = "(.*)"';
$AssemblyInfo = Get-Content $Filename
- $NewString = $AssemblyInfo -replace $Regex, "public const string AssemblyVersion = ""$Version"""
+ $NewString = $AssemblyInfo -replace $Regex, "public const string AssemblyVersion = ""$AssemblyVersion"""
$NewString | Set-Content $Filename -Encoding UTF8
}
From 38380582c678d69688a3313f0230ff5ccdd89859 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Thu, 6 Nov 2014 14:31:00 +1000
Subject: [PATCH 024/134] Fix mistake in CefSharp.Common.nuspec - packages were
incorrect
---
NuGet/CefSharp.Common.nuspec | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec
index 424648e4d2..67fdc052a6 100644
--- a/NuGet/CefSharp.Common.nuspec
+++ b/NuGet/CefSharp.Common.nuspec
@@ -12,10 +12,8 @@
chrome browser
Copyright © 2010-2014 The CefSharp Authors
-
-
-
-
+
+
From 7783769eadeb56aff41fb9379a638d59af6ba42e Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 14 Nov 2014 09:13:04 +1000
Subject: [PATCH 025/134] Update build version and feed url in appveyor.yml
---
appveyor.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 9401ba970e..3014dab01f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,7 +1,7 @@
environment:
VisualStudioVersion: 11.0
-version: 37.0.0-CI{build}
+version: 39.0.0-CI{build}
shallow_clone: true
@@ -19,7 +19,7 @@ artifacts:
# Publish to myget.org feed
deploy:
provider: NuGet
- server: https://www.myget.org/F/cefsharp/
+ server: https://www.myget.org/F/cefsharp-2171/
api_key:
secure: T3yoLSioRwXa7byUvu17t4I88RTQTvICh2j+KplLb1YVimd1IYy2m2akGqgOMJhY
skip_symbols: true
From acfad1fcbf35d36d7e901158c2c9330c5e32f6bd Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 14 Nov 2014 09:15:29 +1000
Subject: [PATCH 026/134] Untabify
---
build.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.ps1 b/build.ps1
index b16e0f533b..4b83c1524f 100644
--- a/build.ps1
+++ b/build.ps1
@@ -4,7 +4,7 @@ param(
[string] $Target = "nupkg",
[Parameter(Position = 1)]
[string] $Version = "39.0.0-pre01",
- [Parameter(Position = 2)]
+ [Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
[string] $RedistVersion = "3.2171.1899-pre0"
From 065bb055f08680af2f3062af34538efba43873b9 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 14 Nov 2014 09:36:35 +1000
Subject: [PATCH 027/134] Cleanup managedCefBrowserAdapter address property,
can now be set directly when creating the offscreen browser
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 14 ++------------
CefSharp.Wpf/ChromiumWebBrowser.cs | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 09327c8aba..416b9411c0 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -23,7 +23,6 @@ namespace CefSharp
MCefRefPtr _renderClientAdapter;
BrowserProcessServiceHost^ _browserProcessServiceHost;
IWebBrowserInternal^ _webBrowserInternal;
- String^ _address;
JavascriptObjectRepository^ _javaScriptObjectRepository;
protected:
@@ -39,7 +38,6 @@ namespace CefSharp
}
_webBrowserInternal = nullptr;
- _address = nullptr;
_javaScriptObjectRepository = nullptr;
DisposableResource::DoDispose(isDisposing);
@@ -53,12 +51,12 @@ namespace CefSharp
_javaScriptObjectRepository = gcnew JavascriptObjectRepository();
}
- void CreateOffscreenBrowser(BrowserSettings^ browserSettings)
+ void CreateOffscreenBrowser(BrowserSettings^ browserSettings, String^ address)
{
HWND hwnd = HWND();
CefWindowInfo window;
window.SetAsWindowless(hwnd, TRUE);
- CefString addressNative = StringUtils::ToNative(_address);
+ CefString addressNative = StringUtils::ToNative(address);
if (!CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings, NULL))
@@ -79,7 +77,6 @@ namespace CefSharp
void LoadUrl(String^ address)
{
- _address = address;
auto cefFrame = _renderClientAdapter->TryGetCefMainFrame();
if (cefFrame != nullptr)
@@ -96,13 +93,6 @@ namespace CefSharp
if(_webBrowserInternal != nullptr)
{
_webBrowserInternal->OnInitialized();
-
- auto address = _address;
-
- if (address != nullptr)
- {
- LoadUrl(address);
- }
}
}
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 641b24ada4..b7c8e1d290 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -476,7 +476,7 @@ private void CreateOffscreenBrowserWhenActualSizeChanged()
return;
}
- managedCefBrowserAdapter.CreateOffscreenBrowser(BrowserSettings ?? new BrowserSettings());
+ managedCefBrowserAdapter.CreateOffscreenBrowser(BrowserSettings ?? new BrowserSettings(), Address);
browserCreated = true;
}
From 76c002aac94a889127fbe22665cbc378d6e55bf2 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 14 Nov 2014 09:38:43 +1000
Subject: [PATCH 028/134] Cleanup OnPreviewKey
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index b7c8e1d290..7e8073f824 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -857,19 +857,16 @@ private void OnPreviewKey(KeyEventArgs e)
// we have to handle these extra keys here. Hooking the Tab key like this makes the tab focusing in essence work like
// KeyboardNavigation.TabNavigation="Cycle"; you will never be able to Tab out of the web browser control.
var modifiers = GetModifiers(e);
+ var sendKey = KeysToSendtoBrowser.Contains(e.Key);
- if (KeysToSendtoBrowser.Contains(e.Key) || modifiers > 0)
+ if (sendKey || modifiers > 0)
{
var message = (int)(e.IsDown ? WM.KEYDOWN : WM.KEYUP);
var virtualKey = KeyInterop.VirtualKeyFromKey(e.Key);
managedCefBrowserAdapter.SendKeyEvent(message, virtualKey, modifiers);
- if (KeysToSendtoBrowser.Contains(e.Key))
- {
- e.Handled = true;
- }
-
+ e.Handled = sendKey;
}
}
From 7058a9bc2972b90c682c75754e3782c33815f8db Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 18 Nov 2014 13:53:55 +1000
Subject: [PATCH 029/134] Update `OffScreen` browser to support `2171`
---
.../CefSharp.OffScreen.Example.csproj | 8 ++++----
CefSharp.OffScreen.Example/Program.cs | 5 +----
CefSharp.OffScreen.Example/packages.config | 4 ++--
CefSharp.OffScreen/ChromiumWebBrowser.cs | 17 ++++++++++++++---
4 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
index 16bf7a69c2..f5b2a1a5bb 100644
--- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
+++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
@@ -88,9 +88,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/Program.cs b/CefSharp.OffScreen.Example/Program.cs
index cd57525a62..592af442ac 100644
--- a/CefSharp.OffScreen.Example/Program.cs
+++ b/CefSharp.OffScreen.Example/Program.cs
@@ -25,15 +25,12 @@ public static void Main(string[] args)
CefExample.Init();
// Create the offscreen Chromium browser.
- browser = new ChromiumWebBrowser();
+ browser = new ChromiumWebBrowser(testUrl);
// An event that is fired when the first page is finished loading.
// This returns to us from another thread.
browser.FrameLoadEnd += BrowserFrameLoadEnd;
- // Start loading the test URL in Chrome's thread.
- browser.Load(testUrl);
-
// We have to wait for something, otherwise the process will exit too soon.
Console.ReadKey();
diff --git a/CefSharp.OffScreen.Example/packages.config b/CefSharp.OffScreen.Example/packages.config
index 084feef8ea..08fe3cd2d4 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.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index 3c938db125..b8943c9223 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -35,17 +35,18 @@ public class ChromiumWebBrowser : IRenderWebBrowser
/// This must be set to something other than 0x0 otherwise Chromium will not render,
/// and the ScreenshotAsync task will deadlock.
private System.Drawing.Size size = new System.Drawing.Size(1366, 768);
-
+
///
/// Create a new offscreen Chromium with the initial URL of "about:blank".
///
+ /// Initial address (url) to load
/// The browser settings to use. If null, the default settings are used.
- public ChromiumWebBrowser(BrowserSettings browserSettings = null)
+ public ChromiumWebBrowser(string address, BrowserSettings browserSettings = null)
{
Cef.AddDisposable(this);
managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this);
- managedCefBrowserAdapter.CreateOffscreenBrowser(browserSettings ?? new BrowserSettings());
+ managedCefBrowserAdapter.CreateOffscreenBrowser(browserSettings ?? new BrowserSettings(), address);
}
public void Dispose()
@@ -195,6 +196,16 @@ public void CloseDevTools()
throw new NotImplementedException();
}
+ public void ReplaceMisspelling(string word)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddWordToDictionary(string word)
+ {
+ throw new NotImplementedException();
+ }
+
public string Address { get; set; }
public bool CanGoBack { get; private set; }
From e9defe152373b4b7f748b9cb26c77bc65f97b4f1 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 19 Nov 2014 22:58:46 +1000
Subject: [PATCH 030/134] Update to 3.2171.1902-pre packages
---
.../CefSharp.BrowserSubprocess.Core.vcxproj | 6 +++---
CefSharp.BrowserSubprocess.Core/packages.config | 2 +-
CefSharp.Core/CefSharp.Core.vcxproj | 6 +++---
CefSharp.Core/packages.config | 2 +-
.../CefSharp.OffScreen.Example.csproj | 9 +++++----
CefSharp.OffScreen.Example/packages.config | 4 ++--
CefSharp.Test/CefSharp.Test.csproj | 10 +++++-----
CefSharp.Test/packages.config | 4 ++--
.../CefSharp.WinForms.Example.csproj | 10 +++++-----
CefSharp.WinForms.Example/packages.config | 4 ++--
CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj | 10 +++++-----
CefSharp.Wpf.Example/packages.config | 4 ++--
12 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
index 2fb2f63c72..23f21248cf 100644
--- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
+++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -66,7 +66,7 @@
- f6c01df1
+ e7e3cc55
true
@@ -198,6 +198,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config
index 96bfbf846f..29df00376a 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 b1644c5d4f..8e592415a9 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -66,7 +66,7 @@
<_ProjectFileVersion>11.0.51106.1
- 3c9e3304
+ 35b130a2
bin\$(Configuration)\
@@ -280,6 +280,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/packages.config b/CefSharp.Core/packages.config
index 96bfbf846f..29df00376a 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 f5b2a1a5bb..52a4335c8f 100644
--- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
+++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
@@ -12,6 +12,7 @@
v4.0
512
Client
+ 62ab0abb
true
@@ -88,9 +89,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 08fe3cd2d4..b71b02da62 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.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj
index c4733404e7..0d7d0d6d9a 100644
--- a/CefSharp.Test/CefSharp.Test.csproj
+++ b/CefSharp.Test/CefSharp.Test.csproj
@@ -19,7 +19,7 @@
3.5
Client
- afff917a
+ e8407935
true
@@ -142,9 +142,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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.Test/packages.config b/CefSharp.Test/packages.config
index 3de428da91..2fb56cd67a 100644
--- a/CefSharp.Test/packages.config
+++ b/CefSharp.Test/packages.config
@@ -2,8 +2,8 @@
-
-
+
+
\ 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 d72cf3c54b..3f63e8c899 100644
--- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
+++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
@@ -21,7 +21,7 @@
3.5
Client
- d2750ac0
+ da768d66
x64
@@ -150,9 +150,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 740f5addb9..1a95f9f5a3 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 c758b17b92..b7c20a44a7 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -21,7 +21,7 @@
3.5
Client
- 1f156171
+ afb6365a
true
@@ -166,9 +166,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 740f5addb9..1a95f9f5a3 100644
--- a/CefSharp.Wpf.Example/packages.config
+++ b/CefSharp.Wpf.Example/packages.config
@@ -1,5 +1,5 @@

-
-
+
+
\ No newline at end of file
From 9e5c0707c890c00b173f669e95a5ad2ed4c42ad3 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Thu, 27 Nov 2014 23:29:51 +0100
Subject: [PATCH 031/134] Updated cef redist to 3.2171.1902-pre0
---
build.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.ps1 b/build.ps1
index 66069ad2c1..696463bdcc 100644
--- a/build.ps1
+++ b/build.ps1
@@ -7,7 +7,7 @@ param(
[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
- [string] $RedistVersion = "3.2171.1899-pre0"
+ [string] $RedistVersion = "3.2171.1902-pre0"
)
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
From 81532639e22bd5005c3dcae9bcf625d454118614 Mon Sep 17 00:00:00 2001
From: Bodekaer
Date: Thu, 27 Nov 2014 23:30:24 +0100
Subject: [PATCH 032/134] Cleaner naming of CefSharp dll references when
automatically imported from NuGet to VS
---
NuGet/CefSharp.Common.props | 21 ++++++++++++---------
NuGet/CefSharp.Wpf.props | 11 ++++++-----
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/NuGet/CefSharp.Common.props b/NuGet/CefSharp.Common.props
index 8533dae14e..08de47cc0b 100644
--- a/NuGet/CefSharp.Common.props
+++ b/NuGet/CefSharp.Common.props
@@ -1,14 +1,17 @@
-
-
-
-
-
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.dll
+
diff --git a/NuGet/CefSharp.Wpf.props b/NuGet/CefSharp.Wpf.props
index ed206ec0b7..d80635b327 100644
--- a/NuGet/CefSharp.Wpf.props
+++ b/NuGet/CefSharp.Wpf.props
@@ -1,10 +1,11 @@
-
-
-
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Wpf.dll
+
From a0b2a8a59018316ed7310726466a1e49b62e2c87 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 28 Nov 2014 11:49:33 +1000
Subject: [PATCH 033/134] Update project references in nuget props files
---
NuGet/CefSharp.OffScreen.props | 12 +++++++-----
NuGet/CefSharp.WinForms.props | 11 ++++++-----
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/NuGet/CefSharp.OffScreen.props b/NuGet/CefSharp.OffScreen.props
index 6689b254c2..05638713c1 100644
--- a/NuGet/CefSharp.OffScreen.props
+++ b/NuGet/CefSharp.OffScreen.props
@@ -1,10 +1,12 @@
-
-
-
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.OffScreen.dll
+
+
diff --git a/NuGet/CefSharp.WinForms.props b/NuGet/CefSharp.WinForms.props
index 05acaa7145..c340077edc 100644
--- a/NuGet/CefSharp.WinForms.props
+++ b/NuGet/CefSharp.WinForms.props
@@ -1,10 +1,11 @@
-
-
-
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll
+
+
+ $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.WinForms.dll
+
From d38118393b9e698ebc37316130eb0d6bf0359eca Mon Sep 17 00:00:00 2001
From: amaitland
Date: Wed, 3 Dec 2014 11:21:22 +1000
Subject: [PATCH 034/134] Release handlers used for InteropBitmap when
disposing of RenderClientAdapter
---
CefSharp.Core/Internals/RenderClientAdapter.h | 39 +++++++++++++------
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 9e2cf767b4..c564cf6c4c 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -41,13 +41,25 @@ namespace CefSharp
_renderWebBrowser = nullptr;
_webBrowserInternal = nullptr;
+ DisposeBitmapInfo(MainBitmapInfo);
+
delete MainBitmapInfo;
MainBitmapInfo = nullptr;
+ DisposeBitmapInfo(PopupBitmapInfo);
+
delete PopupBitmapInfo;
PopupBitmapInfo = nullptr;
}
+ void DisposeBitmapInfo(BitmapInfo^ bitmapInfo)
+ {
+ auto backBufferHandle = (HANDLE)bitmapInfo->BackBufferHandle;
+ auto fileMappingHandle = (HANDLE)bitmapInfo->FileMappingHandle;
+
+ ReleaseBitmapHandlers(&backBufferHandle, &fileMappingHandle);
+ }
+
// CefClient
virtual CefRefPtr GetRenderHandler() OVERRIDE{ return this; };
@@ -186,17 +198,7 @@ namespace CefSharp
{
_renderWebBrowser->ClearBitmap(bitmapInfo);
- if (*backBufferHandle != NULL)
- {
- UnmapViewOfFile(*backBufferHandle);
- *backBufferHandle = NULL;
- }
-
- if (*fileMappingHandle != NULL)
- {
- CloseHandle(*fileMappingHandle);
- *fileMappingHandle = NULL;
- }
+ ReleaseBitmapHandlers(backBufferHandle, fileMappingHandle);
*fileMappingHandle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, numberOfBytes, NULL);
if (*fileMappingHandle == NULL)
@@ -221,6 +223,21 @@ namespace CefSharp
CopyMemory(*backBufferHandle, (void*)buffer, numberOfBytes);
};
+ void ReleaseBitmapHandlers(HANDLE* backBufferHandle, HANDLE* fileMappingHandle)
+ {
+ if (*backBufferHandle != NULL)
+ {
+ UnmapViewOfFile(*backBufferHandle);
+ *backBufferHandle = NULL;
+ }
+
+ if (*fileMappingHandle != NULL)
+ {
+ CloseHandle(*fileMappingHandle);
+ *fileMappingHandle = NULL;
+ }
+ }
+
IMPLEMENT_REFCOUNTING(RenderClientAdapter)
};
}
From 259b37d7f2128c8f96b2b020e3945a0fe8bba3e6 Mon Sep 17 00:00:00 2001
From: "treverj@tjdiversified.com"
Date: Tue, 2 Dec 2014 22:47:18 -0600
Subject: [PATCH 035/134] Changed Resize function to better match the
CefClient's Add NotifyMoveOrResizeStarted Method
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 38 ++++++++++++++++++++----
CefSharp.WinForms/ChromiumWebBrowser.cs | 7 +++++
2 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 67f72ec31f..c6685955f9 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -471,11 +471,39 @@ namespace CefSharp
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
}
- void Resize(int width, int height)
- {
- HWND browserHwnd = _renderClientAdapter->GetBrowserHwnd();
- SetWindowPos(browserHwnd, NULL, 0, 0, width, height, SWP_NOZORDER);
- }
+ void Resize(int width, int height)
+ {
+ CefWindowHandle hwnd = _renderClientAdapter->TryGetCefHost()->GetWindowHandle();
+ if (hwnd) {
+ if (width <= 0 && height <= 0) {
+ // For windowed browsers when the frame window is minimized set the
+ // browser window size to 0x0 to reduce resource usage.
+ SetWindowPos(hwnd, NULL,
+ 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+ }
+ else {
+ // Resize the window and address bar to match the new frame size.
+ RECT rect;
+ GetClientRect(hwnd, &rect);
+ HDWP hdwp = BeginDeferWindowPos(1);
+ hdwp = DeferWindowPos(hdwp, hwnd, NULL,
+ 0, 0, width,
+ height, SWP_NOZORDER);
+ EndDeferWindowPos(hdwp);
+ }
+ }
+ }
+
+ void NotifyMoveOrResizeStarted()
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->NotifyMoveOrResizeStarted();
+ }
+ }
+
void RegisterJsObject(String^ name, Object^ object)
{
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 9d5a882c0b..559de14acc 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -360,6 +360,13 @@ private void ResizeBrowser()
}
}
+ public void NotifyMoveOrResizeStarted()
+ {
+ if (IsBrowserInitialized && managedCefBrowserAdapter != null)
+ {
+ managedCefBrowserAdapter.NotifyMoveOrResizeStarted();
+ }
+ }
public void ReplaceMisspelling(string word)
{
From 0ae0e68ba1ec53126b261e1757a07ed99e77953f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bjarte=20Skog=C3=B8y?=
Date: Wed, 3 Dec 2014 09:35:25 +0100
Subject: [PATCH 036/134] Implemented WasHidden for the WPF ChromiumWebBrowser
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 10 ++++++++++
CefSharp.Wpf/ChromiumWebBrowser.cs | 3 +++
2 files changed, 13 insertions(+)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 67f72ec31f..0a1914ec2e 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -116,6 +116,16 @@ namespace CefSharp
}
}
+ void WasHidden(bool hidden)
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->WasHidden(hidden);
+ }
+ }
+
void SendFocusEvent(bool isFocused)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 1bf851e207..c86224ea43 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -506,6 +506,9 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
// If the control was not rendered yet when we tried to set up the source hook, it may have failed (since it couldn't
// lookup the HwndSource), so we need to retry it whenever visibility changes.
AddSourceHookIfNotAlreadyPresent();
+
+ var isVisible = (bool)args.NewValue;
+ managedCefBrowserAdapter.WasHidden(!isVisible);
}
private static void OnApplicationExit(object sender, ExitEventArgs e)
From 4297893b616c0f3f9bf7917bcea5750564bfd732 Mon Sep 17 00:00:00 2001
From: "treverj@tjdiversified.com"
Date: Wed, 3 Dec 2014 09:25:46 -0600
Subject: [PATCH 037/134] Code cleanup and changes based on comments
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 61 +++++++++++-------------
CefSharp.WinForms/ChromiumWebBrowser.cs | 2 +-
2 files changed, 30 insertions(+), 33 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index c6685955f9..b60ba5bdc5 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -26,6 +26,8 @@ namespace CefSharp
JavascriptObjectRepository^ _javaScriptObjectRepository;
protected:
+
+
virtual void DoDispose(bool isDisposing) override
{
Close();
@@ -43,6 +45,7 @@ namespace CefSharp
DisposableResource::DoDispose(isDisposing);
};
+
public:
ManagedCefBrowserAdapter(IWebBrowserInternal^ webBrowserInternal)
{
@@ -471,38 +474,32 @@ namespace CefSharp
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
}
- void Resize(int width, int height)
- {
- CefWindowHandle hwnd = _renderClientAdapter->TryGetCefHost()->GetWindowHandle();
- if (hwnd) {
- if (width <= 0 && height <= 0) {
- // For windowed browsers when the frame window is minimized set the
- // browser window size to 0x0 to reduce resource usage.
- SetWindowPos(hwnd, NULL,
- 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
- }
- else {
- // Resize the window and address bar to match the new frame size.
- RECT rect;
- GetClientRect(hwnd, &rect);
- HDWP hdwp = BeginDeferWindowPos(1);
- hdwp = DeferWindowPos(hdwp, hwnd, NULL,
- 0, 0, width,
- height, SWP_NOZORDER);
- EndDeferWindowPos(hdwp);
- }
- }
- }
-
- void NotifyMoveOrResizeStarted()
- {
- auto cefHost = _renderClientAdapter->TryGetCefHost();
-
- if (cefHost != nullptr)
- {
- cefHost->NotifyMoveOrResizeStarted();
- }
- }
+ void Resize(int width, int height)
+ {
+ HWND browserHwnd = _renderClientAdapter->GetBrowserHwnd();
+ if (browserHwnd) {
+ if (width == 0 && height == 0)
+ {
+ // For windowed browsers when the frame window is minimized set the
+ // browser window size to 0x0 to reduce resource usage.
+ SetWindowPos(browserHwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+ }
+ else
+ {
+ SetWindowPos(browserHwnd, NULL, 0, 0, width, height, SWP_NOZORDER);
+ }
+ }
+ }
+
+ void NotifyMoveOrResizeStarted()
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->NotifyMoveOrResizeStarted();
+ }
+ }
void RegisterJsObject(String^ name, Object^ object)
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 559de14acc..47bf407f11 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -34,6 +34,7 @@ public class ChromiumWebBrowser : Control, IWebBrowserInternal, IWinFormsWebBrow
public bool CanReload { get; private set; }
public bool IsBrowserInitialized { get; private set; }
+
public double ZoomLevel
{
get { return managedCefBrowserAdapter.GetZoomLevel(); }
@@ -348,7 +349,6 @@ public Task GetTextAsync()
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
-
ResizeBrowser();
}
From c425dd12e0f7ab69250ad4eb52040568ce22cdaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bjarte=20Skog=C3=B8y?=
Date: Wed, 3 Dec 2014 20:25:20 +0100
Subject: [PATCH 038/134] Formatting
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 0a1914ec2e..ff4b81f640 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -122,7 +122,7 @@ namespace CefSharp
if (cefHost != nullptr)
{
- cefHost->WasHidden(hidden);
+ cefHost->WasHidden(hidden);
}
}
From 368267711ec565c26b2126ac83fbe26496c046b3 Mon Sep 17 00:00:00 2001
From: "treverj@tjdiversified.com"
Date: Wed, 3 Dec 2014 09:25:46 -0600
Subject: [PATCH 039/134] Code cleanup and changes based on comments
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 72 +++++++++++++-----------
CefSharp.WinForms/ChromiumWebBrowser.cs | 1 -
2 files changed, 39 insertions(+), 34 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index c6685955f9..2e45f116ac 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -18,14 +18,18 @@ using namespace System::Threading::Tasks;
namespace CefSharp
{
+
public ref class ManagedCefBrowserAdapter : public DisposableResource
{
MCefRefPtr _renderClientAdapter;
BrowserProcessServiceHost^ _browserProcessServiceHost;
IWebBrowserInternal^ _webBrowserInternal;
JavascriptObjectRepository^ _javaScriptObjectRepository;
-
+
+
protected:
+
+
virtual void DoDispose(bool isDisposing) override
{
Close();
@@ -43,7 +47,12 @@ namespace CefSharp
DisposableResource::DoDispose(isDisposing);
};
+
public:
+
+
+
+
ManagedCefBrowserAdapter(IWebBrowserInternal^ webBrowserInternal)
{
_renderClientAdapter = new RenderClientAdapter(webBrowserInternal, gcnew Action(this, &ManagedCefBrowserAdapter::OnAfterBrowserCreated));
@@ -460,6 +469,7 @@ namespace CefSharp
void CreateBrowser(BrowserSettings^ browserSettings, IntPtr^ sourceHandle, String^ address)
{
+
HWND hwnd = static_cast(sourceHandle->ToPointer());
RECT rect;
GetClientRect(hwnd, &rect);
@@ -469,40 +479,36 @@ namespace CefSharp
CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
+
}
- void Resize(int width, int height)
- {
- CefWindowHandle hwnd = _renderClientAdapter->TryGetCefHost()->GetWindowHandle();
- if (hwnd) {
- if (width <= 0 && height <= 0) {
- // For windowed browsers when the frame window is minimized set the
- // browser window size to 0x0 to reduce resource usage.
- SetWindowPos(hwnd, NULL,
- 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
- }
- else {
- // Resize the window and address bar to match the new frame size.
- RECT rect;
- GetClientRect(hwnd, &rect);
- HDWP hdwp = BeginDeferWindowPos(1);
- hdwp = DeferWindowPos(hdwp, hwnd, NULL,
- 0, 0, width,
- height, SWP_NOZORDER);
- EndDeferWindowPos(hdwp);
- }
- }
- }
-
- void NotifyMoveOrResizeStarted()
- {
- auto cefHost = _renderClientAdapter->TryGetCefHost();
-
- if (cefHost != nullptr)
- {
- cefHost->NotifyMoveOrResizeStarted();
- }
- }
+ void Resize(int width, int height)
+ {
+ HWND browserHwnd = _renderClientAdapter->GetBrowserHwnd();
+ if (browserHwnd)
+ {
+ if (width == 0 && height == 0)
+ {
+ // For windowed browsers when the frame window is minimized set the
+ // browser window size to 0x0 to reduce resource usage.
+ SetWindowPos(browserHwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+ }
+ else
+ {
+ SetWindowPos(browserHwnd, NULL, 0, 0, width, height, SWP_NOZORDER);
+ }
+ }
+ }
+
+ void NotifyMoveOrResizeStarted()
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->NotifyMoveOrResizeStarted();
+ }
+ }
void RegisterJsObject(String^ name, Object^ object)
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 559de14acc..c10b71d1b9 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -348,7 +348,6 @@ public Task GetTextAsync()
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
-
ResizeBrowser();
}
From ad5795552c41b84d40115087c2b04561f46461d2 Mon Sep 17 00:00:00 2001
From: "treverj@tjdiversified.com"
Date: Wed, 3 Dec 2014 20:34:35 -0600
Subject: [PATCH 040/134] Code clean up.
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 4 ----
CefSharp.WinForms/ChromiumWebBrowser.cs | 2 --
2 files changed, 6 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 2e45f116ac..e0fa56bff9 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -51,8 +51,6 @@ namespace CefSharp
public:
-
-
ManagedCefBrowserAdapter(IWebBrowserInternal^ webBrowserInternal)
{
_renderClientAdapter = new RenderClientAdapter(webBrowserInternal, gcnew Action(this, &ManagedCefBrowserAdapter::OnAfterBrowserCreated));
@@ -510,13 +508,11 @@ namespace CefSharp
}
}
-
void RegisterJsObject(String^ name, Object^ object)
{
_javaScriptObjectRepository->Register(name, object);
}
-
void ReplaceMisspelling(String^ word)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 47bf407f11..f31764738d 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -34,7 +34,6 @@ public class ChromiumWebBrowser : Control, IWebBrowserInternal, IWinFormsWebBrow
public bool CanReload { get; private set; }
public bool IsBrowserInitialized { get; private set; }
-
public double ZoomLevel
{
get { return managedCefBrowserAdapter.GetZoomLevel(); }
@@ -378,6 +377,5 @@ public void AddWordToDictionary(string word)
managedCefBrowserAdapter.AddWordToDictionary(word);
}
-
}
}
From ed2b2f1f6495f13c2e00ef7ed8f9dba1cf82dd00 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Thu, 4 Dec 2014 14:46:30 +1000
Subject: [PATCH 041/134] Fix formatting introduced by PR #661
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 16 +++-------------
CefSharp.WinForms/ChromiumWebBrowser.cs | 2 +-
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 6a378c3099..63a97a5791 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -18,18 +18,14 @@ using namespace System::Threading::Tasks;
namespace CefSharp
{
-
public ref class ManagedCefBrowserAdapter : public DisposableResource
{
MCefRefPtr _renderClientAdapter;
BrowserProcessServiceHost^ _browserProcessServiceHost;
IWebBrowserInternal^ _webBrowserInternal;
JavascriptObjectRepository^ _javaScriptObjectRepository;
-
-
+
protected:
-
-
virtual void DoDispose(bool isDisposing) override
{
Close();
@@ -47,10 +43,7 @@ namespace CefSharp
DisposableResource::DoDispose(isDisposing);
};
-
public:
-
-
ManagedCefBrowserAdapter(IWebBrowserInternal^ webBrowserInternal)
{
_renderClientAdapter = new RenderClientAdapter(webBrowserInternal, gcnew Action(this, &ManagedCefBrowserAdapter::OnAfterBrowserCreated));
@@ -477,7 +470,6 @@ namespace CefSharp
void CreateBrowser(BrowserSettings^ browserSettings, IntPtr^ sourceHandle, String^ address)
{
-
HWND hwnd = static_cast(sourceHandle->ToPointer());
RECT rect;
GetClientRect(hwnd, &rect);
@@ -487,7 +479,6 @@ namespace CefSharp
CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
-
}
void Resize(int width, int height)
@@ -534,7 +525,8 @@ namespace CefSharp
}
}
- void AddWordToDictionary(String^ word){
+ void AddWordToDictionary(String^ word)
+ {
auto cefHost = _renderClientAdapter->TryGetCefHost();
if (cefHost != nullptr)
@@ -543,7 +535,5 @@ namespace CefSharp
cefHost->AddWordToDictionary(wordNative);
}
}
-
-
};
}
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 281fd61e0c..a1c5c0f4a0 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -374,6 +374,7 @@ public override bool Focused
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
+
ResizeBrowser();
}
@@ -402,6 +403,5 @@ public void AddWordToDictionary(string word)
{
managedCefBrowserAdapter.AddWordToDictionary(word);
}
-
}
}
From 9fcffab55393e102955ef6cf15e3e71e0776c16d Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 16:44:09 +0700
Subject: [PATCH 042/134] Implementing invalidate
---
CefSharp.Core/CefSharp.Core.vcxproj | 1 +
CefSharp.Core/CefSharp.Core.vcxproj.filters | 3 +++
CefSharp.Core/ManagedCefBrowserAdapter.h | 13 ++++++++++++-
CefSharp.Core/MouseButtonType.h | 3 ++-
CefSharp.Core/PaintElementType.h | 14 ++++++++++++++
CefSharp.Wpf/ChromiumWebBrowser.cs | 3 +++
build.ps1 | 6 +++---
7 files changed, 38 insertions(+), 5 deletions(-)
create mode 100644 CefSharp.Core/PaintElementType.h
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index 8e592415a9..0595589bda 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -250,6 +250,7 @@
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index 0879635f56..5d1f81a257 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -94,6 +94,9 @@
Header Files
+
+ Header Files
+
Header Files
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 63a97a5791..ccecf1326d 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -7,6 +7,7 @@
#include "Stdafx.h"
#include "BrowserSettings.h"
#include "MouseButtonType.h"
+#include "PaintElementType.h"
#include "Internals/RenderClientAdapter.h"
#include "Internals/MCefRefPtr.h"
#include "Internals/StringVisitor.h"
@@ -126,6 +127,16 @@ namespace CefSharp
}
}
+ void Invalidate(PaintElementType type)
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
+ }
+ }
+
void SendFocusEvent(bool isFocused)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
@@ -191,7 +202,7 @@ namespace CefSharp
void OnMouseButton(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
-
+
if (cefHost != nullptr)
{
CefMouseEvent mouseEvent;
diff --git a/CefSharp.Core/MouseButtonType.h b/CefSharp.Core/MouseButtonType.h
index 2a84dc7f0a..5add4099bc 100644
--- a/CefSharp.Core/MouseButtonType.h
+++ b/CefSharp.Core/MouseButtonType.h
@@ -10,6 +10,7 @@ namespace CefSharp
{
Left = CefBrowserHost::MouseButtonType::MBT_LEFT,
Middle = CefBrowserHost::MouseButtonType::MBT_MIDDLE,
- Right = CefBrowserHost::MouseButtonType::MBT_RIGHT
+ Right = CefBrowserHost::MouseButtonType::MBT_RIGHT,
+ Blabla
};
}
\ No newline at end of file
diff --git a/CefSharp.Core/PaintElementType.h b/CefSharp.Core/PaintElementType.h
new file mode 100644
index 0000000000..dd6481ce4b
--- /dev/null
+++ b/CefSharp.Core/PaintElementType.h
@@ -0,0 +1,14 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#include "include/cef_browser.h"
+
+namespace CefSharp
+{
+ public enum class PaintElementType
+ {
+ View = CefBrowserHost::PaintElementType::PET_VIEW,
+ Popup = CefBrowserHost::PaintElementType::PET_POPUP
+ };
+}
\ No newline at end of file
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index c86224ea43..fd5e7cc1c9 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -509,6 +509,9 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
var isVisible = (bool)args.NewValue;
managedCefBrowserAdapter.WasHidden(!isVisible);
+
+ if (isVisible)
+ managedCefBrowserAdapter.Invalidate(PaintElementType.View);
}
private static void OnApplicationExit(object sender, ExitEventArgs e)
diff --git a/build.ps1 b/build.ps1
index 696463bdcc..cdb9effeea 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "39.0.0-pre01",
+ [string] $Version = "39.0.0-pre01-MB3",
[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
@@ -284,8 +284,8 @@ WriteAssemblyVersion
switch -Exact ($Target) {
"nupkg"
{
- #VSX v120
- VSX v110
+ VSX v120
+ #VSX v110
Nupkg
}
"nupkg-only"
From 094df1aab1df28654d371b2088bdd01fc722525a Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 16:44:09 +0700
Subject: [PATCH 043/134] Implementing invalidate
---
CefSharp.Core/CefSharp.Core.vcxproj | 1 +
CefSharp.Core/CefSharp.Core.vcxproj.filters | 3 +++
CefSharp.Core/ManagedCefBrowserAdapter.h | 13 ++++++++++++-
CefSharp.Core/PaintElementType.h | 14 ++++++++++++++
CefSharp.Wpf/ChromiumWebBrowser.cs | 3 +++
build.ps1 | 6 +++---
6 files changed, 36 insertions(+), 4 deletions(-)
create mode 100644 CefSharp.Core/PaintElementType.h
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index 8e592415a9..07462f0f61 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -250,6 +250,7 @@
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index 0879635f56..5d1f81a257 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -94,6 +94,9 @@
Header Files
+
+ Header Files
+
Header Files
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 63a97a5791..ccecf1326d 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -7,6 +7,7 @@
#include "Stdafx.h"
#include "BrowserSettings.h"
#include "MouseButtonType.h"
+#include "PaintElementType.h"
#include "Internals/RenderClientAdapter.h"
#include "Internals/MCefRefPtr.h"
#include "Internals/StringVisitor.h"
@@ -126,6 +127,16 @@ namespace CefSharp
}
}
+ void Invalidate(PaintElementType type)
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
+
+ if (cefHost != nullptr)
+ {
+ cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
+ }
+ }
+
void SendFocusEvent(bool isFocused)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
@@ -191,7 +202,7 @@ namespace CefSharp
void OnMouseButton(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
-
+
if (cefHost != nullptr)
{
CefMouseEvent mouseEvent;
diff --git a/CefSharp.Core/PaintElementType.h b/CefSharp.Core/PaintElementType.h
new file mode 100644
index 0000000000..dd6481ce4b
--- /dev/null
+++ b/CefSharp.Core/PaintElementType.h
@@ -0,0 +1,14 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#include "include/cef_browser.h"
+
+namespace CefSharp
+{
+ public enum class PaintElementType
+ {
+ View = CefBrowserHost::PaintElementType::PET_VIEW,
+ Popup = CefBrowserHost::PaintElementType::PET_POPUP
+ };
+}
\ No newline at end of file
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index c86224ea43..fd5e7cc1c9 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -509,6 +509,9 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
var isVisible = (bool)args.NewValue;
managedCefBrowserAdapter.WasHidden(!isVisible);
+
+ if (isVisible)
+ managedCefBrowserAdapter.Invalidate(PaintElementType.View);
}
private static void OnApplicationExit(object sender, ExitEventArgs e)
diff --git a/build.ps1 b/build.ps1
index 696463bdcc..cdb9effeea 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "39.0.0-pre01",
+ [string] $Version = "39.0.0-pre01-MB3",
[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
@@ -284,8 +284,8 @@ WriteAssemblyVersion
switch -Exact ($Target) {
"nupkg"
{
- #VSX v120
- VSX v110
+ VSX v120
+ #VSX v110
Nupkg
}
"nupkg-only"
From e6f7ab414c1111aabd115e9f52e101e44345d0b3 Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 18:02:07 +0700
Subject: [PATCH 044/134] Removing test line, was committed by mistake
---
CefSharp.Core/MouseButtonType.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/CefSharp.Core/MouseButtonType.h b/CefSharp.Core/MouseButtonType.h
index 5add4099bc..85bd7cd8fa 100644
--- a/CefSharp.Core/MouseButtonType.h
+++ b/CefSharp.Core/MouseButtonType.h
@@ -11,6 +11,5 @@ namespace CefSharp
Left = CefBrowserHost::MouseButtonType::MBT_LEFT,
Middle = CefBrowserHost::MouseButtonType::MBT_MIDDLE,
Right = CefBrowserHost::MouseButtonType::MBT_RIGHT,
- Blabla
};
}
\ No newline at end of file
From 519e4e86a0ab4a782920ecb748ddb674da6c9124 Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 18:45:12 +0700
Subject: [PATCH 045/134] Adjusting formatting to use space instead of tab
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 17 ++++++++---------
CefSharp.Core/MouseButtonType.h | 2 +-
CefSharp.Core/PaintElementType.h | 10 +++++-----
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index ccecf1326d..2c4838fdbe 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -127,15 +127,15 @@ namespace CefSharp
}
}
- void Invalidate(PaintElementType type)
- {
- auto cefHost = _renderClientAdapter->TryGetCefHost();
+ void Invalidate(PaintElementType type)
+ {
+ auto cefHost = _renderClientAdapter->TryGetCefHost();
- if (cefHost != nullptr)
- {
- cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
- }
- }
+ if (cefHost != nullptr)
+ {
+ cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
+ }
+ }
void SendFocusEvent(bool isFocused)
{
@@ -202,7 +202,6 @@ namespace CefSharp
void OnMouseButton(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
-
if (cefHost != nullptr)
{
CefMouseEvent mouseEvent;
diff --git a/CefSharp.Core/MouseButtonType.h b/CefSharp.Core/MouseButtonType.h
index 85bd7cd8fa..2a84dc7f0a 100644
--- a/CefSharp.Core/MouseButtonType.h
+++ b/CefSharp.Core/MouseButtonType.h
@@ -10,6 +10,6 @@ namespace CefSharp
{
Left = CefBrowserHost::MouseButtonType::MBT_LEFT,
Middle = CefBrowserHost::MouseButtonType::MBT_MIDDLE,
- Right = CefBrowserHost::MouseButtonType::MBT_RIGHT,
+ Right = CefBrowserHost::MouseButtonType::MBT_RIGHT
};
}
\ No newline at end of file
diff --git a/CefSharp.Core/PaintElementType.h b/CefSharp.Core/PaintElementType.h
index dd6481ce4b..703545ef43 100644
--- a/CefSharp.Core/PaintElementType.h
+++ b/CefSharp.Core/PaintElementType.h
@@ -6,9 +6,9 @@
namespace CefSharp
{
- public enum class PaintElementType
- {
- View = CefBrowserHost::PaintElementType::PET_VIEW,
- Popup = CefBrowserHost::PaintElementType::PET_POPUP
- };
+ public enum class PaintElementType
+ {
+ View = CefBrowserHost::PaintElementType::PET_VIEW,
+ Popup = CefBrowserHost::PaintElementType::PET_POPUP
+ };
}
\ No newline at end of file
From 9a65bcb4b44321c4a4410f84e6dccc9db0320672 Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 23:22:52 +0700
Subject: [PATCH 046/134] Reverting changes to build.ps1 file
---
build.ps1 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/build.ps1 b/build.ps1
index cdb9effeea..696463bdcc 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "39.0.0-pre01-MB3",
+ [string] $Version = "39.0.0-pre01",
[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
@@ -284,8 +284,8 @@ WriteAssemblyVersion
switch -Exact ($Target) {
"nupkg"
{
- VSX v120
- #VSX v110
+ #VSX v120
+ VSX v110
Nupkg
}
"nupkg-only"
From 698751cb1a150677693ef35353d183fc77f84340 Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 23:26:30 +0700
Subject: [PATCH 047/134] Removing unnecessary whiteline changes
---
CefSharp.Core/ManagedCefBrowserAdapter.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 2c4838fdbe..ee95ecf0f4 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -202,6 +202,7 @@ namespace CefSharp
void OnMouseButton(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
+
if (cefHost != nullptr)
{
CefMouseEvent mouseEvent;
From d68e99b1d21b88d7e4de6a24cf0a7ca02b01076d Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 23:30:13 +0700
Subject: [PATCH 048/134] Changing copyright symbol to avoid encoding issue
---
CefSharp.Core/PaintElementType.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/PaintElementType.h b/CefSharp.Core/PaintElementType.h
index 703545ef43..d382ddc47b 100644
--- a/CefSharp.Core/PaintElementType.h
+++ b/CefSharp.Core/PaintElementType.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+// Copyright (c) 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
From db517cc2dabfba5e32a6711746fc6add2b72ccd7 Mon Sep 17 00:00:00 2001
From: dimas
Date: Thu, 4 Dec 2014 23:33:38 +0700
Subject: [PATCH 049/134] Removing Invalidate call from inside
OnIsVisibleChanged, instead making it a method so it can be called from other
place if necessary
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index fd5e7cc1c9..e1533b42f3 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -509,9 +509,6 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
var isVisible = (bool)args.NewValue;
managedCefBrowserAdapter.WasHidden(!isVisible);
-
- if (isVisible)
- managedCefBrowserAdapter.Invalidate(PaintElementType.View);
}
private static void OnApplicationExit(object sender, ExitEventArgs e)
@@ -1291,5 +1288,13 @@ public void AddWordToDictionary(string word)
managedCefBrowserAdapter.AddWordToDictionary(word);
}
+ // Invalidate the view. The browser will call CefRenderHandler::OnPaint
+ // asynchronously. This method is only used when window rendering is
+ // disabled.
+ public void Invalidate(PaintElementType type)
+ {
+ managedCefBrowserAdapter.Invalidate(type);
+ }
+
}
}
From 2011243ec37abe2119ad2951266d112f2633b606 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 8 Dec 2014 12:12:48 +1000
Subject: [PATCH 050/134] Re-add copyright symbol
---
CefSharp.Core/PaintElementType.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/PaintElementType.h b/CefSharp.Core/PaintElementType.h
index d382ddc47b..703545ef43 100644
--- a/CefSharp.Core/PaintElementType.h
+++ b/CefSharp.Core/PaintElementType.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2014 The CefSharp Authors. All rights reserved.
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
From 414b2c00987533771d98db8ebd11b9c0bbf060a0 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 8 Dec 2014 12:17:54 +1000
Subject: [PATCH 051/134] Improve Xml comment and add `Invalidate` method to
IWpfWebBrowser interface
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 8 ++++----
CefSharp.Wpf/IWpfWebBrowser.cs | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index e1533b42f3..488fdbcfc5 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1288,13 +1288,13 @@ public void AddWordToDictionary(string word)
managedCefBrowserAdapter.AddWordToDictionary(word);
}
- // Invalidate the view. The browser will call CefRenderHandler::OnPaint
- // asynchronously. This method is only used when window rendering is
- // disabled.
+ ///
+ /// Invalidate the view. The browser will call CefRenderHandler::OnPaint asynchronously.
+ ///
+ /// indicates which surface to re-paint either View or Popup.
public void Invalidate(PaintElementType type)
{
managedCefBrowserAdapter.Invalidate(type);
}
-
}
}
diff --git a/CefSharp.Wpf/IWpfWebBrowser.cs b/CefSharp.Wpf/IWpfWebBrowser.cs
index 72306d3c89..7d903808c7 100644
--- a/CefSharp.Wpf/IWpfWebBrowser.cs
+++ b/CefSharp.Wpf/IWpfWebBrowser.cs
@@ -90,5 +90,11 @@ public interface IWpfWebBrowser : IWebBrowser
/// Redo last action.
///
ICommand RedoCommand { get; }
+
+ ///
+ /// Invalidate the view. The browser will call CefRenderHandler::OnPaint asynchronously.
+ ///
+ /// indicates which surface to re-paint either View or Popup.
+ void Invalidate(PaintElementType type);
}
}
From 4dd032871262d6e6f660498ed70410fa989a26e7 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 19:42:49 +1000
Subject: [PATCH 052/134] Remove redundant `ClearBitmap` method from
IRenderWebBrowser
---
CefSharp.Core/Internals/RenderClientAdapter.h | 2 +-
CefSharp.OffScreen/ChromiumWebBrowser.cs | 19 +++++++------------
CefSharp.Wpf/ChromiumWebBrowser.cs | 5 -----
CefSharp/Internals/IRenderWebBrowser.cs | 1 -
4 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index c564cf6c4c..3c79015fbf 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -196,7 +196,7 @@ namespace CefSharp
currentWidth != width ||
currentHeight != height)
{
- _renderWebBrowser->ClearBitmap(bitmapInfo);
+ bitmapInfo->InteropBitmap = nullptr;
ReleaseBitmapHandlers(backBufferHandle, fileMappingHandle);
diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index 4f4c747cf2..0a5698e67c 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -353,16 +353,6 @@ int IRenderWebBrowser.BytesPerPixel
get { return 4; }
}
- void IRenderWebBrowser.ClearBitmap(BitmapInfo bitmapInfo)
- {
- lock (bitmapLock)
- {
- if (bitmap != null)
- bitmap.Dispose();
- bitmap = null;
- }
- }
-
int IRenderWebBrowser.Width
{
get { return size.Width; }
@@ -382,10 +372,15 @@ void IRenderWebBrowser.SetBitmap(BitmapInfo bitmapInfo)
{
lock (bitmapLock)
{
- ((IRenderWebBrowser)this).ClearBitmap(bitmapInfo);
+ if (bitmap != null)
+ {
+ bitmap.Dispose();
+ bitmap = null;
+ }
+
lock (bitmapInfo.BitmapLock)
{
- var stride = bitmapInfo.Width * ((IRenderWebBrowser)this).BytesPerPixel;
+ var stride = bitmapInfo.Width*((IRenderWebBrowser)this).BytesPerPixel;
bitmap = BitmapSourceToBitmap2(Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormats.Bgra32, stride, 0));
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index cf6c4f57fb..95161714f5 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1213,11 +1213,6 @@ void IRenderWebBrowser.SetCursor(IntPtr handle)
});
}
- void IRenderWebBrowser.ClearBitmap(BitmapInfo bitmapInfo)
- {
- bitmapInfo.InteropBitmap = null;
- }
-
///
/// Raises Rendering event
///
diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs
index ef7e6f7182..433b966896 100644
--- a/CefSharp/Internals/IRenderWebBrowser.cs
+++ b/CefSharp/Internals/IRenderWebBrowser.cs
@@ -17,7 +17,6 @@ public interface IRenderWebBrowser : IWebBrowserInternal
void SetCursor(IntPtr cursor);
- void ClearBitmap(BitmapInfo bitmapInfo);
void SetBitmap(BitmapInfo bitmapInfo);
void SetPopupIsOpen(bool show);
From da6e95e8983feb44d111a591d9eafe88483000fc Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 19:44:31 +1000
Subject: [PATCH 053/134] Remove redundant SetBitmap method from
IRenderWebBrowser
---
CefSharp.OffScreen/ChromiumWebBrowser.cs | 7 +------
CefSharp.Wpf/ChromiumWebBrowser.cs | 5 ++---
CefSharp/Internals/IRenderWebBrowser.cs | 2 --
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index 0a5698e67c..a0a6b0a7fc 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -364,11 +364,6 @@ int IRenderWebBrowser.Height
}
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
- {
- ((IRenderWebBrowser)this).SetBitmap(bitmapInfo);
- }
-
- void IRenderWebBrowser.SetBitmap(BitmapInfo bitmapInfo)
{
lock (bitmapLock)
{
@@ -380,7 +375,7 @@ void IRenderWebBrowser.SetBitmap(BitmapInfo bitmapInfo)
lock (bitmapInfo.BitmapLock)
{
- var stride = bitmapInfo.Width*((IRenderWebBrowser)this).BytesPerPixel;
+ var stride = bitmapInfo.Width * ((IRenderWebBrowser)this).BytesPerPixel;
bitmap = BitmapSourceToBitmap2(Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormats.Bgra32, stride, 0));
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 95161714f5..002f5bbec6 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -662,8 +662,7 @@ private IntPtr SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
{
- IRenderWebBrowser renderer = this;
- UiThreadRunAsync(() => renderer.SetBitmap(bitmapInfo), DispatcherPriority.Render);
+ UiThreadRunAsync(() => SetBitmap(bitmapInfo), DispatcherPriority.Render);
}
void IWebBrowserInternal.SetAddress(string address)
@@ -1225,7 +1224,7 @@ protected virtual void OnRendering(object sender, RenderingEventArgs eventArgs)
}
}
- void IRenderWebBrowser.SetBitmap(BitmapInfo bitmapInfo)
+ private void SetBitmap(BitmapInfo bitmapInfo)
{
lock (bitmapInfo.BitmapLock)
{
diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs
index 433b966896..223d3e93ff 100644
--- a/CefSharp/Internals/IRenderWebBrowser.cs
+++ b/CefSharp/Internals/IRenderWebBrowser.cs
@@ -17,8 +17,6 @@ public interface IRenderWebBrowser : IWebBrowserInternal
void SetCursor(IntPtr cursor);
- void SetBitmap(BitmapInfo bitmapInfo);
-
void SetPopupIsOpen(bool show);
void SetPopupSizeAndPosition(int width, int height, int x, int y);
};
From aaf676fa0919e2d56c45f651be2c540a7fa96483 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 19:48:08 +1000
Subject: [PATCH 054/134] Simplify SetBitmap by removing Action<>
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 002f5bbec6..c21e1252ec 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1231,17 +1231,11 @@ private void SetBitmap(BitmapInfo bitmapInfo)
// Inform parents that the browser rendering is updating
OnRendering(this, new RenderingEventArgs(bitmapInfo));
+ var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
- if (bitmapInfo.IsPopup)
- {
- bitmapInfo.InteropBitmap = SetBitmapHelper(bitmapInfo,
- (InteropBitmap)bitmapInfo.InteropBitmap, bitmap => popupImage.Source = bitmap);
- }
- else
- {
- bitmapInfo.InteropBitmap = SetBitmapHelper(bitmapInfo,
- (InteropBitmap)bitmapInfo.InteropBitmap, bitmap => image.Source = bitmap);
- }
+
+ bitmapInfo.InteropBitmap = SetBitmapHelper(bitmapInfo,
+ (InteropBitmap)bitmapInfo.InteropBitmap, img);
}
}
@@ -1253,18 +1247,18 @@ private Point GetPixelPosition(MouseEventArgs e)
return pixelPosition;
}
- private object SetBitmapHelper(BitmapInfo bitmapInfo, InteropBitmap bitmap, Action imageSourceSetter)
+ private object SetBitmapHelper(BitmapInfo bitmapInfo, InteropBitmap bitmap, Image image)
{
if (bitmap == null)
{
- imageSourceSetter(null);
+ image.Source = null;
GC.Collect(1);
var stride = bitmapInfo.Width * ((IRenderWebBrowser)this).BytesPerPixel;
bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
- imageSourceSetter(bitmap);
+ image.Source = bitmap;
}
bitmap.Invalidate();
From 2824f3b225b10be4a3b964e496993332e66c6a06 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:23:05 +1000
Subject: [PATCH 055/134] Continued refactor of SetBitmapHelper
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index c21e1252ec..5fed32a129 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1231,11 +1231,11 @@ private void SetBitmap(BitmapInfo bitmapInfo)
// Inform parents that the browser rendering is updating
OnRendering(this, new RenderingEventArgs(bitmapInfo));
+ var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
+
var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
-
- bitmapInfo.InteropBitmap = SetBitmapHelper(bitmapInfo,
- (InteropBitmap)bitmapInfo.InteropBitmap, img);
+ SetBitmapHelper(bitmapInfo, img, bytesPerPixel);
}
}
@@ -1247,23 +1247,24 @@ private Point GetPixelPosition(MouseEventArgs e)
return pixelPosition;
}
- private object SetBitmapHelper(BitmapInfo bitmapInfo, InteropBitmap bitmap, Image image)
+ private static void SetBitmapHelper(BitmapInfo bitmapInfo, Image img, int bytesPerPixel)
{
+ var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
if (bitmap == null)
{
- image.Source = null;
+ img.Source = null;
GC.Collect(1);
- var stride = bitmapInfo.Width * ((IRenderWebBrowser)this).BytesPerPixel;
+ var stride = bitmapInfo.Width * bytesPerPixel;
bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
- image.Source = bitmap;
+ img.Source = bitmap;
}
bitmap.Invalidate();
- return bitmap;
+ bitmapInfo.InteropBitmap = bitmap;
}
public void ViewSource()
From 7c1bc144b6b5643786d424643f776f445a6405aa Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:24:04 +1000
Subject: [PATCH 056/134] Remove SetBitmapHelper method - call code inline for
now
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 37 +++++++++++++-----------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 5fed32a129..3facc08a7b 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1235,7 +1235,22 @@ private void SetBitmap(BitmapInfo bitmapInfo)
var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
- SetBitmapHelper(bitmapInfo, img, bytesPerPixel);
+ var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
+ if (bitmap == null)
+ {
+ img.Source = null;
+ GC.Collect(1);
+
+ var stride = bitmapInfo.Width * bytesPerPixel;
+
+ bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
+ bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
+ img.Source = bitmap;
+ }
+
+ bitmap.Invalidate();
+
+ bitmapInfo.InteropBitmap = bitmap;
}
}
@@ -1247,26 +1262,6 @@ private Point GetPixelPosition(MouseEventArgs e)
return pixelPosition;
}
- private static void SetBitmapHelper(BitmapInfo bitmapInfo, Image img, int bytesPerPixel)
- {
- var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
- if (bitmap == null)
- {
- img.Source = null;
- GC.Collect(1);
-
- var stride = bitmapInfo.Width * bytesPerPixel;
-
- bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
- bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
- img.Source = bitmap;
- }
-
- bitmap.Invalidate();
-
- bitmapInfo.InteropBitmap = bitmap;
- }
-
public void ViewSource()
{
managedCefBrowserAdapter.ViewSource();
From 0bb35f8b27ec51053c347c404cace044179ae6e7 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:24:47 +1000
Subject: [PATCH 057/134] Only update the InteropBitmap reference when a new
one is created
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 3facc08a7b..b772a07867 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1246,11 +1246,11 @@ private void SetBitmap(BitmapInfo bitmapInfo)
bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
img.Source = bitmap;
+
+ bitmapInfo.InteropBitmap = bitmap;
}
bitmap.Invalidate();
-
- bitmapInfo.InteropBitmap = bitmap;
}
}
From f6743870236c6646e41f305afd658a21c63bfdbd Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:25:38 +1000
Subject: [PATCH 058/134] Move rendering code inline
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 61 +++++++++++++++---------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index b772a07867..bd1c8f553e 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -662,7 +662,36 @@ private IntPtr SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
{
- UiThreadRunAsync(() => SetBitmap(bitmapInfo), DispatcherPriority.Render);
+ UiThreadRunAsync(delegate
+ {
+ lock (bitmapInfo.BitmapLock)
+ {
+ // Inform parents that the browser rendering is updating
+ OnRendering(this, new RenderingEventArgs(bitmapInfo));
+
+ var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
+
+ var img = bitmapInfo.IsPopup ? popupImage : image;
+ // Now update the WPF image
+ var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
+ if (bitmap == null)
+ {
+ img.Source = null;
+ GC.Collect(1);
+
+ var stride = bitmapInfo.Width * bytesPerPixel;
+
+ bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
+ bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
+ img.Source = bitmap;
+
+ bitmapInfo.InteropBitmap = bitmap;
+ }
+
+ bitmap.Invalidate();
+ }
+ },
+ DispatcherPriority.Render);
}
void IWebBrowserInternal.SetAddress(string address)
@@ -1224,36 +1253,6 @@ protected virtual void OnRendering(object sender, RenderingEventArgs eventArgs)
}
}
- private void SetBitmap(BitmapInfo bitmapInfo)
- {
- lock (bitmapInfo.BitmapLock)
- {
- // Inform parents that the browser rendering is updating
- OnRendering(this, new RenderingEventArgs(bitmapInfo));
-
- var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
-
- var img = bitmapInfo.IsPopup ? popupImage : image;
- // Now update the WPF image
- var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
- if (bitmap == null)
- {
- img.Source = null;
- GC.Collect(1);
-
- var stride = bitmapInfo.Width * bytesPerPixel;
-
- bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
- bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
- img.Source = bitmap;
-
- bitmapInfo.InteropBitmap = bitmap;
- }
-
- bitmap.Invalidate();
- }
- }
-
private Point GetPixelPosition(MouseEventArgs e)
{
var deviceIndependentPosition = e.GetPosition(this);
From a11ec84b2ba4b6a1bf46a3ef815398d2fb163fc0 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:27:35 +1000
Subject: [PATCH 059/134] Only get BytesPerPixel when generating a new
InteropBitmap
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index bd1c8f553e..7127ff75b7 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -669,8 +669,6 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
// Inform parents that the browser rendering is updating
OnRendering(this, new RenderingEventArgs(bitmapInfo));
- var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
-
var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
@@ -679,6 +677,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
img.Source = null;
GC.Collect(1);
+ var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
var stride = bitmapInfo.Width * bytesPerPixel;
bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
From e3f771883312516ee394dc08d2b9b2574b365011 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:48:21 +1000
Subject: [PATCH 060/134] Rename width and height variables
---
CefSharp.Core/Internals/RenderClientAdapter.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 3c79015fbf..af51cde14d 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -186,15 +186,15 @@ namespace CefSharp
_renderWebBrowser->InvokeRenderAsync(bitmapInfo);
};
- void SetBufferHelper(BitmapInfo^ bitmapInfo, int ¤tWidth, int& currentHeight, int width, int height,
+ void SetBufferHelper(BitmapInfo^ bitmapInfo, int ¤tWidth, int& currentHeight, int newWidth, int newHeight,
HANDLE* fileMappingHandle, HANDLE* backBufferHandle, const void* buffer)
{
- int pixels = width * height;
+ int pixels = newWidth * newHeight;
int numberOfBytes = pixels * _renderWebBrowser->BytesPerPixel;
if (*backBufferHandle == NULL ||
- currentWidth != width ||
- currentHeight != height)
+ currentWidth != newWidth ||
+ currentHeight != newHeight)
{
bitmapInfo->InteropBitmap = nullptr;
@@ -216,8 +216,8 @@ namespace CefSharp
return;
}
- currentWidth = width;
- currentHeight = height;
+ currentWidth = newWidth;
+ currentHeight = newHeight;
}
CopyMemory(*backBufferHandle, (void*)buffer, numberOfBytes);
From 325b7f19e207adc7315e63faf711a60b236aa7ac Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:50:14 +1000
Subject: [PATCH 061/134] Continue to cleanup width and height variables
---
CefSharp.Core/Internals/RenderClientAdapter.h | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index af51cde14d..4d1fd2f4ff 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -180,13 +180,10 @@ namespace CefSharp
bitmapInfo->FileMappingHandle = (IntPtr)fileMappingHandle;
bitmapInfo->BackBufferHandle = (IntPtr)backBufferHandle;
- bitmapInfo->Width = newWidth;
- bitmapInfo->Height = newHeight;
-
_renderWebBrowser->InvokeRenderAsync(bitmapInfo);
};
- void SetBufferHelper(BitmapInfo^ bitmapInfo, int ¤tWidth, int& currentHeight, int newWidth, int newHeight,
+ void SetBufferHelper(BitmapInfo^ bitmapInfo, int currentWidth, int currentHeight, int newWidth, int newHeight,
HANDLE* fileMappingHandle, HANDLE* backBufferHandle, const void* buffer)
{
int pixels = newWidth * newHeight;
@@ -215,11 +212,11 @@ namespace CefSharp
// TODO: method call fails.
return;
}
-
- currentWidth = newWidth;
- currentHeight = newHeight;
}
+ bitmapInfo->Width = newWidth;
+ bitmapInfo->Height = newHeight;
+
CopyMemory(*backBufferHandle, (void*)buffer, numberOfBytes);
};
From 96b300eaf2138f0e5653c0922ff480db2b90a69e Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:51:18 +1000
Subject: [PATCH 062/134] Move currentWidth and currentHeight into
SetBufferHelper
---
CefSharp.Core/Internals/RenderClientAdapter.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 4d1fd2f4ff..89719e0498 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -169,12 +169,10 @@ namespace CefSharp
{
lock l(bitmapInfo->BitmapLock);
- int currentWidth = bitmapInfo->Width, currentHeight = bitmapInfo->Height;
-
auto fileMappingHandle = (HANDLE)bitmapInfo->FileMappingHandle;
auto backBufferHandle = (HANDLE)bitmapInfo->BackBufferHandle;
- SetBufferHelper(bitmapInfo, currentWidth, currentHeight, newWidth, newHeight, &fileMappingHandle,
+ SetBufferHelper(bitmapInfo, newWidth, newHeight, &fileMappingHandle,
&backBufferHandle, buffer);
bitmapInfo->FileMappingHandle = (IntPtr)fileMappingHandle;
@@ -183,9 +181,12 @@ namespace CefSharp
_renderWebBrowser->InvokeRenderAsync(bitmapInfo);
};
- void SetBufferHelper(BitmapInfo^ bitmapInfo, int currentWidth, int currentHeight, int newWidth, int newHeight,
+ void SetBufferHelper(BitmapInfo^ bitmapInfo, int newWidth, int newHeight,
HANDLE* fileMappingHandle, HANDLE* backBufferHandle, const void* buffer)
{
+ int currentWidth = bitmapInfo->Width;
+ int currentHeight = bitmapInfo->Height;
+
int pixels = newWidth * newHeight;
int numberOfBytes = pixels * _renderWebBrowser->BytesPerPixel;
From f1e50092241723946d3623b7983c91f44cd6d435 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:52:27 +1000
Subject: [PATCH 063/134] Remove redundant local variable declaration
---
CefSharp.Core/Internals/RenderClientAdapter.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 89719e0498..c8d437d44a 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -184,15 +184,12 @@ namespace CefSharp
void SetBufferHelper(BitmapInfo^ bitmapInfo, int newWidth, int newHeight,
HANDLE* fileMappingHandle, HANDLE* backBufferHandle, const void* buffer)
{
- int currentWidth = bitmapInfo->Width;
- int currentHeight = bitmapInfo->Height;
-
int pixels = newWidth * newHeight;
int numberOfBytes = pixels * _renderWebBrowser->BytesPerPixel;
if (*backBufferHandle == NULL ||
- currentWidth != newWidth ||
- currentHeight != newHeight)
+ bitmapInfo->Width != newWidth ||
+ bitmapInfo->Height != newHeight)
{
bitmapInfo->InteropBitmap = nullptr;
From 6f5ce15847110556526bcb5bed647f9ea01db6d6 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 20:55:48 +1000
Subject: [PATCH 064/134] Simplify OnPaint
---
CefSharp.Core/Internals/RenderClientAdapter.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index c8d437d44a..1e1e03cf00 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -98,14 +98,7 @@ namespace CefSharp
virtual DECL void OnPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects,
const void* buffer, int width, int height) OVERRIDE
{
- if (type == PET_VIEW)
- {
- SetBuffer(MainBitmapInfo, width, height, buffer);
- }
- else if (type == PET_POPUP)
- {
- SetBuffer(PopupBitmapInfo, width, height, buffer);
- }
+ SetBuffer(type == PET_VIEW ? MainBitmapInfo : PopupBitmapInfo, width, height, buffer);
};
virtual DECL void OnCursorChange(CefRefPtr browser, CefCursorHandle cursor) OVERRIDE
From 166c898251afd273136619660c8f6cc64645b7f5 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 21:04:37 +1000
Subject: [PATCH 065/134] Add comments to SetBufferHelper
---
CefSharp.Core/Internals/RenderClientAdapter.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 1e1e03cf00..7102809c60 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -184,10 +184,13 @@ namespace CefSharp
bitmapInfo->Width != newWidth ||
bitmapInfo->Height != newHeight)
{
+ //Clear the reference to InteropBitmap so a new one is created in by InvokeRenderAsync
bitmapInfo->InteropBitmap = nullptr;
+ //Release the current handles (if not null)
ReleaseBitmapHandlers(backBufferHandle, fileMappingHandle);
+ // Create new fileMappingHandle
*fileMappingHandle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, numberOfBytes, NULL);
if (*fileMappingHandle == NULL)
{
From 013c3145c7c001ca0693135fa55d36e2f13bbbdd Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 21:05:29 +1000
Subject: [PATCH 066/134] Only create new RenderingEventArgs when EventHandler
is attached (performance reasons, no need to create object unnecessarily)
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 7127ff75b7..245b607c70 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -667,7 +667,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
lock (bitmapInfo.BitmapLock)
{
// Inform parents that the browser rendering is updating
- OnRendering(this, new RenderingEventArgs(bitmapInfo));
+ OnRendering(this, bitmapInfo);
var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
@@ -1243,12 +1243,12 @@ void IRenderWebBrowser.SetCursor(IntPtr handle)
///
/// Raises Rendering event
///
- protected virtual void OnRendering(object sender, RenderingEventArgs eventArgs)
+ protected virtual void OnRendering(object sender, BitmapInfo bitmapInfo)
{
var rendering = Rendering;
if (rendering != null)
{
- rendering(this, eventArgs);
+ rendering(sender, new RenderingEventArgs(bitmapInfo));
}
}
From 7bc7cd227a80ced6896524fa029222c19e49dec5 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 21:17:37 +1000
Subject: [PATCH 067/134] Improve comment
---
CefSharp.Core/Internals/RenderClientAdapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 7102809c60..620f25405e 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -184,7 +184,7 @@ namespace CefSharp
bitmapInfo->Width != newWidth ||
bitmapInfo->Height != newHeight)
{
- //Clear the reference to InteropBitmap so a new one is created in by InvokeRenderAsync
+ //Clear the reference to InteropBitmap so a new one is created by InvokeRenderAsync
bitmapInfo->InteropBitmap = nullptr;
//Release the current handles (if not null)
From 25203c53278b04c86dc8aaafa37d0e174d5a18bd Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 21:24:55 +1000
Subject: [PATCH 068/134] Create BrowserSettings in ChromiumWebBrowser
constructor and explicitly call Dispose (it references an unmanaged resource)
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 245b607c70..24dc9db8e7 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -338,6 +338,9 @@ public void Dispose()
protected virtual void Dispose(bool isdisposing)
{
+ BrowserSettings.Dispose();
+
+ BrowserSettings = null;
ResourceHandler = null;
Loaded -= OnLoaded;
@@ -470,6 +473,7 @@ public ChromiumWebBrowser()
disposables.Add(new DisposableEventWrapper(this, ActualWidthProperty, OnActualSizeChanged));
ResourceHandler = new DefaultResourceHandler();
+ BrowserSettings = new BrowserSettings();
}
~ChromiumWebBrowser()
@@ -484,7 +488,7 @@ private void CreateOffscreenBrowserWhenActualSizeChanged()
return;
}
- managedCefBrowserAdapter.CreateOffscreenBrowser(BrowserSettings ?? new BrowserSettings(), Address);
+ managedCefBrowserAdapter.CreateOffscreenBrowser(BrowserSettings, Address);
browserCreated = true;
}
From 40f3328b5b3650899ddc3c98f3686378cf76774a Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 21:42:09 +1000
Subject: [PATCH 069/134] Add simple JSON example to BindingTest.html
---
CefSharp.Example/BoundObject.cs | 5 +++++
CefSharp.Example/Resources/BindingTest.html | 19 +++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/CefSharp.Example/BoundObject.cs b/CefSharp.Example/BoundObject.cs
index c48cb5a83e..50fc60a81b 100644
--- a/CefSharp.Example/BoundObject.cs
+++ b/CefSharp.Example/BoundObject.cs
@@ -194,6 +194,11 @@ public String lowercaseMethod()
return "lowercase";
}
+ public string ReturnJsonEmployeeList()
+ {
+ return "{\"employees\":[{\"firstName\":\"John\", \"lastName\":\"Doe\"},{\"firstName\":\"Anna\", \"lastName\":\"Smith\"},{\"firstName\":\"Peter\", \"lastName\":\"Jones\"}]}";
+ }
+
[JavascriptIgnore]
public string IgnoredProperty { get; set; }
diff --git a/CefSharp.Example/Resources/BindingTest.html b/CefSharp.Example/Resources/BindingTest.html
index 41ecf32684..a4052deba8 100644
--- a/CefSharp.Example/Resources/BindingTest.html
+++ b/CefSharp.Example/Resources/BindingTest.html
@@ -45,6 +45,25 @@
document.write("Stress Test done with : " + stressTestCallCount + " call to bound.repeat(\"hi \", 5)");
+
+
+ JSON Serializer Test
+
+
+
+
+
Methods on bound object 'bound':
From 520349d6435db0012b39bee34d80c379d817c574 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 23:19:21 +1000
Subject: [PATCH 070/134] Make BitmapInfo abstract and implement a strongly
typed version in WPF and OffScreen
---
CefSharp.Core/Internals/RenderClientAdapter.h | 11 +++++------
CefSharp.OffScreen/CefSharp.OffScreen.csproj | 1 +
CefSharp.OffScreen/ChromiumWebBrowser.cs | 5 +++++
CefSharp.OffScreen/GdiBitmapInfo.cs | 15 +++++++++++++++
CefSharp.Wpf/CefSharp.Wpf.csproj | 1 +
CefSharp.Wpf/ChromiumWebBrowser.cs | 14 ++++++++++----
CefSharp.Wpf/InteropBitmapInfo.cs | 16 ++++++++++++++++
CefSharp.Wpf/RenderingEventArgs.cs | 5 ++---
CefSharp/Internals/BitmapInfo.cs | 7 +++----
CefSharp/Internals/IRenderWebBrowser.cs | 1 +
10 files changed, 59 insertions(+), 17 deletions(-)
create mode 100644 CefSharp.OffScreen/GdiBitmapInfo.cs
create mode 100644 CefSharp.Wpf/InteropBitmapInfo.cs
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 620f25405e..1fd642eaf1 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -29,11 +29,10 @@ namespace CefSharp
ClientAdapter(webBrowserInternal, onAfterBrowserCreated),
_webBrowserInternal(webBrowserInternal)
{
- MainBitmapInfo = gcnew BitmapInfo();
- PopupBitmapInfo = gcnew BitmapInfo();
- PopupBitmapInfo->IsPopup = true;
-
_renderWebBrowser = dynamic_cast(webBrowserInternal);
+
+ MainBitmapInfo = _renderWebBrowser->CreateBitmapInfo(false);
+ PopupBitmapInfo = _renderWebBrowser->CreateBitmapInfo(true);
}
~RenderClientAdapter()
@@ -184,8 +183,8 @@ namespace CefSharp
bitmapInfo->Width != newWidth ||
bitmapInfo->Height != newHeight)
{
- //Clear the reference to InteropBitmap so a new one is created by InvokeRenderAsync
- bitmapInfo->InteropBitmap = nullptr;
+ //Clear the reference to Bitmap so a new one is created by InvokeRenderAsync
+ bitmapInfo->ClearBitmap();
//Release the current handles (if not null)
ReleaseBitmapHandlers(backBufferHandle, fileMappingHandle);
diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj
index 9e5eac677a..7a2c28be10 100644
--- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj
+++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj
@@ -64,6 +64,7 @@
+
diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index a0a6b0a7fc..b245225561 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -363,6 +363,11 @@ int IRenderWebBrowser.Height
get { return size.Height; }
}
+ public BitmapInfo CreateBitmapInfo(bool isPopup)
+ {
+ return new GdiBitmapInfo { IsPopup = isPopup };
+ }
+
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
{
lock (bitmapLock)
diff --git a/CefSharp.OffScreen/GdiBitmapInfo.cs b/CefSharp.OffScreen/GdiBitmapInfo.cs
new file mode 100644
index 0000000000..968c72e6c5
--- /dev/null
+++ b/CefSharp.OffScreen/GdiBitmapInfo.cs
@@ -0,0 +1,15 @@
+using System.Drawing;
+using CefSharp.Internals;
+
+namespace CefSharp.OffScreen
+{
+ public class GdiBitmapInfo : BitmapInfo
+ {
+ public Bitmap Bitmap { get; set; }
+
+ public override void ClearBitmap()
+ {
+ Bitmap = null;
+ }
+ }
+}
diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj
index 3bfe48f298..0c7fa17114 100644
--- a/CefSharp.Wpf/CefSharp.Wpf.csproj
+++ b/CefSharp.Wpf/CefSharp.Wpf.csproj
@@ -93,6 +93,7 @@
+
Code
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 24dc9db8e7..2cf66f1020 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -664,18 +664,24 @@ private IntPtr SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam
return IntPtr.Zero;
}
+ public BitmapInfo CreateBitmapInfo(bool isPopup)
+ {
+ return new InteropBitmapInfo { IsPopup = isPopup };
+ }
+
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
{
UiThreadRunAsync(delegate
{
lock (bitmapInfo.BitmapLock)
{
+ var interopBitmapInfo = (InteropBitmapInfo)bitmapInfo;
// Inform parents that the browser rendering is updating
- OnRendering(this, bitmapInfo);
+ OnRendering(this, interopBitmapInfo);
var img = bitmapInfo.IsPopup ? popupImage : image;
// Now update the WPF image
- var bitmap = bitmapInfo.InteropBitmap as InteropBitmap;
+ var bitmap = interopBitmapInfo.InteropBitmap;
if (bitmap == null)
{
img.Source = null;
@@ -688,7 +694,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
img.Source = bitmap;
- bitmapInfo.InteropBitmap = bitmap;
+ interopBitmapInfo.InteropBitmap = bitmap;
}
bitmap.Invalidate();
@@ -1247,7 +1253,7 @@ void IRenderWebBrowser.SetCursor(IntPtr handle)
///
/// Raises Rendering event
///
- protected virtual void OnRendering(object sender, BitmapInfo bitmapInfo)
+ protected virtual void OnRendering(object sender, InteropBitmapInfo bitmapInfo)
{
var rendering = Rendering;
if (rendering != null)
diff --git a/CefSharp.Wpf/InteropBitmapInfo.cs b/CefSharp.Wpf/InteropBitmapInfo.cs
new file mode 100644
index 0000000000..20d0f7cab2
--- /dev/null
+++ b/CefSharp.Wpf/InteropBitmapInfo.cs
@@ -0,0 +1,16 @@
+using System.Windows.Interop;
+using CefSharp.Internals;
+
+namespace CefSharp.Wpf
+{
+ public class InteropBitmapInfo : BitmapInfo
+ {
+ // Cannot be InteropBitmap since we really don't want CefSharp to be dependent on WPF libraries.
+ public InteropBitmap InteropBitmap { get; set; }
+
+ public override void ClearBitmap()
+ {
+ InteropBitmap = null;
+ }
+ }
+}
diff --git a/CefSharp.Wpf/RenderingEventArgs.cs b/CefSharp.Wpf/RenderingEventArgs.cs
index e0957aa0ca..d8d4e7ef3a 100644
--- a/CefSharp.Wpf/RenderingEventArgs.cs
+++ b/CefSharp.Wpf/RenderingEventArgs.cs
@@ -3,7 +3,6 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
-using CefSharp.Internals;
namespace CefSharp.Wpf
{
@@ -12,7 +11,7 @@ namespace CefSharp.Wpf
///
public class RenderingEventArgs : EventArgs
{
- public RenderingEventArgs(BitmapInfo bitmapInfo)
+ public RenderingEventArgs(InteropBitmapInfo bitmapInfo)
{
BitmapInfo = bitmapInfo;
}
@@ -20,7 +19,7 @@ public RenderingEventArgs(BitmapInfo bitmapInfo)
///
/// The bitmap info being rendered.
///
- public BitmapInfo BitmapInfo { get; private set; }
+ public InteropBitmapInfo BitmapInfo { get; private set; }
}
}
diff --git a/CefSharp/Internals/BitmapInfo.cs b/CefSharp/Internals/BitmapInfo.cs
index a6b0a35017..4498b3ad87 100644
--- a/CefSharp/Internals/BitmapInfo.cs
+++ b/CefSharp/Internals/BitmapInfo.cs
@@ -6,7 +6,7 @@
namespace CefSharp.Internals
{
- public class BitmapInfo
+ public abstract class BitmapInfo
{
public object BitmapLock;
public IntPtr BackBufferHandle;
@@ -17,10 +17,9 @@ public class BitmapInfo
public IntPtr FileMappingHandle { get; set; }
- // Cannot be InteropBitmap since we really don't want CefSharp to be dependent on WPF libraries.
- public object InteropBitmap;
+ public abstract void ClearBitmap();
- public BitmapInfo()
+ protected BitmapInfo()
{
BitmapLock = new object();
}
diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs
index 223d3e93ff..354299b4c9 100644
--- a/CefSharp/Internals/IRenderWebBrowser.cs
+++ b/CefSharp/Internals/IRenderWebBrowser.cs
@@ -13,6 +13,7 @@ public interface IRenderWebBrowser : IWebBrowserInternal
int Width { get; }
int Height { get; }
+ BitmapInfo CreateBitmapInfo(bool isPopup);
void InvokeRenderAsync(BitmapInfo bitmapInfo);
void SetCursor(IntPtr cursor);
From 33b0e4710e7a1e771d49baec831d98a8c55bcaab Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 23:35:31 +1000
Subject: [PATCH 071/134] Add TODO
---
CefSharp.Wpf/ChromiumWebBrowser.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 2cf66f1020..326ede0ae3 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -694,6 +694,9 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
img.Source = bitmap;
+ //TODO: Look into
+ //bitmap.CopyPixels
+
interopBitmapInfo.InteropBitmap = bitmap;
}
From 85c44f77547baaefe8a6eccf56a32f680493feef Mon Sep 17 00:00:00 2001
From: amaitland
Date: Tue, 16 Dec 2014 23:41:11 +1000
Subject: [PATCH 072/134] Move BytesPerPixel to BitmapInfo - simplifies code
---
CefSharp.Core/Internals/RenderClientAdapter.h | 2 +-
CefSharp.OffScreen/ChromiumWebBrowser.cs | 10 +++-------
CefSharp.Wpf/ChromiumWebBrowser.cs | 17 ++++-------------
CefSharp/Internals/BitmapInfo.cs | 2 ++
CefSharp/Internals/IRenderWebBrowser.cs | 2 --
5 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index 1fd642eaf1..7bd85e6adf 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -177,7 +177,7 @@ namespace CefSharp
HANDLE* fileMappingHandle, HANDLE* backBufferHandle, const void* buffer)
{
int pixels = newWidth * newHeight;
- int numberOfBytes = pixels * _renderWebBrowser->BytesPerPixel;
+ int numberOfBytes = pixels * bitmapInfo->BytesPerPixel;
if (*backBufferHandle == NULL ||
bitmapInfo->Width != newWidth ||
diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index b245225561..d7e403387f 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -347,11 +347,6 @@ public void SendMouseWheelEvent(int x, int y, int deltaX, int deltaY)
}
#region IRenderWebBrowser (rendering to bitmap; derived from CefSharp.Wpf.ChromiumWebBrowser)
- /// The bitmap buffer is 32 BPP.
- int IRenderWebBrowser.BytesPerPixel
- {
- get { return 4; }
- }
int IRenderWebBrowser.Width
{
@@ -365,7 +360,8 @@ int IRenderWebBrowser.Height
public BitmapInfo CreateBitmapInfo(bool isPopup)
{
- return new GdiBitmapInfo { IsPopup = isPopup };
+ //The bitmap buffer is 32 BPP
+ return new GdiBitmapInfo { IsPopup = isPopup, BytesPerPixel = 4 };
}
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
@@ -380,7 +376,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
lock (bitmapInfo.BitmapLock)
{
- var stride = bitmapInfo.Width * ((IRenderWebBrowser)this).BytesPerPixel;
+ var stride = bitmapInfo.Width * bitmapInfo.BytesPerPixel;
bitmap = BitmapSourceToBitmap2(Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormats.Bgra32, stride, 0));
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 326ede0ae3..9f97551556 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -21,6 +21,8 @@ namespace CefSharp.Wpf
{
public class ChromiumWebBrowser : ContentControl, IRenderWebBrowser, IWpfWebBrowser
{
+ private static readonly PixelFormat PixelFormat = PixelFormats.Bgra32;
+ private static readonly int BytesPerPixel = PixelFormat.BitsPerPixel / 8;
private static readonly Key[] KeysToSendtoBrowser =
{
Key.Tab,
@@ -118,11 +120,6 @@ public bool CanReload
#endregion
- int IRenderWebBrowser.BytesPerPixel
- {
- get { return PixelFormat.BitsPerPixel / 8; }
- }
-
int IRenderWebBrowser.Width
{
get { return (int)matrix.Transform(new Point(ActualWidth, ActualHeight)).X; }
@@ -133,11 +130,6 @@ int IRenderWebBrowser.Height
get { return (int)matrix.Transform(new Point(ActualWidth, ActualHeight)).Y; }
}
- private static PixelFormat PixelFormat
- {
- get { return PixelFormats.Bgra32; }
- }
-
#region Address dependency property
public string Address
@@ -666,7 +658,7 @@ private IntPtr SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam
public BitmapInfo CreateBitmapInfo(bool isPopup)
{
- return new InteropBitmapInfo { IsPopup = isPopup };
+ return new InteropBitmapInfo { IsPopup = isPopup, BytesPerPixel = BytesPerPixel };
}
void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
@@ -687,8 +679,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
img.Source = null;
GC.Collect(1);
- var bytesPerPixel = ((IRenderWebBrowser)this).BytesPerPixel;
- var stride = bitmapInfo.Width * bytesPerPixel;
+ var stride = bitmapInfo.Width * bitmapInfo.BytesPerPixel;
bitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormat, stride, 0);
diff --git a/CefSharp/Internals/BitmapInfo.cs b/CefSharp/Internals/BitmapInfo.cs
index 4498b3ad87..7cb0194667 100644
--- a/CefSharp/Internals/BitmapInfo.cs
+++ b/CefSharp/Internals/BitmapInfo.cs
@@ -17,6 +17,8 @@ public abstract class BitmapInfo
public IntPtr FileMappingHandle { get; set; }
+ public int BytesPerPixel { get; set; }
+
public abstract void ClearBitmap();
protected BitmapInfo()
diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs
index 354299b4c9..e73fafa207 100644
--- a/CefSharp/Internals/IRenderWebBrowser.cs
+++ b/CefSharp/Internals/IRenderWebBrowser.cs
@@ -8,8 +8,6 @@ namespace CefSharp.Internals
{
public interface IRenderWebBrowser : IWebBrowserInternal
{
- int BytesPerPixel { get; }
-
int Width { get; }
int Height { get; }
From c7032ea83cb6c91e76eb87017ee961de9ec0cd9b Mon Sep 17 00:00:00 2001
From: amaitland
Date: Thu, 18 Dec 2014 22:22:15 +1000
Subject: [PATCH 073/134] Upgrade to Cef 3.2171.1949 OnCursorChange Signature
has changed
---
.../CefSharp.BrowserSubprocess.Core.vcxproj | 6 +++---
CefSharp.BrowserSubprocess.Core/packages.config | 2 +-
CefSharp.Core/CefSharp.Core.vcxproj | 6 +++---
CefSharp.Core/Internals/RenderClientAdapter.h | 3 ++-
CefSharp.Core/packages.config | 2 +-
.../CefSharp.OffScreen.Example.csproj | 10 +++++-----
CefSharp.OffScreen.Example/packages.config | 4 ++--
CefSharp.Test/CefSharp.Test.csproj | 10 +++++-----
CefSharp.Test/packages.config | 4 ++--
.../CefSharp.WinForms.Example.csproj | 10 +++++-----
CefSharp.WinForms.Example/packages.config | 4 ++--
CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj | 10 +++++-----
CefSharp.Wpf.Example/packages.config | 4 ++--
NuGet.config | 1 +
build.ps1 | 2 +-
15 files changed, 40 insertions(+), 38 deletions(-)
diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
index 23f21248cf..7743e9fdee 100644
--- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
+++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -66,7 +66,7 @@
- e7e3cc55
+ 03744085
true
@@ -198,6 +198,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config
index 29df00376a..e2fa03398d 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 71f3887230..5a28c9ece4 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -1,6 +1,6 @@

-
+
Debug
@@ -66,7 +66,7 @@
<_ProjectFileVersion>11.0.51106.1
- 35b130a2
+ 6edfce21
bin\$(Configuration)\
@@ -282,6 +282,6 @@
This project references NuGet package(s) that are missing on this computer. Enable 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/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index c564cf6c4c..de533f87bf 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -108,7 +108,8 @@ namespace CefSharp
}
};
- virtual DECL void OnCursorChange(CefRefPtr browser, CefCursorHandle cursor) OVERRIDE
+ virtual DECL void OnCursorChange(CefRefPtr browser, CefCursorHandle cursor, CursorType type,
+ const CefCursorInfo& custom_cursor_info) OVERRIDE
{
_renderWebBrowser->SetCursor((IntPtr)cursor);
};
diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config
index 29df00376a..e2fa03398d 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 52a4335c8f..0e663d886c 100644
--- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
+++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
@@ -12,7 +12,7 @@
v4.0
512
Client
- 62ab0abb
+ 320b0b24
true
@@ -89,9 +89,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 b71b02da62..a13e14422e 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.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj
index 0d7d0d6d9a..d22a5bb564 100644
--- a/CefSharp.Test/CefSharp.Test.csproj
+++ b/CefSharp.Test/CefSharp.Test.csproj
@@ -19,7 +19,7 @@
3.5
Client
- e8407935
+ 85aa022d
true
@@ -142,9 +142,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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.Test/packages.config b/CefSharp.Test/packages.config
index 2fb56cd67a..ecc64962e9 100644
--- a/CefSharp.Test/packages.config
+++ b/CefSharp.Test/packages.config
@@ -2,8 +2,8 @@
-
-
+
+
\ 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 c5305b8980..196133da78 100644
--- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
+++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
@@ -21,7 +21,7 @@
3.5
Client
- da768d66
+ e79ac826
x64
@@ -155,9 +155,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 1a95f9f5a3..a97537c46b 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 b7c20a44a7..37e8ff465a 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -21,7 +21,7 @@
3.5
Client
- afb6365a
+ eef213f7
true
@@ -166,9 +166,9 @@
This project references NuGet package(s) that are missing on this computer. Enable 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 1a95f9f5a3..a97537c46b 100644
--- a/CefSharp.Wpf.Example/packages.config
+++ b/CefSharp.Wpf.Example/packages.config
@@ -1,5 +1,5 @@

-
-
+
+
\ No newline at end of file
diff --git a/NuGet.config b/NuGet.config
index fdbce8603f..d9430d5a84 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,6 +3,7 @@
+
diff --git a/build.ps1 b/build.ps1
index 696463bdcc..f40759b71a 100644
--- a/build.ps1
+++ b/build.ps1
@@ -7,7 +7,7 @@ param(
[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
- [string] $RedistVersion = "3.2171.1902-pre0"
+ [string] $RedistVersion = "3.2171.1949"
)
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
From 048ff475e5ac6d48c69cd96b1e2e7893f0498288 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 19 Dec 2014 14:09:17 +1000
Subject: [PATCH 074/134] When OnTitleChange and browser IsPopup then set the
Window title directly
---
CefSharp.Core/Internals/ClientAdapter.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 910f09411a..2497f05d45 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -77,7 +77,16 @@ namespace CefSharp
void ClientAdapter::OnTitleChange(CefRefPtr browser, const CefString& title)
{
- _browserControl->SetTitle(StringUtils::ToClr(title));
+ if(browser->IsPopup())
+ {
+ // Set the popup window title
+ auto hwnd = browser->GetHost()->GetWindowHandle();
+ SetWindowText(hwnd, std::wstring(title).c_str());
+ }
+ else
+ {
+ _browserControl->SetTitle(StringUtils::ToClr(title));
+ }
}
bool ClientAdapter::OnTooltip(CefRefPtr browser, CefString& text)
From 450ee3995d1f6e9140ac6627399b2594d0ab0e72 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Fri, 19 Dec 2014 16:30:59 +1000
Subject: [PATCH 075/134] Close open popups (if any) when
ManagedCefBrowserAdapter is disposed
---
CefSharp.Core/Internals/ClientAdapter.cpp | 38 ++++++++++++++++++++---
CefSharp.Core/Internals/ClientAdapter.h | 3 ++
CefSharp.Core/ManagedCefBrowserAdapter.h | 12 +++++--
3 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index 2497f05d45..19678dc4e9 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -17,6 +17,19 @@ namespace CefSharp
{
namespace Internals
{
+ void ClientAdapter::CloseAllPopups(bool forceClose)
+ {
+ if (!_popupBrowsers.empty())
+ {
+ // Request that any popup browsers close.
+ auto it = _popupBrowsers.begin();
+ for (; it != _popupBrowsers.end(); ++it)
+ {
+ (*it)->GetHost()->CloseBrowser(forceClose);
+ }
+ }
+ }
+
bool ClientAdapter::OnBeforePopup(CefRefPtr browser, CefRefPtr frame, const CefString& target_url,
const CefString& target_frame_name, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo,
CefRefPtr& client, CefBrowserSettings& settings, bool* no_javascript_access)
@@ -34,7 +47,12 @@ namespace CefSharp
void ClientAdapter::OnAfterCreated(CefRefPtr browser)
{
- if (!browser->IsPopup())
+ if (browser->IsPopup())
+ {
+ // Add to the list of popup browsers.
+ _popupBrowsers.push_back(browser);
+ }
+ else
{
_browserHwnd = browser->GetHost()->GetWindowHandle();
_cefBrowser = browser;
@@ -49,7 +67,20 @@ namespace CefSharp
void ClientAdapter::OnBeforeClose(CefRefPtr browser)
{
- if (_browserHwnd == browser->GetHost()->GetWindowHandle())
+ if (browser->IsPopup())
+ {
+ // Remove from the browser popup list.
+ auto it = _popupBrowsers.begin();
+ for (; it != _popupBrowsers.end(); ++it)
+ {
+ if ((*it)->IsSame(browser))
+ {
+ _popupBrowsers.erase(it);
+ break;
+ }
+ }
+ }
+ else if (_browserHwnd == browser->GetHost()->GetWindowHandle())
{
ILifeSpanHandler^ handler = _browserControl->LifeSpanHandler;
if (handler != nullptr)
@@ -270,7 +301,7 @@ namespace CefSharp
{
auto mimeType = StringUtils::ToNative(resourceHandler->MimeType);
auto statusText = StringUtils::ToNative(resourceHandler->StatusText);
-
+
CefRefPtr streamAdapter = new StreamAdapter(resourceHandler->Stream);
CefRefPtr stream = CefStreamReader::CreateForHandler(static_cast>(streamAdapter));
@@ -494,6 +525,5 @@ namespace CefSharp
return handler->OnDragEnter(_browserControl, dragDataWrapper, (CefSharp::DragOperationsMask)mask);
}
-
}
}
diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core/Internals/ClientAdapter.h
index 8ddcbfb026..272d03423a 100644
--- a/CefSharp.Core/Internals/ClientAdapter.h
+++ b/CefSharp.Core/Internals/ClientAdapter.h
@@ -5,6 +5,7 @@
#pragma once
#include "Stdafx.h"
+#include
#include "include/cef_app.h"
#include "include/cef_client.h"
#include "include/cef_render_process_handler.h"
@@ -36,6 +37,7 @@ namespace CefSharp
gcroot^> _onAfterBrowserCreated;
HWND _browserHwnd;
CefRefPtr _cefBrowser;
+ std::list> _popupBrowsers;
gcroot _tooltip;
@@ -57,6 +59,7 @@ namespace CefSharp
HWND GetBrowserHwnd() { return _browserHwnd; }
CefRefPtr GetCefBrowser() { return _cefBrowser; }
+ void CloseAllPopups(bool forceClose);
// CefClient
virtual CefRefPtr GetLifeSpanHandler() OVERRIDE{ return this; }
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 6d6e7793af..10317fde4e 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -29,7 +29,8 @@ namespace CefSharp
protected:
virtual void DoDispose(bool isDisposing) override
{
- Close();
+ CloseAllPopups(true);
+ Close(true);
_renderClientAdapter = nullptr;
if (_browserProcessServiceHost != nullptr)
@@ -66,16 +67,21 @@ namespace CefSharp
}
}
- void Close()
+ void Close(bool forceClose)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
if (cefHost != nullptr)
{
- cefHost->CloseBrowser(true);
+ cefHost->CloseBrowser(forceClose);
}
}
+ void CloseAllPopups(bool forceClose)
+ {
+ _renderClientAdapter->CloseAllPopups(forceClose);
+ }
+
void LoadUrl(String^ address)
{
auto cefFrame = _renderClientAdapter->TryGetCefMainFrame();
From 5543b21df5def33c4320108f07e31d9c80a64306 Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 22 Dec 2014 17:08:12 +1000
Subject: [PATCH 076/134] Whitespace fixes
---
.../Internals/CefContextMenuParamsWrapper.cpp | 20 -------------------
.../Internals/CefContextMenuParamsWrapper.h | 4 +---
2 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
index c61055aae8..31507a7361 100644
--- a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp
@@ -9,8 +9,6 @@ namespace CefSharp
{
namespace Internals
{
-
-
int CefContextMenuParamsWrapper::YCoord::get()
{
return _wrappedInfo->GetYCoord();
@@ -21,41 +19,34 @@ namespace CefSharp
return _wrappedInfo->GetXCoord();
}
-
//// TODO: Implement:
////virtual TypeFlags GetTypeFlags() OVERRIDE;
-
String^ CefContextMenuParamsWrapper::LinkUrl::get()
{
return StringUtils::ToClr(_wrappedInfo->GetLinkUrl());
}
-
String^ CefContextMenuParamsWrapper::UnfilteredLinkUrl::get()
{
return StringUtils::ToClr(_wrappedInfo->GetUnfilteredLinkUrl());
}
-
String^ CefContextMenuParamsWrapper::SourceUrl::get()
{
return StringUtils::ToClr(_wrappedInfo->GetSourceUrl());
}
-
bool CefContextMenuParamsWrapper::HasImageContents::get()
{
return _wrappedInfo->HasImageContents();
}
-
String^ CefContextMenuParamsWrapper::PageUrl::get()
{
return StringUtils::ToClr(_wrappedInfo->GetPageUrl());
}
-
String^ CefContextMenuParamsWrapper::FrameUrl::get()
{
return StringUtils::ToClr(_wrappedInfo->GetFrameUrl());
@@ -66,18 +57,15 @@ namespace CefSharp
return StringUtils::ToClr(_wrappedInfo->GetFrameCharset());
}
-
//// TODO: Implement:
////virtual MediaType GetMediaType() OVERRIDE;
////virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
-
String^ CefContextMenuParamsWrapper::SelectionText::get()
{
return StringUtils::ToClr(_wrappedInfo->GetSelectionText());
}
-
String^ CefContextMenuParamsWrapper::MisspelledWord::get()
{
return StringUtils::ToClr(_wrappedInfo->GetMisspelledWord());
@@ -88,11 +76,9 @@ namespace CefSharp
return _wrappedInfo->GetMisspellingHash();
}
-
//// TODO: Implement:
////virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
-
List^ CefContextMenuParamsWrapper::DictionarySuggestions::get()
{
std::vector& dictionarySuggestions = std::vector();
@@ -101,9 +87,6 @@ namespace CefSharp
return StringUtils::ToClr(dictionarySuggestions);
}
-
-
-
bool CefContextMenuParamsWrapper::IsEditable::get()
{
return _wrappedInfo->IsEditable();
@@ -114,10 +97,7 @@ namespace CefSharp
return _wrappedInfo->IsSpellCheckEnabled();
}
-
//// TODO: Implement:
////virtual EditStateFlags GetEditStateFlags() OVERRIDE;
-
-
}
}
diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
index 85d4d79631..185bc941ba 100644
--- a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
+++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h
@@ -45,7 +45,7 @@ namespace CefSharp
virtual property List^ DictionarySuggestions { List^ get(); }
-
+ // TODO: Implement:
//virtual bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE;
virtual property bool IsEditable { bool get(); }
@@ -53,8 +53,6 @@ namespace CefSharp
// TODO: Implement:
//virtual EditStateFlags GetEditStateFlags() OVERRIDE;
-
-
};
}
}
From e6e85f67eb20dc105e1b75dcbb3a8eb67d61d83d Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 22 Dec 2014 17:23:33 +1000
Subject: [PATCH 077/134] Add license disclaimer Cleanup formatting
---
CefSharp.Wpf.Example/Handlers/MenuHandler.cs | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/CefSharp.Wpf.Example/Handlers/MenuHandler.cs b/CefSharp.Wpf.Example/Handlers/MenuHandler.cs
index 2a14de61d8..1df98e6a8c 100644
--- a/CefSharp.Wpf.Example/Handlers/MenuHandler.cs
+++ b/CefSharp.Wpf.Example/Handlers/MenuHandler.cs
@@ -1,23 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using System;
namespace CefSharp.Wpf.Example.Handlers
{
-
public class MenuHandler : IMenuHandler
{
-
public bool OnBeforeContextMenu(IWebBrowser browser, IContextMenuParams parameters)
{
-
Console.WriteLine("Context menu opened");
Console.WriteLine(parameters.MisspelledWord);
return true;
}
-
-
}
}
From 78bbc23bd22f15b0120d5c53f55afbc54bde704f Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 22 Dec 2014 17:24:07 +1000
Subject: [PATCH 078/134] Implement AddWordToDictionary and ReplaceMisspelling
in CefSharp.Offscreen
---
CefSharp.OffScreen/ChromiumWebBrowser.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs
index 7aff142d5d..34f1d41722 100644
--- a/CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -207,12 +207,12 @@ public void CloseDevTools()
public void ReplaceMisspelling(string word)
{
- throw new NotImplementedException();
+ managedCefBrowserAdapter.ReplaceMisspelling(word);
}
public void AddWordToDictionary(string word)
{
- throw new NotImplementedException();
+ managedCefBrowserAdapter.AddWordToDictionary(word);
}
public string Address { get; set; }
From 6ecd2239df5278ef99a1ad1cf43ab15ff446177e Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 22 Dec 2014 17:26:11 +1000
Subject: [PATCH 079/134] Remove testing localPackages entry from NuGet.config
---
NuGet.config | 1 -
1 file changed, 1 deletion(-)
diff --git a/NuGet.config b/NuGet.config
index d9430d5a84..fdbce8603f 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,7 +3,6 @@
-
From 48aa8181392917101bcbb84d0487c990c0a93fbd Mon Sep 17 00:00:00 2001
From: amaitland
Date: Mon, 22 Dec 2014 17:28:06 +1000
Subject: [PATCH 080/134] Remove old files (including nunit)
---
clean.sh | 7 -------
nunit/nunit-console-runner.dll | Bin 36864 -> 0 bytes
nunit/nunit-console-x86.exe | Bin 5120 -> 0 bytes
nunit/nunit.core.dll | Bin 147456 -> 0 bytes
nunit/nunit.core.interfaces.dll | Bin 57344 -> 0 bytes
nunit/nunit.framework.dll | Bin 143360 -> 0 bytes
nunit/nunit.util.dll | Bin 131072 -> 0 bytes
test.sh | 8 --------
8 files changed, 15 deletions(-)
delete mode 100755 clean.sh
delete mode 100644 nunit/nunit-console-runner.dll
delete mode 100644 nunit/nunit-console-x86.exe
delete mode 100644 nunit/nunit.core.dll
delete mode 100644 nunit/nunit.core.interfaces.dll
delete mode 100644 nunit/nunit.framework.dll
delete mode 100644 nunit/nunit.util.dll
delete mode 100644 test.sh
diff --git a/clean.sh b/clean.sh
deleted file mode 100755
index 07171770d2..0000000000
--- a/clean.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# Purpose: Utility script which makes it easier to switch between VS2010 and VS2012 (since they share the same output folder)
-#
-rm -rf $(gfind -iname bin -or -iname obj)
-rm -f Debug/CefSharp*.*
-rm -f Release/CefSharp*.*
diff --git a/nunit/nunit-console-runner.dll b/nunit/nunit-console-runner.dll
deleted file mode 100644
index 057145566545140479a265c8ff856985d6404e26..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 36864
zcmeHwe|#L(b?=$k)$Z)9w9;yA$-iWeY;4wENtSFJu)tthmO%a`W68e)!K|gRym+-E
zW>>a_Y9b{-fEo(_nzJ%FYh!PpHS7%9Emc+K
zSsv@{T|`^70KGWBrPm+r$D}t#HG}9%U@V2b_J~)W;QD%nuTgR{hUJ&fp8*12J*q*k
z_18-U_0m;JjF3+g_{zW&U|HcI%P*fHsw}U+*Rn+f4T>KF^-GF1qLzYvw1E0`y8+N9
zx{91Admjtf7B}w>pf0japujXE_?CUv!yqlLopnGcvVI1QOgDjV*=Ie`hO+8RamE5O
z7MQWXj0I*aFk^uk3(Qzx#sV`In6bc&1^z#>z?FPojSt_O>Qq6`pHFl-z7fHez;fafNf1C`8_=69t)t47zLuY8hF)Fc=3j3l9~NgiVJ>4?u35pF~~jkvRj(3A7Z
znCvX#-6xAhHNc8)*l;nMH3{R2dFHoP&}T!0=P+!Wz&Mb>V~tEQ&ai2=x?Z~g^vMPQ
zSPp6>8sZJjReEwEFhZVcC0&sw7x_4^ZlNypl^z0&&1IB?Af_1@#}k-fQ?0tHVV0l)
zV?@IkOFAyWtg$qTC<*(T`K17rM!mBPS2AG2vr(uDjAKya#f{_4CW#h!)U(_WNy14@%C`W5`AS?8
zCdIkjit@6!>9pZG>n+VUM+&XZD&UkA-TwtPfpHC{aaJ?-T1;s$vEZd^@B}XqisZ3^
zLW$_L=b$Z7nP0;fSRTs){-UlW%ZtC%%QW_r+ZJHXOqqNix+(7`4}*CRB^K5t7NzRr
z3*(FKO2pz-@tAWiix6K_zbCOMz9_!%*34T$VfVv$RiYAo;kq&|U(Ymd`-gbZxw~a(
zCMp|R_0FHiDpXUv+F8q`n$+18uc>noG|WXyJSQ|EOpPauPY0?pGk%j!&5Bn8A>tX}
zh9G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#eA>*+2%8!84JuEcEEHGn%84JunFangcfwdM
diff --git a/nunit/nunit-console-x86.exe b/nunit/nunit-console-x86.exe
deleted file mode 100644
index 06279acb54f6d4aefa7482e6d20f04e69581fd39..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5120
zcmeHKO>88^6@G1djn})j%#t8hh^2N+zzd%Ccx)Dj*zC-Xz2L=vc*ZvQ6K?mEXFBfb
z9;$o%lLPXFNKquThloR@NIB*ZMM<;~hzKEWIRt6XNQpQn2NWqeB!`giy`J%mV>?=;
zNZ~-)_3G!ndiA|mue#nWe(Mf(6HyQ9XP*(hiL#ohr>0yd2*OxxX=NIL@&YxxTvWBNtnGn;{wJEMSLTQotZw@FQG2|0NwRj4^sCJIegf*U=-&n+FIVxCJk<=!M3lK*zw93~<(1-(V?=ZH2R
zXij!En?x5o$M@S;3H+9LAI2}W259YA@5g9=+zX;m+14g*^rR?2vQ1=Mj09T_oerO1
zBqay*w$XkFLBYC-Y1VZKwWH*SZgvc%TW7zbFt#o_M|DN?`*Z9&B8!O8eXjCQ#u5xz
z`yh3V4B!C!pP}BTuXK$JqW|>G;_aIjYer$LyIDJ9Kbv_j`y9`lBOmlG*u!tYEwEt-
zb+{NCFQ`N;kwKuc3x?N8XjM0_8A?|bMPfdd+BAGg)?H>0{xNDp9}p^=*L3;E_BFZnQKCqg}!A4
zRxkZh=%1`vXzlHKO7th%6MqbmqNm^i9<3;5zfG%xpemyuJhB066TIJrb2sQKbXn+C
zq1S|t3;nv#ywG`}uL%7n=w)(1hsYE9y6kaY`ifk-LN+~v)~1K30QxA+gAUWHpcg0u
zIzf+HHh8x{Uly4nZJ_^c+O$Tg=a7BJVbeVZg7OC#nRqi9Tl5X-bV?1=UlUglO)rM!
zhOb|spb>a++6{v!^mTfF>bkA>H5Gg(ipFVa4NSX`FjpHvpbga`H#EMtMa6?C)-_t*
z`kr=UT6DaCY&Q-KIR-(LaP3vS?St)w0p+7e*S7qFk{A0rA0ybd8nHf_p4E|SygG}X
zWER3&-3bm(GFA-iaO0DVLRddAUZr{pt7M$At~qAsz5}#`5|sh-(!OivwD;S{M=9pT_~*(Q3@qN`$t!h`InxD{9`+*Tdd4q0>|YhTAFcs!e#cosgh
z$xqVm54Z!h*dyz$(&3A(j=MC;F?wu^H_odBwtq_{IeJ$5g
zuB_H}+2`**GLWy4%1Q4_^8fHam%OJ6vHu9RpGvZ+4j{=(wQ|OM^^|#DeAuBO=_Vih
zI~e>dM|2PGcB|Bp5B@n}%hbJ|Nwn+8(Ov_c!)sNgs0v$1
za37yjG=kY{_}DP23~0L98wXMaUKQF5PbJw#G@Uzui2I2>lJ9
zSFl#o9_>KC0UgE6BKofEtFbR*V7U^cLgDAd>uj}$`Mhw~!851
zOFOOzLUz~_mlQQUas&CnSF
zM*}AkcSL3>A(%k_>D7@S}Wa3Po-28J3-m;!$8lZ4s?{d@xnm=G*VwlR238i(M+mg
zg6AW*ij*-**F4vRQMk=1bM1L2s@c2aDOGatB4RUn2b9d*I*Ecmq)Y
diff --git a/nunit/nunit.core.dll b/nunit/nunit.core.dll
deleted file mode 100644
index 5a727d5dcc28df5106df9df2d4a31f38370001f4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 147456
zcmeFad7NZbdH;X=-s)Rh_ssNkPxb8GEHhlXx|?B>X4p4DHbGeiR5n3j1TI$17^SGD
zRg5dR1kp?sWfY^LxFJyzSBx8?;{q;$juK;{F~)qO(HI?m@6U72t-3YSAo>3C`|HQN
zrt98w&U2pgJkNQ~bDp!_)6RcG5CuU{;P25#gWwZ9_3vo=ef*y}k{6BLvnaT$eE%Mw
z=sWfPJ*WS4}@XEA59txJR|G6a-7cAQ*SCvwQpZqj`!t#V>Jm^Jetx8O)JR
z{0AB#d>#D?3lQ!;?M)H(ZxXy#FnE6}A?*6^qA(cPHSURo$AbV4I{!+9PwIq%V0z1C
zFWy4u&Hd-&U^q(PjU#;n_c~JTQ9ti9g@}XP+(XeD)(}z2@#6n+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