Commit Graph

909 Commits

Author SHA1 Message Date
amaitland 2f96ee9bb1 WinForms/WPF/OffScreen - Disable back forward cache to improve javascript integration reliability
- Workaround for common cause of "Error while fulfilling of JS: Request BrowserId : 1 not found it's likely the browser is already closed"

Issue #4621
2025-08-16 09:22:05 +10:00
amaitland 7a2347357c WPF - Browser not correctly refreshing on Resize (workaround)
- Disable GPU compositing

Issue #4953
2025-08-16 08:36:11 +10:00
Alex Maitland c38d5010a9 NetCore - Upgrade minimum version to 6.0 (#5127)
* NetCore - Upgrade minimum version to 5.0

* Update platform target
* Change to windows 10 specific TFM for top level packages
* Upgrade to .Net 6
* Nuget - Update packages
* Net Core - Fix dotnet test path
* Add Test Sdk and update Runner

---------

Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
2025-07-05 13:59:17 +10:00
Alex Maitland e1865d9233 WPF - Use WpfImeKeyboardHandler for supported KeyboardLayoutIds (#4439)
* WPF - Use WpfImeKeyboardHandler for supported KeyboardLayoutIds

---------

Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
2025-06-21 09:08:44 +10:00
Alex Maitland f43cd64c55 Import CefSharp.Wpf.HwndHost into main repository. (#4981)
* HwndHost - Initial import

* HwndHost - Add Example to solution and use common IWpfChromiumWebBrowser interface

* HwndHost - Update UpdateNugetPackages.ps1

* HwndHost - Add Nuspec

* HwndHost Example - Upgrade version

* HwndHost Example - Try non self contained build for debug and release

* Test - Add basic HwndHost tests

Probably need to revisit these, little bit hacky creating the window

* HwndHost - Allow any RequestContext that inherits from Core.RequestContext

Cheery pick of https://github.com/cefsharp/CefSharp.Wpf.HwndHost/pull/31

* HwndHost Example - Disable arm64

Example will be removed shortly, so it doesn't matter too much now.
It will be moved to MinimalExample and the Wpf Example expanded

* HwndHost - Delete delegate command

* Upgrade packages

* Nuget - Move Nuspec file to PackageReference folder

---------

Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
2025-01-18 06:40:48 +10:00
campersau 8aaa165ddc editorconfig - Enable CA2247 to error on build (#4943)
* Docs - Fix some invalid XML doc tags

* editorconfig - Enable CA2247
2024-09-29 12:43:45 +10:00
amaitland 17269dc648 Core - Add Microsoft.CodeAnalysis.NetAnalyzers 8.0 to all csproj files
- Make sure appveyor builds
- Will look at enabling some of the compiler warnings as errors to improve the sour
2024-09-28 12:14:32 +10:00
campersau bafde73a73 WPF/OffScreen - Avoid ObjectDisposedException when browser is already disposed (#4941) 2024-09-28 07:42:07 +10:00
amaitland 19739abd9c Remove Alloy Bootstrap (M128)
- Remove ChromeRuntime option
- Remove Extension Handling and related methods (no longer supported)
- Remove PackLoadingDisabled (no longer supported)
- Remove PersistUserPreferences (always on)

Resolves #4795
2024-09-18 17:53:17 +10:00
Alex Maitland 05577b7bf3 WPF/OffScreen - NullReferenceException in the WaitForRenderIdleAsync method
- Catch and throw exception back onto the calling thread so it doesn't crash the app

Resovles #4902
2024-08-21 18:43:28 +10:00
Alex Maitland 57f8cd344f Core - Change Cef.IsInitialized from bool to bool? (#4869)
Resolves #4867
2024-08-14 17:19:34 +10:00
Alex Maitland 45f257359e Set --hide-crash-restore-bubble by default to prevent Chromium window from opening after unsuccessful shutdown.
Resolves https://github.com/cefsharp/CefSharp/issues/4903
2024-08-14 14:54:33 +10:00
Alex Maitland e11bdcde76 WPF - Add GetDragOperationsMask virtual method to allow custom behaviour. (#4845)
Follow up to PR# 4814
2024-06-23 16:13:58 +10:00
WilliamTomOBrien 4e3c28756b WPF - Ensure only single drag operation is emit on DragSourceEndedAt (#4814)
* refactor: ensure only single event is sent to browser host

* fix: remove unnecessary code

* fix: update comments
2024-06-23 15:36:45 +10:00
Alex Maitland 5b29591b22 WinForms/WPF/OffScreen - Set disable-chrome-login-prompt command line arg by default
- GetAuthCredentials won't be called otherwise, those wishing to use the Chrome password
  prompt can remove the command line arg at runtime.

Resolves #4830
2024-06-21 19:31:19 +10:00
Alex Maitland 43321f74e6 WinForms/WPF/OffScreen - Change to using Chrome bootstrap by default
Issue #4835
2024-06-16 08:37:16 +10:00
Alex Maitland 635eedb58f Upgrade to 124.3.1+g6d871a1+chromium-124.0.6367.60 / Chromium 124.0.6367.60 2024-05-03 18:45:50 +10:00
Alex Maitland f5bcd01b05 WPF - Add ExperimentalExtensions.UsePopupMouseTransform to allow for custom implementation
Issue https://github.com/cefsharp/CefSharp/issues/2820
2024-03-24 11:41:31 +10:00
Alex Maitland b26cb077e3 WPF - Fixed Html Dropdown positioning when near bottom of screen (Cleanup) (#4759)
* WPF - Popup Mouse Transform

- Refactor and performance improvements
- WPF Example - Enable popup transform by default

Issue #2820
2024-03-16 08:03:16 +10:00
DidiDerDenker d606945ada WPF - Fixed Html Dropdown positioning when near bottom of screen (#4639)
* Fixed positioning of dropdown.

* Renamed mouse-teleport, adjusted code-style, moved logic to mouse-adjustor, applied codereview.

* Added comments to new class.

* Applied codereview, i.e. renamed teleporting-variables and -comments.

* Added boolean for the state of the popup.

* Set isOpen.

* Optimized adjust-method.

* Added interface for mouse-adjustor.

---------

Co-authored-by: Vogel <vogel@atv-systems.de>
Co-authored-by: Daniel Vogel <daniel.vogel@kinoda.de>
2024-03-16 07:43:48 +10:00
feliciwithme 14dba5457c WPF - Fix the Chinese IMEs (such as "sogou pinyin", "qq...") window position is incorrect in Winform form embedded wpf control. (#4678)
WPF - Fix chinese IMEs ( such as "sogou pinyin", "qq pinyin" etc. ) input window position, In Winform embedded wpf borwser mode.

* Update WpfIMEKeyboardHandler.cs
2024-01-17 19:04:47 +10:00
Alex Maitland e45890a0f9 WPF/OffScreen - WaitForRenderIdleAsync possible ObjectDisposedException
- Potentially the call to the Stop/Start the Timer in the Paint event handler
  may result in an ObjectDisposedException as the Timer was disposed on a different thread.

Resolves #4597
2023-11-11 10:39:50 +10:00
Andrew Bushnell cbc89802ef WPF - WritableBitmapRenderHandler Avoid null bitmap references upon wakeup. (#4619)
Force initial bitmap creation upon wakeup when the image.source is null... Happens if sizing etc. rapidly and the UI thread short circuits when CreateNewBitMap is true and the first wake up occurs with it 'false' amd image.Source is still null...
2023-11-01 06:14:36 +10:00
Alex Maitland becbb9e21d WPF - Exception on wakeup from sleep
Issue #4426
2023-09-02 19:24:32 +10:00
developersthinksmartbox f75b991898 NetCore - Generate Reference Assemblies building with VS2022 (#4559)
* Ensure reference assemblies are copied to output folders

The .NET 6.0 SDK introduced a breaking change meaning that reference
assemblies are no longer automatically copied from the intermediate
build directory to the output directory. An additional MsBuild property
is now required.

* Specify VS2022 for reference assembly copy condition

---------

Co-authored-by: Bernard Mason <bernard.mason@thinksmartbox.com>
2023-08-04 06:24:59 +10:00
Alex Maitland 1def8a7937 Upgrade to .Net 4.6.2 (#4482)
* Upgrade minimum .Net version to 4.6.2

#4433

* Use TaskCreationOptions.RunContinuationsAsynchronously

- Now that min version is .Net 4.6.2 we can use RunContinuationsAsynchronously
- Remove some unused code
2023-06-10 07:33:20 +10:00
Alex Maitland 3ce76eb191 CEF Issue Tracker moved to GitHub
- Update some of the internal links

Issue #4430
2023-03-24 10:52:58 +10:00
Alex Maitland a4db645e5b Core - Xml Doc fixes 2023-03-12 11:09:48 +10:00
Alex Maitland 0916c757dd WPF - Tooltip minor cleanup
- Ignore tooltip change if both new/old values are null/empty
- Change order so timer is stopped before hiding tooltip
2023-02-03 13:08:28 +10:00
Alex Maitland 7021a7da52 WPF - Allow overriding of TooltipTextProperty change
- Override the OnTooltipTextChanged method to customise display of browser tooltip

Related to issue #4048
2023-02-03 13:08:28 +10:00
Alex Maitland 0131dd8a33 WPF - Resize Hack Refactor
- Rename properties/variables
- Directly reference upstream issue

Follow up to https://github.com/cefsharp/CefSharp/pull/4307
2022-12-13 12:13:56 +10:00
Wupval 8e322164ea WPF - Add simplified resize hack (disabled by default) (#4307)
- Adds a simplified version of the resize hack used to workaround issue #2779 

Related discussion https://github.com/cefsharp/CefSharp/discussions/4274

Upstream Issue https://bitbucket.org/chromiumembedded/cef/issues/3427/osr-rendering-bug-when-minimizing-and
2022-12-13 12:02:26 +10:00
Alex Maitland 824ba98c6f WPF - Experimental LifeSpanHandler optional LifespanHandler constructor arg
Resolves #4285
2022-11-14 14:16:16 +10:00
Alex Maitland 7b9770a42a WPF - Experimental LifeSpanHandler renaming
- Rename the delegates (add prefix)

Issue #4285
2022-11-02 13:08:25 +10:00
Fabian van der Veen 8cbd572f98 WPF - Send keyboard modifiers along with drag events (#4287)
Fixes #4286
2022-10-29 09:26:42 +10:00
Alex Maitland ec8e3405bd WPF - Add Experimental LifeSpanHandler capable of hosting pop-ups as Tabs/Controls
Issue #4285
2022-10-25 15:51:35 +10:00
Alex Maitland aa582e83e1 WinForms/WPF - Add ChromiumWebBrowser.UnregisterShutdownHandler
Resolves #4096
2022-10-25 13:12:20 +10:00
Alex Maitland 92892c9b85 WPF - Add ChromiumWebBrowser.ToggleAudioMuteCommand
- Add new extension method to toggle audio mute
- Add new command to toggle audio mute
- Add new menu item to WPF Example

Resolves #3247
2022-10-25 12:32:01 +10:00
Alex Maitland 71562dddc8 WPF - Add WritableBitmapRenderHandler.CopyOnlyDirtyRect (defaults to false)
- To improve performance we can only copy the part of the DirtyRect that was changed
  currently disabled by default, can be enabled once more testing one.
2022-09-19 14:29:39 +10:00
Alex Maitland 59a13994fa WPF - Fix xml doc
- Remove char that was causing generated xml doc to be invalid
2022-08-21 14:03:03 +10:00
Alex Maitland b8b27f6885 WPF/OffScreen - Add WaitForRenderIdleAsync (#4080)
* WPF/OffScreen - Add WaitForRenderIdleAsync

- Task resolves when render has been idle for the specified time
- Make TaskTimeoutExtensions public (they're not extension methods as this was expected)
2022-05-30 19:11:17 +10:00
Alex Maitland ec25c08905 WPF - Remove EmbeddedCursor workaround
- Forgot to remove the WPF code, not needed anymore

Follow up to https://github.com/cefsharp/CefSharp/commit/dce81299feab534d4766c7a93d7c403f30d984b9
2022-05-05 12:51:57 +10:00
Alex Maitland dce81299fe WPF - Remove EmbeddedCursor workaround
Bug was fixed upstream and now no longer required.

Related issue #4021
2022-05-05 12:40:55 +10:00
Alex Maitland 452edca0ec WPF - Update EmbeddedCursor Res Ids
This is no longer actually being used and will be removed in the next version
as manually keeping the Id's up to date is unnecessary work.
2022-04-21 09:39:50 +10:00
Alex Maitland 837f6ec7a6 WPF - CompositionTargetRenderHandler add null check 2022-04-20 12:15:30 +10:00
Alex Maitland df562dd251 WPF - Workaround for Cursors not loading correctly
- For cursors that are embedded in libcef.dll the OnCursorChange method is passing
 in IntPtr.Zero so we're unable to load the cursor.
 This commit adds a manual mapping of CursorType to resource Id and loads the cursors manually
- Adds a basic test to assert the cursors load, should validate if the resource ids change

This needs to be fixed upstream https://bitbucket.org/chromiumembedded/cef/issues/3270/osr-pan-icon-missing-when-pressing-the

Test url https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#values

Issue #4021
2022-04-04 14:45:27 +10:00
Alex Maitland 77b20c71ae Examples - Add .Net 5.0 and conditionally .Net 6.0 as target frameworks
- .Net 6.0 requires VS2022

This may need to be changed if Appveyor doesn't like building the .Net 5.0 targets
2022-04-01 17:44:45 +10:00
Alex Maitland 3d39238a93 Core - Code cleanup
- Make more classes sealed
- Add xml doc
- Add serializable constructor
2022-02-22 11:33:18 +10:00
Alex Maitland 597e54fc11 IBrowserHost.Find remove identifier param
Resolves #4013
2022-02-22 11:17:56 +10:00
Alex Maitland 3b1c46aab9 Code Cleanup - Minor code cleanup
- Add Microsoft.CodeAnalysis.NetAnalyzers package
- Make some classes sealed
- Fix/Add xml doc
2022-02-01 14:07:01 +10:00