Commit Graph

6179 Commits

Author SHA1 Message Date
pedoc 893d03221f Javascript Binding - Allow binding to classes in the global namespace (#3467)
* fix IsComplexType NullReferenceException

Sometimes, the registered Javascript object does not have a namespace, at this time this function will throw a ```NullReferenceException```.

* add unit test for IsComplexType

* Simplify and remove useless code

* Update CefSharp/Internals/JavascriptObjectRepository.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>

Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
2021-04-05 10:29:42 +10:00
Konstantin Preißer 462bc747bd Add support for Windows ARM64 to CefSharp.NETCore packages (#3359)
* Add support for Windows ARM64 for the NETCore packages.

Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64.

Fixes cefsharp/CefSharp#2944

* PR feedback: Remove "WIN32" define as it is already defined by minwindef.h.

* PR feedback: Switch the CefSharp.*.Example.netcore and CefSharp.Test.netcore projects from cef.redist to chromiumembeddedframework.runtime.

Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.

* Follow-Up: Update path to CefSharp.Test.dll.

* PR feedback: Also use RuntimeInformation for the .NET Framework example projects.

* PR feedback:
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed.
- Update .vsconfig to include the VC ARM64 build tools.
2021-04-01 17:27:48 +10:00
Alex Maitland aabdb68e99 WPF - Pass 0 to SendKeyEvent as lparam instead of modifiers
Resolves #3462
2021-04-01 17:17:40 +10:00
Alex Maitland 36de22502c Net Core - Assembly.GetEntryAssembly can return null when loaded from an unmanaged application
- Add null check and use currently assembly location to resolve libcef.dll

The GetEntryAssembly method can return null when a managed assembly has been loaded from an unmanaged application.
https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.getentryassembly?view=net-5.0
2021-04-01 16:54:19 +10:00
Alex Maitland 047f8b838c WPF/WinForms/OffScreen - Reduce code duplication
Issue #3082
2021-04-01 16:28:20 +10:00
Alex Maitland bbb5afaeb3 Net Core - DependencyChecker fix AnyCPU validation for CefSharp.Core.Runtime.dll
Resolves #3388
2021-03-27 15:16:13 +10:00
Alex Maitland 223af40803 Core - Remove IBrowserSettings.WebSecurity
Web Security can be disabled via the "disable-web-security" command-line switch.

This is a breaking change.

Resolves #3312
2021-03-27 13:05:06 +10:00
Alex Maitland 69eaeb44ec Upgrade to CEF 90.1.0+g35a360f+chromium-90.0.4430.30 / Chromium 90.0.4430.30 2021-03-27 11:24:10 +10:00
Alex Maitland 52374b74a7 Core - Remove IContextMenuParams.IsPepperMenu
This is a breaking change

Resolves #3460
2021-03-27 11:17:23 +10:00
Alex Maitland 8f1bde2cd5 Upgrade to CEF 90.0.6+g0ad85c1+chromium-90.0.4430.30 / Chromium 90.0.4430.30 2021-03-26 17:59:45 +10:00
Alex Maitland a543442a26 Core - Add OwinResourceHandler and OwinSchemeHandlerFactory
Very basic implementation ported from https://github.com/amaitland/CefSharp.Owin

- Currently no multi part post support
- No support for cancellation token
2021-03-26 15:56:35 +10:00
Alex Maitland 310c6fdd0d README.md - Update with release of 89-pre 2021-03-26 15:03:27 +10:00
Alex Maitland 6f4fe5e12a ClickOnce - Load CefSharp.dll from parent directory if not in current directory
Still not loading, move the EnableHighDPISupport into internal method

Follow up to https://github.com/cefsharp/CefSharp/commit/aee97e650dd1d3099e17cf84930bc016b84e6c4c
2021-03-24 20:18:27 +10:00
Alex Maitland bff3768f51 Nuget - TargetPlatform Map Win32 to x86 (VC++ projects) 2021-03-23 15:19:11 +10:00
Alex Maitland 2b5aed7e78 Net Core - Update RefAssemblty (Add Cef.GetMinLogLevel) 2021-03-23 15:14:21 +10:00
Alex Maitland 36092b548c Core - DependencyChecker now supports AnyCPU
- Remove the .Net Core specific implementation, was easier to unify them than first though
- Split checking for dlls into different folders to support AnyCPU
2021-03-23 15:13:38 +10:00
Alex Maitland 24056cd94d Net Core - Add DependencyChecker.netcore
Specific .Net core DependencyChecker that takes care of the specifics of running under .Net Core/.Net 5.0
Later on the DependencyChecker can be unified.

Issue #3388
2021-03-23 10:49:15 +10:00
Alex Maitland 0c6268f940 Nuget - Improvements and formatting fixes
- Remove CefSharpBuildAction default to NoAction when Nuget 5.0 and Library
  For those writing plugins this would have resulted in no files being copied, will rely on users setting
  to NoAction themselves when required
- When $PlatformTarget is empty default to $Platform as the fallback, older Non SDK Style library projects
  are known to not set PlatformTarget when Platform is AnyCPU which would have resulted in only the x86 files being copied.
- Fix formatting of CefSharp.Common.NETCore.targets
2021-03-23 10:49:14 +10:00
Alex Maitland 583608095a ClickOnce - Load CefSharp.dll from parent directory if not in current folder
When publishing with ClickOnce targeting AnyCPU the x64 folder is missing a copy of CefSharp.dll which is required by the BrowserSubprocess.
The file is copied correctly when the projects builds normally, so there's some quirk of the Publish process.

Temp workaround

Issue as described at https://github.com/cefsharp/CefSharp/issues/3319#issuecomment-791783346
2021-03-23 10:49:14 +10:00
Alex Maitland 0cfcabe2c9 Example - Remove renderer-process-limit and add disclaimer
Related #3447
2021-03-22 14:14:38 +10:00
billshinji 516de14af6 WPF - Japanese IME unable to enter space (#3455)
This is a fix in response to the issue of not emitting spaces in Japanese IME (from @karthikeyancdm).
After all, it turns out that ImeSetComposition() and ImeFinishComposingText() should be invoked regardless of the current language.
2021-03-22 14:07:54 +10:00
Alex Maitland 207172efe3 WPF - Add OnDpiChanged for NetCore builds
Automatically deals with DPI Change

Issue #3388
2021-03-16 15:58:25 +10:00
Alex Maitland 7950640bd8 Nuget - Sdk Style Project targeting AnyCPU generate error when PlatformTarget not set
When targeting AnyCPU with an SDK Style project PlatformTarget will default to x86 before build
and after build it will have been correctly updated to AnyCPU. This is too late for our purpose as we
have already copied the x86 files resulting in a build that won't run on an an x64 machine.

Issue https://github.com/dotnet/sdk/issues/1560

Disable an error to the user. Add <PlatformTarget>AnyCPU</PlatformTarget> as simple workaround to proj file.

See also https://github.com/cefsharp/CefSharp/discussions/3430 for background.

Release #3446
2021-03-16 15:27:24 +10:00
Alex Maitland f278d3d69a Test - Fix a couple of javascript warnings 2021-03-16 14:54:05 +10:00
Alex Maitland e7d59c928e Revert "Nuget - Remove netcoreapp3.0 hacks"
This reverts commit 005f5c8862.
2021-03-14 19:41:28 +10:00
Alex Maitland e6370fe739 Upgrade to CEF 89.0.7+gb5952bd+chromium-89.0.4389.72 / Chromium 89.0.4389.72 2021-03-14 19:41:09 +10:00
Alex Maitland 83dde5ec77 Core - Fix xml doc 2021-03-14 19:31:51 +10:00
Alex Maitland 5905802fbb DevTools Client - Upgrade to 89.0.4389.72 2021-03-12 13:58:37 +10:00
Alex Maitland 6d080ad3f9 Nuget (Net Core) - Add CefSharpBuildAction to CefSharpAfterBuildDiagnostic 2021-03-12 13:55:38 +10:00
Alex Maitland 005f5c8862 Nuget - Remove netcoreapp3.0 hacks
To continue using these packages you can specify AssetTargetFallback
https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#assettargetfallback

Resolves #3444
2021-03-12 13:35:47 +10:00
Alex Maitland 38dc00d712 Xml Doc - Fix cref 2021-03-12 13:28:16 +10:00
Alex Maitland 73e2192c95 Upgrade version numbers to 89.0.60 2021-03-12 13:20:12 +10:00
Alex Maitland 5780aefda3 Net Source - Add SourceLink support
- The Debug PDBs will now use SourceLink
- The C++/CLI projects will use SourceLink
- CefSharp.Core.dll now generates/uses a ref assembly
- The managed (c#) projects still embed sources/symbols for Release builds

At some point we should investigate generating a snupkg to reduce the dll size
2021-03-12 13:15:31 +10:00
Alex Maitland 6601a66b75 Javascript Binding - ClientAdapter.MethodInvocationComplete NRE
Resolves #3443
2021-03-12 11:59:04 +10:00
Alex Maitland 09c1b2ff73 Examples - Re-Add CefSharp.Core.Runtime reference.
Switching between Win32 and x86 builds locally and sometimes you end up with a reference to the
incorrect arch dll as it looks like the compiler thinks its up to date and doesn't copy the new dll.
Was easily fixed by calling Clean, was time consuming though.
2021-03-11 15:22:30 +10:00
Alex Maitland bcc2c91e0a Core - ManagedCefBrowserAdapter::InitializeBrowserProcessServiceHost improve Dispose handling
As the browser is Disposed on a different Thread to OnAfterBrowserCreated is called there's possibility of an ObjectDisposedException.
Instead of locking just catch and ignore the error as it's extremely rare

Resolves #3437
2021-03-11 15:22:30 +10:00
Alex Maitland 087572f6d4 Core - Tweak Build order 2021-03-11 15:22:25 +10:00
Alex Maitland c8968d46b7 Core - Remove RefAssembly Generation from Net452 packages
- They're not generated under VS2015 (AppVeyor) so didn't end up using them
2021-03-11 15:22:25 +10:00
Jozef Izso af214f5397 Explicitly set the code page to UTF-8 (65001) so the copyright symbol is compiled correctly (#3432) 2021-03-10 09:35:49 +10:00
Alex Maitland c13e2eea5e Nuget - Remove SDK Style project workaround for not PlatformTarget specified
- Remove the workound as it's not working (behaviour is different depending on the SDK version installed)
- Add Prefer32Bit to diag output

For SDK style projects the $(PlatformTarget) is incorrectly set by default
Issue https://github.com/dotnet/sdk/issues/1560

Explicitly setting $(PlatformTarget) in your project file is the recommended solution until the above issue is fixed.
2021-03-09 15:04:37 +10:00
Alex Maitland ba44f6ffce Nuget - Fix formatting 2021-03-09 15:04:37 +10:00
Jozef Izso 7e6e15af88 Fix typos in CefSharp.Common.targets (#3426) 2021-03-08 09:09:33 +10:00
Alex Maitland be58e78fc7 Nuget - CefSharpAfterBuildDiagnostic add extra properties 2021-03-06 13:41:24 +10:00
Alex Maitland c6dc9ebde9 Nuget - Default CefSharpBuildAction to NoAction when Library project PackageRef Nuget > 5.0
- NoAction should now disable AnyCPU checks
- Default to NoAction when Library and Nuget 5.0 when using PackageReference, the Transitive references should flow through to the consuming
projects.
2021-03-06 13:37:01 +10:00
Alex Maitland a7e2ffff24 README.md - Update Release branches table with 88 Release and creating of upcoming 89 branch 2021-03-06 12:58:36 +10:00
Alex Maitland 39e7fc5743 Upgrade to CEF 89.0.6+g6f30454+chromium-89.0.4389.72 / Chromium 89.0.4389.72 2021-03-06 11:12:47 +10:00
Alex Maitland 5ebb08f3bc Net Core - Nuget Add CefSharpBuildAction and default to NoAction for Class Library
For class libraries we don't want to copy our files into their output folder by default as they won't actually,
so added CefSharpBuildAction and defaulted to NoAction (can be overridden by the user if required).

Consuming packages will have the transitive reference added and files copied into WinExe/Exe projects by default
2021-03-06 10:37:48 +10:00
Alex Maitland c41cb484d1 Net Core - WinForms remove Microsoft.Net.Compilers packagereference
Not sure of the reason I included it, it's not required.
2021-03-06 10:26:02 +10:00
Alex Maitland 07ce2e0ab3 Net Core - Nuget chromiumembeddedframework.runtime include BuildTransitive
Update dependency includes add BuildTransitive
2021-03-05 17:15:20 +10:00
Alex Maitland 29c78b781f Issue Template - Add What version of .Net section 2021-03-05 11:38:19 +10:00