Commit Graph

6179 Commits

Author SHA1 Message Date
yeyezizhi ccd4af84b0 Fix Chinese IME character Composition issue (#3163) 2020-07-02 09:34:21 +10:00
campersau 3b89e27884 WinForms Example - Use Uri.EscapeDataString instead of WebUtility.HtmlEncode for escaping query string value (#3162) 2020-06-30 20:57:24 +10:00
amaitland bd4cadd2ed Core - Add ExecuteDevToolsMethodAsync extension method
ExecuteDevToolsMethod has to be called exclusively on the CEF UI thread.
This extension method will invoke into the CEF UI thread if required.
2020-06-30 14:48:35 +10:00
amaitland 253849549b WinForms Example - Use google.com as search engine when invalid url entered in address
If Uri.IsWellFormedUriString is false then we'll load using https://www.google.com/search?q=
2020-06-30 14:28:13 +10:00
amaitland eee134c70f Example - Add DevToolsExtensions.CaptureScreenShotAsPng
Example of taking a screenshot as a png using the new devtools interface
2020-06-29 13:58:06 +10:00
amaitland db75e9b6a3 Core - IBrowserHost.AddDevToolsMessageObserver can be run on any thread.
Remove ThrowIfExecutedOnNonCefUiThread as it appears the observer
can be added on any thread.
2020-06-29 13:09:31 +10:00
amaitland 49ee24912d Core - Add support for direct DevTools protocol messaging
Add support for direct DevTools protocol messaging (fixes issue #2961).

This change allows the client to directly send and receive DevTools
protocol messages (send method calls, and receive method results and
events) without requiring a DevTools front-end or remote-debugging
session.

https://bitbucket.org/chromiumembedded/cef/commits/fd6631bd181233d36b98e1327da84c44372add76
2020-06-29 11:12:37 +10:00
amaitland 046db62ad9 WinForms - Possible null reference when Dispose
If you've somehow managed to set BrowserSettings to null then Dispose would throw a NullReferenceException
2020-06-29 10:47:17 +10:00
amaitland 88aae91ea5 Core - Add IRequestHandler.OnDocumentAvailableInMainFrame
Resolves #3157
2020-06-28 20:08:18 +10:00
amaitland 0bf05e6de7 Upgrade to CEF 83.4.0+gfd6631b+chromium-83.0.4103.106 / Chromium 83.0.4103.106 2020-06-28 20:08:18 +10:00
Alex Maitland 48b27f5114 Update README.md
Update contact section
2020-06-23 20:02:13 +10:00
Jozef Izso e0e23be25e Fix whitespace in .targets files (#3156) 2020-06-21 07:00:06 +10:00
amaitland e1ed525ba3 WPF Example - ExperimentalLifespanHandler remove targetUrl from constructor
Avoid unnecessary memory allocation. The initialAddress passed into the constructor
wasn't used.
2020-06-20 06:36:35 +10:00
amaitland ec4d4a4eab WPF Example - Improve ExperimentalLifespanHandler
- Pass targetUrl into constructor instead of setting Address property (avoid unnecessarily calling Load(url)
- Rename the popup ChromiumWebBrowser instance to make code more readable.
2020-06-19 20:54:37 +10:00
amaitland 971b7671a6 Core - Allow overriding of enable-features command line arg
Added example of NetworkServiceInProcess

NOTE: Running the Network Service in Process is not something CEF officially supports
It may or may not work for newer versions.
2020-06-19 20:48:25 +10:00
amaitland c1dbcf2f0e README.md - Add 83 branch details (-pre release) 2020-06-14 13:37:19 +10:00
amaitland c8ebd23a88 WPF - Disable GPU Compositing
Resize was causing glitches, doesn't reproduce with cefclient
Needs further investigation.

Revert to disabling GPU compositing

Issue #3114
2020-06-14 13:37:19 +10:00
Alex Maitland 72840a841d Update Readme.txt
Update .Net Core link
2020-06-09 20:58:38 +10:00
amaitland c1a4db20fd Upgrade to CEF 83.3.12+g0889ff0+chromium-83.0.4103.97 / Chromium 83.0.4103.97 2020-06-09 15:57:25 +10:00
amaitland ae99a30364 Core - IDownloadItemCallback incorrectly disposed on Pause/Resume
Resolves #3145
2020-06-09 14:14:14 +10:00
amaitland 1d8c90258e Core - ByteArrayResourceHandler throw exception if byte[] length 0
We cannot create a CefStreamReader when buffer length is 0
CefStreamReader::CreateForData returns null and CefStreamResourceHandler crashes
as the stream is null

https://github.com/chromiumembedded/cef/blob/9df4a54308a88fd80c5774d91c62da35afb5fd1b/libcef/browser/stream_impl.cc#L27
https://github.com/chromiumembedded/cef/blob/a94dc6a0588e15deb184650b9015cd259e52a702/libcef_dll/wrapper/cef_stream_resource_handler.cc#L79
2020-06-09 14:14:14 +10:00
amaitland 213a6e326d Core - ResourceHandler default Access-Control-Allow-Origin to * 2020-06-09 14:14:12 +10:00
amaitland 319f57ecdd Core - Improve CefSharpSettings.ConcurrentTaskExecution xml doc 2020-06-09 14:14:12 +10:00
Alex Maitland 2e1d960440 Update bug_report.md
Update x64 link
2020-06-02 12:25:59 +10:00
Alex Maitland 224641e45f Update CONTRIBUTING.md
Update to reflect 81.3.100 Release
2020-06-02 12:25:31 +10:00
Alex Maitland 809b5db7f3 Update bug_report.md
Update to reflect version 81.3.100 release
2020-06-02 12:22:48 +10:00
amaitland 898ca38e7a Core - Add BindingOptions.NameConverter
- Allows for the user to provide their own IJavascriptNameConverter implementation
- Defaults to using the CamelCaseJavascriptNameConverter (which is exactly the same very basic
naming conversion used by default currently).
- If CamelCaseJavascriptNames is false then no conversion is used

Naming is now separate from the JavascriptObjectRepository and can be tested in isolation.
2020-05-30 20:02:56 +10:00
amaitland 3ba91f5798 Test - OffScreenBrowserBasicFacts remove assert
It's possible that BrowserRefCounter.Instance.Count is 0 after
we Dispose, so we'll update our test to make sure we have at most
one instance, and it's fine we if have 0
2020-05-30 19:28:51 +10:00
amaitland ae41e10d71 Core - Javascript Binding Configure Property Name
- Rename settings object to JavascriptBindingSettings
- Validate JavascriptBindingSettings.JsBindingGlobalObjectName in setter to provide immediate
  feedback
- Add FreezableBase which throws exception when frozen (we can reuse this for some other settings classes)
- Add some basic Unit Tests (More would be better)

Follow on from #3126
2020-05-30 19:28:50 +10:00
Geevo 66691105b4 Core - Added ability to configure/customize javascript binding property name. 2020-05-30 18:53:13 +10:00
amaitland c0ba9e9135 Upgrade to CEF 83.3.9+ged43e55+chromium-83.0.4103.61 / Chromium 83.0.4103.61 2020-05-25 20:04:27 +10:00
amaitland 50fb9c081d WPF - Add AddressChanged event
Typically the address would be databound, there's been a few requests to add an event
so adding one.
2020-05-23 20:30:22 +10:00
amaitland ae17525092 WPF Example - Can now run LegacyBindingTest from menu without code change
It's a bit of a hack at this point, have to read the property from the DataContext.
Need to work on a clean binding solution

Issue #2977
2020-05-23 20:08:51 +10:00
amaitland ea30d88014 OffScreen - Improve constructor xml doc
Issue #2977
2020-05-23 19:46:43 +10:00
amaitland e9ca3f58e2 Core - FreezableBase improve error message
Include the instance type instead of FreezableBase
2020-05-23 19:45:22 +10:00
amaitland 880f11410c Core - JavascriptBindingSettings.LegacyBindingEnabled throw if Frozen
Throw exception if attempt to set frozen property.

Issue #2977
2020-05-23 14:28:10 +10:00
amaitland a70abc4437 Core - LegacyBinding is now configured per browser
Previously it was global set using CefSharpSettings.LegacyJavascriptBindingEnabled

Now it's configured through IJavascriptObjectRepository.Settings.LegacyBindingEnabled
which defaults to CefSharpSettings.LegacyJavascriptBindingEnabled (until it's removed).

IJavascriptObjectRepository.ResolveObject is raised with LegacyObjects as the name
to allow for easier binding of objects.

Issue #2977
2020-05-23 14:15:33 +10:00
amaitland b1f98751ba README.md - release 81.3.100 packages 2020-05-23 12:05:42 +10:00
amaitland 35e207d08b Update version number to 81.3.100 2020-05-23 12:05:06 +10:00
deonberlin 7e3159ebd3 WPF - Implement AltGr support. (#3131)
* Fixed #3104 AltGr support.

* Code format adjusted.

* Moved AltGr code to better location within the function.

Co-authored-by: Daniel Bitterlich <bitterlich@deon.de>
2020-05-23 10:13:23 +10:00
amaitland 4a7625938c WPF - Improve GetModifiers(KeyEventArgs e) performance
Only get KeyboardDevice.Modifiers once as it's not a stored value, it's calculated
every call.
2020-05-21 20:16:44 +10:00
amaitland f8ffbc7aa5 Nuget - Set PublishState Include for <None/> entries
Hopefully this will allow support for ClickOnce installer
2020-05-21 20:11:38 +10:00
amaitland b86a3ac59a Tests - Add OffScreenBrowserBasicFacts.CanExecuteJavascriptInMainFrameAfterNavigatingToDifferentOrigin
Confirm CanExecuteJavascriptInMainFrame is true after navigating to a different origin

Resolves #3021
2020-05-19 08:23:47 +10:00
amaitland 940034314b Tests - Convert BinderFacts.NullToValueType to NullToValueTypeTheory
Now uses Theory with InlineData
2020-05-18 11:47:43 +10:00
amaitland 99cc2d5030 Core - Cef.GetMimeType custom/fallback mimeType mapping
- return application/octet-stream when no mapping found
- Add custom dictionary with some additional mimeTypes, users can add their own to this dictionary
- Add xunit test

Resolves #3041
2020-05-18 11:47:42 +10:00
amaitland ef590444b4 Core - DefaultBinder InvalidOperationException when binding [1,2,3,1.23] to double[]
- Bind for all elements in a collection, not just when the collection contains list/arrays
- Add additional unit tests

JavaScript array of [1,2,3,1.23] translates to [int, int, int, double], when attempting to Bind
to a double[] an InvalidOperationException was thrown. We now call Bind for each element,
when the type is directly assignable we return the value, for cases like above we perform a
type conversion.

Resolves #3129
2020-05-18 09:13:02 +10:00
amaitland b888c41fb7 Revert "Core - Remove ResourceHandler.GetMimeType"
This reverts commit 1b5e82814d4e49ab3b0ab249ad85c6254515a459.
2020-05-15 20:26:43 +10:00
amaitland b9fba00078 Upgrade to CEF 81.3.10+gb223419+chromium-81.0.4044.138 2020-05-15 20:26:43 +10:00
amaitland 436e565f04 Core - Remove DefaultRequestHandler
Issue #3124
2020-05-15 20:26:42 +10:00
amaitland 5cdc1f747e Core - Remove ResourceHandler.GetMimeType
It's actually made private for now as it's used in one place and
will be removed when that obsolete method is removed.

Resolves #3105
2020-05-15 20:26:42 +10:00