Commit Graph

184 Commits

Author SHA1 Message Date
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 95e0a24fac use content messages to inform frontend of text search changes 2020-05-13 14:31:39 +01:00
Vincent Sanders 3c7538a9f9 hoist common text search out of content handlers 2020-05-12 21:09:41 +01:00
Vincent Sanders ab952e0634 improve content header usage 2020-05-07 20:55:44 +01:00
Vincent Sanders 5f8b1497e1 clean up content headers and documentation comments
pure formatting and documentation changes, no code difference
2020-05-06 23:38:50 +01: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
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
Vincent Sanders 214478fc15 Improve some content documentation comments 2020-02-23 16:17:51 +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
Michael Drake 8e1154eb1c Content: Remove redundant and unused redraw message fields.
This was archaic support for rendering images as "overlays",
and avoiding a redraw via the browser window redraw and HTML
contents.  Basically it was "plot this image here", but it
was too error prone, so it was removed a long time ago.

These are some last vestiges that made the redraw message
look more complex than it is.
2019-11-11 21:54:15 +00: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 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
Daniel Silverstone b48e462f0f content, hlcache: Propagate query events upward
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-04 11:22:40 +01:00
Vincent Sanders c2fa6af0ff make content close check the content status itself
make content handler open and close return error status
2019-07-10 16:42:52 +01:00
Michael Drake 6ad7b3e608 Content: Add content message to get viewport dimensions. 2019-05-06 15:38:33 +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
Daniel Silverstone f3892c98fd Add content_exec and associated vtable entry
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 16:00:03 +01:00
Michael Drake e94fe1632e Content API: Avoid content message copy in content user callback. 2017-08-26 16:38:18 +01:00
Vincent Sanders 76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders 8711fbe47d move mouse and pointer state header into public API 2016-05-30 12:10:08 +01:00
Vincent Sanders 392307bb1f reduce content header interdependancy 2016-04-18 23:04:16 +01:00
Vincent Sanders ea2e1c4d98 Add scaled content redraw interface.
Add a new interface to the content to allow automaticaly scaled
content redraws. This is intended to replace the thumbnail_redraw
interface with something more generic.
2015-04-23 15:47:28 +01:00
Michael Drake cbd9d710a3 Use forward declaration instead of #include for nsurl. 2015-02-26 16:14:23 +00:00
Vincent Sanders 56bb1b03c5 Doxygen cleanups 2014-11-09 12:50:30 +00:00
Vincent Sanders 5562c9a553 Continue doxygen error cleanup. 2014-11-08 22:08:29 +00:00
Vincent Sanders 05a64bfde9 fix up more doxygen errors 2014-11-08 16:49:32 +00:00
Vincent Sanders 3405803280 Improve content encoding information API
Extend the content_get_encoding() API to retrieve the source of
the encoding as well as the actual encoding.
2014-11-07 12:33:34 +00:00
Vincent Sanders 8c2cfecfb5 Allow content handlers to have debug values set through API
Previously content handler debugging features were accessed by global
variables. This allows the setting of debugging parameters via a
content API giving per content control over debugging features.
Currently only used by the html content handler to toggle global
redraw debugging.
2014-11-06 22:51:46 +00:00
Vincent Sanders 8ec7ad053a Make the fetching of a contents encoding generic.
The frontends previously had to use an html renderer API to get the
encoding of a content. This also required the explicit checking of the
contents type rather than using the existing content API to abstract
this knowledge.
2014-11-05 23:44:31 +00:00
Vincent Sanders bdfedb686b replace save_link operation table entry usage of textural url with nsurl 2014-11-03 23:05:59 +00:00
Vincent Sanders c31c4babe1 Change contextual content retrieval to browser features.
Update the API which allows frontends to acquire the page features
(images, link urls or form elements) present at the given coordinates
within a browser window.

By making this an explicit browser_window API and using the browser.h
header for the associated data structure with a more appropriate API
naming the usage is much more obvious and contained.

Additionally the link url is now passed around as a nsurl stopping it
being converted from nsurl to text and back again several times.
2014-11-02 15:46:42 +00:00
Michael Drake b27f3e5ac4 Open select menu via content msg, instead of breaking encapsulation.
Fixes bw deref and browser_private.h #include in render/
2014-10-24 17:57:15 +01:00
Vincent Sanders af16c38d2d fix DOM tree dump debug 2014-08-04 00:37:21 +01:00
Vincent Sanders 4d4d74c8cd move page search gui callbacks to their own operations table 2014-03-18 22:32:52 +00:00
Rob Kendrick 0d7f1cfc93 Add infrastructure for calling front ends to set file gadget filenames via clicking in addition to drag-and-drop 2014-01-05 16:04:35 +00:00
Michael Drake ba9769bc8c Pass fetch redirect info up to content layer as content_msg. Mark redirect origin URLs as visited in browser window content callback. Note this doesn't mean we track redirects, it just lets us get the :visited link style on links that redirect. 2013-05-27 14:51:00 +01:00
Michael Drake 3afd9c9731 Remove search context from browser window, simplify search interface for front ends.
Added content interface for search.

Removed bw->cur_search search context. Desktop layer now does nothing
except pass search requests from front end onto the bw's current_content
via the content interface.

Search API reduced to a pair of functions at each level:
  {desktop|content|html|textplain}_search
and
  {desktop|content|html|textplain}_search_clear

Updated front ends to use simplified search API.  Only tested GTK and RO builds.

These confine the search stuff to render/.  However search still uses struct
selection.  The handling for which is still spread over desktop/ and render/.
Also the render/search code itself still fiddles inside html and textplain
privates.
2013-05-07 14:41:40 +01:00
Michael Drake c2a718075a A load of refactoring of how content selection and input work.
Keypresses now go via content interface.
Contents don't shove the selection object into browser windows any more.
Contents report selection existence by sending message.
HTML content keeps track of where selections in it exist.
Contents report whether they have input focus via caret setting msg.
Caret can be hidden (can still input/paste) or removed.
Consolidate textarea selection handling.
Make textarea report its selection status changes to client.
Various textarea fixes.
Changed how we decide when to clear selections, and give focus.
2013-02-22 12:19:35 +00:00
Michael Drake 4747bbbfb2 HTML drags now go via content msg. 2013-02-08 13:22:53 +00:00
Michael Drake 147f2bd08a Remove content_msg for PASTE, since it doesn't need a gui_window to get the buffer from the front end now. 2013-01-08 16:53:00 +00:00
Vincent Sanders f18bbd48c7 Improve error handling in html content 2012-10-17 21:52:43 +01:00
Michael Drake daf10f00a6 API for content debug dump. 2012-08-20 16:03:45 +01:00
Michael Drake edef40bbc4 Don't pass struct box to content open. 2012-08-20 14:22:28 +01:00
Michael Drake 57d2e31e59 Avoid using hlcache_handle for drag saves in html_interaction. Drag save msg with NULL content now means save the content which sends the message. 2012-08-19 12:46:42 +01:00
Michael Drake a2906b3994 Add paste request content message. 2012-08-18 22:19:15 +01:00
Michael Drake 142a0bf859 Add content message for setting mouse pointer. 2012-08-17 10:01:15 +01:00
Michael Drake 402de7572d Use new content message for saving of hyperlink target URL. 2012-08-16 23:26:05 +01:00
Michael Drake 1919c8e071 Add message for content wanting wanting drag save to start. 2012-08-16 20:20:49 +01:00
Michael Drake e5374cc042 Let contents broadcast explicit status messages as well as announce that their internal status has been updated. 2012-08-15 19:00:50 +01:00