Commit Graph

117 Commits

Author SHA1 Message Date
Michael Drake 4f47cad962 Non block level :after boxes aren't supported yet, so don't generate them.
svn path=/trunk/netsurf/; revision=11691
2011-02-15 23:08:38 +00:00
John Mark Bell 5d27aa256f Port to latest libcss
svn path=/trunk/netsurf/; revision=11526
2011-01-29 19:22:12 +00:00
Michael Drake 749dfa52ba Completion of first-letter and first-line pseudo element computed styles is not handled yet.
svn path=/trunk/netsurf/; revision=11228
2011-01-06 11:11:47 +00:00
John Mark Bell 77ea8a8d63 Always want inline style now (also prevents use of an uninitialised variable)
svn path=/trunk/netsurf/; revision=11220
2011-01-05 22:38:37 +00:00
John Mark Bell 9422e6dad0 Remove redundant validation -- if you successfully obtain a css_select_results object, then its base style is guaranteed to exist
svn path=/trunk/netsurf/; revision=11217
2011-01-05 20:14:34 +00:00
Michael Drake 08ed4c207f Update to new libcss API for simultanious selection for base element and its pseudo elements.
svn path=/trunk/netsurf/; revision=11215
2011-01-05 19:36:05 +00:00
Michael Drake 027726c432 Don't create iframes for hidden or non-displayed boxes.
svn path=/trunk/netsurf/; revision=11213
2011-01-05 01:26:29 +00:00
Michael Drake 61b7c722be Implement enough support for the :after pseudo element for the widely-used clearfix CSS layout hack to work.
svn path=/trunk/netsurf/; revision=11206
2011-01-04 21:52:43 +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 c052d534e7 Add some missing CONTENT_WEBPs. WebP images in HTML docs now display correctly.
svn path=/trunk/netsurf/; revision=10890
2010-10-16 15:26:28 +00:00
John Mark Bell 6e161d822c Restrict permissible content types for list marker images
svn path=/trunk/netsurf/; revision=10798
2010-09-19 11:27:43 +00:00
Michael Drake 0642cdafc2 Fix mouse.h file description. Add iframe comment.
svn path=/trunk/netsurf/; revision=10571
2010-06-09 09:53:07 +00:00
Michael Drake bc9fef0a1a Add iframe comment.
svn path=/trunk/netsurf/; revision=10559
2010-06-03 15:15:31 +00:00
John Mark Bell 000e6ad3de It turns out that realloc(ptr, 0) --> free(ptr) is not actually required by the C standard (whereas realloc(NULL, size) --> malloc(size) is).
Therefore, explicitly model the behaviour expected by our libraries (that realloc of 0 size is equivalent to free).

svn path=/trunk/netsurf/; revision=10524
2010-04-30 07:00:58 +00:00
Daniel Silverstone 30e0cfe7a9 First step to fixing memory leaks -- Box model no longer leaks computed styles
svn path=/trunk/netsurf/; revision=10500
2010-04-27 21:38:41 +00:00
Vincent Sanders 03bb3e8636 remove _GNU_SOURCE define from everywhere.
strndup is not standard so provide an implementation.

svn path=/trunk/netsurf/; revision=10474
2010-04-24 15:22:17 +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 9e86512c4f Fix quirks mode propagation for @style.
svn path=/trunk/netsurf/; revision=9675
2009-11-15 10:10:00 +00:00
John Mark Bell 0665611cc2 Port to modified libcss API.
svn path=/trunk/netsurf/; revision=8997
2009-08-02 19:19:43 +00:00
John Mark Bell c51b14383c Now that libwapcaplet guarantees NUL-termination of strings, stop copying them unnecessarily.
svn path=/trunk/netsurf/; revision=8785
2009-07-25 15:47:11 +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 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