Skip to content

Commit

Permalink
117.2.4+g5053a95+chromium-117.0.5938.150 (#315)
Browse files Browse the repository at this point in the history
* upgrading Cef to 5845

* upgrading Cef to 5845

* Removing OnQuotaRequest

* bump webview

* bump webview

* CEF 117.2.4+g5053a95+chromium-117.0.5938.150 Upgrade

* Revert Sources

* Remove Avalonia sources
  • Loading branch information
osesantos authored Oct 10, 2023
1 parent cc79703 commit 7cac5c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<DotnetVersion>net6.0</DotnetVersion>
<Platforms>x64;ARM64</Platforms>
<AvaloniaVersion>0.10.17</AvaloniaVersion>
<CefGlueVersion>106.5249.22</CefGlueVersion>
<CefGlueVersion>117.5938.1</CefGlueVersion>
</PropertyGroup>

<PropertyGroup>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<Version>2.106.13</Version>
<Version>2.117.1</Version>
<Authors>OutSystems</Authors>
<Product>WebViewControl</Product>
<Copyright>Copyright © OutSystems 2023</Copyright>
Expand Down
8 changes: 0 additions & 8 deletions Nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@

<packageSources>
<add key="Nuget" value="https://api.nuget.org/v3/index.json" />
<add key="Avalonia" value="https://nuget.avaloniaui.net/repository/outsystems-feed/" />
<add key="AvaloniaNightlyBuilds" value="https://www.myget.org/F/avalonia-ci/api/v2" />
</packageSources>

<packageSourceMapping>
<packageSource key="Nuget">
<package pattern="*" />
</packageSource>
<packageSource key="Avalonia">
<package pattern="*" />
</packageSource>
<packageSource key="AvaloniaNightlyBuilds">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
17 changes: 5 additions & 12 deletions WebViewControl/WebView.InternalRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ private class InternalRequestHandler : RequestHandler {
private static readonly Lazy<HttpResourceRequestHandler> HttpResourceRequestHandler = new Lazy<HttpResourceRequestHandler>(() => new HttpResourceRequestHandler());

private WebView OwnerWebView { get; }

private InternalResourceRequestHandler ResourceRequestHandler { get; }

public InternalRequestHandler(WebView webView) {
OwnerWebView = webView;
ResourceRequestHandler = new InternalResourceRequestHandler(OwnerWebView);
}

protected override bool OnQuotaRequest(CefBrowser browser, string originUrl, long newSize, CefCallback callback) {
using (callback) {
callback.Continue();
return true;
}
}

protected override bool GetAuthCredentials(CefBrowser browser, string originUrl, bool isProxy, string host, int port, string realm, string scheme, CefAuthCallback callback) {
using (callback) {
if (OwnerWebView.ProxyAuthentication != null) {
Expand All @@ -40,11 +33,11 @@ protected override bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRe
if (UrlHelper.IsInternalUrl(request.Url)) {
return false;
}

if (OwnerWebView.IsHistoryDisabled && request.TransitionType.HasFlag(CefTransitionType.ForwardBackFlag)) {
return true;
}

var cancel = false;
var beforeNavigate = OwnerWebView.BeforeNavigate;
if (beforeNavigate != null) {
Expand Down Expand Up @@ -91,7 +84,7 @@ protected override void OnRenderProcessTerminated(CefBrowser browser, CefTermina
OwnerWebView.ForwardUnhandledAsyncException(exception);
}

protected override CefResourceRequestHandler GetResourceRequestHandler(CefBrowser browser, CefFrame frame, CefRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling) {
protected override CefResourceRequestHandler GetResourceRequestHandler(CefBrowser browser, CefFrame frame, CefRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling) {
if (OwnerWebView.IsSecurityDisabled && HttpResourceHandler.AcceptedResources.Contains(request.ResourceType) && request.Url != null) {
var url = new Uri(request.Url);
if (url.Scheme == Uri.UriSchemeHttp || url.Scheme == Uri.UriSchemeHttps) {
Expand All @@ -102,4 +95,4 @@ protected override CefResourceRequestHandler GetResourceRequestHandler(CefBrowse
}
}
}
}
}

0 comments on commit 7cac5c3

Please sign in to comment.