Skip to content

Commit 60a1f64

Browse files
committed
CEF Upgrade - Breaking Changes
- Remove CefSettings.EnableNetSecurityExpiration - Remove RequestContextSettings.EnableNetSecurityExpiration #2954 - Remove IFrame.LoadStringForUrl and IWebBrowser.LoadString Resolves #2955
1 parent 3ee5b45 commit 60a1f64

File tree

8 files changed

+1
-90
lines changed

8 files changed

+1
-90
lines changed

CefSharp.BrowserSubprocess.Core/Wrapper/Frame.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ void Frame::LoadUrl(String^ url)
152152
_frame->LoadURL(StringUtils::ToNative(url));
153153
}
154154

155-
///
156-
// Load the contents of |html| with the specified dummy |url|. |url|
157-
// should have a standard scheme (for example, http scheme) or behaviors like
158-
// link clicks and web security restrictions may not behave as expected.
159-
///
160-
/*--cef()--*/
161-
void Frame::LoadStringForUrl(String^ html, String^ url)
162-
{
163-
_frame->LoadString(StringUtils::ToNative(html), StringUtils::ToNative(url));
164-
}
165-
166155
///
167156
// Execute a string of JavaScript code in this frame. The |script_url|
168157
// parameter is the URL where the script in question can be found, if any.

CefSharp.BrowserSubprocess.Core/Wrapper/Frame.h

+1-9
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,6 @@ namespace CefSharp
154154
/*--cef()--*/
155155
virtual void LoadUrl(String^ url);
156156

157-
///
158-
// Load the contents of |html| with the specified dummy |url|. |url|
159-
// should have a standard scheme (for example, http scheme) or behaviors like
160-
// link clicks and web security restrictions may not behave as expected.
161-
///
162-
/*--cef()--*/
163-
virtual void LoadStringForUrl(String^ html, String^ url);
164-
165157
///
166158
// Execute a string of JavaScript code in this frame. The |script_url|
167159
// parameter is the URL where the script in question can be found, if any.
@@ -241,7 +233,7 @@ namespace CefSharp
241233
{
242234
IBrowser^ get();
243235
}
244-
236+
245237
virtual IRequest^ CreateRequest(bool initializePostData);
246238

247239
virtual IUrlRequest^ CreateUrlRequest(IRequest^ request, IUrlRequestClient^ client);

CefSharp.Core/AbstractCefSettings.h

-12
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,6 @@ namespace CefSharp
9696
void set(bool value) { _cefSettings->command_line_args_disabled = value; }
9797
}
9898

99-
/// <summary>
100-
/// Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
101-
/// HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
102-
/// using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
103-
/// https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
104-
/// </summary>
105-
property bool EnableNetSecurityExpiration
106-
{
107-
bool get() { return _cefSettings->enable_net_security_expiration == 1; }
108-
void set(bool value) { _cefSettings->enable_net_security_expiration = value; }
109-
}
110-
11199
/// <summary>
112100
/// Set to true to control browser process main (UI) thread message pump
113101
/// scheduling via the IBrowserProcessHandler.OnScheduleMessagePumpWork

CefSharp.Core/Internals/CefFrameWrapper.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,6 @@ void CefFrameWrapper::LoadUrl(String^ url)
209209
_frame->LoadURL(StringUtils::ToNative(url));
210210
}
211211

212-
///
213-
// Load the contents of |html| with the specified dummy |url|. |url|
214-
// should have a standard scheme (for example, http scheme) or behaviors like
215-
// link clicks and web security restrictions may not behave as expected.
216-
///
217-
/*--cef()--*/
218-
void CefFrameWrapper::LoadStringForUrl(String^ html, String^ url)
219-
{
220-
ThrowIfDisposed();
221-
ThrowIfFrameInvalid();
222-
223-
_frame->LoadString(StringUtils::ToNative(html), StringUtils::ToNative(url));
224-
}
225-
226212
///
227213
// Execute a string of JavaScript code in this frame. The |script_url|
228214
// parameter is the URL where the script in question can be found, if any.

CefSharp.Core/Internals/CefFrameWrapper.h

-8
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,6 @@ namespace CefSharp
155155
/*--cef()--*/
156156
virtual void LoadUrl(String^ url);
157157

158-
///
159-
// Load the contents of |html| with the specified dummy |url|. |url|
160-
// should have a standard scheme (for example, http scheme) or behaviors like
161-
// link clicks and web security restrictions may not behave as expected.
162-
///
163-
/*--cef()--*/
164-
virtual void LoadStringForUrl(String^ html, String^ url);
165-
166158
///
167159
// Execute a string of JavaScript code in this frame. The |script_url|
168160
// parameter is the URL where the script in question can be found, if any.

CefSharp.Core/RequestContextSettings.h

-12
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,6 @@ namespace CefSharp
9797
void set(String^ value) { StringUtils::AssignNativeFromClr(_settings->accept_language_list, value); }
9898
}
9999

100-
/// <summary>
101-
/// Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
102-
/// HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
103-
/// using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
104-
/// https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
105-
/// </summary>
106-
property bool EnableNetSecurityExpiration
107-
{
108-
bool get() { return _settings->enable_net_security_expiration == 1; }
109-
void set(bool value) { _settings->enable_net_security_expiration = value; }
110-
}
111-
112100
/// <summary>
113101
/// Set to true to ignore errors related to invalid SSL certificates.
114102
/// Enabling this setting can lead to potential security vulnerabilities like

CefSharp/IFrame.cs

-8
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,6 @@ public interface IFrame : IDisposable
107107
/// <param name="url">url to be loaded in the frame</param>
108108
void LoadUrl(string url);
109109

110-
/// <summary>
111-
/// Load the contents of html with the specified dummy url.
112-
/// </summary>
113-
/// <param name="html">html to be loaded</param>
114-
/// <param name="url"> should have a standard scheme (for example, http scheme) or behaviors like
115-
/// link clicks and web security restrictions may not behave as expected.</param>
116-
void LoadStringForUrl(string html, string url);
117-
118110
/// <summary>
119111
/// Execute a string of JavaScript code in this frame.
120112
/// </summary>

CefSharp/WebBrowserExtensions.cs

-16
Original file line numberDiff line numberDiff line change
@@ -381,22 +381,6 @@ public static void LoadUrlWithPostData(this IWebBrowser browser, string url, byt
381381
}
382382
}
383383

384-
/// <summary>
385-
/// Load the string contents with the specified dummy url. Web security restrictions may not behave as expected.
386-
/// </summary>
387-
/// <param name="browser">The ChromiumWebBrowser instance this method extends</param>
388-
/// <param name="html">html string to load</param>
389-
/// <param name="url">the url should have a standard scheme (for example, http scheme) or behaviors like link clicks</param>
390-
public static void LoadString(this IWebBrowser browser, string html, string url)
391-
{
392-
using (var frame = browser.GetMainFrame())
393-
{
394-
ThrowExceptionIfFrameNull(frame);
395-
396-
frame.LoadStringForUrl(html, url);
397-
}
398-
}
399-
400384
/// <summary>
401385
/// Registers and loads a <see cref="ResourceHandler"/> that represents the HTML content.
402386
/// </summary>

0 commit comments

Comments
 (0)