Commit Graph

146 Commits

Author SHA1 Message Date
John Mark Bell 3a56b67d95 Add missing #include.
Fix guard macro -- how long has this been wrong, I wonder?

svn path=/trunk/netsurf/; revision=6069
2009-01-15 15:58:35 +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
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
John Mark Bell dc85ddb0a8 Launch redirects to unsupported URLs in other applications.
svn path=/trunk/netsurf/; revision=4098
2008-04-19 11:07:42 +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
Rob Kendrick 4ec38922ac Change meaning of c->redraw_time to be the earliest time to reflow during page asset fetch. Have the time selected vary depending on how long the last reflow took.
svn path=/trunk/netsurf/; revision=3925
2008-03-11 00:14:39 +00:00
Michael Drake bae61d9224 Periodically reflow the page while fetching a page's objects. Make buffer all rendering default.
svn path=/trunk/netsurf/; revision=3874
2008-02-29 23:03:26 +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
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
James Bursa afc9517fbd Add CONTENT_SVG to content handling.
svn path=/trunk/netsurf/; revision=3406
2007-07-13 03:54:47 +00:00
Daniel Silverstone 6807b4208a Remove the netsurf/ from the include paths and rationalise use of <> vs "" in includes
NetSurf includes are now done with ""s and other system includes with <>s as C intended.
The scandeps tool has been updated to only look for ""ed includes, and to verify that the
files exist in the tree before adding them to the dependency lines. The depend rule has
therefore been augmented to make sure the autogenerated files are built before it is run.

This is untested under self-hosted RISC OS builds. All else tested and works.


svn path=/trunk/netsurf/; revision=3307
2007-05-30 22:39:54 +00:00
Richard Wilson 7368688642 Dynamically update scale view (implement 1556975) and prevent double redraws.
svn path=/trunk/netsurf/; revision=3191
2007-03-03 19:46:20 +00:00
Rob Kendrick 7c88381a59 Make time taken that is displayed in status bar use gettimeofday()-based time rather than clock()-based time
svn path=/trunk/netsurf/; revision=3157
2007-01-30 15:32:31 +00:00
James Bursa bda01b3135 Fix parsing error when an empty HTML data is returned. Add HTTP status and other information to status bar.
svn path=/trunk/netsurf/; revision=3140
2007-01-13 00:21:15 +00:00
James Bursa b6b768f521 Improved tracking of memory usage. c->size is now exclusive of talloc size, and the two are added to find the full size.
svn path=/trunk/netsurf/; revision=3103
2006-12-03 22:34:26 +00:00
Michael Drake ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
James Bursa 65b356ba75 Documentation moved to Docs/01-content
svn path=/trunk/netsurf/; revision=3050
2006-11-11 19:46:51 +00:00
Richard Wilson 60ea34ad48 [project @ 2006-02-26 02:25:19 by rjw]
Add support for ICO files.

svn path=/import/netsurf/; revision=2096
2006-02-26 02:25:19 +00:00
Richard Wilson da4a9313f1 [project @ 2006-02-25 18:50:34 by rjw]
Support for BMP files

svn path=/import/netsurf/; revision=2095
2006-02-25 18:51:51 +00:00
John Mark Bell d4d3e5ee1c [project @ 2006-02-23 15:06:53 by jmb]
Handle invalid SSL certificates better - UI still needs work.
Modify fetch callback data parameter type to remove compiler warnings.
Constify things.
Lose global ssl_verify_certificates option.
Fix issue when closing a dialog without input focus.

svn path=/import/netsurf/; revision=2092
2006-02-23 15:06:54 +00:00
Richard Wilson 4cc85469cb [project @ 2006-02-21 20:49:11 by rjw]
Allow any content to be used as a background. Simplify bitmap code.

svn path=/import/netsurf/; revision=2087
2006-02-21 20:49:12 +00:00
James Bursa 415254c326 [project @ 2006-02-12 23:07:28 by bursa]
Rewrite handling of text/plain contents. Now rendered directly instead of converting to HTML.

svn path=/import/netsurf/; revision=2078
2006-02-12 23:07:28 +00:00
John Mark Bell 0f228ada91 [project @ 2006-02-06 00:10:09 by jmb]
Implement HTTP caching algorithm; this should avoid stale cache entries being used.

svn path=/import/netsurf/; revision=2059
2006-02-06 00:10:09 +00:00
John Mark Bell 0f77b057a1 [project @ 2006-01-25 06:52:38 by jmb]
Meta refresh support

svn path=/import/netsurf/; revision=2039
2006-01-25 06:52:38 +00:00
Adrian Lees 1efd4796a2 [project @ 2005-12-10 14:31:32 by adrianl]
ArtWorks support

svn path=/import/netsurf/; revision=1891
2005-12-10 14:31:33 +00:00
James Bursa 972392ef66 [project @ 2005-10-30 21:22:19 by bursa]
Add index parameter to content_open().

svn path=/import/netsurf/; revision=1872
2005-10-30 21:22:19 +00:00
James Bursa 08e8ee3ed1 [project @ 2005-08-21 12:04:17 by bursa]
Change void * parameters to intptr_t to make them correct for storing integers or pointers.

svn path=/import/netsurf/; revision=1852
2005-08-21 12:04:18 +00:00
James Bursa 9741deb831 [project @ 2005-07-05 22:43:38 by bursa]
Add locked attribute to content structure and use it to ignore content_redraw() during _convert() or _reformat().

svn path=/import/netsurf/; revision=1787
2005-07-05 22:43:38 +00:00
Richard Wilson 92743be24d [project @ 2005-04-05 02:36:33 by rjw]
Reduce re-allocation of memory when receiving files (drastically increases the speed of loading large files locally). Sprite files no longer require two copies of their data.

svn path=/import/netsurf/; revision=1598
2005-04-05 02:36:33 +00:00
John Mark Bell 77de9c1336 [project @ 2005-01-03 02:09:20 by jmb]
Shift + Click == download

svn path=/import/netsurf/; revision=1429
2005-01-03 02:09:20 +00:00
John Mark Bell 8334683068 [project @ 2005-01-02 03:58:20 by jmb]
xcalloc/xrealloc/xstrdup-purge - Lose remaining calls (and purge the relevant functions from utils.c)

svn path=/import/netsurf/; revision=1419
2005-01-02 03:58:21 +00:00
Richard Wilson 403f12872d [project @ 2004-10-04 23:54:42 by rjw]
Moved GIF file reading to image/, optimisation of plotting for GIFs, JNGs, PNGs and JPEGs, initial work for toolbar customisation. Possibly some other things too.

svn path=/import/netsurf/; revision=1301
2004-10-04 23:54:42 +00:00
James Bursa 3371a27391 [project @ 2004-09-03 22:44:47 by bursa]
Add generic bitmap functions. Move jpeg and mng code from riscos/ to image/ and update to use bitmap. Note: background tiling and drawfile export for jpeg and mng/png are broken.

svn path=/import/netsurf/; revision=1265
2004-09-03 22:44:48 +00:00
John Mark Bell 006344401c [project @ 2004-08-15 19:06:23 by jmb]
Rationalise image redraw.
Supply background colour when redrawing contents
Reenable printing of background images
Require Tinct 0.07

svn path=/import/netsurf/; revision=1234
2004-08-15 19:06:24 +00:00
James Bursa acfb4c0adb [project @ 2004-08-11 22:08:25 by bursa]
Remove content_add_instance(), content_remove_instance(), content_reshape_instance(). Add content_open(), content_close(). Implement for CONTENT_HTML.

svn path=/import/netsurf/; revision=1213
2004-08-11 22:08:26 +00:00
James Bursa bc727dda1c [project @ 2004-08-11 19:02:32 by bursa]
Start work on removing instances and making content types non-shareable. Clean up some #includes.

svn path=/import/netsurf/; revision=1211
2004-08-11 19:02:32 +00:00
John Mark Bell 912d09b1cb [project @ 2004-08-11 16:26:13 by jmb]
Make content_redraw return a bool
Printing of foreground images now uses OS_SpriteOp
Printing of background images disabled
Mega-paranoid SWI result checking in htmlredraw.c
Rearranged GIF data structure slightly - updates to reflect this.
Other stuff I've probably forgotten

svn path=/import/netsurf/; revision=1208
2004-08-11 16:26:13 +00:00
James Bursa 54d25de371 [project @ 2004-07-30 16:16:07 by bursa]
Implement content_quit() and ro_gui_window_quit() to free resources on quit.

svn path=/import/netsurf/; revision=1164
2004-07-30 16:16:07 +00:00
Richard Wilson b7bb766e95 [project @ 2004-07-16 19:47:02 by rjw]
Fix for hotlist menu selection. Interface for MNG/JNG display.

svn path=/import/netsurf/; revision=1083
2004-07-16 19:47:03 +00:00
James Bursa 6720beb2c1 [project @ 2004-06-23 15:41:50 by bursa]
Fix fetchcache_go() treatment of contents which the initiator loses interest in (eg. wrong content-type).

svn path=/import/netsurf/; revision=997
2004-06-23 15:41:50 +00:00
James Bursa fdaf72417a [project @ 2004-06-22 17:37:51 by bursa]
Fix aborting of fetches.

svn path=/import/netsurf/; revision=990
2004-06-22 17:37:51 +00:00
James Bursa b4723c1d05 [project @ 2004-06-21 15:09:58 by bursa]
Merge memory cache into content module.

svn path=/import/netsurf/; revision=986
2004-06-21 15:09:59 +00:00
James Bursa f8825b81e4 [project @ 2004-06-20 23:09:51 by bursa]
Implement content_stop() and html_stop().

svn path=/import/netsurf/; revision=982
2004-06-20 23:09:52 +00:00
James Bursa 08177fa581 [project @ 2004-06-10 20:41:26 by bursa]
Add global content list. Better error handling in content code. Improved code documentation. Remove some obsolete functions. Implement debug window listing contents.

svn path=/import/netsurf/; revision=951
2004-06-10 20:41:26 +00:00
John Tytgat dc65374aa6 [project @ 2004-06-05 15:03:59 by joty]
Created content_set_status() : one centralised place where status_message
in the content struct is updated in a fail safe way.

svn path=/import/netsurf/; revision=928
2004-06-05 15:03:59 +00:00
James Bursa 1f28aad336 [project @ 2004-06-02 20:58:16 by bursa]
Remove some #ifdef riscos. Use floats for animation area.

svn path=/import/netsurf/; revision=908
2004-06-02 20:58:16 +00:00
James Bursa 8b78a7803d [project @ 2004-05-21 14:26:59 by bursa]
Improved handling of objects and frames; some work on malloc() failure in box conversion.

svn path=/import/netsurf/; revision=880
2004-05-21 14:26:59 +00:00
James Bursa bb41604045 [project @ 2004-05-05 16:33:15 by bursa]
Fix some compiler warnings. Ignore size attribute for file inputs.

svn path=/import/netsurf/; revision=828
2004-05-05 16:33:15 +00:00
James Bursa 199eee4b0b [project @ 2004-04-26 13:47:51 by bursa]
Fix scaled GIF animations.

svn path=/import/netsurf/; revision=805
2004-04-26 13:47:51 +00:00
James Bursa 1f07fc6de5 [project @ 2004-04-24 23:42:31 by bursa]
Replace void pointer in content callbacks with union content_msg_data. Fix animated gif flickering (except for scaled or masked gifs). Add gif to the debug builds.

svn path=/import/netsurf/; revision=801
2004-04-24 23:42:32 +00:00
James Bursa b0fdba3f59 [project @ 2004-03-27 00:53:19 by bursa]
Add imagemap and jpeg to the debug build.

svn path=/import/netsurf/; revision=675
2004-03-27 00:54:03 +00:00
James Bursa 15537fb20d [project @ 2004-03-21 12:50:10 by bursa]
Animation support, not yet optimised.

svn path=/import/netsurf/; revision=641
2004-03-21 12:50:10 +00:00
James Bursa fba46de9cb [project @ 2004-03-11 02:19:13 by bursa]
Add source_data to content structure and remove equivalents from individual contents.

svn path=/import/netsurf/; revision=606
2004-03-11 02:19:14 +00:00
James Bursa 7897a98a4c [project @ 2004-02-25 15:12:57 by bursa]
Implement scaling; rewrite desktop/browser; add riscos/thumbnail; rewrite history.

svn path=/import/netsurf/; revision=566
2004-02-25 15:12:58 +00:00
James Bursa 658084359d [project @ 2004-01-26 14:16:23 by bursa]
Fix crashes related to content_destroy() by adding lock, implement no_error_pages.

svn path=/import/netsurf/; revision=508
2004-01-26 14:16:23 +00:00
James Bursa 1bdcb44639 [project @ 2004-01-24 17:08:15 by bursa]
Add permitted_types to html_fetch_object().

svn path=/import/netsurf/; revision=500
2004-01-24 17:08:16 +00:00
James Bursa 8755ceb0c8 [project @ 2004-01-23 20:46:29 by bursa]
Add error pages for fetch failures.

svn path=/import/netsurf/; revision=498
2004-01-23 20:46:29 +00:00
John Mark Bell 62245d13ec [project @ 2004-01-05 02:10:59 by jmb]
Add ability to turn off browser features in build.
This may be useful when hunting down bugs.

svn path=/import/netsurf/; revision=480
2004-01-05 02:10:59 +00:00
James Bursa ce0d5294d5 [project @ 2003-12-27 20:15:22 by bursa]
Use charset from Content-Type header.

svn path=/import/netsurf/; revision=460
2003-12-27 20:15:23 +00:00
John Mark Bell c9e188a4d1 [project @ 2003-10-25 19:20:13 by jmb]
HTTP Auth login improved (greatly).
Addresses all three issues in the previous version.

svn path=/import/netsurf/; revision=382
2003-10-25 19:20:13 +00:00
John Mark Bell b858507d90 [project @ 2003-09-10 22:27:15 by jmb]
Add support for Draw and Sprite files

svn path=/import/netsurf/; revision=281
2003-09-10 22:27:15 +00:00
James Bursa f33b3e6f52 [project @ 2003-09-10 21:44:10 by bursa]
Reformat page when browser window is resized.

svn path=/import/netsurf/; revision=280
2003-09-10 21:44:11 +00:00
James Bursa 9c2e649290 [project @ 2003-09-10 17:10:25 by bursa]
Set graphics window when rendering objects.

svn path=/import/netsurf/; revision=279
2003-09-10 17:10:25 +00:00
James Bursa 9fa8f4037a [project @ 2003-09-07 21:08:13 by bursa]
Document cache and content, split struct content up.

svn path=/import/netsurf/; revision=270
2003-09-07 21:08:13 +00:00
James Bursa cdf0601420 [project @ 2003-08-30 21:45:03 by bursa]
Make page background colour work properly.

svn path=/import/netsurf/; revision=263
2003-08-30 21:45:03 +00:00
James Bursa 3ce4ce9653 [project @ 2003-08-28 20:04:35 by bursa]
Use Content-Length to give percentage downloads.

svn path=/import/netsurf/; revision=256
2003-08-28 20:04:35 +00:00
John Mark Bell 3c0daf429a [project @ 2003-07-22 22:13:44 by jmb]
Enable viewing HTML source when F8 is pressed

svn path=/import/netsurf/; revision=241
2003-07-22 22:13:44 +00:00
James Bursa c3c1fb916b [project @ 2003-07-18 21:02:29 by bursa]
New GIF renderer using animlib (jmb).

svn path=/import/netsurf/; revision=235
2003-07-18 21:02:29 +00:00
James Bursa 5031b80b33 [project @ 2003-07-17 23:01:02 by bursa]
Fix 670947, tidy gui code, move some headers.

svn path=/import/netsurf/; revision=231
2003-07-17 23:01:02 +00:00
James Bursa 889ae885c6 [project @ 2003-07-14 22:57:45 by bursa]
Add content instances.

svn path=/import/netsurf/; revision=216
2003-07-14 22:57:45 +00:00
James Bursa 9317e33d0b [project @ 2003-07-09 21:33:01 by bursa]
More work on <object> and plugins.

svn path=/import/netsurf/; revision=213
2003-07-09 21:33:01 +00:00
John Mark Bell 133c3ee759 [project @ 2003-07-07 22:10:51 by jmb]
Rewrite plugin system backend.

svn path=/import/netsurf/; revision=210
2003-07-07 22:10:51 +00:00
James Bursa 4496d3cdbd [project @ 2003-06-30 15:57:08 by bursa]
Fix interlaced PNG display.

svn path=/import/netsurf/; revision=192
2003-06-30 15:57:08 +00:00
James Bursa 017fc4eb4b [project @ 2003-06-30 12:44:02 by bursa]
New file headers.

svn path=/import/netsurf/; revision=190
2003-06-30 12:44:03 +00:00
James Bursa 1145b231d4 [project @ 2003-06-26 11:41:26 by bursa]
Implement HTTP redirects.

svn path=/import/netsurf/; revision=187
2003-06-26 11:41:26 +00:00
James Bursa 0c0ff3c596 [project @ 2003-06-17 19:24:20 by bursa]
Change fetchcache system to store loading contents in cache.

svn path=/import/netsurf/; revision=180
2003-06-17 19:24:21 +00:00
Philip Pemberton 97dea9f287 [project @ 2003-06-05 13:17:55 by philpem]
Added GIF decode support

svn path=/import/netsurf/; revision=160
2003-06-05 13:17:55 +00:00
James Bursa 27d93c182c [project @ 2003-05-10 11:13:34 by bursa]
Partial PNG support.

svn path=/import/netsurf/; revision=129
2003-05-10 11:15:49 +00:00
James Bursa 09b1ede5a3 [project @ 2003-04-15 17:53:00 by bursa]
Inline images and related.

svn path=/import/netsurf/; revision=125
2003-04-15 17:53:00 +00:00
James Bursa 63b6455f73 [project @ 2003-04-13 12:50:10 by bursa]
style element, CSS fixes, id selectors.

svn path=/import/netsurf/; revision=124
2003-04-13 12:50:10 +00:00
James Bursa 7c94cf8be9 [project @ 2003-04-10 21:44:45 by bursa]
Memory usage cleaning.

svn path=/import/netsurf/; revision=121
2003-04-10 21:44:45 +00:00
James Bursa 230cb5f01f [project @ 2003-04-09 21:57:09 by bursa]
Table layout fixes, allowed type list.

svn path=/import/netsurf/; revision=119
2003-04-09 21:57:09 +00:00
James Bursa 46edb645e1 [project @ 2003-04-06 18:09:34 by bursa]
@import, more status messages.

svn path=/import/netsurf/; revision=116
2003-04-06 18:09:34 +00:00
James Bursa 2253e38be8 [project @ 2003-04-05 21:38:06 by bursa]
External stylesheets.

svn path=/import/netsurf/; revision=115
2003-04-05 21:38:06 +00:00
James Bursa 4421b2e633 [project @ 2003-04-04 15:19:31 by bursa]
New CSS parser.

svn path=/import/netsurf/; revision=112
2003-04-04 15:19:32 +00:00
James Bursa 8edb43af7d [project @ 2003-02-25 21:00:27 by bursa]
Bug fixes, experimental JPEG support.

svn path=/import/netsurf/; revision=100
2003-02-25 21:00:27 +00:00
James Bursa a4c5929a2f [project @ 2003-02-09 12:58:14 by bursa]
Reorganization and rewrite of fetch, cache, and content handling.

svn path=/import/netsurf/; revision=96
2003-02-09 12:58:15 +00:00