Commit Graph

2052 Commits

Author SHA1 Message Date
Vincent Sanders
55ba27c68f re-order config include so strcasecmp is correctly detected on RISC OS/win32 2019-12-22 11:11:04 +00:00
Vincent Sanders
bacd8d229c make RISC OS specific window_screen_ options limited to that frontend 2019-12-20 12:59:28 +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
dae0ff3d26 remove warning callback from miscelaneous function table 2019-11-11 16:59:28 +00:00
Vincent Sanders
92fff918cc fix "may be used uninitialised" warning 2019-11-06 08:23:27 +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
78aa34e5d7 remove user warnings from hotlist load and curl poll 2019-11-05 00:07:06 +00:00
Vincent Sanders
7c63f5f66b improve error returns throughout complete save and remove user warnings 2019-11-04 23:39:13 +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
Michael Drake
5aeca580f4 save complete: Change de-duplication to compare URLs, rather than contents.
We seem to have more than one content for the same resource.

For example:

* save `<img src="about:logo"><img src="about:logo">` as img-test.html
* run `rm -rf test-save && make && ./nsgtk img-test.html`
* ctrl+s
* save as "test-save" in the current netsurf dir.
* run `md5sum test-save/*`

before and after this commit.  The de-duplication works with URLs,
where it wasn't working with hlcache_handles or contents.
2019-10-26 12:51:17 +01:00
Michael Drake
044ddd5d43 save complete: ctx_find_content: compare contents, not hlcache_handles
There can be multiple hlcache_handles per sharable content.
2019-10-26 12:42:38 +01: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
da7c750efd fix some formatting in save complete 2019-10-24 22:21:43 +01:00
Vincent Sanders
699cc7deee ensure save_complete resources are correctly finalised before quit 2019-10-24 22:20:57 +01:00
Vincent Sanders
bb60859535 resolve leak of attribute value lwc string in complete save 2019-10-24 22:19:52 +01:00
Vincent Sanders
d0359bc957 fix save_complete usage of posix regex so it does not run off the end of strings 2019-10-21 23:44:01 +01:00
Vincent Sanders
f64b37b29f make download core store size in at least 64bits to allow for large files 2019-10-19 19:43:00 +01:00
Vincent Sanders
4745fcf1c7 add regex compatability to utils and enable it for serenity OS 2019-10-12 14:50:49 +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
Vincent Sanders
2e8861dc05 make web search icon setting work properly 2019-09-21 10:53:41 +01:00
Daniel Silverstone
63fc84a25f netsurf_exit(): Finalise DOM namespace strings
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-07 15:39:59 +01:00
Daniel Silverstone
4065f1e027 netsurf_exit(): Release user-agent string on exit
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-07 15:23: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
Daniel Silverstone
2538d05bb4 browser: Turn internal nav URLs into corestring_nsurls
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 20:50:54 +01:00
Daniel Silverstone
b67bbe3280 browser_window: Ensure that back works like 'back to safety'
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 20:33:52 +01:00
Vincent Sanders
6bce06b91f fix spelling mistakes from miscellaneous event commit 2019-08-20 16:38:51 +01:00
Vincent Sanders
4dc4d8b318 add miscellaneous event to browser window callback table
extend the browser window callback table with a miscallaneous event
 entry. This is used to replace all browser window callbacks which
 take no parameters.

This reduces the API surface from seven separate calls to a single
 call with an enumeration which may be readily extended.

The initial implementation in the frontends simply calls the original
 implementations to reduce scope for errors.
2019-08-20 00:16:52 +01:00
Daniel Silverstone
c903c881e6 browser_window: handle 'back to safety' cleanly
In order to ensure we actually go back to safety, clear the
curent loading parameters, and transfer the load parameters
for where we're going into them to be closer to a real navigate,
otherwise we end up copying the wrong loading parameters over
the top when we complete the back-to-safety navigation.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-14 19:31:45 +01:00
Vincent Sanders
a3c3b2fa97 make internal url navigation check safe 2019-08-12 11:16:12 +01:00
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