From 09c6a816e0fd98be9ac4a205e1dd4a5ae991c7bf Mon Sep 17 00:00:00 2001 From: ike709 Date: Tue, 7 Jan 2025 19:32:24 -0600 Subject: [PATCH] Bump cefglue (#5585) * Bump cefglue * another bump * Update build-test.yml * Update to latest CEF natives and fix code to be compatible. * Switch CEF CreateBrowserWindow to Alloy style you will NOT open Chrome * Update cefglue, again --------- Co-authored-by: ike709 Co-authored-by: PJB3005 --- Directory.Packages.props | 2 +- Robust.Client.WebView/Cef/BaseRobustCefClient.cs | 2 ++ Robust.Client.WebView/Cef/RobustCefApp.cs | 2 ++ .../Cef/WebViewManagerCef.BrowserWindow.cs | 1 + Robust.Client.WebView/Cef/WebViewManagerCef.Control.cs | 7 +++++-- cefglue | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 0cc0f54e1cf..0782292db8b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -48,7 +48,7 @@ - + diff --git a/Robust.Client.WebView/Cef/BaseRobustCefClient.cs b/Robust.Client.WebView/Cef/BaseRobustCefClient.cs index 43f35e42421..37a5fcd5248 100644 --- a/Robust.Client.WebView/Cef/BaseRobustCefClient.cs +++ b/Robust.Client.WebView/Cef/BaseRobustCefClient.cs @@ -64,6 +64,8 @@ protected override bool OnFileDialog( string title, string defaultFilePath, string[] acceptFilters, + string[] acceptExtensions, + string[] acceptDescriptions, CefFileDialogCallback callback) { callback.Cancel(); diff --git a/Robust.Client.WebView/Cef/RobustCefApp.cs b/Robust.Client.WebView/Cef/RobustCefApp.cs index c568af02c08..0f1eb9d0dad 100644 --- a/Robust.Client.WebView/Cef/RobustCefApp.cs +++ b/Robust.Client.WebView/Cef/RobustCefApp.cs @@ -44,6 +44,8 @@ protected override void OnBeforeCommandLineProcessing(string processType, CefCom //commandLine.AppendSwitch("--disable-gpu-compositing"); //commandLine.AppendSwitch("--in-process-gpu"); + commandLine.AppendSwitch("--off-screen-rendering-enabled"); + commandLine.AppendSwitch("disable-threaded-scrolling", "1"); commandLine.AppendSwitch("disable-features", "TouchpadAndWheelScrollLatching,AsyncWheelEvents"); diff --git a/Robust.Client.WebView/Cef/WebViewManagerCef.BrowserWindow.cs b/Robust.Client.WebView/Cef/WebViewManagerCef.BrowserWindow.cs index 7858dd6dbce..13100c10ef2 100644 --- a/Robust.Client.WebView/Cef/WebViewManagerCef.BrowserWindow.cs +++ b/Robust.Client.WebView/Cef/WebViewManagerCef.BrowserWindow.cs @@ -23,6 +23,7 @@ public IWebViewWindow CreateBrowserWindow(BrowserWindowCreateParameters createPa var info = CefWindowInfo.Create(); info.Bounds = new CefRectangle(0, 0, createParams.Width, createParams.Height); info.SetAsPopup(mainHWnd, "ss14cef"); + info.RuntimeStyle = CefRuntimeStyle.Alloy; var impl = new WebViewWindowImpl(this); diff --git a/Robust.Client.WebView/Cef/WebViewManagerCef.Control.cs b/Robust.Client.WebView/Cef/WebViewManagerCef.Control.cs index be1ab9d8e06..1b205bee53f 100644 --- a/Robust.Client.WebView/Cef/WebViewManagerCef.Control.cs +++ b/Robust.Client.WebView/Cef/WebViewManagerCef.Control.cs @@ -587,8 +587,11 @@ protected override void OnPaint(CefBrowser browser, CefPaintElementType type, Ce } } - protected override void OnAcceleratedPaint(CefBrowser browser, CefPaintElementType type, - CefRectangle[] dirtyRects, IntPtr sharedHandle) + protected override void OnAcceleratedPaint( + CefBrowser browser, + CefPaintElementType type, + CefRectangle[] dirtyRects, + in CefAcceleratedPaintInfo info) { // Unused, but we're forced to implement it so.. NOOP. } diff --git a/cefglue b/cefglue index e89d3a86d4c..bceff8482c8 160000 --- a/cefglue +++ b/cefglue @@ -1 +1 @@ -Subproject commit e89d3a86d4cd111fdd5e433c8890edefed98b7fa +Subproject commit bceff8482c8e9ff7e1f6a2eae7799132fca3ee60