Commit Graph

36 Commits

Author SHA1 Message Date
amaitland f725ab3907 WinForms - DefaultFocusHandler now allows browser to take focus on initial load
Previously on LoadUrl etc we didn't take focus, we now take focus on the initial Load so touch screens work
The behaviour when using ChromiumWebBrowser.ActivateBrowserOnCreation = true is still the same as versions prior to 73 (version 73 is the only different version)

Issue #2776
2019-06-04 20:10:47 +10:00
amaitland 3cff24cf1f DefaultFocusHandler.OnGotFocus - Add browser null check
For the print dialog we appear to be passed a CefRefPtr<CefBrowser> reference which doesn't appear to trigger an OnAfterCreated call
so we have no reference to it. Looking at the `CefBrowser`, there's no real data of value, empty url, no frame information (just an invalid frame id)
so for now we'll just ignore it in DefaultFocusHandler, we don't want to handle for popups anyway

Resolves #2725
2019-04-17 20:34:47 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 430c439690 IFocusHandler - Add IWebBrowser and IBrowser Params
IFocusHandler methods are now called for popups, use browser.IsPopup to differentiate
DefaultFocusHandler has been updated accordingly

Resolves #2468
2018-07-24 12:26:04 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
smcilveen d1142e6374 Fixing nullreferenceexception on ControlExtensions.IsActive (#1788) 2016-08-30 23:16:02 +10:00
amaitland afe758eb51 Use GhostDoc to generate bulk xml documentation - it's not perfect at least a lot of the interface doco has been copied into the
ChromiumWebBrowser instance classes
2016-06-15 13:44:16 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 37f584ed01 Remove NotifyMoveOrResizeStarted and SetFocus from WinForms ChromiumWebBrowser - will mark them as obsolete in the 47 branch so they can be removed from master 2016-01-09 08:09:39 +10:00
Atvaark b04ccbb269 Add missing comments 2015-11-04 13:10:00 +10:00
Bill Tutt 1df0d648a8 Don't create a task for MemoryStreams, and some more Resharper Cleanups. 2015-05-28 22:14:34 -04:00
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
rassilon 48c2550011 Fix #918 by adding extension method to cast from IntPtr to Int32 2015-03-31 10:26:09 -04:00
rassilon 1dd0fd3c35 Given focus fixes take 5, DefaultFocusHandler probably needs to be public instead of internal so that you can subclass and reuse the tricky default OnGotFocus implementation.
Add doc comment warnings about the danagers of overriding IFocusHandler.OnGotFocus for WinForm ChromiumWebBrowsers.
2015-03-18 11:54:20 -04:00
amaitland a503365073 Indent case statement
Remove unused using statements
2015-03-18 17:50:40 +10:00
rassilon 8bd76e1db9 Further cleanups based on comments. 2015-03-17 09:39:40 -04:00
rassilon b27b7d8fdf Remove debugging logic, and add some additional commentary. 2015-03-15 12:42:15 -04:00
rassilon cc8e51dced Don't .Activate ChromiumWebBrowser during activation if the ChromiumWebBrowser was the .ActiveControl before the app was deactivated.
This will allow WinForm's .ActiveControl logic to occur properly.
Update address bar logic to deal with BackColor being in yellow whenever the control has focus.
2015-03-06 02:31:05 -05:00
rassilon 340d671b1f Move WM_ACTIVATE logging from MovingListener to Interceptor. 2015-03-03 02:07:28 -05:00
rassilon 1ef60f366e Update to master/HEAD
Merge remote-tracking branch 'origin/master' into focus_take5

Conflicts:
	CefSharp.WinForms/ChromiumWebBrowser.cs
2015-03-03 02:00:04 -05:00
amaitland 113512c3db Re-add Browser.IsBrowserInitialized check (IsBrowserInitialized is now set to false when disposing, so just avoids any potential null pointer exceptions) 2015-02-24 13:30:26 +10:00
amaitland 9060ca8183 Resharper inspired cleanups
Change line wrapping slightly (no need to be so aggressive when wrapping when < 132 columns)
2015-02-24 13:28:14 +10:00
rassilon 6b51d5759d Notify browser control directly instead of using an event. 2015-02-23 22:15:37 -05:00
rassilon 7c3dcb656e * Code Review changes
* Add float right select drop down for additional move test.
2015-02-11 17:30:33 -05:00
rassilon 47916e5639 Focus improvements, take 5, a hopeful fix with lots of extra debugging goo so other people can more easily verify the changes.
The additions to MovingListener (and the fields it sets on ChromiumWebBrowser) are ONLY there for debugging related purposes. They will disappear when folks are happy with the results.
2015-02-05 23:31:20 -05:00
rassilon 0507ca52db Straightforward code review fixes, and correctly attach to newForm.HandleCreated/newForm.HandleDestroyed events. 2015-02-04 19:58:28 -05:00
rassilon 0279c41d3c Much improved MovingListener that:
* Tries to handle any possible cases where the ChromiumWebBrowser.Parent gets changed. (WinForms.Examples doesn't currently need this, btw)
* Expose RefindParentForm as public so that the calling control has control over the call to .FindForm().
* Only indicate movement when there is actual x/y movement and we're not going from Maximized to non-Maximized since this logic ends up being handled elsewhere.
* Add some debugging logic so that other folks can experiment with this scary looking change.
* Cave after realizing that every ChromiumWebBrowser needs to be notified of any kind of movement. (and not JUST the visible tabs from WinForm.Examples)
  This means we DO NOT check ParentControl.Visible on purpose.

This was tested by creating two tabs in Winforms.Example, point both at TooltipTest.html (from the custom scheme) and move/resizing around and testing both tabs after the move/resize finished.
2015-02-04 17:24:42 -05:00
rassilon b73e7003d5 Add forgotten copyright header. 2015-02-04 01:46:49 -05:00
rassilon 7894ac61d1 #672: Notify CEF when our owning form moves (WM_MOVE or WM_MOVING) just like cefclient. 2015-02-04 01:44:54 -05:00
amaitland bd6ae9751e Fix spacing 2015-02-03 22:41:43 +10:00
amaitland 6e30c097dd Another attempt at getting focus to work correctly - Simplest approach possible this time 2015-01-29 20:58:47 +10:00
amaitland 584baa2170 Remove User32.cs and implement Focused methods in NativeMethodWrapper 2014-12-30 16:23:36 +10:00
amaitland fc96909e0c Move User32 from CefSharp to CefSharp.WinForms 2014-11-27 20:28:44 +10:00
amaitland 3cb667d13c Add license disclaimer 2014-11-26 13:35:24 +10:00
amaitland d8f684f1a4 Move DefaultFocusHandler into it's own internal class 2014-11-26 13:34:47 +10:00