Commit Graph

101 Commits

Author SHA1 Message Date
Marco Cawthorne cbd3105023
Fix against latest Netsurf - eukara 2022-09-17 00:05:32 -07:00
Vincent Sanders 5e31f045a0 Improve some documentation comments 2021-02-26 13:40:09 +00:00
Vincent Sanders 3cf92011c2 split out gtk misc operations from gui module 2021-02-22 23:04:02 +00:00
Vincent Sanders 49a515c808 Improve colour_lightness
Clearly document what colour_lightness does.
Fix the blue component value multiplier to be in bounds and correct value
2020-06-29 08:49:12 +01:00
Vincent Sanders 860fbc2f8c make browser_window_update internal to browser window as intended 2020-05-25 13:45:54 +01:00
Michael Drake 3626a5654e Plot style: Helper macro to get nearest of black and white. 2020-05-23 21:33:42 +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 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
Vincent Sanders ab952e0634 improve content header usage 2020-05-07 20:55:44 +01:00
Michael Drake 30b9c088b0 Plot style: Add half lighten/darken helper variants. 2020-04-07 21:28:12 +01:00
Chris Young 962431dd3d Rename mask to msk
There's something about "mask" which causes the version of GCC we use for the m68k-amigaos build to misinterpret the code
2020-03-06 20:15:52 +00:00
Michael Drake 82805f72e6 Browser window: Rework constification of bw for show_certificates. 2020-02-24 19:18:20 +00:00
Michael Drake 1e6b0f1d76 Plot style: Add helper to swap red and blue channels. 2020-02-24 18:22:03 +00:00
Daniel Silverstone 3602765e7f
inttypes: Add PRIu64
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 17:19:45 +00:00
Vincent Sanders f172a21df9 about scheme certificate viewer initial implementation 2020-02-24 16:59:18 +00:00
Daniel Silverstone 5a5670410b
ssl_certs: Add dup_into
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:31:10 +00:00
Michael Drake 8da6252f50 Browser window API: Add count for page state enum. 2020-02-23 17:38:14 +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
Michael Drake 475d397b8c Plot style: Add function to engorge a colour channel.
This can be used to exaggerate the red, green, or blue component.
2020-02-23 17:38:14 +00:00
Michael Drake 6783deba4e Plot style: Split lightness calc out of colour_to_bw_furthest macro. 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
Michael Drake f39ce1a262 Browser window: Constify the bw in the URL access function. 2020-02-22 16:37:37 +00:00
Michael Drake 194dfad4a5 Core window: Constify the core_window handle through the getters. 2020-02-22 16:37:37 +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 6f105c41c2
Add certificate-missing error code
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-03 09:41:58 +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 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 ea142abdd0 llcache: Reload SSL certificate data from serialised store
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 14:21:41 +00:00
Vincent Sanders dae0ff3d26 remove warning callback from miscelaneous function table 2019-11-11 16:59:28 +00:00
Vincent Sanders b37fdcd7e2 re-indent browser window and cleanup comments
no functional change
2019-09-29 21:46:23 +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 44f3846727 SSL Error: Enable OpenSSL hostname verification
Since OpenSSL 1.0.2 there has been hostname verification support
which cURL doesn't turn on for some reason.  Turn it on so that
we get better hostname verification handling.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-14 20:11:11 +01:00
Vincent Sanders 98f4525073 add common name ssl certificate error
This adds an ssl faliure code and explanation why curl fetcher
 does not currently set it.
2019-08-10 12:50:23 +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 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
Vincent Sanders 31ef86a016 remove unused interface 2019-08-03 22:02:39 +01:00
Vincent Sanders 357e8a8ad2 remove unnecessary browser_window_redraw_rect interface 2019-08-03 21:58:21 +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
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 552aab42e1 remove scaled parameter from get_dimensions 2019-08-02 12:26:20 +01:00
Vincent Sanders 5742762070 split browser and browser_window operations 2019-08-01 19:51:19 +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 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
Daniel Silverstone 8474c5d4c0 Logging: migrate and provide content interface
Migrate the console enums into netsurf/console.h and add
support so that contents can raise a message to log to
the console.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 22:17:10 +01:00