Commit Graph

4620 Commits

Author SHA1 Message Date
amaitland bec283f027 BindingTest.html - Fix formatting
Braces on new lines
Remove blank line
2018-06-25 11:25:37 +10:00
Mark Vulfson 05743ff2e8 Serialize any Enumerable (List<T>) type to V8 object properly (#2393)
* Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392)
Handle any enumarable, not just arrays when serializing (e.g. when calling
`IJavascriptCallback.ExecuteAsync`).
Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization

* fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization

* fixup! fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization

# Conflicts:
#	CefSharp.Core/Internals/Serialization/V8Serialization.cpp
2018-06-25 11:22:54 +10:00
amaitland 1f531cf5c3 WPF - PresentationSourceChangedHandler Possible RenderHandler NRE
Add braces for simplest possible fix, code will be rewritten in PR #2428
2018-06-25 11:19:55 +10:00
amaitland 6b2d619ee6 WPF - Mark OnMouseWheel as Handled
Resolves #2422
2018-06-20 21:33:34 +10:00
amaitland 5193d4a2ac WPF - Rename WindowStateChanged to OnWindowStateChanged
Also tweak some of the comments
2018-06-20 21:01:50 +10:00
amaitland 4be4ebdb1d WPF - Mouse Scroll becomes unresponsive
Add Hack to CefSharpApp to allow for setting of disable-features command line arg
Add the example command line args
https://github.com/cefsharp/CefSharp/issues/2408
2018-06-20 21:01:50 +10:00
Henrik Heggelund-Berg 80327e5f35 Release window event handlers on Dispose (#2416)
* Release window event handlers on Dispose

Make sure event handlers related to `Window`, e.g. `WindowStateChanged`, is released during Dispose.

* Clear reference to `Window`
2018-06-20 21:01:49 +10:00
amaitland 130c3789f5 CefSharpSettings.SubprocessExitIfParentProcessClosed - only spawn task to monitor parent if command line arg present
Follow up to #2375
2018-06-20 21:01:49 +10:00
amaitland eaeff85eac WcfEnabledSubProcess - Revert codepage change 2018-06-20 21:01:48 +10:00
João Neves 4f9c95cce3 Close CefSharp.BrowserSubprocess.exe if parent process exits (#2375)
* Close cefsharp subprocess if main process dies

* Code review

* Await before exiting

* Update Program.cs
2018-06-20 21:01:48 +10:00
Philipp Feigl a9a8cb83da Update DependencyChecker with now required "v8_context_snapshot.bin" file (#2399) (#2400) 2018-06-20 21:01:47 +10:00
amaitland a6f0708950 JSB - Manually merge in some changes from https://github.com/cefsharp/CefSharp/commit/8f7692ae6e5c75e26accf49d57f5d8460c81b271
Bound object response was not being sent correctly (format has been updated)
2018-05-22 12:04:10 +10:00
amaitland 8716c56e22 JSB - Manually include the additional changes from https://github.com/cefsharp/CefSharp/commit/8f7692ae6e5c75e26accf49d57f5d8460c81b271 2018-05-16 12:41:56 +10:00
amaitland 8f87f3a77d RegisterBoundObjectHandler - Reduce code duplication slightly
# Conflicts:
#	CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h
2018-05-16 11:21:19 +10:00
amaitland 4854f4f45c JavascriptRootObjectWrapper - Log error when trying to bind sync object when IBrowserProcess is null 2018-05-16 11:19:56 +10:00
amaitland 2220ee49ba JavascriptBindingExtensions - Remove unnecessary async keyword from script 2018-05-16 11:19:55 +10:00
amaitland 7440a91d46 Untabify JavascriptBindingExtensions 2018-05-16 11:19:55 +10:00
amaitland 2e01de8250 JSB - Add EnsureObjectBoundAsync method
To support this use case added IJavascriptObjectRepository.ObjectsBoundInJavascript (called a single time with names of all objects bound)

Implements the idea put forward in #2362

# Conflicts:
#	CefSharp/Internals/JavascriptObjectRepository.cs
2018-05-16 11:19:54 +10:00
amaitland 930846eb52 JavascriptAsyncMethodHandler - Obtain Promise from context on Execute
Previously the promise reference was passed into the handler, now we obtain the reference on demand
2018-05-15 15:05:29 +10:00
nicholas-str 3f9272ac35 OnPopupSize - fix incorrect ordering of Rect params
OnPopupSize - fix incorrect ordering of Rect params
2018-05-10 12:03:46 +10:00
amaitland 6e21e04d85 ResourceHandler - Add argument null/empty checks 2018-05-03 11:29:14 +10:00
amaitland 8699b64c2f Nuget - Revert back to the 63 package props/targets files
The newer changes aren't complete - missing at least the BrowserSubprocess, so going with what's been tested for now.

Will fix in `master`
v65.0.0-pre01
2018-05-01 12:05:21 +10:00
amaitland d59e1fa7a0 appveyor.yml - Update temp myget api key 2018-05-01 11:26:33 +10:00
amaitland 14be1388f5 build.ps1 - Stip off -pre from Assembly version 2018-05-01 11:09:00 +10:00
amaitland b034d1c552 Task Callbacks - only call TrySetResultAsync if the callback was never called
Add IsDisposed property to ICompletionCallback, IPrintToPdfCallback, IRegisterCdmCallback, IResolveCallback
Should resolve #2349 until the code review can be finished
2018-04-30 14:21:21 +10:00
amaitland a8ff890433 Always pass through Process Id to subprocess
Improve command line parsing

Partial import of changes from #2375
2018-04-30 14:21:20 +10:00
amaitland 801d53b3cf Add JavascriptBindingCompleteEventArgs - Use for IJavascriptObjectRepository.ObjectsBound event
This contains the breaking changes required for #2362
2018-04-27 16:33:42 +10:00
amaitland 9eb19756ac OffScreen - Default GetScreenPoint to the view x/y coordinates provided
This is likely a better default than 0, 0
2018-04-23 14:18:22 +10:00
amaitland d49f975f1c OffScreen - IRenderHandler now implements all methods
DefaultRenderHandler handles all the calls required by the OffScreen ChromiumWebBrowser implementation
2018-04-23 14:15:25 +10:00
amaitland 93fdd63525 WPF - Fix incorrect param ordering of IRenderHandler.OnPaint
Param order now matches CEF interface
2018-04-23 13:06:05 +10:00
amaitland c51a615d7d OffScreen - Add IRenderHandler and DefaultRenderHandler basic implementation
Only supports OnPaint, will expand to support the other methods
2018-04-23 13:02:12 +10:00
amaitland 61033e66c8 WPF/OffScreen cleanup
- More code cleanup, use null-propagating operator
- WPF Add protected virtual UpdateDragCursor
2018-04-23 12:42:00 +10:00
amaitland c1b89c62e9 WPF/OffScreen - Code cleanup and minor refactor
IRenderWebBrowser - Method naming now matches CEF, xmldoc updated to be more accurate

CefSharp.Wpf.ChromiumWebBrowser and CefSharp.OffScreen.ChromiumWebBrowser both updated as a result of IRenderWebBrowser changes
Should be minimal public API changes, should only require changes for those that are implementing their own rendering, who will have a major rewrite on their hands regardless of this.
2018-04-20 14:49:25 +10:00
amaitland b492905cea Code cleanup - Move some structs and enums into separate namespace
- Move the less likely to be used structs/enums into the relevant namespaces, would ideally like to move them all, would likely cause a few issues
for some when upgrading though, so deferring for now.
- Remove Geoposition as it's no longer used (Geolocation API was removed in CEF)
2018-04-20 12:56:32 +10:00
amaitland 9fedc1255d CefWriteHandlerWrapper - Revert accidental change to Write method
Might look at changing the code later
2018-04-20 12:32:27 +10:00
amaitland f6e58283a6 LegacyBinding - Remove objects from cache if key already exists
Temp fix for #2301 Will be resolved properly in #2306
2018-04-20 10:45:52 +10:00
amaitland 7490b53490 IDragData.GetFileContents - update to properly closer represent the CEF API
Pass in null to get the stream size, pass in a valid stream (typically MemoryStream) to get the actual contents
2018-04-19 17:39:21 +10:00
James Coyle 4c555d7223 Handle URL escaped paths correctly (#2364)
Allows for the FolderSchemeHandler to correctly parse encoded URLs such as URLs containing spaces in requests from the currently loaded page.
2018-04-19 14:20:54 +10:00
amaitland 066f5a92b2 Upgrade to CEF 3.3325.1758.g9aea513 / Chromium 65.0.3325.181 2018-04-17 15:14:42 +10:00
amaitland 11564becca WPF - Improve DragDrop implementation
Improved for when drag/drop both originate and end within the browser. Reuse the CEF IDragData for DragTargetDragEnter call

No improvement has been made to dragging external items
2018-04-16 17:26:23 +10:00
amaitland ccc549ba1f IRenderWebBrowser - Add StartDragging xml doc 2018-04-16 17:26:23 +10:00
amaitland a17150c40d IDragData - Add Clone method 2018-04-16 17:26:22 +10:00
amaitland ce51bfb7ca CefDragDataWrapper - Implement GetFileContents
Based on #1331
2018-04-16 17:26:22 +10:00
amaitland 82630ec396 CefDrawData - Add Image
Add IImage interface and supporting structs/enums
2018-04-16 17:26:21 +10:00
Ondrej Medek 791c42cff3 Example LifespanHandler.OnAfterCreated fix eperimental code rare crash (#2354) 2018-04-13 20:00:25 +10:00
amaitland d99d6d87fe Set event handlers to null in Dispose
Not all event handlers were set to null on Dispose in ChromiumWebBrowser instances and JavascriptObjectRepository

Resolves #2307
2018-04-13 16:18:57 +10:00
amaitland b97c0c54b5 WPF - Add ByteArrayWritableBitmapRenderHandler
Copies every bitmap into a unique byte[], no locking is used.
Will use lots of memory
2018-04-05 16:53:55 +10:00
amaitland 1a3dc5b7a9 Example Projects - Add Microsoft.Net.Compilers Nuget package
Adding Microsoft.Net.Compilers so we can use C#7+ syntax in the example projects.
Will limit to the example projects for now.

For anyone using VS2015, you should still be able to compile, just intellisense won't like the new keywords and syntax
2018-04-05 12:41:10 +10:00
Martin Chrástek 11fe9203e9 Fixed a typo (#2345) 2018-04-05 06:52:53 +10:00
amaitland dd9ba1472e WinForms Example - Update LifeSpanHandler implementation to support closing Tabs vis window.close() javascript 2018-04-04 13:18:21 +10:00