summaryrefslogtreecommitdiff
path: root/src/utils/utils.h
Commit message (Collapse)AuthorAgeFilesLines
* Update for new lpu API.Michael Drake2013-12-141-5/+0
|
* Various changes which modify API and ABI:Michael Drake2013-12-131-2/+6
| | | | | | | | | - Remove client allocation function. - Change node_classes callback not to yield array ownership to libcss. - Node bloom filters now built by, during selection libcss. - Added selection callbacks to get and set data on document nodes. Test suite, example, and documentation updated to match.
* CSS3 SelectorsJohn Mark Bell2011-01-311-0/+2
| | | | svn path=/trunk/libcss/; revision=11557
* Ensure there are zero global symbols without css_ or css__ in front of them. ↵Daniel Silverstone2011-01-201-1/+1
| | | | | | This helps prevent confusion if someone else wants a function called parse_background or similar svn path=/trunk/libcss/; revision=11416
* Fix libcss to use new libwapcaplet behaviour.Daniel Silverstone2010-03-271-0/+2
| | | | | | | TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
* 1) Allocate css_style bytecode in 16 byte chunksJohn Mark Bell2009-08-291-0/+4
| | | | | | | | | | | | | | | | | | 2) Cache unused css_style objects with chunks of size 16, 32, 48, and 64 bytes The above should reduce heap churn somewhat. Further improvements are possible: 1) Make the property parsers write the parsed values direct into the output bytecode, instead of into a temporary object which is then merged into the output. 2) Perform similar caching for css_rule and selector objects. 3) Shrink-wrap finalised output styles rather than leaving them oversized. 4) Perform measurement to determine the optimal chunk sizes (power-of-2 makes maths simple and 16 is plucked from thin air) and cache bucket count/sizes. svn path=/trunk/libcss/; revision=9502
* Simplify charToHex()John Mark Bell2009-07-071-36/+9
| | | | svn path=/trunk/libcss/; revision=8384
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-1/+18
| | | | | | | | | 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
* Make fpmath stuff public.John Mark Bell2009-02-141-114/+2
| | | | | | Un-inline string->fixed conversion routine. svn path=/trunk/libcss/; revision=6513
* Fix handling of max -ve numbersAdrian Lees2009-01-241-9/+26
| | | | svn path=/trunk/libcss/; revision=6214
* Move isDigit() and isHex() to utils.h.John Mark Bell2009-01-221-0/+10
| | | | | | Fix #rgb/#rrggbb parsing to ensure that the characters are valid hex digits. svn path=/trunk/libcss/; revision=6167
* Make integer parsing more robustJohn Mark Bell2009-01-121-2/+3
| | | | svn path=/trunk/libcss/; revision=6041
* Beginnings of a colour specifier parser.John Mark Bell2009-01-111-0/+40
| | | | svn path=/trunk/libcss/; revision=6037
* css_string is now the same as a parserutils_dict_entry. This allows us to ↵John Mark Bell2008-11-271-2/+2
| | | | | | | | | | 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
* Fix rounding when fractional part is close to 1.John Mark Bell2008-11-241-3/+4
| | | | | | Add testcase to exercise this. svn path=/trunk/libcss/; revision=5766
* Fix number parsing and make test code automatically determine correctness.John Mark Bell2008-11-241-2/+3
| | | | | | | More test data, which covers everything. Fix includes in libcss/types.h svn path=/trunk/libcss/; revision=5764
* All numerical values are represented in 22:10 fixed point.John Mark Bell2008-11-231-7/+59
| | | | svn path=/trunk/libcss/; revision=5762
* Make integer_from_css_string return the number of input bytes processed.John Mark Bell2008-11-201-2/+5
| | | | svn path=/trunk/libcss/; revision=5758
* Really stop on first non-digitJohn Mark Bell2008-10-271-1/+1
| | | | svn path=/trunk/libcss/; revision=5647
* Function to extract an integer from a css_string.John Mark Bell2008-10-261-1/+43
| | | | | | | | | | Use this in font-weight parsing. TODO: NUMBER tokens may contain [-+]? ([0-9]+ | [0-9]* '.' [0-9]+). The lexer currently doesn't cater for the [-+]? part. This is a bug (inherited from the grammar in the spec), and must be fixed. TODO: integer_from_css_string probably wants to pass out the number of characters processed so that the client can determine if the input was valid for their context. svn path=/trunk/libcss/; revision=5645
* Import beginnings of a CSS parsing library.John Mark Bell2008-05-011-0/+28
Currently comprises a lexer. svn path=/trunk/libcss/; revision=4112