summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Create charset rule objects.John Mark Bell2009-01-143-3/+58
| | | | svn path=/trunk/libcss/; revision=6059
* Complete bytecode dumping code.John Mark Bell2009-01-122-23/+1624
| | | | | | Change a few opcode values to be more consistent (namely, bit 7 set generally implies that there's data to follow). svn path=/trunk/libcss/; revision=6048
* Slightly more obvious logic. This code still sucks.John Mark Bell2009-01-121-15/+15
| | | | svn path=/trunk/libcss/; revision=6047
* Lose a todo. I don't think we want to have the lexer split up dimensions ↵John Mark Bell2009-01-121-1/+0
| | | | | | into value + unit pairs. svn path=/trunk/libcss/; revision=6046
* When parsing colours, it helps to remember that percentages aren't ↵John Mark Bell2009-01-121-17/+13
| | | | | | necessarily integers. svn path=/trunk/libcss/; revision=6045
* Parse units. This is the only place where we actually have to perform string ↵John Mark Bell2009-01-121-8/+86
| | | | | | comparisons rather than simply comparing pointers. Calling strncasecmp for such short strings may incur an excessive overhead. If so, we can perform the comparison ourselves, thus avoiding the function call. Making the lexer separate the units from the value probably isn't helpful, particularly thanks to the need to handle "color: 0f0000;" in quirks mode (this will be lexed as a dimension). svn path=/trunk/libcss/; revision=6044
* Make rgb() parsing work.John Mark Bell2009-01-121-1/+32
| | | | svn path=/trunk/libcss/; revision=6042
* Make integer parsing more robustJohn Mark Bell2009-01-122-45/+30
| | | | svn path=/trunk/libcss/; revision=6041
* Beginnings of a colour specifier parser.John Mark Bell2009-01-114-50/+111
| | | | svn path=/trunk/libcss/; revision=6037
* Document the grammar of colour specifiersJohn Mark Bell2009-01-101-0/+7
| | | | svn path=/trunk/libcss/; revision=6020
* text-decorationJohn Mark Bell2009-01-102-7/+65
| | | | svn path=/trunk/libcss/; revision=6018
* quotesJohn Mark Bell2009-01-101-5/+136
| | | | svn path=/trunk/libcss/; revision=6017
* play-duringJohn Mark Bell2009-01-102-6/+74
| | | | svn path=/trunk/libcss/; revision=6016
* voice-familyJohn Mark Bell2009-01-103-7/+312
| | | | svn path=/trunk/libcss/; revision=6015
* Squash memory leaksJohn Mark Bell2009-01-101-4/+19
| | | | svn path=/trunk/libcss/; revision=6014
* Yet more font-family. This should now be complete.John Mark Bell2009-01-101-7/+73
| | | | | | If you thought the code was ugly before, this is worse. svn path=/trunk/libcss/; revision=6013
* Fix buffer overflows. Remind me to refactor this code -- it's ugly.John Mark Bell2009-01-101-4/+6
| | | | svn path=/trunk/libcss/; revision=6012
* Port to modified parserutils API.John Mark Bell2009-01-061-222/+242
| | | | svn path=/trunk/libcss/; revision=5973
* A little more work on font-family.John Mark Bell2008-12-052-32/+85
| | | | svn path=/trunk/libcss/; revision=5883
* Beginnings of font-familyJohn Mark Bell2008-12-042-6/+193
| | | | svn path=/trunk/libcss/; revision=5882
* Clarify font-familyJohn Mark Bell2008-12-041-0/+5
| | | | svn path=/trunk/libcss/; revision=5881
* cursorJohn Mark Bell2008-12-042-6/+264
| | | | svn path=/trunk/libcss/; revision=5880
* counter-resetJohn Mark Bell2008-12-041-5/+163
| | | | svn path=/trunk/libcss/; revision=5879
* counter-incrementJohn Mark Bell2008-12-042-9/+165
| | | | svn path=/trunk/libcss/; revision=5878
* Factor out common part of content parser.John Mark Bell2008-12-031-435/+311
| | | | | | This simplifies and shortens the code. svn path=/trunk/libcss/; revision=5877
* Finish contentJohn Mark Bell2008-12-031-1/+238
| | | | svn path=/trunk/libcss/; revision=5876
* Factor out parsing of the value part of list-style-type.John Mark Bell2008-12-031-36/+68
| | | | | | Use this when parsing counter functions. svn path=/trunk/libcss/; revision=5875
* Changes to the encoding of content in bytecode to better match the spec.John Mark Bell2008-12-033-7/+268
| | | | | | Beginnings of a content property parser. svn path=/trunk/libcss/; revision=5874
* Something approximating clipJohn Mark Bell2008-12-023-7/+117
| | | | svn path=/trunk/libcss/; revision=5870
* Rather less memory corruption.John Mark Bell2008-12-021-8/+8
| | | | svn path=/trunk/libcss/; revision=5869
* border-spacingJohn Mark Bell2008-12-021-5/+90
| | | | svn path=/trunk/libcss/; revision=5867
* Fix up azimuth to cater for !important after property value.John Mark Bell2008-12-012-13/+157
| | | | | | Something approximating background-position. svn path=/trunk/libcss/; revision=5866
* Finish azimuthJohn Mark Bell2008-12-012-2/+72
| | | | svn path=/trunk/libcss/; revision=5865
* The advantage of interning strings is that you don't have to store their ↵John Mark Bell2008-12-012-27/+18
| | | | | | | | length everywhere. Purge the length part from the encoding of a string in the bytecode. Fix bytecode dump code to cope with this. svn path=/trunk/libcss/; revision=5864
* Given that we're going to be copying selector details, anyway, it seems ↵John Mark Bell2008-12-013-64/+26
| | | | | | 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-019-463/+437
| | | | svn path=/trunk/libcss/; revision=5862
* Simplify decision as to whether to intern token data by inserting markers ↵John Mark Bell2008-12-012-29/+23
| | | | | | into the css_token_type enum. svn path=/trunk/libcss/; revision=5860
* Divorce css_string from whatever gets stored in lpu hashes.John Mark Bell2008-12-013-9/+12
| | | | | | | | | | | | | | | | | | 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
* Make getToken reduce consecutive whitespace tokens to a single whitespace token.John Mark Bell2008-11-301-9/+19
| | | | | | Update eatWS appropriately. This reduces the number of calls to getToken by a million or so. svn path=/trunk/libcss/; revision=5855
* Slightly clearer code. Marginally faster, too.John Mark Bell2008-11-301-42/+52
| | | | svn path=/trunk/libcss/; revision=5854
* Use parserutils_hash instead of parserutils_dict.John Mark Bell2008-11-305-24/+24
| | | | | | | | | | | | | | | | | | | | | | 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
* Commentary on which tokens actually need string data interning.John Mark Bell2008-11-301-0/+12
| | | | svn path=/trunk/libcss/; revision=5848
* Beginnings of azimuth.John Mark Bell2008-11-302-6/+70
| | | | svn path=/trunk/libcss/; revision=5847
* Tidy things up somewhat.John Mark Bell2008-11-286-607/+615
| | | | | | css21 is now language, as everything will share the same parsing rules (although there is facility to alter behaviour based upon the language level -- consult language->sheet->level and then decide what to do) svn path=/trunk/libcss/; revision=5815
* Optimise css_stylesheet_add_rule by the cunning approach of not iterating ↵John Mark Bell2008-11-282-9/+7
| | | | | | 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-282-64/+117
| | | | | | 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-278-488/+639
| | | | | | | | | | 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
* Calculate some kind of ballpark figure for the memory requirements of a ↵John Mark Bell2008-11-271-12/+31
| | | | | | stylesheet. Summary: lots. svn path=/trunk/libcss/; revision=5808
* Prevent reading from beyond the start of token data.John Mark Bell2008-11-271-5/+6
| | | | svn path=/trunk/libcss/; revision=5807
* Don't intern strings for CSS_TOKEN_S tokens. This is pointless, as all we ↵John Mark Bell2008-11-271-1/+5
| | | | | | care about is the token type in this case. svn path=/trunk/libcss/; revision=5806