Commit Graph

5499 Commits

Author SHA1 Message Date
Alex Maitland f936100b07 Update bug_report.md
Update version number.
2020-10-21 19:29:44 +10:00
amaitland 3372ce8a57 Build - Generate Ref Assemblies for .Net 4.5.2 assemblies
Only for Release builds.

This appears to work as expected under VS2017, not sure about VS2015
Roslny .Net compiler upgraded to 2.4 allows for Ref Assembly generation
2020-10-21 18:10:04 +10:00
amaitland 5d4897f4c6 Core - Add Microsoft.Net.Compilers 2.4
This is the last version to support .Net 4.5.2
Set allowedVersions="2.4"  to stop from updating to a newer version which won't compile under VS2015
2020-10-21 17:55:29 +10:00
amaitland 0d25b7910b Net Core - CefSharp.dll wasn't being copied at runtime
Issue #3197
2020-10-21 17:28:39 +10:00
amaitland 6181e141a0 build - fix packages.config reference in build scripts 2020-10-21 16:09:18 +10:00
amaitland 33146a4e89 Core - Update build/readme to 86.0.17 2020-10-21 15:58:49 +10:00
amaitland 166c57addb Upgrade to CEF 86.0.17+g4a33048+chromium-86.0.4240.75 / Chromium 86.0.4240.75 2020-10-21 15:56:23 +10:00
amaitland 791683d4af Tools - Add UpdateNugetPackages.ps1
- Hacky powershell script to update projects to latest version
- csproj/vcxproj files will now consistently have a UTF8 BOM
- CefSharp.BrowserSubprocess.Core.netcore.vcxproj and CefSharp.BrowserSubprocess.Core.vcxproj
  now reference CefSharp.props relatively as using $SolutionDir doesn't work when running Nuget.exe directly against a vcxproj file
2020-10-21 15:53:44 +10:00
amaitland f0b7bd1e81 Core - Rename vcxproj packages.config files
nuget.exe keeps removing packages.config so renaming to project specific naming
each project in the same directory has a unique packages.config file
2020-10-21 15:50:30 +10:00
amaitland 841156c8ee Test - Add CanEvaluateScriptAsPromiseAsyncReturnObject
Promise return complex object

Issue #3251
2020-10-20 07:18:28 +10:00
amaitland 2d3be70609 Test - Add expiry to DevToolsClientFacts.CanSetCookieForDomain test
#3218
2020-10-16 19:58:30 +10:00
amaitland 74e77eb086 Core - Improve DevTools Client xml doc 2020-10-16 19:58:28 +10:00
amaitland 10f6a4bd20 Core - Add Cookie.SameSite and Cookie.Priority
Resolves #3254
2020-10-14 14:56:35 +10:00
amaitland 752de82395 Upgrade build version to 83.5.121 2020-10-13 15:20:55 +10:00
amaitland 81c0ceee09 BrowserSubProcess - Fix namespace conflict
CefSharp.Core/Cef.h CefSharp.BrowserSubprocess.Core/Cef.h were both in the CefSharp namespace.

TODO: The BrowserSubProcess class namespaces need some cleanup
2020-10-13 15:16:25 +10:00
Alex Maitland 3eca8bdba6 Enhancement - Simplify Setting of RequestContext Proxy (#3250)
Core - Simplify Setting of Proxy for new RequestContext

- Throw exception if requestContext.CanSetPreference returns false.
Proxy likely set via command line args.
- Add IRequestContext.SetPreferenceAsync
-  Test - Add SelfHosted Proxy
Use Titanium.Web.Proxy to self host a proxy for testing proxy settings
Only run Proxy Tests when run locally
- Add RequestContext Builder Fluent API
2020-10-13 13:40:46 +10:00
Alex Maitland fdba655cf5 Core - Change WindowsTargetPlatformVersion to 10.0
According to https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html#reply-548052
this will use the 'latest installed version of Windows 10 SDK'

Issue #3197
2020-10-10 20:34:21 +10:00
Alex Maitland fd46a4c145 Core - Add EvaluateScriptAsPromiseAsync (#3251)
- Add useImmediatelyInvokedFuncExpression param to EvaluateScriptAsync which wraps the script in an IIFE
  with the cefSharpInternalCallbackId variable defined in scope to allow for deferred completion
- Wrap script in Immediately Invoked Function Expression and call promise.resolve to guarantee a promise.
- Return 'CefSharpDefEvalScriptRes' as the result of the js function to defer execution of the callback
- Call newly added cefSharp.sendEvalScriptResponse method in javascript when promise has been resolved/rejected

This is built up of a few parts and can technically be used by the new user to defer the response until they are ready.
Just return `'CefSharpDefEvalScriptRes'` and manually call cefSharp.sendEvalScriptResponse using the cefSharpInternalCallbackId
variable which is injected into the script execution (wrapped in an IIFE to limit scope)
2020-10-06 15:19:37 +10:00
amaitland d0b53da211 Core - Fix IRequestContextHandler.GetResourceRequestHandler never called
CefRequestContextHandlerAdapter now implements GetResourceRequestHandler
2020-10-04 15:13:33 +10:00
amaitland 13e74fea8d README.md - Update in preparation for branching cefsharp/85 2020-10-04 14:47:25 +10:00
amaitland 02a8ea70cd Upgrade to CEF 85.3.12+g3e94ebf+chromium-85.0.4183.121 / Chromium 85.0.4183.121 2020-10-04 14:45:58 +10:00
amaitland 0dcd86026e Net Core - Split netcore vcxproj packages.config files
To make updating easier the netcore vcxproj files have their own packages.config files now
2020-10-04 14:32:06 +10:00
amaitland b4c2e359a6 Core - Improve IRequestContext.SetProxy extension Method
- Add tests
- Add better validation

Issue #3235
2020-10-02 17:13:49 +10:00
amaitland b0ee2f2bda Core - Add Cef.Initialize(settings, performDependencyCheck) overload
Added based on feedback from https://github.com/cefsharp/Questions-and-Support/issues/38
2020-10-02 10:25:25 +10:00
amaitland 02d51747f5 Core - Update CefErrorCode xml doc
Update BlockedByAdministrator xml doc

https://source.chromium.org/chromium/chromium/src/+/refs/tags/85.0.4183.102:net/base/net_error_list.h;l=93

Replaces #3245
2020-10-02 10:25:25 +10:00
amaitland 6b56bfd552 Core - Add IRequestContext.SetProxy
Add helper method for setting proxy on RequestContext

Issue #3235
2020-10-02 10:25:24 +10:00
amaitland e149cabe07 Example - Move RequestContextHandler into CefSharp.Example
Was previously only in WPF project, move into the common CefSharp.Example
as there was nothing WPF specific out the class.
2020-10-02 10:25:23 +10:00
Jozef Izso 23fd91b353 Fix typos in Cef documentation (#3237) 2020-09-25 08:29:23 +10:00
Alex Maitland 78e32a3b9f Enhancement - Add DevToolsClient (#3229)
* Core - Add DevToolsClient

Issue #3165

* DevTools Client - Add Network domain class

- Add hand written class to get a better sense of how the code should be structured.
- Improve exception handling

* Devtools - First draft of devtools protocol methods (generated)

Not complete yet

* Devtools - Simple method execution working

* DevTools - Add .Net Style cased property names to response objects

- Use internal field and datacontract attributes

* DevTools - Improve mapping

* DevTools - Strongly typed enums

* DevTools Client - Generated from active browser instance (M84)

* Devtools Client - Extract IDevToolsClient interface for testability

Improve xml doc comments

* DevTools Client - Improve error handling

* DevTools Client - Improve enum conversion

* Revert to older c# syntax

* DevTools Client - Fix failing tests

* Devtools Client - Add SetCookie Tests

* DevTools Client - Add Capture SyncContext by default

- Add option to capture the SyncContext
- Add option to provide custom SyncContext (can just pass in UI SyncContext and all continuations will happen there).
- Fix bug in ExecuteDevToolsMethodAsync sending the command twice when exeucted on the CEF UI thread

* Devtools Client - Add missing file reference

The problem with developing with the .Net Core project where files are automatically included is you
forget to include them in the regular csproj file.

* Devtools Client - Add CanCanEmulate Test case

* DevTools Client - Add AddScriptToEvaluateOnNewDocumentAsync test

* DevTools Client - OnDevToolsEvent only parse data if event handler != null

* DevTools Client - GetDevToolsClient remove ThrowExceptionIfDisposed/ThrowExceptionIfBrowserNotInitialized calls

Those methods were removed as the GetBrowser call handles the checks for us.

* DevTools Client - Improve error handling

* DevTools Client - Update xml doc comments

* DevTools Client - Add validation method (partial)

Add ability to manually add validation logic

* DevTools Client - Comment out failing test

Was working when targeting M84, now with M85 it fails.

The mapping appears to be correct, will need to investigate further

* OffScreen Example - Remove test code
2020-09-21 19:32:25 +10:00
amaitland ac28701b42 Update build version number to 85.3.6 2020-09-18 17:50:15 +10:00
amaitland 4f74f60787 Core - Add CefSharp.RenderProcessId javascript property
Two new properties have been added (both have the same value)
- CefSharp.RenderProcessId
- cefSharp.renderProcessId

Use which ever suites your naming style

Resolves #2984
2020-09-18 13:56:07 +10:00
amaitland 71773424dc Wpf/WinForms/OffScreen - Standardize InternalIsBrowserInitialized
- Add InternalIsBrowserInitialized to partial class
- Move ThrowExceptionIfDisposed/ThrowExceptionIfBrowserNotInitialized to partial class
- Remove checks from DevToolsExtensions.ExecuteDevToolsMethodAsync as the checks were already in GetBrowser

In WPF it's no longer necessary to have a custom implementation, will leave the Dependency property
(won't action #3033 at this point in time)
2020-09-18 13:32:22 +10:00
amaitland 124490ed20 Core - Legacy Javascript Binding Integration Test
Post QUnitExecutionComplete on test completion

#2977
2020-09-16 20:31:06 +10:00
amaitland 05665405f4 Core - Legacy Javascript Binding Integration Test
Add integration test (only in Net Full, not Net Core currently)

#2977
2020-09-16 19:58:40 +10:00
amaitland 3ccb0f8b10 Core - Reduce ChromiumWebBrowser Code Duplication
- Move events to partial class (where possible)
- Move other explicit interface implementation methods

Issue #3082
2020-09-16 19:44:36 +10:00
amaitland 6d62d188b7 Core - Reduce Code Duplication
Move Handler property decelerations to partial class

Issue #3082
2020-09-16 17:06:57 +10:00
amaitland 4678bbc932 Net Core - Add header to CefSharp.BrowserSubprocess.Core.netcore.vcxproj
Follow up to https://github.com/cefsharp/CefSharp/commit/53f15f22ebaf1c32fe69f14e676c3485fbab00c9
2020-09-16 16:17:30 +10:00
amaitland 2a1dd3fc88 Core - Update Generated Ref Assembly source
Follow up to https://github.com/cefsharp/CefSharp/commit/53f15f22ebaf1c32fe69f14e676c3485fbab00c9
2020-09-16 16:16:47 +10:00
amaitland 3230444045 WPF Example - Add Chrome internal Urls menu
- Add new menu for testing/debugging purposes
2020-09-16 14:32:30 +10:00
amaitland c56098dc7d Core - HtmlString add charSet support
Resolves #2981
2020-09-16 14:31:54 +10:00
amaitland 53f15f22eb Upgrade to CEF 85.3.6+gacfac2f+chromium-85.0.4183.102 / Chromium 85.0.4183.102
- Remove CefSettings.RegisterExtension (#3184)
- Add IRenderProcessHandler.OnWebKitInitialized
- Add Cef.RegisterExtension (Browser SubProcess specific implementation)

Resolves #3184
2020-09-16 13:49:37 +10:00
Alex Maitland d6e79e9b38 Update CONTRIBUTING.md
WPF Add disable-gpu-compositing to list of command line args as it's currently disabled by default
2020-09-05 10:36:27 +10:00
Gilberto Stankiewicz b0b5103100 Fix code analysis C4018 warnings (#3223)
* Replace `auto`s with `size_t`s to reduce:

```
Severity	Code	Description	Project	File	Line	Suppression State
Warning	C4018	'<': signed/unsigned mismatch	CefSharp.BrowserSubprocess.Core	c:\repos\cefsharp\cefsharp.browsersubprocess.core\serialization\jsobjectsserialization.cpp	71
```

* Fix templates
2020-08-26 19:13:13 +10:00
amaitland f55707d9ff build.netcore.ps1 - Update to version 84.4.1 2020-08-26 16:31:24 +10:00
amaitland 498a5dc1e2 README.md - Release 84.4.10 2020-08-26 16:31:23 +10:00
Alex Maitland 818e977094 Update bug_report.md
Update CEF Sample application links
2020-08-26 15:24:19 +10:00
amaitland 3823057d77 Update build version to 84.4.10 2020-08-26 14:56:56 +10:00
amaitland 89e95ef3be Core - Add CompositionUnderline.Style (IME)
https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/win/imm32_manager.cc;l=82;drc=c70af83bc44f6829277cdc3621e7015d6e0d7530;bpv=1;bpt=1?q=GCS_COMPCLAUSE&ss=chromium%2Fchromium%2Fsrc

Resolves #3107
2020-08-26 14:55:51 +10:00
amaitland 8d1afada20 WinForms - OnHandleDestroyed directly references CefSharp.Core crashing Designer
Designer attempts to load CefSharp.Core.dll which in fails, we avoid that when designMode is true

Resolves #3219
2020-08-26 14:55:51 +10:00
amaitland 98694ea1d8 Net Core - CefSharp.Common.NETCore.nuspec use chromiumembeddedframework.runtime
Still haven't managed to get the nuget runtime.json working, seeing if the naming convention of
packages matters

Issue #3197
2020-08-26 13:50:42 +10:00