Commit Graph

2013 Commits

Author SHA1 Message Date
Daniel Silverstone
1cf1ec55bc Support SSL verification through new about: handler
In doing this, also propagate why the certificates were bad
so that the page can display a reason.  We will need FatMessages
for all these.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 13:15:23 +01:00
Daniel Silverstone
75349e79d8 browser_window: Improve history behaviour on internal nav
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 11:40:59 +01:00
Daniel Silverstone
8469f4cc8e Reimplement handling of BAD_AUTH inside browser_window
We now handle authentication requests via an `about:` page
which presents a nice form built into the browser window.
In order to do this, we add internal navigation as a concept
to the browser window and we strip the 401login support from all
frontends except monkey.

The 401login callback is now intended for password safe type support
rather than an immediately interactive prompt.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 11:26:47 +01:00
Michael Drake
03c6ae3812 Browser window navigate: Ensure child.quirks is initialised. 2019-08-05 21:44:51 +01:00
Daniel Silverstone
99984dfc57 browser_window: Stop the throbber right at the end of handling errors
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 21:29:18 +01:00
Daniel Silverstone
170dc5d524 Excise the llcache query pathway.
In further preparation for the auth and cert queries being handled
as special contents from `about:` this excises the query pathway
from the llcache pretty much entirely.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 20:56:07 +01:00
Daniel Silverstone
bfb1bb1192 Migrate SSL certificate storage to the browser window
* Fetchers now provide the certificates before headers
* This is propagated all the way to the browser window
* When a query occurs, we retrieve it from there and fire
  the query with those stored certificates.
* The serial number is a bignum, store it as hex.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 18:12:47 +01:00
Daniel Silverstone
bccf101714 browser_window: Add fetch parameters and split navigate
In order to support future reload/strange navigations, split
the navigate function into two and add a stored parameters
structure which can be used to regenerate any fetch.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 15:44:55 +01:00
Daniel Silverstone
6ba199c7d7 Content messages: Remove ERRORCODE, rework ERROR
This reworks CONTENT_MSG_ERROR to be structured data and
removes the CONTENT_MSG_ERRORCODE message kind.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 14:30:30 +01:00
Vincent Sanders
2171f13ab3 enable gnu extensions to get strcasestr from string.h 2019-08-05 10:01:13 +01:00
Vincent Sanders
077237a4df remove core snapping for values set in absolute mode 2019-08-04 16:47:23 +01:00
Vincent Sanders
3be2b98cc2 change browser_window_drop_file_at_point() to take unscaled coordinates 2019-08-04 14:24:33 +01:00
Vincent Sanders
f21c41a2e5 change browser_window_redraw to use unscaled coordinates 2019-08-04 11:25:35 +01:00
Vincent Sanders
b2f5c80ef8 trivial documentation cleanups 2019-08-04 11:25:35 +01:00
Daniel Silverstone
1905200154 Add content handlers for queries
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-04 11:22:40 +01:00
Daniel Silverstone
3bd7a2ddd6 desktop: Expose llcache query handler temporarily
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-04 11:22:40 +01:00
Vincent Sanders
357e8a8ad2 remove unnecessary browser_window_redraw_rect interface 2019-08-03 21:58:21 +01:00
Daniel Silverstone
4e95b7aedf download: Include log.h
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-03 21:53:34 +01:00
Daniel Silverstone
09eb89e3c3 Migrate query dispatch up from llcache to hlcache
As a first step in refactoring query handling to be managed
by `browser_window`, this migrates the calling of the query
handler from the llcache object code up to the hlcache.

In theory this may result in multiple queries happening for one
object, but we mitigate multiple-responses in the llcache so
all should be well.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-03 21:13:19 +01:00
Daniel Silverstone
1866f3a3d1 local_history: Improve up/down navigation
When pressing up/down on a node when you can't go up/down the
window will now search for a parent node which is a child of
a branching point, and move to that and try again for the up/down
movement.  This makes it slightly more intuitive to move through
the tree.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-03 17:14:14 +01:00
Michael Drake
342b65fd76 Corewindow helper: Add documentation for cw_helper_scroll_visible() 2019-08-03 16:38:09 +01:00
Michael Drake
3938d5340b Corewindow: Sanitise scrolling API.
Now the core has a helper so that all the front ends don't need
to implement the scroll to show area API.

Now they simply have get and set scroll APIs.
2019-08-03 15:57:23 +01:00
Michael Drake
8cff4b79d6 Corewindow helper: Add helper to scroll to visible rectangle.
This takes the algorithm from the GTK front end and puts it in the
core, so it doesn't need to be implemented for every front end.
2019-08-03 15:54:46 +01:00
Vincent Sanders
402e16e5d1 improve browser_window_set_scale
Allow scale setting to use an absolute value or a relative value. This
also imposes sanity limits on the scale range (currently 0.2 to 10.0)
and removes the old junk "all" parameter.
2019-08-03 15:50:43 +01:00
Vincent Sanders
d4c01894c2 change browser_window_get_features to use unscaled coordinates 2019-08-03 14:29:06 +01:00
Vincent Sanders
0ebfff259f change browser_window_mouse_track to use unscaled coordinates 2019-08-03 14:29:05 +01:00
Vincent Sanders
0a8ed41a1a change browser_window_mouse_click to use unscaled coordinates
this means frontends no longer need to scale mouse click events thus
simplifying their implementation.
2019-08-03 14:29:05 +01:00
Daniel Silverstone
acad436d68 treeview: Support scrolling to the highlighted node
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 21:34:53 +01:00
Michael Drake
813a284e9e Local history: Consolidate thumbnail dimensions. 2019-08-02 21:23:06 +01:00
Michael Drake
ab03b204ba Local history: Treat thumbnail dimensions as CSS pixels. 2019-08-02 21:10:15 +01:00
Daniel Silverstone
818f4018d2 local_history: Handle keys for navigating local history
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 20:59:47 +01:00
Daniel Silverstone
1ee32fe962 local_history: Add concept of a cursor to the local history
So that we can eventually navigate around local history by
keyboard, add the concept of a history cursor to the local
history core window.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 20:59:08 +01:00
Vincent Sanders
552aab42e1 remove scaled parameter from get_dimensions 2019-08-02 12:26:20 +01:00
Vincent Sanders
4ae27a6592 remove scaling from internal browser get_dimensions calls 2019-08-02 12:26:19 +01:00
Michael Drake
de12be4e9c Browser window: Make invalidate gui callback use unsacled coordinates. 2019-08-01 22:34:13 +01:00
Vincent Sanders
7f612548e7 reformat and tidy up browser window code ready for corewindow changes 2019-08-01 19:51:19 +01:00
Vincent Sanders
5742762070 split browser and browser_window operations 2019-08-01 19:51:19 +01:00
Vincent Sanders
83c9d2017f Fix clamping in commit fa64763b0d 2019-08-01 14:38:20 +01:00
Daniel Silverstone
fa64763b0d browser_history.c: Clamp contents to be 1x1 at min.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 09:29:22 +01:00
Daniel Silverstone
22ee6621fe treeview: Correct mis-freeing in treeview_create error path
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 09:04:17 +01:00
Vincent Sanders
f4878b4c17 Update version for next development cycle 2019-07-17 11:39:46 +01:00
Vincent Sanders
cfdaf181a2 cleanup browser window message handling
separate out ready and done message processing to make the code
 more readable.

remove checking of content status as content_close() handles that
 itself.
2019-07-10 17:08:29 +01:00
Daniel Silverstone
03624bcf7a browser.c: Don't require > 0 chars in logging
Sometimes JavaScript chooses to log an empty string.  We should
honour that by requiring msg be a valid empty string.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:20:17 +01:00
Daniel Silverstone
c47cc08883 Ensure we set the defaults for the log options to those compiled in
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-28 20:49:12 +01:00
Michael Drake
b38f7cc718 Browser window: Handle the content msg for getdims. 2019-05-06 15:38:33 +01:00
Michael Drake
a4da4612c2 Logging: Bump lwc leak exit report to WARNING level. 2019-05-06 13:06:22 +01:00
Daniel Silverstone
6fdc692aa5 Support DEBUG log level in console_log
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 10:16:48 +01:00
Daniel Silverstone
0312c45d6f Use console_log from browser_window_console_log
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 09:49:46 +01:00
Daniel Silverstone
d240174741 Add console_log to gui tables
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 09:49:11 +01:00
Vincent Sanders
35bc2ccbb8 change content get_source_data interfaces to return uint8_t and size_t
previously these interfaces returned char * and unsigned int which was
undesirable.
2019-05-05 22:50:25 +01:00