Commit Graph

78 Commits

Author SHA1 Message Date
Michael Drake
61489da940 Handle no units in CSS as px. This is a temporary measure until the new CSS parser is used, which will handle this properly.
svn path=/trunk/netsurf/; revision=6173
2009-01-22 10:53:14 +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
François Revel
af7be03db3 more obvious C89
svn path=/trunk/netsurf/; revision=4792
2008-07-29 09:25:17 +00:00
Rob Kendrick
052f99d379 Include headers we need, rather than depending on (optional) features doing so.
svn path=/trunk/netsurf/; revision=4774
2008-07-28 20:32:51 +00:00
Michael Drake
9fb65c7096 Remove if that was always true.
svn path=/trunk/netsurf/; revision=4740
2008-07-26 15:43:41 +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
8f999376d5 Bring definition of {escape} in line with CSS 2.1 spec.
Require units when parsing css lengths.
Correctly ignore background: meta-properties which have multiple instances of sub-properties (e.g. foo { background: red pink; })

svn path=/trunk/netsurf/; revision=3893
2008-03-06 23:20:32 +00:00
James Bursa
aa24cdff0d Bug fixes in parse_length, parse_clip, css_dump_style, css_dump_length by Franz Korntner.
svn path=/trunk/netsurf/; revision=3635
2007-10-28 17:01:53 +00:00
Richard Wilson
8df0a5ad40 No longer assert on invalid input to hex_colour.
svn path=/trunk/netsurf/; revision=3626
2007-10-09 16:41:57 +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
Michael Drake
686c98fafd Allow hex CSS colour values with omitted hash. Fix #rgb and #rrggbb handling to only accept hex characters.
svn path=/trunk/netsurf/; revision=3620
2007-10-03 06:47:45 +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
James Bursa
a0b6661eb6 Make GTK build compile on FreeBSD.
svn path=/trunk/netsurf/; revision=3154
2007-01-29 22:27:15 +00:00
Michael Drake
ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
Richard Wilson
fdbb855a9c Fix accidental press of delete :-s
svn path=/trunk/netsurf/; revision=2852
2006-08-15 19:33:42 +00:00
Richard Wilson
8852cdd109 Treat unitless CSS values as pixels (fix 1527056)
svn path=/trunk/netsurf/; revision=2851
2006-08-15 19:20:36 +00:00
John Mark Bell
4e6974b523 Fix background: parsing & lose potential memory leak
svn path=/trunk/netsurf/; revision=2660
2006-06-28 15:38:46 +00:00
John Mark Bell
c4260ee25e [project @ 2006-03-17 02:08:42 by jmb]
Fix behaviour of clip property parser when presented with invalid data

svn path=/import/netsurf/; revision=2133
2006-03-17 02:08:42 +00:00
John Mark Bell
e4e01d338f [project @ 2006-02-11 21:58:56 by jmb]
Permit negative text indent

svn path=/import/netsurf/; revision=2075
2006-02-11 21:58:56 +00:00
James Bursa
3b4baa8008 [project @ 2005-08-04 22:51:42 by bursa]
Fix strndup() compiler warnings.

svn path=/import/netsurf/; revision=1840
2005-08-04 22:51:42 +00:00
Richard Wilson
a01210941b [project @ 2005-04-20 03:58:40 by rjw]
Fix parsing of 0 values without a unit for background-position and font-size.

svn path=/import/netsurf/; revision=1672
2005-04-20 03:58:40 +00:00
James Bursa
2920bca14a [project @ 2005-04-09 09:47:36 by bursa]
Move HTML contents almost fully over to talloc(), simplifying code. Improvements to title attributes, broken forms, cellpadding. Reorder functions in box_construct.c.

svn path=/import/netsurf/; revision=1608
2005-04-09 09:47:37 +00:00
Richard Wilson
511891d27c [project @ 2005-03-23 18:14:38 by rjw]
Fix incorrect background position calculations. Modify CSS parser to pass all background-position testcases.

svn path=/import/netsurf/; revision=1574
2005-03-23 18:14:38 +00:00
Richard Wilson
b832e05f03 [project @ 2005-03-22 00:10:42 by rjw]
Experimental cellpadding support

svn path=/import/netsurf/; revision=1569
2005-03-22 00:10:42 +00:00
Richard Wilson
ee6d869916 [project @ 2005-01-17 23:06:33 by rjw]
Fix URI memory leakage

svn path=/import/netsurf/; revision=1458
2005-01-17 23:06:33 +00:00
Richard Wilson
71ad0bdf69 [project @ 2005-01-16 21:39:21 by rjw]
Read content, counter-reset and counter-increment properties.

svn path=/import/netsurf/; revision=1456
2005-01-16 21:39:21 +00:00
John Mark Bell
1e592489b1 [project @ 2005-01-16 00:03:45 by jmb]
Create interface for duplication and destruction of css_style structs.

svn path=/import/netsurf/; revision=1450
2005-01-16 00:03:45 +00:00
Michael Drake
6dba177b3d [project @ 2004-12-07 09:25:00 by tlsa]
Fix navajowhite named colour.

svn path=/import/netsurf/; revision=1387
2004-12-07 09:25:00 +00:00
John Mark Bell
2b91efdc1e [project @ 2004-12-07 02:25:14 by jmb]
Support SVG 1.0 named colours (plus feldspar, lightslateblue and violetred).

svn path=/import/netsurf/; revision=1386
2004-12-07 02:25:14 +00:00
James Bursa
37d7353f43 [project @ 2004-12-01 21:48:11 by bursa]
Implement table cell padding and separated borders model for tables. Min/max width calculations still need implementing.

svn path=/import/netsurf/; revision=1378
2004-12-01 21:48:11 +00:00
John Mark Bell
c9bd6fa9fc [project @ 2004-08-09 16:11:58 by jmb]
Rework the interface of the URL handing module to allow for multiple error types.
Modify save_complete URL rewriting appropriately.

svn path=/import/netsurf/; revision=1206
2004-08-09 16:11:58 +00:00
John Mark Bell
d18b55984f [project @ 2004-08-01 23:59:16 by jmb]
Break out uri(...) parsing into separate function

svn path=/import/netsurf/; revision=1177
2004-08-01 23:59:16 +00:00
John Mark Bell
6103e3f0cd [project @ 2004-08-01 21:56:47 by jmb]
Rationalise top, bottom, right and left property handling

svn path=/import/netsurf/; revision=1174
2004-08-01 21:56:47 +00:00
John Mark Bell
3b660a7e33 [project @ 2004-08-01 14:13:47 by jmb]
Internal representation and parsing of most CSS2 properties.

svn path=/import/netsurf/; revision=1172
2004-08-01 14:13:47 +00:00
John Mark Bell
6560a2ae5f [project @ 2004-07-16 20:22:31 by jmb]
Add overflow support.
Re-tabulate property table in ruleset.c

svn path=/import/netsurf/; revision=1087
2004-07-16 20:22:31 +00:00
John Mark Bell
da1ad11a35 [project @ 2004-06-25 21:25:33 by jmb]
Increase limit of property name to 25 chars to accommodate background-attachment.
This was missed from the original background properties checkin

svn path=/import/netsurf/; revision=1011
2004-06-25 21:25:33 +00:00
James Bursa
0df8b0734d [project @ 2004-06-25 20:24:06 by bursa]
Fix parsing of invalid color declarations.

svn path=/import/netsurf/; revision=1010
2004-06-25 20:24:06 +00:00
James Bursa
aa6e904604 [project @ 2004-06-25 14:28:29 by bursa]
Parse CSS background shorthand property. Background rendering improvements.

svn path=/import/netsurf/; revision=1006
2004-06-25 14:28:29 +00:00
James Bursa
496bfa6d74 [project @ 2004-06-24 23:29:31 by bursa]
Simplify and improve parse_background_position(). Implement css_parse_rgb(). Fix truncation of paragraphs with background images.

svn path=/import/netsurf/; revision=1003
2004-06-24 23:29:31 +00:00
John Mark Bell
913498394c [project @ 2004-06-24 00:07:28 by jmb]
Support for background: meta-property. background-position isn't handled here. this needs fixing.

svn path=/import/netsurf/; revision=1001
2004-06-24 00:07:28 +00:00
John Mark Bell
b8896816c3 [project @ 2004-06-15 20:45:02 by jmb]
rgb() support

svn path=/import/netsurf/; revision=974
2004-06-15 20:45:02 +00:00
John Mark Bell
e932715010 [project @ 2004-06-11 12:51:40 by jmb]
Fix for crash caused by inline style attributes specifying background images.

svn path=/import/netsurf/; revision=961
2004-06-11 12:51:40 +00:00
John Mark Bell
78594f3f60 [project @ 2004-06-09 19:55:06 by jmb]
Implement background-image, background-repeat, background-position and background-attachment CSS properties.

background-attachment and background-position need more work.
Some redraw issues remain.

svn path=/import/netsurf/; revision=938
2004-06-09 19:55:06 +00:00
James Bursa
d7a4adf481 [project @ 2004-05-01 17:48:38 by bursa]
CSS parsing improvements: new tokeniser using re2c, improve memory-exhaustion behaviour, plug leaks, reduce memory usage, clean up code, add source documention.

svn path=/import/netsurf/; revision=806
2004-05-01 17:48:38 +00:00
John Mark Bell
8e16babeaa [project @ 2004-04-18 21:10:02 by jmb]
Work around the lack of a '#' at the start of a colour specified in #rrggbb format

svn path=/import/netsurf/; revision=793
2004-04-18 21:10:02 +00:00
John Mark Bell
a260f648f8 [project @ 2004-04-02 23:12:26 by jmb]
Implement CSS cursor property

svn path=/import/netsurf/; revision=705
2004-04-02 23:12:26 +00:00
James Bursa
ead74d2f01 [project @ 2004-03-29 21:27:52 by bursa]
Implement CSS universal selector.

svn path=/import/netsurf/; revision=690
2004-03-29 21:27:52 +00:00
James Bursa
2c757c1e79 [project @ 2004-03-22 00:36:53 by bursa]
Implement most of CSS borders.

svn path=/import/netsurf/; revision=650
2004-03-22 00:36:53 +00:00
James Bursa
3f6812c112 [project @ 2004-03-13 20:45:41 by bursa]
Use option_font_size when calculating keyword font-size.

svn path=/import/netsurf/; revision=618
2004-03-13 20:45:41 +00:00