Commit Graph

6318 Commits

Author SHA1 Message Date
Alex Maitland 92be5c6b3d WinFormsLifeSpanHandlerEx - Make sure actions are all called on UI thread 2023-04-01 07:31:02 +10:00
Alex Maitland bb83e54481 Change IsMainBrowser to use CefRefPtr instead of IBrowser instance
IBrowser might be disposed before we can perform the Identifier check
2023-04-01 07:29:36 +10:00
Alex Maitland 33bae3260b WinForms Example - Add LifeSpanHandler demo capable of hosting popup using ChromiumWebBrowser 2023-04-01 06:15:13 +10:00
Alex Maitland 12012b8baa Rename IsHostedBrowser to IsMainBrowser 2023-03-31 14:27:32 +10:00
Alex Maitland eea5a8a223 Core - ClientAdapter improve HasParent checks
- HasParent check has now been replaced with IsHostedBrowser
  which has additional check to make sure the internal
  IWebBrowser.Set* methods are only called for a IBrowser
  instance that's directly associated with a ChromiumWebBrowser instance
  This resolves issues with DevTools being opened for a popup hosted
  in a ChromiumWebBrowser instance.

Related discussion https://github.com/cefsharp/CefSharp/discussions/4438
2023-03-31 14:13:13 +10:00
Alex Maitland bf7b73419c Core - ClientAdapter::OnFrameCreated called before OnAfterCreated
- The very first call to ClientAdapter::OnFrameCreated happens
  before OnAfterCreated leaving us with a IBrowser instance that's null
  Create an IBrowser instance that's scoped to the method call
2023-03-31 11:49:57 +10:00
Alex Maitland c1be4d8ea1 Core - Improve ClientAdapter::GetBrowserWrapper logic
Simplify the logic

- For non popup return immediately (most common scenario)
- Check for IBrowser instance for matching popup
- Check for HasParent and return the browser Instance
- Return nullptr if no matching IBrowser wrapper found
2023-03-31 11:00:20 +10:00
Alex Maitland 261894181f Net Core - Update RefAssembly 2023-03-28 06:00:28 +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 f14ecb69b9 Core - Remove Cef.EnableHighDPISupport
Resolves #4417
2023-03-15 18:26:35 +10:00
Alex Maitland 874f18bc33 DevTools Client - Update to 111.0.5563.65 2023-03-15 10:33:52 +10:00
Alex Maitland fb779a5b46 Core - Move DevTools Client from CefSharp.dll to CefSharp.Core.dll
- Moves the Dependency of System.Text.Json from CefSharp.dll
  BrowserSubProcess as a result no longer has a reference
  where wasn't required for it's operation.

Resolves #4428 #4427
2023-03-14 14:05:48 +10:00
Alex Maitland 75fd3acf66 WinForms - LifeSpanHandler.DoClose add ObjectDisposedException try/catch
- If the popup is being hosted on a Form that is being Closed/Disposed
  as we attempt to call Control.Invoke we can end up with an ObjectDisposedException
2023-03-14 13:19:38 +10:00
Alex Maitland 0c7bc3f9b6 WinForms - Refactor ChromiumHostControlBase to use P/Invoke
- Avoid using using NativeMethodWrapper, hopefully this keeps the designer
  happy, no need to load CefSharp.Core.Runtime.dll

Issue #4019
2023-03-13 19:34:10 +10:00
Alex Maitland 35f3a57688 MSBuild - change from using $(SolutionDir) to $MSBuildThisFileDirectory
- Changes to make CefSharp easier to use as a git submodule
- BrowserSubProcess now builds for net6.0-windows for use with WinForms example
2023-03-13 19:02:18 +10:00
Alex Maitland e439cd04f9 Core - Build BrowserSubProcess for net6.0-windows
- This is only for local builds, we still only ship a .Net Core 3.1 exe (.Net 5.0 for arm64)
- Potentially we should always use the netcoreapp3.1 exe to mimic what's happening when using the nuget packages
  That would require changes to the .targets file to copy the correct exe based on arch
2023-03-13 13:25:11 +10:00
Alex Maitland 7bfcaef94c Net Core - Remove EnableHighDPISupport from BrowserSubProcess
- NetCore has it's own exe which still had a call to EnableHighDPISupport
- WPF seems to default to System DPI aware, revert to using app.manifest for PerMonitorV2

Follow up to https://github.com/cefsharp/CefSharp/commit/b17cd2a1b23df786c1051c7c66947f6d52239510

Issues #4417 #4410
2023-03-13 13:05:38 +10:00
Alex Maitland 8f03007cee WinForms - ChromiumHostControl change designer image 2023-03-12 19:31:41 +10:00
Alex Maitland 1dc71ee486 WinForms - OOP Designer migrate to Microsoft.WinForms.Designer.SDK
Only for Net Core (.Net 5/6/7)
2023-03-12 18:58:07 +10:00
Alex Maitland 7cdab11dc3 Upgrade to 111.2.2+g1b83ff6+chromium-111.0.5563.65 / Chromium 111.0.5563.65 2023-03-12 16:53:52 +10:00
Alex Maitland a4db645e5b Core - Xml Doc fixes 2023-03-12 11:09:48 +10:00
Alex Maitland 1877279601 Test - Add JavascriptBinding/JavascriptBindingSimpleTest.ShouldWork
- Now a single file example using OffScreen
2023-03-12 06:49:47 +10:00
Alex Maitland f6093ef54e Core - Add JavascriptMessageReceivedEventArgs.SetBinder method
- Allow for specifying a custom binder used for converting the
  response from cefSharp.postMessage
2023-03-11 06:40:51 +10:00
Alex Maitland fa4a37a8b0 Core - Add EvaluateScriptAsync<T>(string script) extension method
- Add generic overload that uses the DefaultBinder (with CamelCaseNaming)
  to perform type conversion
2023-03-10 18:37:42 +10:00
Alex Maitland 05fc069837 Upgrade to 111.1.2+g6926287+chromium-111.0.5563.64 / Chromium 111.0.5563.64 2023-03-09 12:35:33 +10:00
Alex Maitland a8f20291e2 build.ps1 - Update version number via UpdateNugetPackages.ps1
Resolves #4418
2023-03-08 06:44:23 +10:00
Alex Maitland b17cd2a1b2 Core - High-DPI support is now enabled by default in Chromium.
- Chromium now enables DPI awareness programmatically by default
- Remove Cef.EnableHighDPISupport calls and mark as obsolete
- Remove dpiawareness entries from app.manifest

Issues #4417 #4410
2023-03-07 13:03:53 +10:00
Alex Maitland 5b61574a51 Net Core - Support Central Package Management
- Use VersionOverride in .targets file when ManagePackageVersionsCentrally == true

Resolves #4362
2023-03-07 11:07:44 +10:00
Alex Maitland edf99b5c24 Net Core - ManagePackageVersionsCentrally exclude chromiumembeddedframework.runtime packages
- When Nuget packages are managed centrally the build will break when no RuntimeIdentifier is specified
  as the .targets file includes <PackageReference/> entries for the chromiumembeddedframework.runtime packages.
  For now when ManagePackageVersionsCentrally exclude the <ItemGroup />

Issue #4362
2023-03-07 10:53:16 +10:00
Alex Maitland 4f6fdf85c8 Upgrade to 111.0.11+geb023d1+chromium-111.0.5563.50 / Chromium 111.0.5563.50 2023-03-04 10:19:50 +10:00
Alex Maitland a39686b339 Core - Cleanup WebBrowserExtensions
- Add null check
- Rename params
- Reduce code duplication
2023-02-27 11:09:17 +10:00
Alex Maitland 75d49a9d81 Bug Report - Update links 2023-02-27 06:40:02 +10:00
Alex Maitland 916b7e01a6 Test - Add PostMessage IJavascriptCallback test 2023-02-25 05:36:56 +10:00
Alex Maitland 6df59e0cf2 Core - Fix some xml doc mistakes 2023-02-23 13:05:53 +10:00
Alex Maitland 89da873101 Core - Make WebBrowserExtensions.ThrowExceptionIfBrowserNull public
- Make public
- No longer extension method so it doesn't pollute the public API
2023-02-23 12:40:16 +10:00
Alex Maitland f7cc1d4b63 Upgrade to 110.0.28+g16a2153+chromium-110.0.5481.104 / Chromium 110.0.5481.104 2023-02-22 05:53:01 +10:00
Alex Maitland 1f25de839c Test - JavascriptBindingTests.ShouldReturnRenderProcessId assert page loaded 2023-02-17 19:07:56 +10:00
Alex Maitland d960f98dd4 Test - CookieManagerTests.ShouldSetAndGetCookie adjust Date comparison
- Test was failing when run on Appveyor, use Assert.Equal with a 1second tolerance
2023-02-17 18:48:39 +10:00
Alex Maitland abefe829ae Test - Improvements
- Use LangVersion to 8.0
- Minor cleanup
2023-02-17 18:04:30 +10:00
Alex Maitland d0b06b3105 Test - CookieManagerTests rename method 2023-02-17 16:52:03 +10:00
Alex Maitland 75a564bdff Test - ConcurrentMethodRunnerQueueTest cleanup
Issue #3067
2023-02-17 16:48:28 +10:00
Alex Maitland cafd378859 Test - Code Cleanup
- Start splitting tests out into own files where relevant
- Improve call ordering
- Use Assert.RaisesAsync where possible
- Classes have been renamed (Tests is now the standard suffix)

TODO: Some of the classes still need their method names changed
2023-02-17 13:53:23 +10:00
Alex Maitland 7edc164206 Upgrade to 110.0.25+g75b1c96+chromium-110.0.5481.78 / Chromium 110.0.5481.78 2023-02-10 06:17:40 +10:00
Alex Maitland 2c141e0fc7 DevTools Client - Update to 110.0.5481.77 2023-02-07 05:59:19 +10:00
Alex Maitland 929039e9e3 README.md - Update M110 release imminent 2023-02-07 05:51:31 +10:00
Alex Maitland 91d9981ff2 Upgrade to 110.0.22+gb3f93d5+chromium-110.0.5481.77 / Chromium 110.0.5481.77 2023-02-06 12:08:02 +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 b5334f8d31 Net Core - Update RefAssembly
- PopupFeatures was updated

Issue #4383
2023-02-02 11:49:33 +10:00
Alex Maitland ee0c75368c Core - Update IPopupFeatures
Upstream change see https://github.com/chromiumembedded/cef/commit/d04b5d4f8747ec68370740729922a9cd6868b8f5#diff-447d40892c51b4ffc870cf1a28bab2ae2d411752216be4750a17193e6675b26bL2182

Resolves #4383
2023-02-02 11:27:51 +10:00