Commit Graph

881 Commits

Author SHA1 Message Date
JoViehmann 39c8c2fe79 Use RenderOptions of the control in Wpf ChromiumWebBrowser.cs CreateImage
This little change allows users to set the RenderOptions BitmapScalingMode for the ChromiumWebBrowser Wpf control just like this:

<cefSharp:ChromiumWebBrowser RenderOptions.BitmapScalingMode="Fant">

While NearestNeighbor (fixed value before my edit) looks fine if each rendered pixel is exactly displayed as a single pixel, using that setting for a browser placed in a viewport leads to ugly results.

You can test the different BitmapScalingMode settings for example in the Wpf.Example application if you set the RenderOptions.BitmapScalingMode property for the ChromiumWebBrowser in BrowserTabView.xaml.
Just change the Angel (Tweak WPF Rendering) of the browser in the running application to actually see the differences.

Best Regards
Johannes Viehmann
2015-10-30 13:58:45 +01:00
amaitland 7aa128781d Add IsDisposed checks
Resolves #1307
2015-10-13 19:46:38 +10:00
amaitland efb841fdca Add CefSharpSettings.ShutdownOnExit - all the user to disable the inbuilt call to Cef.Shutdown
(Also needs to set shutdownOnProcessExit:false when calling Cef.Initialize, or the ParentProcessExitHandler will be called to Shutdown Cef)
2015-10-08 22:37:14 +10:00
amaitland 190178e79e Only enable WCF if a bound object has been registered
Fixes #1272
2015-09-18 13:56:43 +10:00
amaitland 45e5da8d7b Remove obsolete methods 2015-09-01 22:49:17 +10:00
amaitland 36bf1c5c58 Refactor GetScreenInfo - add GetViewRect method so closer match cefclient example
Add note about GetViewRect
2015-08-26 20:13:07 +10:00
amaitland a3c3d6c51f Untabify RenderClientAdapter
Remove GetPixelPosition method - inline code
Remove redundant else branch from BitmapFactory
2015-08-26 15:21:38 +10:00
amaitland 73e01e09e6 Merge branch 'features/HighDpiAgain' of https://github.com/bjarteskogoy/CefSharp 2015-08-26 15:18:29 +10:00
amaitland 1691e172bd Remove unused using statements
Add extra blank line
Make GetDragEffects static
2015-08-24 12:20:19 +10:00
Bjarte Skogøy 0c2b0ae7f7 Device/logical coordinates stuff. Now mouse positions and popups are behaving properly. 2015-08-21 10:23:55 +02:00
mmamone dba5cc4690 Updates post review
Updated the naming conventions in RenderClientAdapter.
Used a DataObject for the drag data (in order to handle text, html, etc
...).
In the future, can support images once GetFileContents is
implemented.
2015-08-20 09:34:32 +10:00
mmamone defd1dd3da Replaced FragmentHtml with FragmentText 2015-08-19 13:51:30 +10:00
mmamone cb96ce1437 Implement start drag for WPF browser
Exposed the necessary functions for start drag to work:
* StartDragging (RenderClientAdapter)
* OnDragSourceEndedAt (ManagedCefBrowserAdapter)
* OnDragSourceSystemDragEnded (ManagedCefBrowserAdapter)

Implemented IRenderWebBrowser.StartDragging for the WPF
ChromiumWebBrowser.

TODO: Would like to add an adorner layer for the dragged text (using the
supplied fragment html), but feels like a project for later.
2015-08-19 13:03:18 +10:00
Bjarte Skogøy c7c0dad0d4 Init bitmap infos when scale info is available 2015-08-18 23:33:10 +02:00
Bjarte Skogøy 4bbd9e7b09 A start. Need to test popups and test on high dpi screen. 2015-08-18 14:17:20 +02:00
amaitland 29e6bc7571 Rename IMenuHandler to IContextMenuHandler 2015-08-17 13:42:44 +10:00
amaitland 41acea55d3 Add ILoadHandler to directly expose CefLoadHandler interface
Rather than have a complex set of rules where some methods were handled via IPopupHandler and others weren't
It's just a basic wrapper around CEF now with the internal event handlers only being called if it's not a popup
2015-08-17 11:54:40 +10:00
amaitland bb3103e1c2 Rename IPopupHandler to IDisplayHandler 2015-08-17 11:23:21 +10:00
amaitland 2368115c61 Make CanReload as Obsolete - use IsLoading instead 2015-08-13 21:39:19 +10:00
amaitland 77c11c3ad0 Move Title property from IWebBrowser to IWpfWebBrowser (not really required for WinForms and OffScreen)
TitleChanged EventHandler is now the best way to access these for WinForms and OffScreen
2015-08-13 21:36:18 +10:00
amaitland 74665ef4e2 Pass args directly into the IWebBrowserInternal implementation (ChromiumWebBrowser) so that extra params can be added easily
Add some more TODO's - still some API cleanup work required
2015-08-13 21:33:23 +10:00
cefsharp-ms 2f81a34c28 modified condition to avoid casting to IWebBrowserInternal for each resize 2015-08-04 12:45:10 +02:00
cefsharp-ms 4e84d84ec9 offscreen browser is not created for wpf control when it has parent 2015-08-04 12:17:11 +02:00
amaitland 7092d18af1 Add controlHandle property to to IWebBrowserInternal
For WinForms only create the browser if HasParent = false
2015-08-03 17:55:41 +10:00
cefsharp-ms 0b300d5dda Merged master 2015-07-31 17:41:00 +02:00
amaitland 9a0d7688a0 Merge branch 'cef/2272' 2015-07-28 17:17:12 +10:00
amaitland ce2521c986 Add IWebBrowserInternal.HasParent property so we know when there is a parent - OnAfterCreated is handled different for popup with a parent 2015-07-28 16:59:59 +10:00
amaitland d843e96407 Merge branch 'cef/2272' of https://github.com/jamespearce2006/CefSharp into cef/2272 2015-07-28 15:59:30 +10:00
amaitland 93529cc845 Untabify 2015-07-28 11:16:02 +10:00
amaitland f90ee3ea9c Remove the WPF SendKeyEvent and use the IBrowser.SendKeyEvent function instead 2015-07-27 13:32:34 +10:00
amaitland 4a70afeca3 WPF control - move some of the mapping methods into extensions, they could potentially be reused 2015-07-27 11:58:14 +10:00
amaitland 118182f537 Add modifiers param to SendMouseWheelEvent
Add SendKeyEvent to IBrowserHost including mapping struct classes
2015-07-24 12:23:29 +10:00
cefsharp-ms a99e020138 added option to register async js objects with only method bindings 2015-07-23 15:10:28 +02:00
amaitland 0c031a1a3b Split RequestContext out from BrowserSettings 2015-07-22 13:51:16 +10:00
amaitland 3ab612a44a Rename Oninitialized to OnAfterBrowserCreated (more closely matches the underlying CEF API) 2015-07-07 16:48:45 +10:00
amaitland 9798772694 Reordering of events in the WPF control means that the pages weren't loading consistently.
As we suggest with users, now waiting for the browser control to be initialized before attempting to load a url
Store a local volatile browserInitialized flag so that we can access on any thread (as opposed to the DependencyProperty that can only be used on the UI thread)
2015-07-07 16:48:44 +10:00
amaitland b8a322ebe0 Ignore AddressChange if newValue == null
Cherry picked from https://github.com/jamespearce2006/CefSharp/commit/94225377388acc7b70cfe7f5715215b446c7a6aa
2015-07-07 12:26:01 +10:00
amaitland 3773edb986 Merge branch 'master' of https://github.com/jamespearce2006/CefSharp 2015-07-07 10:59:42 +10:00
jamespearce2006 9555eab476 Suggested Changes 2015-07-06 14:27:27 +01:00
jamespearce2006 0b1cef8d11 Fix NullReferenceException
Fix NullReferenceException when Address is set before OnApplyTemplate is
called
2015-07-06 13:53:30 +01:00
amaitland df29944016 Implement SendMouseMoveEvent in IBrowserHost
Can now be used by offscreen
2015-07-06 12:47:29 +10:00
amaitland 5c27b7befa Set toolTip to null after mouse leaves 2015-07-06 12:42:50 +10:00
amaitland 98d186c33c Move OnMouseButton into IBrowserHost (rename to SendMouseClickEvent) 2015-07-06 12:39:33 +10:00
amaitland fbe8ccd61c Move Invalidate method from ManagedCefBrowserAdapter into CefBrowserHostWrapper - now can be used in OffScreen 2015-07-06 12:25:09 +10:00
amaitland bbe267b44c Throw exception if IsBrowserInitialized when trying to call RegisterJsObject 2015-07-06 12:16:58 +10:00
amaitland df94d54a61 Remove duplicate GetMainFrame and GetFocusedFrame methods - turned them into extensions 2015-07-01 19:49:27 +10:00
amaitland f239503bb3 Move SendMouseWheelEvent to IBrowserHost 2015-07-01 19:38:14 +10:00
amaitland 958a6264a3 Remove LoadUrl code from ManagedCefBrowserAdapter - remove more duplication 2015-07-01 12:29:37 +10:00
amaitland 819dfd54f9 Move WcfEnabled option into CefSharpSettings class
Reduce code duplication - move EvaluateScriptAsync in WebBrowserExtensions
2015-06-29 13:20:47 +10:00
amaitland 801bebbbd0 Merge branch 'MorePopupHandlerWork' of https://github.com/rassilon/CefSharp 2015-06-11 10:04:43 +10:00