diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 467118210..02e5e3fb3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -120,7 +120,7 @@ body: attributes: value: | To help determine where the problem needs to be fixed please download and test using the `CEF Sample Application(cefclient)`. - 1. Download for [x86](https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windows32_client.tar.bz2) or [x64](https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windows64_client.tar.bz2) or [arm64](https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windowsarm64_client.tar.bz2). + 1. Download for [x86](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windows32_client.tar.bz2) or [x64](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windows64_client.tar.bz2) or [arm64](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windowsarm64_client.tar.bz2). 2. Extract tar.bz2 file 3. Execute cefclient.exe using the **command line args below**: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5660731e6..c0e886320 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,10 +18,8 @@ The upstream [`CEF` forum](http://magpcss.org/ceforum/) is a valuable resource, It maybe helpful to run the `cefclient` application and compare output with `CefSharp`. The `WinForms` and `WPF` versions use two different rendering modes, `WPF` uses Offscreen Rendering (`OSR`). `OffScreen` also uses `OSR` mode. - - Download one of the following: - - For x86 download https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windows32_client.tar.bz2 - - For x64 download https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windows64_client.tar.bz2 - - For arm64 download https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windowsarm64_client.tar.bz2 + - Download and run the `CEF Sample Application(cefclient)`: + - Download for [x86](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windows32_client.tar.bz2) or [x64](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windows64_client.tar.bz2) or [arm64](https://cef-builds.spotifycdn.com/cef_binary_126.2.12%2Bg162c3d6%2Bchromium-126.0.6478.127_windowsarm64_client.tar.bz2). - Extract and run cefclient.exe - If you are using WPF/OffScreen run ``` diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj index de36c6c7a..c15f74e60 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index f280a9416..0438b23fa 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index 0e61bed48..c2fda2faa 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,8 +1,8 @@ #pragma code_page(65001) 1 VERSIONINFO - FILEVERSION 126,2,70 - PRODUCTVERSION 126,2,70 + FILEVERSION 127,3,40 + PRODUCTVERSION 127,3,40 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -18,10 +18,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "126.2.70" + VALUE "FileVersion", "127.3.40" VALUE "LegalCopyright", "Copyright © 2023 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "126.2.70" + VALUE "ProductVersion", "127.3.40" END END BLOCK "VarFileInfo" diff --git a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config index 1cbdd822d..b7ceaa954 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config +++ b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config index 153f5c1ca..f08a3177e 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config +++ b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index 3784d9899..55beec8ab 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj index 6016bcf5d..d1eaea674 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index c9e339ab7..f27249255 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/Resource.rc b/CefSharp.Core.Runtime/Resource.rc index 4c95f00b3..f6bab694d 100644 --- a/CefSharp.Core.Runtime/Resource.rc +++ b/CefSharp.Core.Runtime/Resource.rc @@ -1,8 +1,8 @@ #pragma code_page(65001) 1 VERSIONINFO - FILEVERSION 126,2,70 - PRODUCTVERSION 126,2,70 + FILEVERSION 127,3,40 + PRODUCTVERSION 127,3,40 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -18,10 +18,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "126.2.70" + VALUE "FileVersion", "127.3.40" VALUE "LegalCopyright", "Copyright © 2023 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "126.2.70" + VALUE "ProductVersion", "127.3.40" END END BLOCK "VarFileInfo" diff --git a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config index 1cbdd822d..b7ceaa954 100644 --- a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config +++ b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config index 153f5c1ca..f08a3177e 100644 --- a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config +++ b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core/DevTools/DevToolsClient.Generated.cs b/CefSharp.Core/DevTools/DevToolsClient.Generated.cs index bc449f5bd..dfd0bdd4e 100644 --- a/CefSharp.Core/DevTools/DevToolsClient.Generated.cs +++ b/CefSharp.Core/DevTools/DevToolsClient.Generated.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 126.0.6478.115 +// CHROMIUM VERSION 127.0.6533.100 using System.Runtime.Serialization; namespace CefSharp.DevTools.Accessibility @@ -1985,6 +1985,16 @@ namespace CefSharp.DevTools.Audits [EnumMember(Value = ("CorpNotSameOriginAfterDefaultedToSameOriginByCoep"))] CorpNotSameOriginAfterDefaultedToSameOriginByCoep, /// + /// CorpNotSameOriginAfterDefaultedToSameOriginByDip + /// + [EnumMember(Value = ("CorpNotSameOriginAfterDefaultedToSameOriginByDip"))] + CorpNotSameOriginAfterDefaultedToSameOriginByDip, + /// + /// CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip + /// + [EnumMember(Value = ("CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"))] + CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, + /// /// CorpNotSameSite /// [EnumMember(Value = ("CorpNotSameSite"))] @@ -3528,7 +3538,17 @@ namespace CefSharp.DevTools.Audits /// ReplacedByButtonMode /// [EnumMember(Value = ("ReplacedByButtonMode"))] - ReplacedByButtonMode + ReplacedByButtonMode, + /// + /// RelyingPartyOriginIsOpaque + /// + [EnumMember(Value = ("RelyingPartyOriginIsOpaque"))] + RelyingPartyOriginIsOpaque, + /// + /// TypeNotMatching + /// + [EnumMember(Value = ("TypeNotMatching"))] + TypeNotMatching } /// @@ -7958,10 +7978,10 @@ namespace CefSharp.DevTools.DOM [EnumMember(Value = ("scroll-marker"))] ScrollMarker, /// - /// scroll-markers + /// scroll-marker-group /// - [EnumMember(Value = ("scroll-markers"))] - ScrollMarkers, + [EnumMember(Value = ("scroll-marker-group"))] + ScrollMarkerGroup, /// /// scrollbar /// @@ -13298,6 +13318,26 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Started ServiceWorker static routing source evaluation. + /// + [DataMember(Name = ("workerRouterEvaluationStart"), IsRequired = (false))] + public double? WorkerRouterEvaluationStart + { + get; + set; + } + + /// + /// Started cache lookup when the source was evaluated to `cache`. + /// + [DataMember(Name = ("workerCacheLookupStart"), IsRequired = (false))] + public double? WorkerCacheLookupStart + { + get; + set; + } + /// /// Started sending request. /// @@ -13989,6 +14029,16 @@ namespace CefSharp.DevTools.Network [EnumMember(Value = ("corp-not-same-origin-after-defaulted-to-same-origin-by-coep"))] CorpNotSameOriginAfterDefaultedToSameOriginByCoep, /// + /// corp-not-same-origin-after-defaulted-to-same-origin-by-dip + /// + [EnumMember(Value = ("corp-not-same-origin-after-defaulted-to-same-origin-by-dip"))] + CorpNotSameOriginAfterDefaultedToSameOriginByDip, + /// + /// corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip + /// + [EnumMember(Value = ("corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"))] + CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, + /// /// corp-not-same-site /// [EnumMember(Value = ("corp-not-same-site"))] @@ -14474,6 +14524,32 @@ namespace CefSharp.DevTools.Network get; set; } + + /// + /// The actual router source used. + /// + public CefSharp.DevTools.Network.ServiceWorkerRouterSource? ActualSourceType + { + get + { + return (CefSharp.DevTools.Network.ServiceWorkerRouterSource? )(StringToEnum(typeof(CefSharp.DevTools.Network.ServiceWorkerRouterSource? ), actualSourceType)); + } + + set + { + this.actualSourceType = (EnumToString(value)); + } + } + + /// + /// The actual router source used. + /// + [DataMember(Name = ("actualSourceType"), IsRequired = (false))] + internal string actualSourceType + { + get; + set; + } } /// @@ -15112,6 +15188,35 @@ namespace CefSharp.DevTools.Network } } + /// + /// cookiePartitionKey object + /// The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h. + /// + [System.Runtime.Serialization.DataContractAttribute] + public partial class CookiePartitionKey : CefSharp.DevTools.DevToolsDomainEntityBase + { + /// + /// The site of the top-level URL the browser was visiting at the start + /// of the request to the endpoint that set the cookie. + /// + [DataMember(Name = ("topLevelSite"), IsRequired = (true))] + public string TopLevelSite + { + get; + set; + } + + /// + /// Indicates if the cookie has any ancestors that are cross-site to the topLevelSite. + /// + [DataMember(Name = ("hasCrossSiteAncestor"), IsRequired = (true))] + public bool HasCrossSiteAncestor + { + get; + set; + } + } + /// /// Cookie object /// @@ -15309,11 +15414,10 @@ namespace CefSharp.DevTools.Network } /// - /// Cookie partition key. The site of the top-level URL the browser was visiting at the start - /// of the request to the endpoint that set the cookie. + /// Cookie partition key. /// [DataMember(Name = ("partitionKey"), IsRequired = (false))] - public string PartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey PartitionKey { get; set; @@ -15583,7 +15687,12 @@ namespace CefSharp.DevTools.Network /// CorsOptIn /// [EnumMember(Value = ("CorsOptIn"))] - CorsOptIn + CorsOptIn, + /// + /// Scheme + /// + [EnumMember(Value = ("Scheme"))] + Scheme } /// @@ -15956,12 +16065,10 @@ namespace CefSharp.DevTools.Network } /// - /// Cookie partition key. The site of the top-level URL the browser was visiting at the start - /// of the request to the endpoint that set the cookie. - /// If not set, the cookie will be set as not partitioned. + /// Cookie partition key. If not set, the cookie will be set as not partitioned. /// [DataMember(Name = ("partitionKey"), IsRequired = (false))] - public string PartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey PartitionKey { get; set; @@ -18565,7 +18672,7 @@ namespace CefSharp.DevTools.Network /// Only sent when partitioned cookies are enabled. /// [DataMember(Name = ("cookiePartitionKey"), IsRequired = (false))] - public string CookiePartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey CookiePartitionKey { get; private set; @@ -18661,10 +18768,10 @@ namespace CefSharp.DevTools.Network [EnumMember(Value = ("AlreadyExists"))] AlreadyExists, /// - /// Unavailable + /// ResourceLimited /// - [EnumMember(Value = ("Unavailable"))] - Unavailable, + [EnumMember(Value = ("ResourceLimited"))] + ResourceLimited, /// /// Unauthorized /// @@ -20529,6 +20636,11 @@ namespace CefSharp.DevTools.Page [EnumMember(Value = ("cross-origin-isolated"))] CrossOriginIsolated, /// + /// deferred-fetch + /// + [EnumMember(Value = ("deferred-fetch"))] + DeferredFetch, + /// /// direct-sockets /// [EnumMember(Value = ("direct-sockets"))] @@ -23331,6 +23443,31 @@ namespace CefSharp.DevTools.Page [EnumMember(Value = ("BroadcastChannelOnMessage"))] BroadcastChannelOnMessage, /// + /// WebViewSettingsChanged + /// + [EnumMember(Value = ("WebViewSettingsChanged"))] + WebViewSettingsChanged, + /// + /// WebViewJavaScriptObjectChanged + /// + [EnumMember(Value = ("WebViewJavaScriptObjectChanged"))] + WebViewJavaScriptObjectChanged, + /// + /// WebViewMessageListenerInjected + /// + [EnumMember(Value = ("WebViewMessageListenerInjected"))] + WebViewMessageListenerInjected, + /// + /// WebViewSafeBrowsingAllowlistChanged + /// + [EnumMember(Value = ("WebViewSafeBrowsingAllowlistChanged"))] + WebViewSafeBrowsingAllowlistChanged, + /// + /// WebViewDocumentStartJavascriptChanged + /// + [EnumMember(Value = ("WebViewDocumentStartJavascriptChanged"))] + WebViewDocumentStartJavascriptChanged, + /// /// WebSocket /// [EnumMember(Value = ("WebSocket"))] @@ -42066,6 +42203,34 @@ namespace CefSharp.DevTools.DOM } } +namespace CefSharp.DevTools.DOM +{ + /// + /// GetAnchorElementResponse + /// + [DataContract] + public class GetAnchorElementResponse : DevToolsDomainResponseBase + { + [DataMember] + internal int nodeId + { + get; + set; + } + + /// + /// nodeId + /// + public int NodeId + { + get + { + return nodeId; + } + } + } +} + namespace CefSharp.DevTools.DOM { using System.Linq; @@ -43309,6 +43474,27 @@ namespace CefSharp.DevTools.DOM dict.Add("nodeId", nodeId); return _client.ExecuteDevToolsMethodAsync("DOM.getQueryingDescendantsForContainer", dict); } + + partial void ValidateGetAnchorElement(int nodeId, string anchorSpecifier = null); + /// + /// Returns the target anchor element of the given anchor query according to + /// https://www.w3.org/TR/css-anchor-position-1/#target. + /// + /// Id of the positioned element from which to find the anchor. + /// An optional anchor specifier, as defined inhttps://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.If not provided, it will return the implicit anchor element forthe given positioned element. + /// returns System.Threading.Tasks.Task<GetAnchorElementResponse> + public System.Threading.Tasks.Task GetAnchorElementAsync(int nodeId, string anchorSpecifier = null) + { + ValidateGetAnchorElement(nodeId, anchorSpecifier); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("nodeId", nodeId); + if (!(string.IsNullOrEmpty(anchorSpecifier))) + { + dict.Add("anchorSpecifier", anchorSpecifier); + } + + return _client.ExecuteDevToolsMethodAsync("DOM.getAnchorElement", dict); + } } } @@ -48050,7 +48236,7 @@ namespace CefSharp.DevTools.Network return _client.ExecuteDevToolsMethodAsync("Network.clearBrowserCookies", dict); } - partial void ValidateDeleteCookies(string name, string url = null, string domain = null, string path = null, string partitionKey = null); + partial void ValidateDeleteCookies(string name, string url = null, string domain = null, string path = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null); /// /// Deletes browser cookies with matching name and url or domain/path/partitionKey pair. /// @@ -48058,9 +48244,9 @@ namespace CefSharp.DevTools.Network /// If specified, deletes all the cookies with the given name where domain and path matchprovided URL. /// If specified, deletes only cookies with the exact domain. /// If specified, deletes only cookies with the exact path. - /// If specified, deletes only cookies with the the given name and partitionKey where domainmatches provided URL. + /// If specified, deletes only cookies with the the given name and partitionKey whereall partition key attributes match the cookie partition key attribute. /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> - public System.Threading.Tasks.Task DeleteCookiesAsync(string name, string url = null, string domain = null, string path = null, string partitionKey = null) + public System.Threading.Tasks.Task DeleteCookiesAsync(string name, string url = null, string domain = null, string path = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null) { ValidateDeleteCookies(name, url, domain, path, partitionKey); var dict = new System.Collections.Generic.Dictionary(); @@ -48080,9 +48266,9 @@ namespace CefSharp.DevTools.Network dict.Add("path", path); } - if (!(string.IsNullOrEmpty(partitionKey))) + if ((partitionKey) != (null)) { - dict.Add("partitionKey", partitionKey); + dict.Add("partitionKey", partitionKey.ToDictionary()); } return _client.ExecuteDevToolsMethodAsync("Network.deleteCookies", dict); @@ -48350,7 +48536,7 @@ namespace CefSharp.DevTools.Network return _client.ExecuteDevToolsMethodAsync("Network.setCacheDisabled", dict); } - partial void ValidateSetCookie(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, string partitionKey = null); + partial void ValidateSetCookie(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null); /// /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. /// @@ -48367,9 +48553,9 @@ namespace CefSharp.DevTools.Network /// True if cookie is SameParty. /// Cookie source scheme type. /// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.This is a temporary ability and it will be removed in the future. - /// Cookie partition key. The site of the top-level URL the browser was visiting at the startof the request to the endpoint that set the cookie.If not set, the cookie will be set as not partitioned. + /// Cookie partition key. If not set, the cookie will be set as not partitioned. /// returns System.Threading.Tasks.Task<SetCookieResponse> - public System.Threading.Tasks.Task SetCookieAsync(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, string partitionKey = null) + public System.Threading.Tasks.Task SetCookieAsync(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null) { ValidateSetCookie(name, value, url, domain, path, secure, httpOnly, sameSite, expires, priority, sameParty, sourceScheme, sourcePort, partitionKey); var dict = new System.Collections.Generic.Dictionary(); @@ -48430,9 +48616,9 @@ namespace CefSharp.DevTools.Network dict.Add("sourcePort", sourcePort.Value); } - if (!(string.IsNullOrEmpty(partitionKey))) + if ((partitionKey) != (null)) { - dict.Add("partitionKey", partitionKey); + dict.Add("partitionKey", partitionKey.ToDictionary()); } return _client.ExecuteDevToolsMethodAsync("Network.setCookie", dict); @@ -55869,6 +56055,34 @@ namespace CefSharp.DevTools.PWA } } +namespace CefSharp.DevTools.PWA +{ + /// + /// LaunchFilesInAppResponse + /// + [DataContract] + public class LaunchFilesInAppResponse : DevToolsDomainResponseBase + { + [DataMember] + internal string[] targetIds + { + get; + set; + } + + /// + /// targetIds + /// + public string[] TargetIds + { + get + { + return targetIds; + } + } + } +} + namespace CefSharp.DevTools.PWA { using System.Linq; @@ -55948,9 +56162,8 @@ namespace CefSharp.DevTools.PWA partial void ValidateLaunch(string manifestId, string url = null); /// /// Launches the installed web app, or an url in the same web app instead of the - /// default start url if it is provided. Returns a tab / web contents based - /// Target.TargetID which can be used to attach to via Target.attachToTarget or - /// similar APIs. + /// default start url if it is provided. Returns a page Target.TargetID which + /// can be used to attach to via Target.attachToTarget or similar APIs. /// /// manifestId /// url @@ -55967,6 +56180,50 @@ namespace CefSharp.DevTools.PWA return _client.ExecuteDevToolsMethodAsync("PWA.launch", dict); } + + partial void ValidateLaunchFilesInApp(string manifestId, string[] files); + /// + /// Opens one or more local files from an installed web app identified by its + /// manifestId. The web app needs to have file handlers registered to process + /// the files. The API returns one or more page Target.TargetIDs which can be + /// used to attach to via Target.attachToTarget or similar APIs. + /// If some files in the parameters cannot be handled by the web app, they will + /// be ignored. If none of the files can be handled, this API returns an error. + /// If no files provided as the parameter, this API also returns an error. + /// + /// According to the definition of the file handlers in the manifest file, one + /// Target.TargetID may represent a page handling one or more files. The order + /// of the returned Target.TargetIDs is not guaranteed. + /// + /// TODO(crbug.com/339454034): Check the existences of the input files. + /// + /// manifestId + /// files + /// returns System.Threading.Tasks.Task<LaunchFilesInAppResponse> + public System.Threading.Tasks.Task LaunchFilesInAppAsync(string manifestId, string[] files) + { + ValidateLaunchFilesInApp(manifestId, files); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("manifestId", manifestId); + dict.Add("files", files); + return _client.ExecuteDevToolsMethodAsync("PWA.launchFilesInApp", dict); + } + + partial void ValidateOpenCurrentPageInApp(string manifestId); + /// + /// Opens the current page in its web app identified by the manifest id, needs + /// to be called on a page target. This function returns immediately without + /// waiting for the app finishing loading. + /// + /// manifestId + /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> + public System.Threading.Tasks.Task OpenCurrentPageInAppAsync(string manifestId) + { + ValidateOpenCurrentPageInApp(manifestId); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("manifestId", manifestId); + return _client.ExecuteDevToolsMethodAsync("PWA.openCurrentPageInApp", dict); + } } } diff --git a/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs b/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs index 061b23678..7f061b02b 100644 --- a/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs +++ b/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 126.0.6478.115 +// CHROMIUM VERSION 127.0.6533.100 using System.Text.Json.Serialization; namespace CefSharp.DevTools.Accessibility @@ -1814,6 +1814,16 @@ namespace CefSharp.DevTools.Audits [JsonPropertyName("CorpNotSameOriginAfterDefaultedToSameOriginByCoep")] CorpNotSameOriginAfterDefaultedToSameOriginByCoep, /// + /// CorpNotSameOriginAfterDefaultedToSameOriginByDip + /// + [JsonPropertyName("CorpNotSameOriginAfterDefaultedToSameOriginByDip")] + CorpNotSameOriginAfterDefaultedToSameOriginByDip, + /// + /// CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip + /// + [JsonPropertyName("CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip")] + CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, + /// /// CorpNotSameSite /// [JsonPropertyName("CorpNotSameSite")] @@ -3184,7 +3194,17 @@ namespace CefSharp.DevTools.Audits /// ReplacedByButtonMode /// [JsonPropertyName("ReplacedByButtonMode")] - ReplacedByButtonMode + ReplacedByButtonMode, + /// + /// RelyingPartyOriginIsOpaque + /// + [JsonPropertyName("RelyingPartyOriginIsOpaque")] + RelyingPartyOriginIsOpaque, + /// + /// TypeNotMatching + /// + [JsonPropertyName("TypeNotMatching")] + TypeNotMatching } /// @@ -7315,10 +7335,10 @@ namespace CefSharp.DevTools.DOM [JsonPropertyName("scroll-marker")] ScrollMarker, /// - /// scroll-markers + /// scroll-marker-group /// - [JsonPropertyName("scroll-markers")] - ScrollMarkers, + [JsonPropertyName("scroll-marker-group")] + ScrollMarkerGroup, /// /// scrollbar /// @@ -12449,6 +12469,26 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Started ServiceWorker static routing source evaluation. + /// + [JsonPropertyName("workerRouterEvaluationStart")] + public double? WorkerRouterEvaluationStart + { + get; + set; + } + + /// + /// Started cache lookup when the source was evaluated to `cache`. + /// + [JsonPropertyName("workerCacheLookupStart")] + public double? WorkerCacheLookupStart + { + get; + set; + } + /// /// Started sending request. /// @@ -13089,6 +13129,16 @@ namespace CefSharp.DevTools.Network [JsonPropertyName("corp-not-same-origin-after-defaulted-to-same-origin-by-coep")] CorpNotSameOriginAfterDefaultedToSameOriginByCoep, /// + /// corp-not-same-origin-after-defaulted-to-same-origin-by-dip + /// + [JsonPropertyName("corp-not-same-origin-after-defaulted-to-same-origin-by-dip")] + CorpNotSameOriginAfterDefaultedToSameOriginByDip, + /// + /// corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip + /// + [JsonPropertyName("corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip")] + CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, + /// /// corp-not-same-site /// [JsonPropertyName("corp-not-same-site")] @@ -13506,6 +13556,16 @@ namespace CefSharp.DevTools.Network get; set; } + + /// + /// The actual router source used. + /// + [JsonPropertyName("actualSourceType")] + public CefSharp.DevTools.Network.ServiceWorkerRouterSource? ActualSourceType + { + get; + set; + } } /// @@ -14068,6 +14128,35 @@ namespace CefSharp.DevTools.Network } } + /// + /// cookiePartitionKey object + /// The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h. + /// + public partial class CookiePartitionKey : CefSharp.DevTools.DevToolsDomainEntityBase + { + /// + /// The site of the top-level URL the browser was visiting at the start + /// of the request to the endpoint that set the cookie. + /// + [JsonPropertyName("topLevelSite")] + [System.Diagnostics.CodeAnalysis.DisallowNull] + public string TopLevelSite + { + get; + set; + } + + /// + /// Indicates if the cookie has any ancestors that are cross-site to the topLevelSite. + /// + [JsonPropertyName("hasCrossSiteAncestor")] + public bool HasCrossSiteAncestor + { + get; + set; + } + } + /// /// Cookie object /// @@ -14220,11 +14309,10 @@ namespace CefSharp.DevTools.Network } /// - /// Cookie partition key. The site of the top-level URL the browser was visiting at the start - /// of the request to the endpoint that set the cookie. + /// Cookie partition key. /// [JsonPropertyName("partitionKey")] - public string PartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey PartitionKey { get; set; @@ -14494,7 +14582,12 @@ namespace CefSharp.DevTools.Network /// CorsOptIn /// [JsonPropertyName("CorsOptIn")] - CorsOptIn + CorsOptIn, + /// + /// Scheme + /// + [JsonPropertyName("Scheme")] + Scheme } /// @@ -14756,12 +14849,10 @@ namespace CefSharp.DevTools.Network } /// - /// Cookie partition key. The site of the top-level URL the browser was visiting at the start - /// of the request to the endpoint that set the cookie. - /// If not set, the cookie will be set as not partitioned. + /// Cookie partition key. If not set, the cookie will be set as not partitioned. /// [JsonPropertyName("partitionKey")] - public string PartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey PartitionKey { get; set; @@ -17153,7 +17244,7 @@ namespace CefSharp.DevTools.Network /// [JsonInclude] [JsonPropertyName("cookiePartitionKey")] - public string CookiePartitionKey + public CefSharp.DevTools.Network.CookiePartitionKey CookiePartitionKey { get; private set; @@ -17254,10 +17345,10 @@ namespace CefSharp.DevTools.Network [JsonPropertyName("AlreadyExists")] AlreadyExists, /// - /// Unavailable + /// ResourceLimited /// - [JsonPropertyName("Unavailable")] - Unavailable, + [JsonPropertyName("ResourceLimited")] + ResourceLimited, /// /// Unauthorized /// @@ -19028,6 +19119,11 @@ namespace CefSharp.DevTools.Page [JsonPropertyName("cross-origin-isolated")] CrossOriginIsolated, /// + /// deferred-fetch + /// + [JsonPropertyName("deferred-fetch")] + DeferredFetch, + /// /// direct-sockets /// [JsonPropertyName("direct-sockets")] @@ -21682,6 +21778,31 @@ namespace CefSharp.DevTools.Page [JsonPropertyName("BroadcastChannelOnMessage")] BroadcastChannelOnMessage, /// + /// WebViewSettingsChanged + /// + [JsonPropertyName("WebViewSettingsChanged")] + WebViewSettingsChanged, + /// + /// WebViewJavaScriptObjectChanged + /// + [JsonPropertyName("WebViewJavaScriptObjectChanged")] + WebViewJavaScriptObjectChanged, + /// + /// WebViewMessageListenerInjected + /// + [JsonPropertyName("WebViewMessageListenerInjected")] + WebViewMessageListenerInjected, + /// + /// WebViewSafeBrowsingAllowlistChanged + /// + [JsonPropertyName("WebViewSafeBrowsingAllowlistChanged")] + WebViewSafeBrowsingAllowlistChanged, + /// + /// WebViewDocumentStartJavascriptChanged + /// + [JsonPropertyName("WebViewDocumentStartJavascriptChanged")] + WebViewDocumentStartJavascriptChanged, + /// /// WebSocket /// [JsonPropertyName("WebSocket")] @@ -38863,6 +38984,26 @@ namespace CefSharp.DevTools.DOM } } +namespace CefSharp.DevTools.DOM +{ + /// + /// GetAnchorElementResponse + /// + public class GetAnchorElementResponse : DevToolsDomainResponseBase + { + /// + /// nodeId + /// + [JsonInclude] + [JsonPropertyName("nodeId")] + public int NodeId + { + get; + private set; + } + } +} + namespace CefSharp.DevTools.DOM { using System.Linq; @@ -40106,6 +40247,27 @@ namespace CefSharp.DevTools.DOM dict.Add("nodeId", nodeId); return _client.ExecuteDevToolsMethodAsync("DOM.getQueryingDescendantsForContainer", dict); } + + partial void ValidateGetAnchorElement(int nodeId, string anchorSpecifier = null); + /// + /// Returns the target anchor element of the given anchor query according to + /// https://www.w3.org/TR/css-anchor-position-1/#target. + /// + /// Id of the positioned element from which to find the anchor. + /// An optional anchor specifier, as defined inhttps://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.If not provided, it will return the implicit anchor element forthe given positioned element. + /// returns System.Threading.Tasks.Task<GetAnchorElementResponse> + public System.Threading.Tasks.Task GetAnchorElementAsync(int nodeId, string anchorSpecifier = null) + { + ValidateGetAnchorElement(nodeId, anchorSpecifier); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("nodeId", nodeId); + if (!(string.IsNullOrEmpty(anchorSpecifier))) + { + dict.Add("anchorSpecifier", anchorSpecifier); + } + + return _client.ExecuteDevToolsMethodAsync("DOM.getAnchorElement", dict); + } } } @@ -44476,7 +44638,7 @@ namespace CefSharp.DevTools.Network return _client.ExecuteDevToolsMethodAsync("Network.clearBrowserCookies", dict); } - partial void ValidateDeleteCookies(string name, string url = null, string domain = null, string path = null, string partitionKey = null); + partial void ValidateDeleteCookies(string name, string url = null, string domain = null, string path = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null); /// /// Deletes browser cookies with matching name and url or domain/path/partitionKey pair. /// @@ -44484,9 +44646,9 @@ namespace CefSharp.DevTools.Network /// If specified, deletes all the cookies with the given name where domain and path matchprovided URL. /// If specified, deletes only cookies with the exact domain. /// If specified, deletes only cookies with the exact path. - /// If specified, deletes only cookies with the the given name and partitionKey where domainmatches provided URL. + /// If specified, deletes only cookies with the the given name and partitionKey whereall partition key attributes match the cookie partition key attribute. /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> - public System.Threading.Tasks.Task DeleteCookiesAsync(string name, string url = null, string domain = null, string path = null, string partitionKey = null) + public System.Threading.Tasks.Task DeleteCookiesAsync(string name, string url = null, string domain = null, string path = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null) { ValidateDeleteCookies(name, url, domain, path, partitionKey); var dict = new System.Collections.Generic.Dictionary(); @@ -44506,9 +44668,9 @@ namespace CefSharp.DevTools.Network dict.Add("path", path); } - if (!(string.IsNullOrEmpty(partitionKey))) + if ((partitionKey) != (null)) { - dict.Add("partitionKey", partitionKey); + dict.Add("partitionKey", partitionKey.ToDictionary()); } return _client.ExecuteDevToolsMethodAsync("Network.deleteCookies", dict); @@ -44776,7 +44938,7 @@ namespace CefSharp.DevTools.Network return _client.ExecuteDevToolsMethodAsync("Network.setCacheDisabled", dict); } - partial void ValidateSetCookie(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, string partitionKey = null); + partial void ValidateSetCookie(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null); /// /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. /// @@ -44793,9 +44955,9 @@ namespace CefSharp.DevTools.Network /// True if cookie is SameParty. /// Cookie source scheme type. /// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.This is a temporary ability and it will be removed in the future. - /// Cookie partition key. The site of the top-level URL the browser was visiting at the startof the request to the endpoint that set the cookie.If not set, the cookie will be set as not partitioned. + /// Cookie partition key. If not set, the cookie will be set as not partitioned. /// returns System.Threading.Tasks.Task<SetCookieResponse> - public System.Threading.Tasks.Task SetCookieAsync(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, string partitionKey = null) + public System.Threading.Tasks.Task SetCookieAsync(string name, string value, string url = null, string domain = null, string path = null, bool? secure = null, bool? httpOnly = null, CefSharp.DevTools.Network.CookieSameSite? sameSite = null, double? expires = null, CefSharp.DevTools.Network.CookiePriority? priority = null, bool? sameParty = null, CefSharp.DevTools.Network.CookieSourceScheme? sourceScheme = null, int? sourcePort = null, CefSharp.DevTools.Network.CookiePartitionKey partitionKey = null) { ValidateSetCookie(name, value, url, domain, path, secure, httpOnly, sameSite, expires, priority, sameParty, sourceScheme, sourcePort, partitionKey); var dict = new System.Collections.Generic.Dictionary(); @@ -44856,9 +45018,9 @@ namespace CefSharp.DevTools.Network dict.Add("sourcePort", sourcePort.Value); } - if (!(string.IsNullOrEmpty(partitionKey))) + if ((partitionKey) != (null)) { - dict.Add("partitionKey", partitionKey); + dict.Add("partitionKey", partitionKey.ToDictionary()); } return _client.ExecuteDevToolsMethodAsync("Network.setCookie", dict); @@ -51695,6 +51857,26 @@ namespace CefSharp.DevTools.PWA } } +namespace CefSharp.DevTools.PWA +{ + /// + /// LaunchFilesInAppResponse + /// + public class LaunchFilesInAppResponse : DevToolsDomainResponseBase + { + /// + /// targetIds + /// + [JsonInclude] + [JsonPropertyName("targetIds")] + public string[] TargetIds + { + get; + private set; + } + } +} + namespace CefSharp.DevTools.PWA { using System.Linq; @@ -51774,9 +51956,8 @@ namespace CefSharp.DevTools.PWA partial void ValidateLaunch(string manifestId, string url = null); /// /// Launches the installed web app, or an url in the same web app instead of the - /// default start url if it is provided. Returns a tab / web contents based - /// Target.TargetID which can be used to attach to via Target.attachToTarget or - /// similar APIs. + /// default start url if it is provided. Returns a page Target.TargetID which + /// can be used to attach to via Target.attachToTarget or similar APIs. /// /// manifestId /// url @@ -51793,6 +51974,50 @@ namespace CefSharp.DevTools.PWA return _client.ExecuteDevToolsMethodAsync("PWA.launch", dict); } + + partial void ValidateLaunchFilesInApp(string manifestId, string[] files); + /// + /// Opens one or more local files from an installed web app identified by its + /// manifestId. The web app needs to have file handlers registered to process + /// the files. The API returns one or more page Target.TargetIDs which can be + /// used to attach to via Target.attachToTarget or similar APIs. + /// If some files in the parameters cannot be handled by the web app, they will + /// be ignored. If none of the files can be handled, this API returns an error. + /// If no files provided as the parameter, this API also returns an error. + /// + /// According to the definition of the file handlers in the manifest file, one + /// Target.TargetID may represent a page handling one or more files. The order + /// of the returned Target.TargetIDs is not guaranteed. + /// + /// TODO(crbug.com/339454034): Check the existences of the input files. + /// + /// manifestId + /// files + /// returns System.Threading.Tasks.Task<LaunchFilesInAppResponse> + public System.Threading.Tasks.Task LaunchFilesInAppAsync(string manifestId, string[] files) + { + ValidateLaunchFilesInApp(manifestId, files); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("manifestId", manifestId); + dict.Add("files", files); + return _client.ExecuteDevToolsMethodAsync("PWA.launchFilesInApp", dict); + } + + partial void ValidateOpenCurrentPageInApp(string manifestId); + /// + /// Opens the current page in its web app identified by the manifest id, needs + /// to be called on a page target. This function returns immediately without + /// waiting for the app finishing loading. + /// + /// manifestId + /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> + public System.Threading.Tasks.Task OpenCurrentPageInAppAsync(string manifestId) + { + ValidateOpenCurrentPageInApp(manifestId); + var dict = new System.Collections.Generic.Dictionary(); + dict.Add("manifestId", manifestId); + return _client.ExecuteDevToolsMethodAsync("PWA.openCurrentPageInApp", dict); + } } } diff --git a/CefSharp.Core/DevTools/DevToolsClient.cs b/CefSharp.Core/DevTools/DevToolsClient.cs index a88fad214..2426c4637 100644 --- a/CefSharp.Core/DevTools/DevToolsClient.cs +++ b/CefSharp.Core/DevTools/DevToolsClient.cs @@ -97,7 +97,7 @@ namespace CefSharp.DevTools { var p = ((EventProxy)eventProxy); - if(p.RemoveHandler(eventHandler)) + if (p.RemoveHandler(eventHandler)) { return !eventHandlers.TryRemove(eventName, out _); } @@ -218,7 +218,7 @@ namespace CefSharp.DevTools var events = eventHandlers.Values; eventHandlers.Clear(); - foreach(var evt in events) + foreach (var evt in events) { evt.Dispose(); } @@ -257,13 +257,13 @@ namespace CefSharp.DevTools eventProxy.Raise(this, method, parameters, SyncContext); } } - catch(Exception ex) + catch (Exception ex) { var errorEvent = DevToolsEventError; var json = ""; - if(parameters.Length > 0) + if (parameters.Length > 0) { parameters.Position = 0; @@ -271,7 +271,7 @@ namespace CefSharp.DevTools { json = StreamToString(parameters, leaveOpen: false); } - catch(Exception) + catch (Exception) { //TODO: do we somehow pass this exception to the user? } @@ -338,7 +338,7 @@ namespace CefSharp.DevTools /// event Name /// JSON stream /// object of type - private static T DeserializeJsonEvent(string eventName, Stream stream) where T : EventArgs + private static T DeserializeJsonEvent(string eventName, Stream stream) where T : EventArgs { if (typeof(T) == typeof(EventArgs)) { @@ -369,6 +369,20 @@ namespace CefSharp.DevTools return (T)DeserializeJson(typeof(T), stream); } +#if NETCOREAPP + private static readonly System.Text.Json.JsonSerializerOptions DefaultJsonSerializerOptions = new System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + IgnoreNullValues = true, + Converters = { new CefSharp.Internals.Json.JsonEnumConverterFactory() }, + }; +#else + private static readonly System.Runtime.Serialization.Json.DataContractJsonSerializerSettings DefaultJsonSerializerSettings = new System.Runtime.Serialization.Json.DataContractJsonSerializerSettings + { + UseSimpleDictionaryFormat = true, + }; +#endif + /// /// Deserialize the JSON stream into a .Net object. /// For .Net Core/.Net 5.0 uses System.Text.Json @@ -380,24 +394,13 @@ namespace CefSharp.DevTools private static object DeserializeJson(Type type, Stream stream) { #if NETCOREAPP - var options = new System.Text.Json.JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - IgnoreNullValues = true, - }; - - options.Converters.Add(new CefSharp.Internals.Json.JsonEnumConverterFactory()); - // TODO: use synchronus Deserialize(Stream) when System.Text.Json gets updated var memoryStream = new MemoryStream((int)stream.Length); stream.CopyTo(memoryStream); - return System.Text.Json.JsonSerializer.Deserialize(memoryStream.ToArray(), type, options); + return System.Text.Json.JsonSerializer.Deserialize(memoryStream.ToArray(), type, DefaultJsonSerializerOptions); #else - var settings = new System.Runtime.Serialization.Json.DataContractJsonSerializerSettings(); - settings.UseSimpleDictionaryFormat = true; - - var dcs = new System.Runtime.Serialization.Json.DataContractJsonSerializer(type, settings); + var dcs = new System.Runtime.Serialization.Json.DataContractJsonSerializer(type, DefaultJsonSerializerSettings); return dcs.ReadObject(stream); #endif } diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index afceec795..0a18ea24c 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj index 93ed54cfd..9b5d5008d 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj @@ -39,7 +39,7 @@ - + diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index e1b49d9ca..623375c3a 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.OffScreen/CefSettings.cs b/CefSharp.OffScreen/CefSettings.cs index ee4c1346d..8c2b073be 100644 --- a/CefSharp.OffScreen/CefSettings.cs +++ b/CefSharp.OffScreen/CefSettings.cs @@ -26,6 +26,10 @@ namespace CefSharp.OffScreen // the Chrome login prompt is disabled // https://github.com/chromiumembedded/cef/issues/3603 CefCommandLineArgs.Add("disable-chrome-login-prompt"); + + // Disable "Restore pages" popup after incorrect shutdown + // https://github.com/chromiumembedded/cef/issues/3767 + CefCommandLineArgs.Add("hide-crash-restore-bubble"); } /// diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj index aaac234bc..4f6765283 100644 --- a/CefSharp.Test/CefSharp.Test.csproj +++ b/CefSharp.Test/CefSharp.Test.csproj @@ -36,7 +36,7 @@ - + diff --git a/CefSharp.Test/CefSharp.Test.netcore.csproj b/CefSharp.Test/CefSharp.Test.netcore.csproj index b06350107..a9a875de5 100644 --- a/CefSharp.Test/CefSharp.Test.netcore.csproj +++ b/CefSharp.Test/CefSharp.Test.netcore.csproj @@ -35,7 +35,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index 8fca55a13..e90491999 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -32,7 +32,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj index 54cff9b99..5e969e7ad 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj @@ -39,7 +39,7 @@ - + diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index d795201cb..f6a46b873 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms/CefSettings.cs b/CefSharp.WinForms/CefSettings.cs index 1cac56696..2f2692ccc 100644 --- a/CefSharp.WinForms/CefSettings.cs +++ b/CefSharp.WinForms/CefSettings.cs @@ -21,6 +21,10 @@ namespace CefSharp.WinForms // the Chrome login prompt is disabled // https://github.com/chromiumembedded/cef/issues/3603 CefCommandLineArgs.Add("disable-chrome-login-prompt"); + + // Disable "Restore pages" popup after incorrect shutdown + // https://github.com/chromiumembedded/cef/issues/3767 + CefCommandLineArgs.Add("hide-crash-restore-bubble"); } } } diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 4b72c50ea..22b283075 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -31,7 +31,7 @@ - + diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj index 18d763540..236eb5eb0 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj @@ -40,7 +40,7 @@ - + diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index 48a8cd925..23527618d 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf/CefSettings.cs b/CefSharp.Wpf/CefSettings.cs index 765f8cb04..42021e09e 100644 --- a/CefSharp.Wpf/CefSettings.cs +++ b/CefSharp.Wpf/CefSettings.cs @@ -27,6 +27,10 @@ namespace CefSharp.Wpf // the Chrome login prompt is disabled // https://github.com/chromiumembedded/cef/issues/3603 CefCommandLineArgs.Add("disable-chrome-login-prompt"); + + // Disable "Restore pages" popup after incorrect shutdown + // https://github.com/chromiumembedded/cef/issues/3767 + CefCommandLineArgs.Add("hide-crash-restore-bubble"); } } } diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 4bdc5a964..3af233711 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -913,15 +913,7 @@ namespace CefSharp.Wpf { // DoDragDrop will fire DragEnter event var result = DragDrop.DoDragDrop(this, dataObject, allowedOps.GetDragEffects()); - var dragEffects = currentDragDropEffects.HasValue ? currentDragDropEffects.Value : DragDropEffects.None; - - // Ensure the drag and drop operation wasn't cancelled - var finalEffectMask = dragEffects.GetDragOperationsMask() & result.GetDragOperationsMask(); - - // We shouldn't have an instance where finalEffectMask signfies multiple effects, as the operation - // set by UpdateDragCursor should only ever be none, move, copy, or link. However, if it does, we'll - // just default to copy, as that reflects the defaulting behavior of GetDragEffects. - var finalSingleEffect = finalEffectMask.HasFlag(DragOperationsMask.Every) ? DragOperationsMask.Copy : finalEffectMask; + var dragOperationMask = GetDragOperationsMask(result, currentDragDropEffects); // DragData was stored so when DoDragDrop fires DragEnter we reuse a clone of the IDragData provided here currentDragData = null; @@ -929,7 +921,7 @@ namespace CefSharp.Wpf // If result or the last recorded drag drop effect were DragDropEffects.None // then we'll send DragOperationsMask.None, effectively cancelling the drag operation - browser.GetHost().DragSourceEndedAt(x, y, finalSingleEffect); + browser.GetHost().DragSourceEndedAt(x, y, dragOperationMask); browser.GetHost().DragSourceSystemDragEnded(); } }); @@ -937,6 +929,22 @@ namespace CefSharp.Wpf return true; } + protected virtual DragOperationsMask GetDragOperationsMask(DragDropEffects result, DragDropEffects? dragEffects) + { + // Ensure the drag and drop operation wasn't cancelled + var finalEffectMask = (dragEffects ?? DragDropEffects.None).GetDragOperationsMask() & result.GetDragOperationsMask(); + + // We shouldn't have an instance where finalEffectMask signfies multiple effects, as the operation + // set by UpdateDragCursor should only ever be none, move, copy, or link. However, if it does, we'll + // just default to copy, as that reflects the defaulting behavior of GetDragEffects. + if (finalEffectMask.HasFlag(DragOperationsMask.Every)) + { + return DragOperationsMask.Copy; + } + + return finalEffectMask; + } + /// void IRenderWebBrowser.UpdateDragCursor(DragOperationsMask operation) { @@ -1714,7 +1722,7 @@ namespace CefSharp.Wpf { browser.GetHost().DragTargetDragOver(GetMouseEvent(e), e.AllowedEffects.GetDragOperationsMask()); } - e.Effects = currentDragDropEffects.HasValue ? currentDragDropEffects.Value : DragDropEffects.None; + e.Effects = currentDragDropEffects ?? DragDropEffects.None; e.Handled = true; } diff --git a/CefSharp.shfbproj b/CefSharp.shfbproj index 5c39365dc..a1dcb2749 100644 --- a/CefSharp.shfbproj +++ b/CefSharp.shfbproj @@ -31,7 +31,7 @@ - 126.2.70 + 127.3.40 2 False C#, Managed C++ @@ -59,7 +59,7 @@ InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected, EditorBrowsableNever, NonBrowsable - Version 126.2.70 + Version 127.3.40 https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE Interfaces, enums, structs and classes that make up the core API interface diff --git a/CefSharp/Enums/CefErrorCode.cs b/CefSharp/Enums/CefErrorCode.cs index 113c596b7..57370cba1 100644 --- a/CefSharp/Enums/CefErrorCode.cs +++ b/CefSharp/Enums/CefErrorCode.cs @@ -26,7 +26,7 @@ namespace CefSharp // 300-399 HTTP errors // 400-499 Cache errors // 500-599 ? - // 600-699 FTP errors + // 600-699 // 700-799 Certificate manager errors // 800-899 DNS resolver errors @@ -195,6 +195,12 @@ namespace CefSharp /// BlockedByOrb = -32, + /// + /// The request was blocked because it originated from a frame that has disabled + /// network access. + /// + NetworkAccessRevoked = -33, + /// /// A connection was closed (corresponding to a TCP FIN). /// @@ -404,7 +410,7 @@ namespace CefSharp /// received a 302 (temporary redirect) response. The response body might /// include a description of why the request failed. /// - /// TODO(https://crbug.com/928551): This is deprecated and should not be used by + /// TODO(crbug.com/40093955): This is deprecated and should not be used by /// new code. /// HttpsProxyTunnelResponseRedirect = -140, @@ -1184,7 +1190,29 @@ namespace CefSharp /// The IP address space of the cached remote endpoint is blocked by private /// network access check. /// - CachedIpAddressSpaceBlockedByLocalNetworkAccessPolicy = -384, + CachedIpAddressSpaceBlockedByPrivateNetworkAccessPolicy = -384, + + /// + /// The connection is blocked by private network access checks. + /// + BlockedByPrivateNetworkAccessChecks = -385, + + /// + /// Content decoding failed due to the zstd window size being too big (over 8MB). + /// + ZstdWindowSizeTooBig = -386, + + /// + /// The compression dictionary cannot be loaded. + /// + DictionaryLoadFailed = -387, + + /// + /// The "content-dictionary" response header is unexpected. This is used both + /// when there is no "content-dictionary" response header and when the received + /// "content-dictionary" response header does not match the expected value. + /// + UnexpectedContentDictionaryHeader = -388, /// /// The cache does not have the requested entry. @@ -1309,51 +1337,13 @@ namespace CefSharp TrustTokenOperationSuccessWithoutSendingRequest = -507, // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). *** - - /// - /// A generic error for failed FTP control connection command. - /// If possible, please use or add a more specific error code. - /// - FtpFailed = -601, - - /// - /// The server cannot fulfill the request at this point. This is a temporary - /// error. - /// FTP response code 421. - /// - FtpServiceUnavailable = -602, - - /// - /// The server has aborted the transfer. - /// FTP response code 426. - /// - FtpTransferAborted = -603, - - /// - /// The file is busy, or some other temporary error condition on opening - /// the file. - /// FTP response code 450. - /// - FtpFileBusy = -604, - - /// - /// Server rejected our command because of syntax errors. - /// FTP response codes 500, 501. - /// - FtpSyntaxError = -605, - - /// - /// Server does not support the command we issued. - /// FTP response codes 502, 504. - /// - FtpCommandNotSupported = -606, - - /// - /// Server rejected our command because we didn't issue the commands in right - /// order. - /// FTP response code 503. - /// - FtpBadCommandSequence = -607, + // *** Code -601 is reserved (was FTP_FAILED). *** + // *** Code -602 is reserved (was FTP_SERVICE_UNAVAILABLE). *** + // *** Code -603 is reserved (was FTP_TRANSFER_ABORTED). *** + // *** Code -604 is reserved (was FTP_FILE_BUSY). *** + // *** Code -605 is reserved (was FTP_SYNTAX_ERROR). *** + // *** Code -606 is reserved (was FTP_COMMAND_NOT_SUPPORTED). *** + // *** Code -607 is reserved (was FTP_BAD_COMMAND_SEQUENCE). *** /// /// PKCS #12 import failed due to incorrect password. @@ -1504,9 +1494,13 @@ namespace CefSharp /// DnsNoMatchingSupportedAlpn = -811, + // Error -812 was removed + // Error -813 was removed + /// - /// The compression dictionary cannot be loaded. + /// When checking whether secure DNS can be used, the response returned for the + /// requested probe record either had no answer or was invalid. /// - DictionaryLoadFailed = -812, + DnsSecureProbeRecordInvalid = -814, }; } diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index c87ea5331..e810ee478 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ namespace CefSharp public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "126.2.70"; - public const string AssemblyFileVersion = "126.2.70.0"; + public const string AssemblyVersion = "127.3.40"; + public const string AssemblyFileVersion = "127.3.40.0"; public const string AssemblyCopyright = "Copyright © 2023 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; diff --git a/NuGet/CefSharp.Common.app.config.x64.transform b/NuGet/CefSharp.Common.app.config.x64.transform index cccb9d06c..fbe85f055 100644 --- a/NuGet/CefSharp.Common.app.config.x64.transform +++ b/NuGet/CefSharp.Common.app.config.x64.transform @@ -20,7 +20,7 @@ - + diff --git a/NuGet/CefSharp.Common.app.config.x86.transform b/NuGet/CefSharp.Common.app.config.x86.transform index d79792986..04343d37f 100644 --- a/NuGet/CefSharp.Common.app.config.x86.transform +++ b/NuGet/CefSharp.Common.app.config.x86.transform @@ -20,7 +20,7 @@ - + diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.targets b/NuGet/PackageReference/CefSharp.Common.NETCore.targets index 73b9990a5..127029a28 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.targets +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.targets @@ -143,16 +143,16 @@ - - - + + + - - - + + + diff --git a/UpdateNugetPackages.ps1 b/UpdateNugetPackages.ps1 index fb63d6a19..59f1a5052 100644 --- a/UpdateNugetPackages.ps1 +++ b/UpdateNugetPackages.ps1 @@ -3,7 +3,7 @@ param( [Parameter(Position = 1)] - [string] $CefVersion = "126.2.7", + [string] $CefVersion = "127.3.4", [Parameter(Position = 2)] [string] $CefSharpVersion = "" ) diff --git a/appveyor.yml b/appveyor.yml index 810a966f5..d63dc38ec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 126.2.70-CI{build} +version: 127.3.40-CI{build} clone_depth: 10 diff --git a/build.ps1 b/build.ps1 index 1f1c1b9a9..360d60ee8 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,9 +5,9 @@ param( [Parameter(Position = 0)] [string] $Target = "vs2019", [Parameter(Position = 1)] - [string] $Version = "126.2.70", + [string] $Version = "127.3.40", [Parameter(Position = 2)] - [string] $AssemblyVersion = "126.2.70", + [string] $AssemblyVersion = "127.3.40", [Parameter(Position = 3)] [ValidateSet("NetFramework", "NetCore", "NetFramework452", "NetCore31")] [string] $TargetFramework = "NetFramework",