summaryrefslogtreecommitdiff
path: root/src/stylesheet.h
Commit message (Collapse)AuthorAgeFilesLines
* Make all URIs absoluteJohn Mark Bell2009-07-011-0/+3
| | | | svn path=/trunk/libcss/; revision=8228
* Support for parsing inline stylesJohn Mark Bell2009-06-261-0/+2
| | | | svn path=/trunk/libcss/; revision=8024
* Nested block support.John Mark Bell2009-06-261-4/+9
| | | | svn path=/trunk/libcss/; revision=8014
* Quirks mode parsingJohn Mark Bell2009-02-151-0/+3
| | | | svn path=/trunk/libcss/; revision=6519
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-12/+11
| | | | | | | | | It passes the tests, perhaps we need more of them. Lifetimes of lwc_string objects really need attention before we can consider this finished. svn path=/trunk/libcss/; revision=6517
* Rework handling of imported stylesheets.John Mark Bell2009-02-141-5/+6
| | | | | | No longer is the client called back mid-parse. Instead, they must acquire details of and process imported stylesheets after css_stylesheet_data_done() has been called on the parent sheet. The return code of css_stylesheet_data_done() informs the client of the need to process imported sheets. svn path=/trunk/libcss/; revision=6504
* Drop css_error_handler and rename css_alloc to css_allocator_fnDaniel Silverstone2009-02-141-1/+1
| | | | svn path=/trunk/libcss/; revision=6482
* Synchronise media type bitfield with reality -- it's 64bits wide.John Mark Bell2009-02-121-1/+1
| | | | svn path=/trunk/libcss/; revision=6453
* Distinguish between pseudo classes and pseudo elementsJohn Mark Bell2009-02-101-1/+2
| | | | svn path=/trunk/libcss/; revision=6406
* Remove redundant fieldsJohn Mark Bell2009-01-251-6/+0
| | | | svn path=/trunk/libcss/; revision=6270
* Beginnings of specificity. John Mark Bell2009-01-251-0/+4
| | | | | | | | Note that we store the specificity on each simple selector. Thus the total specificity for a combinator chain is obtained by summing the specificity of each chain member. TODO: distinguish between pseudo classes and elements. svn path=/trunk/libcss/; revision=6267
* Simplify API of css_stylesheet_selector_create -- it's always used to create ↵John Mark Bell2009-01-251-2/+1
| | | | | | element selectors. Everything else is handled via detail. svn path=/trunk/libcss/; revision=6266
* Selector hash.John Mark Bell2009-01-251-2/+2
| | | | svn path=/trunk/libcss/; revision=6263
* Purge stylesheet dumping code from the library.John Mark Bell2009-01-191-4/+0
| | | | | | | Create a common header for the test harnesses to use, instead. Fix z-index dumping while we're at it. svn path=/trunk/libcss/; revision=6146
* Don't build the serialisation code in release modeJohn Mark Bell2009-01-141-0/+2
| | | | svn path=/trunk/libcss/; revision=6064
* Make @import actually create a rule and attempt some kind of fetch logic.John Mark Bell2009-01-141-0/+3
| | | | | | | There's still a bunch of outstanding functionality here (like URL resolution and media list parsing). Also, there's currently no way of telling the client to stop fetching data for a stylesheet (and, more importantly, not to attempt to access the stylesheet again as it's about to be destroyed) svn path=/trunk/libcss/; revision=6062
* Create charset rule objects.John Mark Bell2009-01-141-1/+4
| | | | svn path=/trunk/libcss/; revision=6059
* Given that we're going to be copying selector details, anyway, it seems ↵John Mark Bell2008-12-011-4/+2
| | | | | | pointless to create objects on the heap which can equally well be on the stack, given the shortness of their lifetime. svn path=/trunk/libcss/; revision=5863
* Retain pointer to dictionary entries so we don't have to rediscover it later.John Mark Bell2008-12-011-4/+5
| | | | svn path=/trunk/libcss/; revision=5862
* Divorce css_string from whatever gets stored in lpu hashes.John Mark Bell2008-12-011-2/+2
| | | | | | | | | | | | | | | | | | Use pointers to parserutils_hash_entry directly in stylesheet datastructures. The upshot of this for allzengarden.css is: 5506 slots used (of 8192 => 67.211914%) Data: 8 full blocks: 32768 bytes 9 partial blocks: 35124 bytes (of 36864 => 95.279945%) Total: 69936 (4112) (32) Hash structures: 65584 i.e. a total string dictionary size of 135,520 bytes, which is some 74,056 bytes less than before. svn path=/trunk/libcss/; revision=5859
* Use parserutils_hash instead of parserutils_dict.John Mark Bell2008-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | This approximately halves the size of the interned string table. We now have the following for allzengarden.css: 5507 slots used (of 8192 => 67.224121%) Data: 3 full blocks: 12288 bytes 10 partial blocks: 38946 bytes (of 40960 => 95.083008%) Total: 53488 (4112) (32) Entries: 21 full blocks: 86016 bytes 1 partial blocks: 2096 bytes (of 4096 => 51.171875%) Total: 90496 (4112) (32) Hash structures: 65592 Which gives a total dictionary size of 209,576 bytes. Note that 43% of this is parserutils_hash_entry structures (length-pointer pairs). It would be good, therefore, to be able to purge these. svn path=/trunk/libcss/; revision=5852
* Optimise css_stylesheet_add_rule by the cunning approach of not iterating ↵John Mark Bell2008-11-281-0/+1
| | | | | | through a singly linked list to find the end every time we want to insert a rule. This doubles parsing speed. svn path=/trunk/libcss/; revision=5811
* Change the way in which css_rules are defined. This is more compact than the ↵John Mark Bell2008-11-281-39/+56
| | | | | | previous approach. Space requirements for rule objects alone is now 447,120 bytes as opposed to 819,270 bytes previously. This reduces the space requirements for allzengarden.css to 2,041,712 bytes, which is 45% the size of what we had originally. svn path=/trunk/libcss/; revision=5810
* css_string is now the same as a parserutils_dict_entry. This allows us to ↵John Mark Bell2008-11-271-13/+23
| | | | | | | | | | use dict entries directly as strings. iChange the way in which selectors are represented. This significantly reduces memory requirements -- reducing the approximate usage count (excludes the string dictionary, which is about 360k) of allzengarden.css from 4,535,400 bytes to 2,414,312 bytes on a 64bit platform. The string dictionary is now created and owned by the stylesheet object. The parser is just given access to this so that it can store strings in it. svn path=/trunk/libcss/; revision=5809
* Make stylesheet component constructors/destructors report errorsJohn Mark Bell2008-11-091-7/+9
| | | | svn path=/trunk/libcss/; revision=5675
* Something approximating a parser for clear.John Mark Bell2008-10-231-1/+7
| | | | | | Provide API to create/destroy css_styles and append them to css_rules. svn path=/trunk/libcss/; revision=5625
* Parse common part of declarations.John Mark Bell2008-10-221-3/+6
| | | | | | Stub out handlers for properties. svn path=/trunk/libcss/; revision=5620
* Style information for selector rulesets can be shared between the individual ↵John Mark Bell2008-10-201-2/+1
| | | | | | selectors in the ruleset. Therefore, hang it off the css_rule object, rather than having a separate copy for every selector in the ruleset. Selectors know which css_rule they belong to so can easily find the applicable style information. svn path=/trunk/libcss/; revision=5609
* Provide an internal mechanism for dumping stylesheets to a file handle.John Mark Bell2008-10-191-0/+3
| | | | | | Make the css21 test driver call this so we can see if it's working. svn path=/trunk/libcss/; revision=5602
* Finish selector list parsingJohn Mark Bell2008-10-191-1/+2
| | | | svn path=/trunk/libcss/; revision=5599
* Create a parser instance for a stylesheet. Also create a level-specific ↵John Mark Bell2008-09-251-0/+6
| | | | | | frontend. This probably wants reworking as we don't really want to be switching on the language level every time we want to interact with the parser frontend. svn path=/trunk/libcss/; revision=5437
* Public stylesheet API & stubbed out implementations.John Mark Bell2008-09-251-0/+5
| | | | | | Make public headers use libcss_ as their guard macro prefix. svn path=/trunk/libcss/; revision=5433
* Implement a bunch of css_stylesheet_*John Mark Bell2008-09-201-0/+4
| | | | svn path=/trunk/libcss/; revision=5376
* More API munging. Also stub out implementations of new APIs.John Mark Bell2008-09-131-0/+3
| | | | svn path=/trunk/libcss/; revision=5306
* Some idle API poking.John Mark Bell2008-09-121-7/+27
| | | | svn path=/trunk/libcss/; revision=5305
* Turn internal representation outline into a header file.John Mark Bell2008-08-081-0/+138
svn path=/trunk/libcss/; revision=4964