Commit Graph

97 Commits

Author SHA1 Message Date
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 90c0fb6f3e Fix frame targets.
svn path=/trunk/netsurf/; revision=7729
2009-06-08 09:34:58 +00:00
John Mark Bell 243c1ba03f Limit scope of manually-defined NDEBUG. Purge a bunch of redundant #undef NDEBUG.
svn path=/trunk/netsurf/; revision=7593
2009-05-28 10:39:53 +00:00
John Mark Bell c18945f771 Fix numbering of floated list items
svn path=/trunk/netsurf/; revision=7361
2009-04-29 10:44:20 +00:00
Michael Drake a99a5bdd70 Move handling of TR height attribute from box construction to layout and add support for height property on TR.
svn path=/trunk/netsurf/; revision=7358
2009-04-28 20:13:10 +00:00
John Mark Bell daf7a52dd6 Hubbub is no longer optional.
Remove libxml2 parser binding.

svn path=/trunk/netsurf/; revision=7115
2009-04-17 00:54:27 +00:00
John Mark Bell 6a7b1a73a7 Fix compilation with GCC 2.95.
It astounds me how some of this lot compiled at all.

svn path=/trunk/netsurf/; revision=7104
2009-04-16 12:49:49 +00:00
John Mark Bell cc1094f0ac Utilise hubbub's form association callback.
Please can we dispense with the libxml binding? It's causing much #ifdef mess.
Fix encoding of <input type=image> names -- previously were output as raw utf-8, rather than in the submission charset.
Actually bother to destroy forms in a document, and the controls associated with them. We still leak non form-associated controls, but that's too much effort to fix right now.

svn path=/trunk/netsurf/; revision=6573
2009-02-20 11:39:25 +00:00
Michael Drake b7a1b3999e Implement percentage heights for block level elements in normal flow, floats and positioned boxes. Percentage min/max-height not yet handled.
svn path=/trunk/netsurf/; revision=5550
2008-10-12 21:22:28 +00:00
Michael Drake 8a6e803029 Load SVGs in IMG elements.
svn path=/trunk/netsurf/; revision=5463
2008-09-30 12:17:16 +00:00
John Mark Bell 385d274f5b A bunch of fixes to the libpng binding
svn path=/trunk/netsurf/; revision=5338
2008-09-15 22:45:44 +00:00
Michael Drake 668dd06dc3 Add comments and change height attribute handling on TR to only alter the height if attribute height is greater than current height.
svn path=/trunk/netsurf/; revision=5259
2008-09-05 13:04:30 +00:00
Michael Drake 55e2831909 Ignore height/width attributes on elements where they are not permitted.
svn path=/trunk/netsurf/; revision=5162
2008-08-21 18:00:32 +00:00
François Revel da1b02f77f C89
svn path=/trunk/netsurf/; revision=5103
2008-08-13 17:45:44 +00:00
John Mark Bell 114f948f36 Ignore blank maxlength attributes
svn path=/trunk/netsurf/; revision=4912
2008-08-05 09:54:55 +00:00
John Mark Bell e004e0e745 Squash more warnings.
svn path=/trunk/netsurf/; revision=4210
2008-05-26 10:46:45 +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
Michael Drake 83a83757ab Only record that the HTML alignment was set by a table element if it is actually set.
svn path=/trunk/netsurf/; revision=4058
2008-03-29 19:51:00 +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 bdf3c5e56b Squash "implicit declaration of function 'gui_multitask'" warnings.
svn path=/trunk/netsurf/; revision=3980
2008-03-19 16:46:26 +00:00
Michael Drake f7be887580 Centered tables are a special case.
svn path=/trunk/netsurf/; revision=3880
2008-03-05 08:09:06 +00:00
Michael Drake f752aca0d4 Fix align attributes on TABLE etc being overridden in the table's cells by the default alignment of cells with no align attribute.
svn path=/trunk/netsurf/; revision=3873
2008-02-28 20:36:09 +00:00
Michael Drake 748937547a Don't meddle with blockquote's margins.
svn path=/trunk/netsurf/; revision=3869
2008-02-26 22:31:38 +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 a4e1ffda1a Improve handling of HTML attributes / markup:
* Only apply presentational HTML attributes if no more
   important CSS has been set for the property. (NetSurf used
   to be a bit hit-and-miss when presentational markup and
   CSS were mixed.)
 * Change table cellpadding and border handling to happen as
   soon the boxes styles are available, rather than after the
   whole table has been constructed. Also fix default table
   border colour.
 * Improve handling of CENTER tag and ALIGN attribute. These
   could not be correctly supported in the default CSS file,
   so block level element alignment is now done during box
   construction. (Fixes #1891379, #1824492, #1723853)
Form improvements:
 * Small MAXLENGTH values on text inputs now reduce element
   width. (Fixes #1894854)
 * Prevent select option text from wrapping.

svn path=/trunk/netsurf/; revision=3866
2008-02-25 16:37:48 +00:00
John Mark Bell 1fc91faff1 Also flag box as invisible so it'll have no effect on layout
svn path=/trunk/netsurf/; revision=3864
2008-02-25 08:56:11 +00:00
John Mark Bell 73c02364a8 Ignore spurious top-level framesets correctly (previously declared memory exhaustion, which is obviously wrong)
svn path=/trunk/netsurf/; revision=3863
2008-02-25 08:53:04 +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
Richard Wilson 7163f5aadd Fix parsing of invalid colour values becoming CSS_COLOR_NONE. Make all colour parsing code common.
svn path=/trunk/netsurf/; revision=3625
2007-10-09 16:25:25 +00:00
James Bursa 21db9de5f8 Make F9 dump box tree to an editor for easier debugging.
svn path=/trunk/netsurf/; revision=3529
2007-08-20 02:39:49 +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
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
John Mark Bell 00377eec58 Import font containing symbols we need for list items.
(Un)Install font appropriately at runtime.
Make list markers use the right characters.

svn path=/trunk/netsurf/; revision=3280
2007-05-14 22:57:11 +00:00
John Mark Bell f1fba1908f Fix embedded object + display: none; crash (1695751) (c.f r3236)
svn path=/trunk/netsurf/; revision=3239
2007-04-06 23:48:26 +00:00
John Mark Bell 94d12a96e7 Squash access to freed memory.
Actually process form inputs which have been styled display:none;
This needs revisiting after 1.0 as the following will still break:
<form ..>
  <div style="display:none;">
    <input type="hidden" name="foo" value="bar"/>
  </div>
  <input type="submit" name="submit" value="submit"/>
</form>
The children of the div are not processed (which is correct for display 
purposes, but results in the hidden input being ignored entirely). A 
more correct fix would be to perform form input -> gadget creation 
orthogonally from box tree generation; then styling will have no effect.

svn path=/trunk/netsurf/; revision=3236
2007-04-06 12:05:25 +00:00
John Mark Bell 6eba75b1c6 Recognise <image> as a synonym for <img> (fixes 1692426)
svn path=/trunk/netsurf/; revision=3231
2007-04-01 20:21:58 +00:00
John Mark Bell 64b229d0d6 Make <object> attribute handling more spec compliant
svn path=/trunk/netsurf/; revision=3215
2007-03-22 22:47:24 +00:00
John Mark Bell e80ce80a98 Default form field maxlength to UINT_MAX (fixes 1620540)
svn path=/trunk/netsurf/; revision=3205
2007-03-11 23:48:29 +00:00
John Mark Bell e57a90e91c Fix handling of % signs in textarea initial value. (Fixes 1617123)
svn path=/trunk/netsurf/; revision=3180
2007-02-11 23:21:05 +00:00
James Bursa a0b6661eb6 Make GTK build compile on FreeBSD.
svn path=/trunk/netsurf/; revision=3154
2007-01-29 22:27:15 +00:00
James Bursa b6630787c5 Default frame margin 0 instead of -1. Fix marginheight parsing.
svn path=/trunk/netsurf/; revision=3147
2007-01-24 22:53:09 +00:00
Richard Wilson 4f1ca7d14c Don't require frames to specify a URL (fixes frame names not being recognised)
svn path=/trunk/netsurf/; revision=3135
2007-01-03 20:11:09 +00:00
Richard Wilson f4b8d3a009 Reflow iframes on layout (fix 1617625)
svn path=/trunk/netsurf/; revision=3126
2006-12-30 02:10:46 +00:00
James Bursa e2d7630ae8 Remove wrong kind of free for data allocated using talloc.
svn path=/trunk/netsurf/; revision=3113
2006-12-08 22:18:15 +00:00
Michael Drake ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
James Bursa f546f6b5e7 Implement list-style-type circle, square, none, and decimal.
svn path=/trunk/netsurf/; revision=3034
2006-11-05 19:50:34 +00:00
James Bursa f4f17f905b More work on lists. Simplify the implementation to a BLOCK for display: list-item, with a marker box on box->list_marker.
svn path=/trunk/netsurf/; revision=3031
2006-11-05 12:58:24 +00:00
John Mark Bell 7bd710a71c Initial work for display: list-item support
svn path=/trunk/netsurf/; revision=3028
2006-11-04 19:53:22 +00:00
James Bursa b6c8e435cd Implement absolute positioned inlines.
svn path=/trunk/netsurf/; revision=3026
2006-11-04 19:17:11 +00:00
James Bursa a6b1a2ee46 Remove code to determine containing block; no longer used.
svn path=/trunk/netsurf/; revision=3015
2006-10-22 20:20:17 +00:00