Commit Graph

78 Commits

Author SHA1 Message Date
Daniel Silverstone
6848cc890a
browser_window: Check for bw==NULL before dereferencing it
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-03 14:23:43 +01:00
Vincent Sanders
ebe1b05114 improve desktop text search header usage
remove unecessary inclusion of desktop search header in content
  header which has knock on effect of not having ctype or string
  system headers dragged in unecessarily.

Futher this highlighted use of ctype API where internal ascii
  processing ought to be used.
2020-06-24 23:49:59 +01:00
Vincent Sanders
85dea6eed3 remove unecessary headers from browser window 2020-05-25 23:52:39 +01:00
Vincent Sanders
b182cc7617 remove box handling from browser window 2020-05-25 20:37:06 +01:00
Vincent Sanders
860fbc2f8c make browser_window_update internal to browser window as intended 2020-05-25 13:45:54 +01:00
Vincent Sanders
5c02f9bd97 rename browser window internal redraw request function
remove confusing reference to boxes
2020-05-25 11:28:35 +01:00
Michael Drake
0432d95561 Browser window: Handle counting cookies when URLdb gives use none. 2020-05-23 22:28:00 +01:00
Daniel Silverstone
26df6ab7dd
misc: Add a present_cookies to guit->misc and use it
In order that we present the cookies window usefully, change
browser_window to request presentation of the cookies window
via a gui misc callback.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 21:18:46 +01:00
Daniel Silverstone
7d8ed91a7c
browser_window: Implement cookie counter
This is a fairly inefficient approach to counting the cookies
in use by a page, but it'll do for now.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 20:34:04 +01:00
Daniel Silverstone
dd43748676
fix: Make it OK if the chain isn't avilable during bad-ssl querying
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 09:38:51 +01:00
Daniel Silverstone
b28d3c2675
query/ssl: Include link to view certificate details
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 10:37:27 +01:00
Daniel Silverstone
e6c666d4f4
chore: Perform sslcert_viewer-ectomy
This removes the sslcert_viewer entirely from the code. Where
possible I've also trimmed out of frontends any code I think
should not be present.

Frontends should check and remove any further references that I
have failed to catch.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 09:01:39 +01:00
Vincent Sanders
95e0a24fac use content messages to inform frontend of text search changes 2020-05-13 14:31:39 +01:00
Vincent Sanders
fbc0847db0 move ssl certificate serialisation into a url to the ssl_cert utility code 2020-05-09 22:42:12 +01:00
Daniel Silverstone
9014dc7381
browser_window: Don't attempt to unref NULL lwc string
Fixes #2741

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 13:35:45 +00:00
Daniel Silverstone
677d757a6c
browser_window: Re-add clearing of loading_content in download
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 12:59:22 +00:00
Daniel Silverstone
efbfaa0cb1
JS: Move ownership of jsthread from browser to htmlc
Since it makes more sense for the htmlc to be responsible for
when the JS thread gets destroyed, move its lifetime from the
responsibility of the browser window to the html content.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:00:29 +00:00
Daniel Silverstone
66a23c2560
Browser: Split JS threads between current and loading
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 19:35:15 +00:00
Daniel Silverstone
17b28e85c1
JS: Split concept of JS context into heap and thread
In preparation for proper splitting of Javascript support into
heaps and threads, this renames the types and corrects the no-js
builds to still work.  At this time no substantive change in
semantics exists, and the duktape build won't work.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:30:41 +00:00
Daniel Silverstone
313dc9b099
JS: Remove unused slow script callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:07:50 +00:00
Michael Drake
82e74efeab Browser window: Clean up cert chains when bw is destroyed. 2020-03-12 17:35:28 +00:00
Michael Drake
82805f72e6 Browser window: Rework constification of bw for show_certificates. 2020-02-24 19:18:20 +00:00
Vincent Sanders
1a25234f20 implement browser_window_show_certificates 2020-02-24 18:56:15 +00:00
Daniel Silverstone
50ff8433da
browser_window: Use messages for unknown errors
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:47:23 +00:00
Michael Drake
21bbda23fa Browser window: Set the search string on show cookies.
We still need to tell the front end to open the cookies
window.
2020-02-24 08:55:26 +00:00
Daniel Silverstone
f3a0e9f0a1
browser_window: Various little SSL fixes
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:32:58 +00:00
Michael Drake
a39b651620 Browser window: Add stubs for new interfaces for page-info dialogue. 2020-02-23 17:38:14 +00:00
Michael Drake
d23a7b4c8f Browser window: Constify bw through page_info_state getter. 2020-02-23 17:38:14 +00:00
Vincent Sanders
0c34d06494 Keep the complete certificate chain from a fetch
Instead of extracting information from the X509 certificate chain in
the fetcher the entire chain is propagated in Distinguished Encoding
Rules (DER) format.

This allows all the information contained in a certificate chain to be
retained which can subsequently be presented to the user
2020-02-23 16:23:50 +00:00
Daniel Silverstone
1ecc36384d
browser_window: Propagate error code when handling errors
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:20:05 +00:00
Michael Drake
f39ce1a262 Browser window: Constify the bw in the URL access function. 2020-02-22 16:37:37 +00:00
Daniel Silverstone
277c1550f5
browser_window: Inform GUI about redirects and final URL
To correctly have the GUI know about all url bar updates, we
should inform it during the processing of redirects and we should
ensure that when we're in the ready-but-not-done phase we do not
use the fetch parameters but instead the content's known URL

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-22 16:24:36 +00:00
Daniel Silverstone
0fa5f81a52
Browser: Support requesting location focus
In the creation of a browser window it may be valuable to request
that the GUI focus the location input box.  This can be used when
the user requests a new tab/window to allow the entry box to be
focussed properly immediately.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-22 15:10:51 +00:00
Daniel Silverstone
f3bdee255d
Browser: Add FOREGROUND flag to window creation
To better support new-tab / new-window operations as well as
GUIs which want to allow tabs to open in the background by default,
add a flag to request a new browser window be foregrounded.  This
will allow us to simplify at least the GTK frontend a little.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-22 11:41:15 +00:00
Daniel Silverstone
b9cb2cab0b
browser_window: Don't use the fetch parameters for page info
In order to cope with redirects properly, use the content's URL
not the fetch parameters.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 21:56:41 +00:00
Daniel Silverstone
c4919105ba
browser_window: Remove spurious stopping of throbber
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 21:21:50 +00:00
Daniel Silverstone
b2f98e7092
browser_window: Dispatch page info notification on root browser
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 18:38:51 +00:00
Daniel Silverstone
92caa16cfc
Add missing unrefs
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:25:49 +00:00
Daniel Silverstone
7f628f7ee8
browser_window: Add an event for page info state change
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 16:06:56 +00:00
Daniel Silverstone
6fc2666d07
Allow contents to indicate if they believe they may not be secure.
HTML contents reference many other objects.  The browser window
needs to know if any of them may not be secure, in which case it
needs to report that in its page state.  If other content types
might refer to sub-contents, they will need to define the callback
too.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 15:49:08 +00:00
Daniel Silverstone
9741df214d
browser_window: Add basic page info state and SSL accessors
In order to begin work on the page info dialog, we need access
to the current page's state and SSL chain if available.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 15:01:24 +00:00
Daniel Silverstone
0840613ac2
browser_window: Set referer and flags in ssl error pathway
To make the SSL error pathway consistent with the other error
pathways, set the referer and the fetch parameter flags the same
as the others.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 14:46:16 +00:00
Vincent Sanders
cbb0c05258 remove unecessary user warning calls and improve error propogation in html box 2019-11-05 23:05:42 +00:00
Vincent Sanders
4b0c3f0efe add internal query handler for fetch errors
Any errors from the fetch which are not already handled are
  reported with an internal query page instead of a modal
  dialog.

This is much less invasive for the user and much more in
  keeping with how this is handled by other browsers.

The handler is similar to the timeout handler but the
  functionality is kept separate as it is intended timeout
  handling be extended in future.
2019-10-30 18:56:38 +00:00
Vincent Sanders
76eac19227 add internal query page for request timeouts 2019-10-29 22:29:22 +00:00
Vincent Sanders
6e7f98787a ensure all error messages have text if not provided by caller 2019-10-25 21:43:19 +01:00
Vincent Sanders
ff7dd5419f clear the favicon at the beginning of navigation 2019-09-29 22:07:08 +01:00
Vincent Sanders
b37fdcd7e2 re-indent browser window and cleanup comments
no functional change
2019-09-29 21:46:23 +01:00
Daniel Silverstone
cb33f696a2 browser_window: use about:blank if current_parameters is empty
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-23 21:57:04 +01:00
Daniel Silverstone
9a3f138f92 Browser: Do a better job of not leaking query URIs to the frontend
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 20:51:13 +01:00