summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 1) Allocate css_style bytecode in 16 byte chunksJohn Mark Bell2009-08-293-14/+72
| | | | | | | | | | | | | | | | | | 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
* Namespace preprocessor macros. I'm not entirely sure why I didn't do this in ↵John Mark Bell2009-08-241-739/+740
| | | | | | the first place. svn path=/trunk/libcss/; revision=9437
* Somewhat nasty text-align magic for the benefit of HTML tables.John Mark Bell2009-08-232-8/+20
| | | | svn path=/trunk/libcss/; revision=9405
* It turns out that using magic values for text-align is simpler than having ↵John Mark Bell2009-08-2219-422/+126
| | | | | | an entirely new property for html alignment. svn path=/trunk/libcss/; revision=9387
* Wrong -- it inheritsJohn Mark Bell2009-08-211-1/+1
| | | | svn path=/trunk/libcss/; revision=9380
* -libcss-align is not inheritedJohn Mark Bell2009-08-211-1/+1
| | | | svn path=/trunk/libcss/; revision=9379
* -libcss-alignJohn Mark Bell2009-08-2119-7/+384
| | | | svn path=/trunk/libcss/; revision=9378
* Mention Wapcaplet requirement.Michael Drake2009-08-091-0/+1
| | | | svn path=/trunk/libcss/; revision=9134
* Remove pointless todosJohn Mark Bell2009-08-031-2/+0
| | | | svn path=/trunk/libcss/; revision=9028
* s/opcode/opcode_t/John Mark Bell2009-08-034-6/+6
| | | | svn path=/trunk/libcss/; revision=9020
* Reinstate -Werror for GCC2John Mark Bell2009-08-031-2/+2
| | | | svn path=/trunk/libcss/; revision=9019
* Avoid type collisions when used from C++John Mark Bell2009-08-022-63/+63
| | | | svn path=/trunk/libcss/; revision=8996
* Apparently, converting from int to enum requires a cast.John Mark Bell2009-08-021-45/+45
| | | | svn path=/trunk/libcss/; revision=8995
* More apparent warnings squashedJohn Mark Bell2009-08-021-3/+6
| | | | svn path=/trunk/libcss/; revision=8993
* Avoid potential warning.John Mark Bell2009-08-021-1/+8
| | | | svn path=/trunk/libcss/; revision=8991
* Use unsigned int for bitfields. Apparently, using uint32_t confuses some ↵John Mark Bell2009-08-025-17/+17
| | | | | | compilers. svn path=/trunk/libcss/; revision=8990
* ...but this one gcc2 really doesn't like: warning: bit-field `type' type ↵François Revel2009-08-021-2/+2
| | | | | | invalid in ANSI C. svn path=/trunk/libcss/; revision=8982
* Ensure our local include path overrides the buildsystem settings.John Mark Bell2009-08-011-2/+2
| | | | | | This avoids build failures when our local headers have changed but the buildsystem settings point to an include path that includes headers from a previous version. svn path=/trunk/libcss/; revision=8958
* More rigorous handling of EOF.John Mark Bell2009-07-312-7/+194
| | | | | | Expand test data for this. svn path=/trunk/libcss/; revision=8931
* Regression test for quotes bytecode execution in cascade_quotes.John Mark Bell2009-07-301-0/+85
| | | | svn path=/trunk/libcss/; revision=8913
* Fix processing of quotes bytecode during cascade.John Mark Bell2009-07-301-7/+9
| | | | svn path=/trunk/libcss/; revision=8912
* Plug potential memory leaks in property settingJohn Mark Bell2009-07-302-0/+29
| | | | svn path=/trunk/libcss/; revision=8911
* Change selector hash to segregate:John Mark Bell2009-07-295-171/+851
| | | | | | | | | | | | | 1) element selectors 2) universal selectors with class names 3) universal selectors with ids 4) universal selectors Only bother looking for matching selectors in 2 & 3 if the node being selected for has class names or an id, respectively. In theory, this should speed up style selection somewhat. svn path=/trunk/libcss/; revision=8882
* Calculate the in-memory size of stylesheets and provide some API to access this.John Mark Bell2009-07-275-0/+172
| | | | svn path=/trunk/libcss/; revision=8830
* If, after parsing the media list, we've ended up with no media whatsoever, ↵John Mark Bell2009-07-271-1/+6
| | | | | | then the list must have been blank, which implies CSS_MEDIA_ALL. svn path=/trunk/libcss/; revision=8822
* Don't intern lower-case versions of strings. Use ↵John Mark Bell2009-07-2721-592/+1916
| | | | | | lwc_context_string_caseless_isequal, instead. svn path=/trunk/libcss/; revision=8815
* Completely screw over any other client of libcss because NetSurf wants to ↵John Mark Bell2009-07-231-372/+0
| | | | | | | | | | | | | impose a minimum font size. Computed styles no longer contain fully computed units. The only computation that occurs is to convert EX units into EMs. This means that any EM units must be converted to PT by the client. Additionally, percentage line-height must be computed by the client. The client must also compute percentage vertical-align once they have fully resolved the line-height. svn path=/trunk/libcss/; revision=8741
* Purge use of alloca()John Mark Bell2009-07-221-2/+10
| | | | svn path=/trunk/libcss/; revision=8715
* Clarify operationJohn Mark Bell2009-07-221-2/+3
| | | | svn path=/trunk/libcss/; revision=8706
* Fix rgb() colour parser not to swap g and b.Michael Drake2009-07-221-34/+34
| | | | svn path=/trunk/libcss/; revision=8696
* Match details before considering combinators.John Mark Bell2009-07-221-14/+13
| | | | svn path=/trunk/libcss/; revision=8667
* Remove pointless parameterJohn Mark Bell2009-07-215-12/+8
| | | | svn path=/trunk/libcss/; revision=8653
* Always set values in result style when composingJohn Mark Bell2009-07-211-335/+392
| | | | svn path=/trunk/libcss/; revision=8651
* Avoid division by zeroJohn Mark Bell2009-07-201-2/+5
| | | | svn path=/trunk/libcss/; revision=8624
* Silence warnings in release modeJohn Mark Bell2009-07-171-64/+64
| | | | svn path=/trunk/libcss/; revision=8609
* Error checking for string comparisons.John Mark Bell2009-07-171-3/+13
| | | | svn path=/trunk/libcss/; revision=8608
* Fix selector hash some more. It turns out that I'd forgotten how it was ↵John Mark Bell2009-07-173-5/+37
| | | | | | meant to work. svn path=/trunk/libcss/; revision=8607
* Colour names are case insensitiveJohn Mark Bell2009-07-171-1/+1
| | | | svn path=/trunk/libcss/; revision=8605
* Fix utterly broken selector chain search code.John Mark Bell2009-07-171-12/+0
| | | | svn path=/trunk/libcss/; revision=8604
* Missed this from previous commitJohn Mark Bell2009-07-171-0/+17
| | | | svn path=/trunk/libcss/; revision=8603
* Change mechanism for handling case sensitivity of element names. Now has ↵John Mark Bell2009-07-174-19/+20
| | | | | | | | another selection handler callback for this. Change selector hash to use an ASCII case-insensitive hash function. svn path=/trunk/libcss/; revision=8602
* Store em and percentage values for properties in the computed style.John Mark Bell2009-07-174-562/+2498
| | | | | | | | Fully compute them on access. Introduce a swathe of internal accessors that don't perform the complete computation. Port property composition to these new APIs. Reduce absolute value computation to making font sizes absolute and converting any EX units to EM. svn path=/trunk/libcss/; revision=8601
* It is necessary to consider the element name when matching selectors. John Mark Bell2009-07-171-6/+27
| | | | | | | Firstly, the chains being processed are from a hashtable, so aren't guaranteed to apply to the element being selected. Secondly, when processing combinators, we have a completely different node object to compare. svn path=/trunk/libcss/; revision=8593
* Ensure that we merge-sort the element and universal selector chains during ↵John Mark Bell2009-07-171-44/+51
| | | | | | selection. svn path=/trunk/libcss/; revision=8592
* Fix matching of named ancestor combinators.John Mark Bell2009-07-171-34/+166
| | | | | | Add some helpful debug -- disabled by default. svn path=/trunk/libcss/; revision=8591
* Add a flag to the font size computation callback to indicate that the ↵John Mark Bell2009-07-165-8/+12
| | | | | | resultant absolute font size should not be clamped to a fixed minimum (e.g. if the client has a minimum permissible font size) svn path=/trunk/libcss/; revision=8586
* Hacky avoidance of element name case insensitivity. The correct solution is ↵John Mark Bell2009-07-161-1/+4
| | | | | | for the client to tell us the sensitivity when creating the stylesheet. svn path=/trunk/libcss/; revision=8573
* Use a proper hash function.John Mark Bell2009-07-161-1/+1
| | | | svn path=/trunk/libcss/; revision=8572
* Provide accessor for computed value of display assuming static position.John Mark Bell2009-07-155-60/+45
| | | | | | Modify css_computed_display to follow $9.7. svn path=/trunk/libcss/; revision=8568
* Fix selection from selectors within @media blocks.John Mark Bell2009-07-151-8/+14
| | | | svn path=/trunk/libcss/; revision=8549