Commit Graph

497 Commits

Author SHA1 Message Date
Michael Drake cc840b6df5 Fix up.
svn path=/trunk/netsurf/; revision=4285
2008-06-06 18:26:26 +00:00
Michael Drake 4f535606fb Remove stray semicolon.
svn path=/trunk/netsurf/; revision=4284
2008-06-06 18:23:40 +00:00
Michael Drake d23457c620 Remove stray semicolon.
svn path=/trunk/netsurf/; revision=4283
2008-06-06 18:21:50 +00:00
Michael Drake e598e7c556 Change box scrollbar drag to happen on HOLDING.
svn path=/trunk/netsurf/; revision=4282
2008-06-06 18:18:08 +00:00
Michael Drake 2319b6032e + Change core to handle different front end click behaviour
styles. (Act on mouse button press or on button release.)
+ Click hold on CSS scrollbar arrows now pauses before
  starting to auto-repeat.
+ Click hold on scrollbar wells will now auto-repeat.

svn path=/trunk/netsurf/; revision=4268
2008-06-06 13:58:56 +00:00
Michael Drake 38be80a680 Fix list marker check. Thanks to jmb and mikeL.
svn path=/trunk/netsurf/; revision=4258
2008-06-03 22:18:15 +00:00
John Mark Bell b15a6af3d2 s/wchar_t/uint32_t/g
We always assumed that the keycode type was 32bits wide, anyway. wchar_t isn't guaranteed to be that big, so isn't remotely portable.

svn path=/trunk/netsurf/; revision=4165
2008-05-16 09:37:22 +00:00
John Mark Bell 23fb72ea6b The core code has always assumed a locale of "C".
Do not change the locale globally, else things will break in weird and 
wonderful ways.

Introduce utils/locale.[ch], which provide locale-specific wrappers for various 
functions (currently just the <ctype.h> ones).

Fix up the few places I can see that actually require that the underlying 
locale is paid attention to.

Some notes:

  1) The GTK frontend code has not been touched. It is possible that reading of 
     numeric values (e.g. from the preferences dialogue) may break with this 
     change, particularly in locales that use something other than '.' as their
     decimal separator.
  2) The search code is left unchanged (i.e. assuming a locale of "C"). 
     This may break case insensitive matching of non-ASCII characters. 
     I doubt that ever actually worked, anyway. In future, it should use
     Unicode case conversion to achieve the same effect.
  3) The text input handling in the core makes use of isspace() to detect
     word boundaries. This is fine for western languages (even in the C locale,
     which it's currently assuming). It will, however, break for CJK et. al. 
     (this has always been the case, rather than being a new issue)
  4) text-transform uses locale-specific variants of to{lower,upper}. In future
     this should probably be performing Unicode case conversion. This is the
     only part of the core code that makes use of locale information.

In future, if you require locale-specific behaviour, do the following:

  setlocale(LC_<whatever>, "");
  <your operation(s) here>
  setlocale(LC_<whatever>, "C");

  The first setlocale will change the current locale to the native environment.
  The second setlocale will reset the current locale to "C".
  Any value other than "" or "C" is probably a bug, unless there's a really
  good reason for it.

In the long term, it is expected that all locale-dependent code will reside in 
platform frontends -- the core being wholly locale agnostic (though assuming 
"C" for things like decimal separators).


svn path=/trunk/netsurf/; revision=4153
2008-05-13 14:37:44 +00:00
John Mark Bell 74a1095cd6 Remove unnecessary includes
svn path=/trunk/netsurf/; revision=4144
2008-05-11 10:09:44 +00:00
John Mark Bell c5da2c906c Don't change URL bar contents until we've actually fetched the page.
svn path=/trunk/netsurf/; revision=4099
2008-04-19 11:13:56 +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
Michael Drake 60c90f89b8 Fix comment typos.
svn path=/trunk/netsurf/; revision=4097
2008-04-14 08:28:55 +00:00
Michael Drake 48431f9674 Remove text export build config option. Tidy up save_text code.
svn path=/trunk/netsurf/; revision=4095
2008-04-13 21:58:43 +00:00
Michael Drake 5c8406bf8b Rewrite text export to use box tree. Improves output formatting. Simplify selection saving.
svn path=/trunk/netsurf/; revision=4094
2008-04-13 18:21:22 +00:00
Michael Drake 78c22d4171 Tidy and update comments.
svn path=/trunk/netsurf/; revision=4093
2008-04-11 17:51:43 +00:00
Michael Drake 3bd3a811c2 Improve selection of text in floats.
svn path=/trunk/netsurf/; revision=4092
2008-04-11 15:52:56 +00:00
Michael Drake 84cd9a655f Improve click handling in text inputs.
svn path=/trunk/netsurf/; revision=4087
2008-04-08 12:40:05 +00:00
Rob Kendrick 59641def82 const fixes in plotters and history core
svn path=/trunk/netsurf/; revision=4083
2008-04-07 11:15:09 +00:00
Michael Drake 8b2a23081f Various text selection improvements:
+ Fix redraw bug where parts of old selections would get left behind
+ Enable selection of list marker boxes (bullet points and numbers)
+ Improve formatting of copied-to-clipboard or saved text selections
+ Select click anywhere outside current selection now clears current selection

svn path=/trunk/netsurf/; revision=4079
2008-04-07 09:00:21 +00:00
Michael Drake 8de0baae0b Improve formatting of copied/saved text from text selections in PREs. Improve formatting in other odd cases too.
svn path=/trunk/netsurf/; revision=4071
2008-04-02 18:23:42 +00:00
Michael Drake d12357c9a3 Remove unused variable. Update copyright.
svn path=/trunk/netsurf/; revision=4067
2008-03-31 22:22:14 +00:00
Michael Drake 13b1c0d379 Suppress the box->space spaces after BRs in copied/saved text selections.
svn path=/trunk/netsurf/; revision=4066
2008-03-31 21:52:12 +00:00
Michael Drake 62ca5e3e11 Tidy up.
svn path=/trunk/netsurf/; revision=4064
2008-03-31 18:59:23 +00:00
Michael Drake 5def4f5e0c Fix formatting of copied or saved text selections.
svn path=/trunk/netsurf/; revision=4063
2008-03-31 18:04:36 +00:00
Michael Drake 8ec3958b04 Ensure adjust drags before selection adjust selection start point.
svn path=/trunk/netsurf/; revision=4061
2008-03-30 00:06:16 +00:00
Michael Drake 05dca28d58 Selection adjustments always change the selection end when click is inside the existing selection.
svn path=/trunk/netsurf/; revision=4059
2008-03-29 22:26: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
Rob Kendrick 8e79665248 Initial attempt at implementing data: URLs. Needs cleaning and verifying that I'm using the fetcher API correctly. Appears to work, though.
svn path=/trunk/netsurf/; revision=3882
2008-03-05 14:21:29 +00:00
Michael Drake f5b638b8de Squash warnings differently.
svn path=/trunk/netsurf/; revision=3879
2008-03-03 15:10:16 +00:00
Michael Drake 8eda5e9827 Squash two warnings.
svn path=/trunk/netsurf/; revision=3878
2008-03-03 14:52:29 +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 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 1cf46a6792 SignednessWarnings.squash()
Aside from a number of instances of const being cast away (mostly relating to the urldb, which is correct to only export const data) this now builds warning-free with GCC 4 on x86, which is nice.

svn path=/trunk/netsurf/; revision=3868
2008-02-25 17:58:00 +00:00
Michael Drake 11959f49f8 Set default max fetchers per host option to 2.
svn path=/trunk/netsurf/; revision=3865
2008-02-25 11:10:09 +00:00
John Mark Bell 2c2ac87e37 Prevent tabbing into textfields whose styling is display: none;
svn path=/trunk/netsurf/; revision=3849
2008-02-07 00:50:37 +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
John Mark Bell ae3555ccdd Fixes for targetting NetBSD (Thanks to Adam Hoka)
svn path=/trunk/netsurf/; revision=3775
2008-01-26 16:44:17 +00:00
James Bursa b650b2379f Implement path plotter (for SVGs within a page).
svn path=/trunk/netsurf/; revision=3663
2007-12-11 02:45:38 +00:00
Michael Drake d13ac3b066 Increase default font size and line spacing.
svn path=/trunk/netsurf/; revision=3660
2007-12-09 11:13:25 +00:00
James Bursa f386520ff2 Add empty path plotters to stop crashes.
svn path=/trunk/netsurf/; revision=3653
2007-11-29 05:50:21 +00:00
John Mark Bell 8afe0caedd Add break; (these things help, now and again)
Add ACTION_NONE case to the deferred action switch (shuts GCC up)

svn path=/trunk/netsurf/; revision=3649
2007-11-04 13:47:36 +00:00
Adrian Lees ac6946ef83 Fix frame-related crash (images.google) caused by destruction of current window when clicking URL/submitting form
svn path=/trunk/netsurf/; revision=3644
2007-11-04 01:16:50 +00:00
John Mark Bell 6eeeee1778 Ignore SIGPIPE on all platforms, not just RISC OS.
svn path=/trunk/netsurf/; revision=3638
2007-10-31 15:39:55 +00:00
James Bursa d8b810b46b Bug fixes by Franz Korntner.
svn path=/trunk/netsurf/; revision=3636
2007-10-28 17:05:39 +00:00
Daniel Silverstone f025f23c52 Remove the old and crap gesture core
svn path=/trunk/netsurf/; revision=3537
2007-09-14 18:33:32 +00:00
Michael Drake 81df02abe4 Fix for Shift+Adjust clicks on links by Christopher Martin.
svn path=/trunk/netsurf/; revision=3533
2007-08-26 16:58:06 +00:00
James Bursa 3c435ccef8 Rename default scale option back to "scale" (changed to "option_scale" by mistake).
svn path=/trunk/netsurf/; revision=3512
2007-08-13 11:36:25 +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
John Mark Bell cc684469df Fix division by 0 caused by uninitialised scale value.
Break out initialisation of common parts of struct browser_window into their own function.

svn path=/trunk/netsurf/; revision=3481
2007-08-07 07:58:04 +00:00