Commit Graph

6179 Commits

Author SHA1 Message Date
Alex Maitland c1fd48a24d Update support.yml
Add comments about issues closed in error, users must complete the bug report and post a comment.
2019-09-06 12:42:04 +10:00
amaitland 25ab209380 MethodRunnerQueue/ConcurrentMethodRunnerQueue - Remove custom task execution queue
- ConcurrentMethodRunnerQueue we now directly queue tasks on TaskScheduler.Default
- MethodRunnerQueue now uses LimitedConcurrencyLevelTaskScheduler (example from Microsoft) to limit execution to one concurrent task
- MethodRunnerQueue tasks are now run on the ThreadPool directly instead of our own custom thread, should have some threading implications
for user
- IMethodRunnerQueue now implements IDisposable

Resolves #2873
2019-09-06 11:05:18 +10:00
amaitland f88708f063 WebBrowserExtensions - Make GetScript public and rename to GetScriptForJavascriptMethodWithArgs 2019-09-06 09:59:31 +10:00
amaitland b35d5151fe IRequest/IResponse - Improve IsReadOnly handling
- Throw exception if attempting to set property on readonly request/response
- return ReadOnlyNameValueCollection if Headers are readonly
2019-09-05 19:55:32 +10:00
amaitland df3315923e WPF - Add IWpfWebBrowser.Paint/VirtualKeyboardRequested events to interface 2019-09-05 12:35:12 +10:00
amaitland 794c77e79d IBrowserHost - Add GetZoomLevel
Can be called directly on the CEF UI thread
2019-09-02 11:39:21 +10:00
amaitland 07ac50064b WPF - Add NotifyDpiChange method
Extract DPI change code into a public method that can be called when the `WPF` window changes it's DPI
As we target .Net 4.5.2 we don't have access to the new managed DPI change notification that was added in WPF (.Net 4.6)

Resolves #2856
2019-08-24 07:40:32 +10:00
amaitland 61e82bc50c ClientAdapter::GetResourceRequestHandler - LoadHtml and (Un)RegisterResource would only work if RequestHandler not null
- Revised login so RequestHandler not required
2019-08-24 07:40:32 +10:00
Alex Maitland 65612e5734 Update README.md
Release 75.1.141
2019-08-16 15:02:28 +10:00
amaitland 130df919a7 WPF - Remove call to host.Invalidate
Was accidentally committed
2019-08-15 20:58:09 +10:00
amaitland 7980c30478 WinForms Example - Minor changes to DevTools docked example
- Add/revise comments
- Rename some variables

Follow up to #2804
2019-08-14 11:11:10 +10:00
Luke 1992e4970c WinForms - Add example of how to dock devtools into the same window. (#2804)
* Add a SplitContainer as the base UI panel and place the browserPanel in Panel1 and new devToolsPanel in Panel2.
Create two new public methods to open and close the devtools.

* BrowserForm - Changed the Show/Close devtools to call the new methods in the BrowserTabUserControl. If the LifeHandler is null, normal behaviour is assumed.

* Handle the DoClose event in LifeSpanHandler if the IBrowserHost.CloseDevTools() is called directly. This is more of a fail-safe, if the normal CEF behaviour is allowed then entire application will close.

* Added some addtional comments.

* Uncomment the instantiation of the LifeSpanHandler

* Removed devToolsPanel from designer
Removed CloseDevToolsDocked() method
Made ShowDevToolsDocked() method easier to copy and paste
Closing Devtools should now be handled in LifeSpanHandler.DoClose()
Added a bool to the LifeSpanHandler constructor whether to handle Browser popups.
Added Toolscript menu item to show DevTools Docked or Popup
Added async Method to check it DevTools is open

* Changed field access modifier to private

* Renamed dispose devtools handler with a more meaningful name
2019-08-14 10:16:21 +10:00
amaitland 88ab0a1a69 Update version numbers to 76.1.90 2019-08-14 10:14:18 +10:00
amaitland e5ff2fe8e0 Upgrade to CEF 76.1.9+g2cf916e+chromium-76.0.3809.87 / Chromium 76.0.3809.87 2019-08-14 10:09:53 +10:00
amaitland b5993fb31e ICookieManager - Update xml doc
Updated to reflect upstream changes see https://magpcss.org/ceforum/apidocs3/projects/(default)/CefCookieManager.html

Resolves #2855
2019-08-14 07:44:03 +10:00
amaitland dc3d83eca1 WPF Example - MenuHandler commands now fire reliably
- The MVVM Light RelayCommand keeps a WeakRef to the command action, for us this is anonymous, so we
need to keep the target alive.
- Updated MVVMLightLibs (required for keepTargetAlive)
2019-08-13 20:38:36 +10:00
amaitland 07880f0074 WPF Example - Improve demo of hosting popup in ChromiumWebBrowser instance
- LifespanHandler renamed to ExperimentalLifespanHandler to make it clear the feature is experimental
- Add additional check for devtools popup
2019-08-12 12:03:52 +10:00
amaitland e388f5f151 ClientAdapter - Call IWebBrowserInternal Set/On methods when ChromiumWebBrowser is used for hosting popup
IWebBrowserInternal calls like SetLoadingStateChange weren't being made when IsPopup is true, add additional
HasParent check to determine if we're hosting the popup in a ChromiumWebBrowser instance.
2019-08-12 12:01:24 +10:00
amaitland c724e3da65 LegacyJavascriptBinding - Enabled field was overwritten when a popup was opened
Popups don't transmit their own bound object information, _legacyBindingEnabled was being set to false
2019-08-11 18:29:40 +10:00
Andrey Belykh d7e7a49125 Fixed typo in readme.md (#2857) 2019-08-08 06:25:15 +10:00
amaitland bbef0f3fa6 ClientAdapter::MethodInvocationComplete - Add checking for valid frame
Make we have a frame that matches the Id and that it's valid before attempting to create a IPC message
2019-08-06 14:27:44 +10:00
amaitland 798e4635f8 Wpf - Fix Typo built instead of build 2019-08-02 20:14:02 +10:00
amaitland c9203c9310 WPF - Remove disable-gpu-compositing 2019-08-02 12:34:56 +10:00
amaitland 659a624b87 build.ps1 - Force TLS 1.2 for GitLink download
Running locally the following error was occurring
`Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel.`
2019-08-02 10:26:29 +10:00
amaitland f3e400d8d7 Update version number to 76.1.50 2019-08-02 10:14:31 +10:00
amaitland 94b9e9043f Update to CEF 76.1.5+gd8a577c+chromium-76.0.3809.87 2019-08-02 10:06:50 +10:00
amaitland 47b488061e ISelectClientCertificateCallback - Update xml doc, return null means no certificate selected.
Update WinForms Example to deal with user cancellation of certificate selection UI

Resolves #2853
2019-07-31 19:41:08 +10:00
amaitland 010c5aea74 Scheme Registration - Only register custom scheme name one
Adding multiple entries to CefSettings.RegisterScheme that share the same scheme name
yet have different domain/schemehandlerfactory implementations is valid.

We will only register the first set of SchemeName/SchemeOption values (first call to RegisterScheme).
2019-07-30 20:58:57 +10:00
amaitland 6c7d15d9d3 WcfEnabledSubProcess - OnBrowserDestroyed add null checks and log msg if WCF was null
It's likely the WCF host didn't start and some break points should be added in ManagedCefBrowserAdapter::InitializeBrowserProcessServiceHost
to catch the actual exception. We're not logging as it causes too many false positives as it's expected there will be errors
when browser is created then rapidly Disposed.

Resolves #2839
2019-07-27 21:50:13 +10:00
amaitland 6cc1026156 Upgrade version to 75.1.140 2019-07-27 21:36:33 +10:00
amaitland d4fb870e0d Upgrade to CEF 75.1.14+gc81164e+chromium-75.0.3770.100 2019-07-27 21:36:31 +10:00
amaitland e270d24214 WPF - OnWindowStateChanged only call WasHidden(false) when previous state was Minimized
Store the previous window state and only call IBrowserHost.WasHidden(false) if the browser was
previous hidden. Call isn't required when transitioning between Normal and Maximized
2019-07-27 21:36:30 +10:00
amaitland 75fc1737cd Rect - Change to use Math.Ceiling as that appears to match what CEF uses
cefclient uses Math.Floor though when I examine the values returned they're always one less
use use Math.Ceiling appears to match
2019-07-27 19:31:46 +10:00
amaitland ee30c90228 WPF - GetScreenInfo scale Rect/AvailableRect
Scale by DpiScaleFactor
2019-07-27 19:31:45 +10:00
amaitland 119e29e5e3 Rect - Add DebuggerDisplay 2019-07-27 19:31:45 +10:00
amaitland 023dec2309 WPF - store width/height in local variable upon size change
Do this so it's easier to implement a workaround for #2779
2019-07-27 19:31:44 +10:00
amaitland 6f32aa1a0a WinForms - Only use DefaultFocusHandler when !MultiThreadedMessageLoop
If the WinForms UI thread and CEF UI thread are one in the same then we're not using MultiThreadedMessageLoop
2019-07-26 14:13:58 +10:00
amaitland 47e232e89e Upgrade to CEF 75.1.7+gb34af23+chromium-75.0.3770.100 2019-07-26 14:01:18 +10:00
ye4241 aafb09f17f update CefGlue source code link; (#2850) 2019-07-26 12:59:25 +10:00
Chen Huang 87bfa94862 Use Canvas.Top="0" for PART_image absolute position. (#2844)
Using Canvas.Bottom will cause glitchiness when resizing the browser.
On a height change, the height of the canvas changes first, and since
a new frame has not yet been rendered, PART_image still has the old
height, causing the image to jump around
2019-07-25 11:53:31 +10:00
amaitland 7b1a4e2016 README.md - Update in preparation for 75 -pre release 2019-07-23 20:51:01 +10:00
amaitland 581fa04ef7 ICookieManager - Update xml doc (methods are executed on UI thread now) 2019-07-23 20:45:24 +10:00
amaitland 85a01973af CefAppUnmanagedWrapper - Minor refactor in kJavascriptRootObjectResponse and kJavascriptAsyncMethodCallResponse
kJavascriptRootObjectResponse - delete the callback when not used
kJavascriptAsyncMethodCallResponse - Only execute if we have a valid frame
2019-07-20 18:28:36 +10:00
amaitland e36620ed54 JsonString - Revert to older throw style syntax
VS2015 C# compiler doesn't like it and we still haven't installed the newer compiler Nuget packages
2019-07-20 16:34:33 +10:00
amaitland 52ec00c486 Code cleanup - Rename IWebBrowser browserControl to chromiumWebBrowser
Hopefully this makes it clearer that the IWebBrowser instance is actually the ChromiumWebBrowser

Updated almost all instances, there's one WinForms example that wasn't updated
2019-07-20 16:26:25 +10:00
amaitland 2bf8767c4b WPF - Update ZoomLevel xml doc re same origin
Issue #2834
2019-07-20 13:42:37 +10:00
amaitland 209bde2c04 BindingTest.html - Reformat using editorconfig 2019-07-20 12:28:51 +10:00
amaitland 3989864ab0 V8Serialization - Fix compile error 2019-07-20 12:20:46 +10:00
Angshuman Agarwal 48eaff87dc Javascript Integration - Passing empty array in JS now maps to empty list/array instead of null (#2829)
* Set empty list instead of null

* Added QUnit Test for testing Empty Array
2019-07-20 12:17:44 +10:00
amaitland b072d97c1b V8Serialization - Don't throw exceptions
Instead of throwing an exception which will in most cases crash the MethodRunnerQueue
we'll populate the returned data with an error message for an unknown type
For an unknown enum convert to string
2019-07-20 12:16:56 +10:00