Commit Graph

68 Commits

Author SHA1 Message Date
Vincent Sanders
3a7fc30a5f implement content opacity check through the function table 2020-05-13 19:03:14 +01:00
Vincent Sanders
f4e50b45c8 make free text search content handler agnostic 2020-05-12 23:22:05 +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
Vincent Sanders
c2f9bcac19 remove junk content_add_error api 2020-05-06 22:54:52 +01:00
Vincent Sanders
b832bfaea8 remove unused junk error values from content struct
saves over half a kilobyte for every content
2020-05-06 22:22:16 +01: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
Vincent Sanders
185d034323 make mouse track and mouse action content handlers return an error code 2019-11-12 22:48:00 +00:00
Daniel Silverstone
2be3ebd918 content: Rename content_broadcast_errorcode()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 15:25:15 +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
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
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
07242c7415 Content: Make the content structure aware of viewport height.
It was always aware of viewport width, but since adding support for
vh CSS units, the HTML content handler also needs viewport height.

Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-02-17 09:06:58 +00:00
Michael Drake
e94fe1632e Content API: Avoid content message copy in content user callback. 2017-08-26 16:38:18 +01:00
Michael Drake
d70beb28db Content API: Make content_broadcast take pointer to content_msg_data. 2017-08-26 15:50:03 +01:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
974a4a21e1 split out the layout glyph sizing and splitting API
This refactors the core "font" sizing API to be handled through gui
 function tables similar to every other core/frontend calling API.
2016-04-23 23:32:21 +01:00
Vincent Sanders
10ef7b3f1d update content wallclock timing to use monotonic time interface 2016-04-20 22:58:48 +01:00
Vincent Sanders
a6dd92c571 use monotonic clock call for html reflow timing 2016-04-20 19:18:15 +01:00
Vincent Sanders
392307bb1f reduce content header interdependancy 2016-04-18 23:04:16 +01:00
Chris Young
a0e41a46a3 Stop GIF animations when they are no longer in use, instead of waiting until they are destroyed. 2016-02-11 19:23:32 +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
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
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
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
Vincent Sanders
2fef76db15 add errorcode content broadcast API 2012-11-26 17:32:47 +00:00
Vincent Sanders
c1671f37b1 reduce talloc usage to box tree layout only 2012-10-03 19:26:17 +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
fcb7143ecb Simplify content status text setting. 2012-08-15 11:50:08 +01:00
John Mark Bell
f2993e6ed0 content_get_url -> hlcache_handle_get_url, content__get_url -> content_get_url
svn path=/trunk/netsurf/; revision=13236
2011-12-04 14:55:23 +00:00
Michael Drake
02780e1f2d Currently untested (and unused) "drop file on content" handling, and HTML implementation.
svn path=/trunk/netsurf/; revision=13214
2011-12-01 21:49:57 +00:00
Michael Drake
4856a4c1fb Pass scroll wheel action into contents. Handle scrolling of box scrollbars and iframes.
svn path=/trunk/netsurf/; revision=13200
2011-11-29 17:47:29 +00:00
Vincent Sanders
230779848e metadata links stored in contents
browser uses metadata links for favicons

svn path=/trunk/netsurf/; revision=12977
2011-10-07 18:12:47 +00:00
Michael Drake
36eff6da2b Port more internals to nsurl. Front ends may need updating.
svn path=/trunk/netsurf/; revision=12926
2011-10-03 15:56:47 +00:00
John Mark Bell
339bed7272 Virtualise content handler finalisation calls. Remove pointless implementations.
svn path=/trunk/netsurf/; revision=12797
2011-09-15 22:47:50 +00:00
Michael Drake
4075648e7a Content interface to get at contextual content at point.
svn path=/trunk/netsurf/; revision=12753
2011-09-06 18:07:30 +00:00
John Mark Bell
9ee4f6146e Remove mime_type parameter from content handler content_type callback API
svn path=/trunk/netsurf/; revision=12704
2011-09-03 09:27:42 +00:00
Vincent Sanders
2348b13492 refactor bitmap out of generic content structure
svn path=/trunk/netsurf/; revision=12686
2011-08-31 12:12:41 +00:00
John Mark Bell
dc6c58ec41 Fix transition from LOADING to ERROR state after content has been locked for conversion
svn path=/trunk/netsurf/; revision=12614
2011-07-20 21:39:51 +00:00
Michael Drake
9c91893028 Fix selection for non-gui browser windows (iframes).
Selection no longer uses current_redraw_browser.
Fix long-standing selection bugs on platforms that use action on release behaviour.

svn path=/trunk/netsurf/; revision=12598
2011-07-13 13:20:26 +00:00
Michael Drake
eddae6af06 Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
2011-06-30 15:48:07 +00:00