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
fb6186484e
Now contents types without mouse handling can set default pointer. Fixes standalone images showing e.g. link pointer if that was the last pointer before the standalone image loaded.
2012-08-17 10:02:41 +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
Michael Drake
fcb7143ecb
Simplify content status text setting.
2012-08-15 11:50:08 +01:00
Vincent Sanders
137bba2978
fix missing check of lwc_string_caseless_isequal() return value
2012-08-09 16:33:06 +01:00
Vincent Sanders
9b85ae106b
limit url debug output to 140 characters
2012-07-03 14:32:13 +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
Michael Drake
57547f7b1e
Make llcache_handle_get_url return a nsurl.
...
svn path=/trunk/netsurf/; revision=12905
2011-09-28 14:21:35 +00:00
John Mark Bell
033823e64e
Correctly create a sentinel and initialise user_list with it when cloning a content
...
svn path=/trunk/netsurf/; revision=12804
2011-09-18 00:49:34 +00:00
Michael Drake
19daa23f94
Only lock content around its reformat call. This means it is not now locked when reformat message is broadcast. Prevents the browser window callback asking the core to redraw a content before it gets unlocked.
...
svn path=/trunk/netsurf/; revision=12802
2011-09-17 14:35:54 +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
John Mark Bell
1cd92d6d50
Fix race when stopping an HTML content mid-load
...
svn path=/trunk/netsurf/; revision=12611
2011-07-19 20:23:59 +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
Michael Drake
3128ecf2a5
Unify content_redraw params in content_redraw_data struct. Core and RISC OS content handlers updated.
...
svn path=/trunk/netsurf/; revision=12529
2011-06-28 20:17:39 +00:00
Michael Drake
6f215b1f02
Enable content redraw request without hlcache_handle.
...
svn path=/trunk/netsurf/; revision=12518
2011-06-27 21:37:37 +00:00
Michael Drake
5a4c8916ef
If iframes are reformatted due to containing document reflow, don't need to redraw them since they will be redrawn when the containing document is redrawn. Make iframe handling more robust.
...
svn path=/trunk/netsurf/; revision=12497
2011-06-24 09:30:33 +00:00
John Mark Bell
1b8ff87c23
Squash static analyser warning
...
svn path=/trunk/netsurf/; revision=12419
2011-05-16 21:49:21 +00:00
Vincent Sanders
83f9e707eb
refactor content handler initilisation to use named initialisors
...
svn path=/trunk/netsurf/; revision=12341
2011-05-09 15:32:34 +00:00
Michael Drake
cf25f54364
Clear extraneous text when done..
...
svn path=/trunk/netsurf/; revision=12324
2011-05-09 07:59:27 +00:00
Vincent Sanders
8be1e85e91
consolidate content redraw
...
more cleanups ready for image content refactor
svn path=/trunk/netsurf/; revision=12317
2011-05-08 19:54:35 +00:00
Michael Drake
8f6c343309
Simplify status bar text.
...
svn path=/trunk/netsurf/; revision=12313
2011-05-08 19:11:34 +00:00
John Mark Bell
e71691bae8
Merge branches/jmb/content-factory to trunk
...
svn path=/trunk/netsurf/; revision=12283
2011-05-06 20:40:09 +00:00
John Mark Bell
1edcef6141
Remove redundant parameter from content_open API
...
svn path=/trunk/netsurf/; revision=11964
2011-03-10 23:13:03 +00:00
Chris Young
5ac45472c7
Fix broken CONTENT_PLUGIN API.
...
Add a default content handler for Amiga using the plugin interface, which passes
unknown files (currently images only) through DataTypes.
svn path=/trunk/netsurf/; revision=11924
2011-03-06 13:58:02 +00:00
Sven Weidauer
208b98bb44
Created content handler CONTENT_APPLE_IMAGE for Mac OS X that can handle all image file formats supported by Apples ImageIO framework. Right now used only for JPEG to get rid of libjpeg dependency.
...
svn path=/trunk/netsurf/; revision=11911
2011-03-05 09:49:15 +00:00
John Mark Bell
8373123b71
Purge CONTENT_STATUS_TYPE_UNKNOWN
...
svn path=/trunk/netsurf/; revision=11861
2011-02-28 20:38:23 +00:00
John Mark Bell
8d13c93c89
Remove bogus assertions: content handlers which spawn fetches may not transition out of the LOADING state until after the fetches have completed.
...
svn path=/trunk/netsurf/; revision=11860
2011-02-28 20:16:48 +00:00
John Mark Bell
abbf958b4c
Unlock the content when transitioning into the READY state.
...
svn path=/trunk/netsurf/; revision=11859
2011-02-28 19:58:08 +00:00
John Mark Bell
86a2e0076d
Fix bug #3194007 : stop emitting duplicate READY/DONE events.
...
* Make content handlers responsible for setting READY/DONE state & emitting events.
* Stop content_convert doing this when there is a registered convert function for the content type.
svn path=/trunk/netsurf/; revision=11850
2011-02-27 20:11:39 +00:00
John Mark Bell
f42ed976e5
Constify
...
svn path=/trunk/netsurf/; revision=11680
2011-02-14 19:17:08 +00:00
Michael Drake
fe7921a387
Pass clip rect as struct through content_redraw api. Update the front ends to use this. Note only RO build tested.
...
svn path=/trunk/netsurf/; revision=11670
2011-02-13 22:25:11 +00:00
Michael Drake
81f6f2552c
Better documentation of content_redraw
...
svn path=/trunk/netsurf/; revision=11645
2011-02-11 10:55:46 +00:00
Vincent Sanders
2a8e8a5cf1
add browser_window_redraw() method to make content_redraw calls from frontends common RISC OS, atari, amiga and beos have not been updated
...
svn path=/trunk/netsurf/; revision=11640
2011-02-10 22:35:41 +00:00
Chris Young
46617cbe64
Fix compilation
...
svn path=/trunk/netsurf/; revision=10929
2010-10-31 13:27:31 +00:00
Chris Young
835d033e7b
Amiga icon loader. Treeviews will now use the user's icons for content types.
...
svn path=/trunk/netsurf/; revision=10925
2010-10-30 14:23:38 +00:00
Chris Young
c0b63c111b
WebP image support, needs libwebp (from trunk/libwebp) and libvpx.
...
Only enabled for Amiga build currently, may have colour issues on little-endian CPUs
svn path=/trunk/netsurf/; revision=10860
2010-10-03 20:41:31 +00:00
John Mark Bell
2077918805
Merge branches/vince/netsurf-file-fetcher to trunk
...
r=jmb
svn path=/trunk/netsurf/; revision=10750
2010-09-09 21:45:59 +00:00
Michael Drake
b010a25771
+ Refactor input handling from browser window code into content
...
handlers.
+ Disentangle all box tree manipulation from browser window
code and put it where it belongs.
+ Move other content specific and other irrelevant code from
browser window handling to appropriate places.
+ Put mouse state enum in new mouse header, since it's not just
used by browser window code, and it is used by treeview
windows on the treeview branch.
svn path=/trunk/netsurf/; revision=10561
2010-06-04 09:35:08 +00:00
John Mark Bell
3958f3730b
Fix failed assertion in content_convert when process_data fails.
...
svn path=/trunk/netsurf/; revision=10425
2010-04-18 11:04:13 +00:00
John Mark Bell
be3b246eab
Add accessor for quirks
...
svn path=/trunk/netsurf/; revision=10415
2010-04-16 20:54:57 +00:00
John Mark Bell
34465a06ab
Remove fresh field from struct content
...
svn path=/trunk/netsurf/; revision=10413
2010-04-16 20:44:44 +00:00
John Mark Bell
e58a7d88f4
Make content_invalidate_reuse_data cause llcache to invalidate cache control data
...
svn path=/trunk/netsurf/; revision=10412
2010-04-16 20:43:36 +00:00
Vincent Sanders
d1cd04a0b9
remove incorrect low level cache release
...
svn path=/trunk/netsurf/; revision=10391
2010-04-13 16:53:52 +00:00
John Mark Bell
486731e589
Release low-level cache handle when destroying contents
...
svn path=/trunk/netsurf/; revision=10372
2010-04-11 20:58:50 +00:00
John Mark Bell
0650096403
CSS contents may be shared
...
svn path=/trunk/netsurf/; revision=10362
2010-04-11 16:38:16 +00:00
John Mark Bell
ff8791a3f7
Ensure content can be shared when retrieving from cache
...
svn path=/trunk/netsurf/; revision=10361
2010-04-11 16:37:39 +00:00
John Mark Bell
7577e2a1e6
Ensure quirks mode matches when retrieving contents from cache
...
svn path=/trunk/netsurf/; revision=10360
2010-04-11 16:34:23 +00:00
John Mark Bell
737d6ad557
Merge jmb/kill-reentrancy. r=vince
...
svn path=/trunk/netsurf/; revision=10346
2010-04-11 10:52:18 +00:00
John Mark Bell
4a4cc0d1bc
Introduce content_set_ready.
...
Make content_convert emit events only if content is in appropriate state.
Remove no-longer-relevant assertion from content_convert.
svn path=/trunk/netsurf/; revision=10330
2010-04-09 18:52:44 +00:00
John Mark Bell
bba7fbbd9b
Abort and release llcache handle on failure to process data.
...
Make hlcache retrieval ignore erroneous contents.
svn path=/trunk/netsurf/; revision=10296
2010-04-08 07:09:09 +00:00
Michael Drake
2fba2249ee
Add function to test whether hlcache_handle's content is locked.
...
svn path=/trunk/netsurf/; revision=10287
2010-04-07 18:50:18 +00:00
Michael Drake
236b6a15e1
Add mime-type getter.
...
svn path=/trunk/netsurf/; revision=10259
2010-04-07 09:12:09 +00:00
John Mark Bell
2748fe4f64
Make downloads work again.
...
svn path=/trunk/netsurf/; revision=10243
2010-04-05 21:35:38 +00:00
John Mark Bell
79ce683b4e
Most of a stop implementation.
...
Remaining work:
1) Clone content_html_data
2) Cloning content_css_data requires the charset of the old content
3) Calling hlcache_handle_abort() before a content has been created must clean up the retrieval context.
svn path=/trunk/netsurf/; revision=10236
2010-04-04 12:41:19 +00:00
John Mark Bell
43a99ab683
Constify data parameter to *_process_data
...
svn path=/trunk/netsurf/; revision=10234
2010-04-03 16:37:36 +00:00
John Mark Bell
49810d8191
Use mutator to modify content's title field.
...
svn path=/trunk/netsurf/; revision=10231
2010-04-03 11:55:28 +00:00
Chris Young
07537e5240
Fix compilation when building WITH_NS_SVG
...
svn path=/trunk/netsurf/; revision=10213
2010-03-30 18:12:21 +00:00
John Mark Bell
9aca901eb1
The convert stage of a content's state progression no longer reflows the content to the provided dimensions.
...
It is now defined as converting the content into a state in which it is ready for use.
The user of the content is now responsible for performing an initial reformat (sic) of the content before it can be redrawn.
Purge width/height parameters from hlcache_handle_retrieve/content_convert/*_convert APIs.
Fix up content handlers affected by the above change in semantics.
Ensure that browser_window_callback performs an initial reformat of its content.
svn path=/trunk/netsurf/; revision=10207
2010-03-29 22:33:21 +00:00
Daniel Silverstone
cb7412181f
Replace fetch_poll with llcache_poll throughout. Allow CONTENT_OTHER to complete properly.
...
svn path=/trunk/netsurf/; revision=10187
2010-03-28 16:00:54 +00:00
Daniel Silverstone
05a4eceae2
Remove fetchcache.[ch]
...
svn path=/trunk/netsurf/; revision=10183
2010-03-28 15:34:07 +00:00
Daniel Silverstone
270ef59a98
Merge jmb/new-cache; r=dsilvers,rs=vince
...
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
John Mark Bell
355799ce0b
Merge branches/MarkieB/gtkmain to trunk.
...
svn path=/trunk/netsurf/; revision=9729
2009-12-17 23:55:02 +00:00
John Mark Bell
3f4d79e576
This optimisation was so simple that it was broken.
...
svn path=/trunk/netsurf/; revision=9696
2009-11-22 14:24:53 +00:00
John Mark Bell
1c403cb2f8
svgtiny requires separate contents
...
svn path=/trunk/netsurf/; revision=9615
2009-10-08 12:03:44 +00:00
John Mark Bell
e580e2bea9
Hack around cache issue. The entire cache layer needs a redesign asap.
...
svn path=/trunk/netsurf/; revision=9460
2009-08-26 11:22:48 +00:00
John Tytgat
2261b616f6
- content/urldb.c(auth_data): Removed;
...
(prot_space_data): Added, it lives linked in the leaf host_part
struct and together with its scheme and port (which defins canonical root
url) and realm this defines a protection space.
(path_data): Removed auth_data field and replaced by a prot_space_data
pointer.
(host_part::prot_space): Added linked list of protection space data
structs.
(urldb_get_auth_details): Given an URL fetch fetches its auth.
(urldb_set_auth_details): Creates or updates the contents of a
protection space to which given URL belongs.
(urldb_destroy_host_tree): Delete protection data space structures
using urldb_destroy_prot_space.
(urldb_destroy_prot_space): Added.
- content/urldb.h(urldb_get_auth_details): Added realm parameter.
- content/fetchers/fetch_curl.c(fetch_curl_set_options): Update
urldb_get_auth_details call (we don't know realm at this point).
- content/fetchcache.c(fetchcache_callback, fetchcache_auth): At FETCH_AUTH,
use realm to determine if we really don't know auth data and if so,
refetch content.
- content/content.h(struct content): Add content::tried_with_auth.
- content/content.c(content_create): Initialize content::tried_with_auth.
- riscos/401login.c(ro_gui_401login_open): Show known authentication
data in dialogue so user can see what was wrong with it and correct it.
Solves bug #2830829 .
svn path=/trunk/netsurf/; revision=9045
2009-08-04 23:02:23 +00:00
John Mark Bell
ddeadd1c02
Merge LibCSS port to trunk.
...
svn path=/trunk/netsurf/; revision=8752
2009-07-23 23:05:34 +00:00
John Mark Bell
5feb7018c5
Replace parent_url with a pointer to the parent content.
...
svn path=/trunk/netsurf/; revision=8428
2009-07-10 00:26:37 +00:00
Michael Drake
c1439ae4e7
Comment content_redraw.
...
svn path=/trunk/netsurf/; revision=6355
2009-02-02 14:06:51 +00:00
François Revel
54a49823b5
Revert r5478, I didn't notice content struct had a mime_type field.
...
svn path=/trunk/netsurf/; revision=5480
2008-10-03 04:30:47 +00:00
François Revel
209c72b011
Add a function to tell the mime type for a content type.
...
svn path=/trunk/netsurf/; revision=5478
2008-10-03 03:40:42 +00:00
John Tytgat
2d1481fafc
'unsigned long' -> 'colour' where it made sense.
...
svn path=/trunk/netsurf/; revision=5459
2008-09-28 22:37:13 +00:00
Michael Drake
bbd40534c6
Treat image/jpg as JPEG content for Royal Mail captcha.
...
svn path=/trunk/netsurf/; revision=5343
2008-09-16 08:13:35 +00:00
Daniel Silverstone
d3270ed648
Add libpng support. Default to off.
...
svn path=/trunk/netsurf/; revision=5330
2008-09-15 20:23:02 +00:00
John Tytgat
611b558d0e
Constify content_type_name & content_status_name
...
svn path=/trunk/netsurf/; revision=4815
2008-07-30 00:54:43 +00:00
Rob Kendrick
e7c5e16b9b
Performance improvements: rather than calling content_clean() every poll, we now call it no more frequently than once every 5 seconds. Additionally, we cache the result of talloc_total_size() in content_clean() rather than calculating it twice. On large documents, this function took 25% of CPU time. This makes the fetching/rendering/scrolling/redrawing of large documents over twice as fast.
...
svn path=/trunk/netsurf/; revision=4527
2008-07-07 14:05:29 +00:00
James Bursa
8282253a54
Move struct cache_data from fetch to content as it is no longer needed by fetch. Make it a member instead of pointer in struct content.
...
svn path=/trunk/netsurf/; revision=4246
2008-06-03 01:10:46 +00:00
James Shaw
9402e110e9
Implement sprite support for GTK using librosprite
...
svn path=/trunk/netsurf/; revision=4051
2008-03-29 13:30:04 +00:00
John Mark Bell
89793c2171
Make content_reset actually do what it's meant to (i.e. reset the appropriate members)
...
Fix up CONTENT_MSG_REFRESH scheduled events to gracefully the refresh URL disappearing from under them.
svn path=/trunk/netsurf/; revision=3870
2008-02-27 18:38:41 +00:00
John Mark Bell
ad6fcea6b0
Add url_fragment to extract fragment from URL
...
Optionally allow url_compare to ignore fragments in comparison
Fix handling of url_compare result in a few places
Fix redirects which contain fragments in the Location header
svn path=/trunk/netsurf/; revision=3826
2008-02-03 12:04:48 +00:00
John Mark Bell
78d194cb77
Rework handling of HTTP redirects -- we now count the number of redirects followed for a given item and abort if a fixed limit is reached. This fixes sites which have pages that redirect to themselves.
...
Redirect handling is now transparent to clients of fetchcache.
The new scheme works as follows:
1) Request content for URL (fetchcache()
2) Start fetch of content (fetchcache_go()
3) If no redirect, continue through LOADING, READY, DONE etc. states as before
If redirect, receive NEWPTR for each redirect that occurs, then continue
through LOADING, READY, DONE etc. states as before.
The upshot of this is that redirects result in extra contents being created. It also means that, until LOADING has been received, the content (and thus the URL being fetched) may change. Therefore, fetchcache clients should expect to have to deal with transient data prior to LOADING occurring.
As a necessary side-effect of this, the HTML object URLs and CSS @import URLs are no longer stored alongside the relevant contents. These URLs can be accessed by interrogating the url member of struct content anyway, so it was a rather redundant scheme before.
svn path=/trunk/netsurf/; revision=3787
2008-01-28 01:35:00 +00:00
Vincent Sanders
2f864eeecc
Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
...
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
James Bursa
07c54283e3
Move window scaling from platform-specific code to desktop/browser.c. Modify gtk gui to handle scaling in the same way as RO.
...
svn path=/trunk/netsurf/; revision=3478
2007-08-07 03:55:18 +00:00
John Mark Bell
81f3fcbafd
Fix crash when building error page -- fetch will be NULL, so fetch_get_referer will fail.
...
svn path=/trunk/netsurf/; revision=3476
2007-08-06 22:17:04 +00:00
Michael Drake
d2c3d22f52
Change ArtWorks file MIME type to "image/x-artworks".
...
svn path=/trunk/netsurf/; revision=3449
2007-07-21 00:20:04 +00:00
John Mark Bell
04fb714f8e
Add SVG content name to content_type_name array.
...
svn path=/trunk/netsurf/; revision=3448
2007-07-21 00:14:15 +00:00
Rob Kendrick
1522bfeed6
Add incremental parsing of SVG data to librsvg content handler.
...
svn path=/trunk/netsurf/; revision=3441
2007-07-19 13:47:59 +00:00
Rob Kendrick
04292695be
Initial work on RSVG image handler. Still a lot to do.
...
svn path=/trunk/netsurf/; revision=3433
2007-07-18 17:58:35 +00:00
Rob Kendrick
59f358eb0f
Wrap internal SVG renderer with appropriate #ifdef WITH_NS_SVG
...
svn path=/trunk/netsurf/; revision=3432
2007-07-18 14:49:26 +00:00