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>
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>
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>
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>
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>
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.
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.
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.
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>
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>
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>
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>
* 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>
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>
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>