Skip to content

Commit

Permalink
Upgrade to CEF 95.7.10+g00d4ad5+chromium-95.0.4638.54 / Chromium 95.0…
Browse files Browse the repository at this point in the history
….4638.54

Remove CefBrowserSettings.universal_access_from_file_urls and CefBrowserSettings.file_access_from_file_urls.
https://bitbucket.org/chromiumembedded/cef/commits/ff33d7f72144

Remove CefBrowserSettings.application_cache
https://bitbucket.org/chromiumembedded/cef/commits/370a7749e950ef6784c29a666d07a0b67148dd5f

Remove ignore_certificate_errors setting
https://bitbucket.org/chromiumembedded/cef/commits/aabe4ce466766f8bd9907e7fa30546a3afada214

RequestContextSettings.IgnoreCertificateErrors was removed, the CefSettings.IgnoreCertificateErrors property
now set the command line arg

Use CefRect for CefWindowInfo bounds
https://bitbucket.org/chromiumembedded/cef/commits/8587cc4e4bbc187aa989152e521318818b3f41d3

Additional overload has been added to pass in a Rect directly to SetAsChild

Rename SendFocusEvent to SetFocus
https://bitbucket.org/chromiumembedded/cef/commits/49a4611e28d7bbc221cff816d7c4a96c55ba2721

SendFocusEvent will now call SetFocus internally, the project internally has been updated to use SetFocus for WPF

Replace CefRequestCallback with CefCallback
https://bitbucket.org/chromiumembedded/cef/commits/3e7f1bb529442a6c7674262d9219df57964e9524

No changes to the API for this, I've kept the same interface and just mapped internally

Resolves #3857, #3667, #3668
  • Loading branch information
amaitland committed Oct 22, 2021
1 parent 4df57e3 commit 0e242a8
Show file tree
Hide file tree
Showing 38 changed files with 111 additions and 163 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.94.4.11\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.94.4.11\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.95.7.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.95.7.10\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.94.4.11\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.94.4.11\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.95.7.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.95.7.10\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.sdk" version="94.4.11" targetFramework="native" />
<package id="cef.sdk" version="95.7.10" targetFramework="native" />
<package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.sdk" version="94.4.11" targetFramework="netcoreapp3.1" />
<package id="cef.sdk" version="95.7.10" targetFramework="netcoreapp3.1" />
<package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public partial class BrowserSettings : CefSharp.IBrowserSettings
public BrowserSettings() { }
public BrowserSettings(bool autoDispose) { }
public virtual string AcceptLanguageList { get { throw null; } set { } }
public virtual CefSharp.CefState ApplicationCache { get { throw null; } set { } }
public virtual bool AutoDispose { get { throw null; } }
public virtual uint BackgroundColor { get { throw null; } set { } }
public virtual string CursiveFontFamily { get { throw null; } set { } }
Expand All @@ -24,7 +23,6 @@ public BrowserSettings(bool autoDispose) { }
public virtual int DefaultFixedFontSize { get { throw null; } set { } }
public virtual int DefaultFontSize { get { throw null; } set { } }
public virtual string FantasyFontFamily { get { throw null; } set { } }
public virtual CefSharp.CefState FileAccessFromFileUrls { get { throw null; } set { } }
public virtual string FixedFontFamily { get { throw null; } set { } }
public virtual CefSharp.CefState ImageLoading { get { throw null; } set { } }
public virtual CefSharp.CefState ImageShrinkStandaloneToFit { get { throw null; } set { } }
Expand All @@ -43,7 +41,6 @@ public BrowserSettings(bool autoDispose) { }
public virtual string StandardFontFamily { get { throw null; } set { } }
public virtual CefSharp.CefState TabToLinks { get { throw null; } set { } }
public virtual CefSharp.CefState TextAreaResize { get { throw null; } set { } }
public virtual CefSharp.CefState UniversalAccessFromFileUrls { get { throw null; } set { } }
public virtual CefSharp.CefState WebGl { get { throw null; } set { } }
public virtual int WindowlessFrameRate { get { throw null; } set { } }
public void Dispose() { }
Expand Down Expand Up @@ -307,7 +304,6 @@ public RequestContextSettings() { }
public string CachePath { get { throw null; } set { } }
public bool CookieableSchemesExcludeDefaults { get { throw null; } set { } }
public string CookieableSchemesList { get { throw null; } set { } }
public bool IgnoreCertificateErrors { get { throw null; } set { } }
public bool PersistSessionCookies { get { throw null; } set { } }
public bool PersistUserPreferences { get { throw null; } set { } }
public void Dispose() { }
Expand Down
30 changes: 0 additions & 30 deletions CefSharp.Core.Runtime/BrowserSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,26 +237,6 @@ namespace CefSharp
void set(CefState value) { _browserSettings->plugins = (cef_state_t)value; }
}

/// <summary>
/// Controls whether file URLs will have access to all URLs. Also configurable
/// using the "allow-universal-access-from-files" command-line switch.
/// </summary>
virtual property CefState UniversalAccessFromFileUrls
{
CefState get() { return (CefState)_browserSettings->universal_access_from_file_urls; }
void set(CefState value) { _browserSettings->universal_access_from_file_urls = (cef_state_t)value; }
}

/// <summary>
/// Controls whether file URLs will have access to other file URLs. Also
/// configurable using the "allow-access-from-files" command-line switch.
/// </summary>
virtual property CefState FileAccessFromFileUrls
{
CefState get() { return (CefState)_browserSettings->file_access_from_file_urls; }
void set(CefState value) { _browserSettings->file_access_from_file_urls = (cef_state_t)value; }
}

/// <summary>
/// Controls whether image URLs will be loaded from the network. A cached image
/// will still be rendered if requested. Also configurable using the
Expand Down Expand Up @@ -319,16 +299,6 @@ namespace CefSharp
void set(CefState value) { _browserSettings->databases = (cef_state_t)value; }
}

/// <summary>
/// Controls whether the application cache can be used. Also configurable using
/// the "disable-application-cache" command-line switch.
/// </summary>
virtual property CefState ApplicationCache
{
CefState get() { return (CefState)_browserSettings->application_cache; }
void set(CefState value) { _browserSettings->application_cache = (cef_state_t)value; }
}

/// <summary>
/// Controls whether WebGL can be used. Note that WebGL requires hardware
/// support and may not work on all systems even when enabled. Also
Expand Down
9 changes: 0 additions & 9 deletions CefSharp.Core.Runtime/CefSettingsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,6 @@ namespace CefSharp
void set(String^ value) { StringUtils::AssignNativeFromClr(_cefSettings->user_data_path, value); }
}

/// <summary>
/// Set to true in order to completely ignore SSL certificate errors. This is NOT recommended.
/// </summary>
property bool IgnoreCertificateErrors
{
bool get() { return _cefSettings->ignore_certificate_errors == 1; }
void set(bool value) { _cefSettings->ignore_certificate_errors = value; }
}

/// <summary>
/// The locale string that will be passed to WebKit. If empty the default locale of "en-US" will be used. Also configurable using
/// the "lang" command-line switch.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.94.4.11\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.94.4.11\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.95.7.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.95.7.10\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.94.4.11\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.94.4.11\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.95.7.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.95.7.10\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void CefBrowserHostWrapper::SendFocusEvent(bool setFocus)
{
ThrowIfDisposed();

_browserHost->SendFocusEvent(setFocus);
_browserHost->SetFocus(setFocus);
}

void CefBrowserHostWrapper::SendKeyEvent(KeyEvent keyEvent)
Expand Down
15 changes: 11 additions & 4 deletions CefSharp.Core.Runtime/Internals/CefRequestCallbackWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ namespace CefSharp
private ref class CefRequestCallbackWrapper : public IRequestCallback, public CefWrapper
{
private:
MCefRefPtr<CefRequestCallback> _callback;
MCefRefPtr<CefCallback> _callback;
IFrame^ _frame;
IRequest^ _request;

internal:
CefRequestCallbackWrapper(CefRefPtr<CefRequestCallback> &callback)
CefRequestCallbackWrapper(CefRefPtr<CefCallback> &callback)
: _callback(callback), _frame(nullptr), _request(nullptr)
{
}

CefRequestCallbackWrapper(
CefRefPtr<CefRequestCallback> &callback,
CefRefPtr<CefCallback> &callback,
IFrame^ frame,
IRequest^ request)
: _callback(callback), _frame(frame), _request(request)
Expand Down Expand Up @@ -53,7 +53,14 @@ namespace CefSharp
{
ThrowIfDisposed();

_callback->Continue(allow);
if (allow)
{
_callback->Continue();
}
else
{
_callback->Cancel();
}

delete this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace CefSharp
return new CefCookieAccessFilterAdapter(accessFilter, _browserControl);
}

cef_return_value_t OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefRequestCallback> callback) override
cef_return_value_t OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefCallback> callback) override
{
//For ServiceWorker browser and frame will be null
if (browser.get() && frame.get())
Expand Down
4 changes: 2 additions & 2 deletions CefSharp.Core.Runtime/Internals/ClientAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ namespace CefSharp
return nullptr;
}

bool ClientAdapter::OnCertificateError(CefRefPtr<CefBrowser> browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info, CefRefPtr<CefRequestCallback> callback)
bool ClientAdapter::OnCertificateError(CefRefPtr<CefBrowser> browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info, CefRefPtr<CefCallback> callback)
{
auto handler = _browserControl->RequestHandler;

Expand All @@ -651,7 +651,7 @@ namespace CefSharp
return handler->OnCertificateError(_browserControl, browserWrapper, (CefErrorCode)cert_error, StringUtils::ToClr(request_url), sslInfoWrapper, requestCallback);
}

bool ClientAdapter::OnQuotaRequest(CefRefPtr<CefBrowser> browser, const CefString& originUrl, int64 newSize, CefRefPtr<CefRequestCallback> callback)
bool ClientAdapter::OnQuotaRequest(CefRefPtr<CefBrowser> browser, const CefString& originUrl, int64 newSize, CefRefPtr<CefCallback> callback)
{
auto handler = _browserControl->RequestHandler;

Expand Down
4 changes: 2 additions & 2 deletions CefSharp.Core.Runtime/Internals/ClientAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ namespace CefSharp
CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool isNavigation, bool isDownload, const CefString& requestInitiator, bool& disableDefaultHandling) override;
virtual DECL bool GetAuthCredentials(CefRefPtr<CefBrowser> browser, const CefString& originUrl, bool isProxy,
const CefString& host, int port, const CefString& realm, const CefString& scheme, CefRefPtr<CefAuthCallback> callback) override;
virtual DECL bool OnQuotaRequest(CefRefPtr<CefBrowser> browser, const CefString& originUrl, int64 newSize, CefRefPtr<CefRequestCallback> callback) override;
virtual DECL bool OnCertificateError(CefRefPtr<CefBrowser> browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info, CefRefPtr<CefRequestCallback> callback) override;
virtual DECL bool OnQuotaRequest(CefRefPtr<CefBrowser> browser, const CefString& originUrl, int64 newSize, CefRefPtr<CefCallback> callback) override;
virtual DECL bool OnCertificateError(CefRefPtr<CefBrowser> browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info, CefRefPtr<CefCallback> callback) override;
virtual DECL bool OnSelectClientCertificate(CefRefPtr<CefBrowser> browser, bool isProxy, const CefString& host, int port,
const CefRequestHandler::X509CertificateList& certificates, CefRefPtr<CefSelectClientCertificateCallback> callback) override;
virtual DECL void OnPluginCrashed(CefRefPtr<CefBrowser> browser, const CefString& plugin_path) override;
Expand Down
14 changes: 0 additions & 14 deletions CefSharp.Core.Runtime/RequestContextSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,6 @@ namespace CefSharp
void set(String^ value) { StringUtils::AssignNativeFromClr(_settings->accept_language_list, value); }
}

/// <summary>
/// Set to true to ignore errors related to invalid SSL certificates.
/// Enabling this setting can lead to potential security vulnerabilities like
/// "man in the middle" attacks. Applications that load content from the
/// internet should not enable this setting. Can be set globally using the
/// CefSettings.IgnoreCertificateErrors value. This value will be ignored if
/// CachePath matches the CefSettings.cache_path value.
/// </summary>
property bool IgnoreCertificateErrors
{
bool get() { return _settings->ignore_certificate_errors == 1; }
void set(bool value) { _settings->ignore_certificate_errors = value; }
}

/// <summary>
/// Comma delimited list of schemes supported by the associated
/// ICookieManager. If CookieableSchemesExcludeDefaults is false the
Expand Down
Loading

0 comments on commit 0e242a8

Please sign in to comment.