summaryrefslogtreecommitdiff
path: root/src/stylesheet.c
Commit message (Collapse)AuthorAgeFilesLines
* Stylesheet: Drop temporary code to test media query parsing.Michael Drake2019-03-101-7/+0
|
* Media queries: Move css_parse_media_query to parse/mq.c file.Michael Drake2019-03-101-106/+0
| | | | It's now exposed in the mq.h header too.
* Media queries: Make css_parse_media_query return the parsed css_mq_query.Michael Drake2019-03-101-9/+28
| | | | | This converts the experimental code to test the media query parsing into a useful function.
* Media queries: Drop parse debug output.Michael Drake2019-03-101-17/+1
|
* HACKS for testing Media Queries parsing.Michael Drake2019-03-101-0/+110
| | | | | | | | | | | Top level stylesheets need to have their media query passed in. So we need a way to parse standalone media queries. This was hacked together to explore doing that. However, it encounteded an issue where it seems the parseAtRule() function in src/parse/parse.c doesn't handle the full grammar for media queries.
* Media Queries: sort out object lifetimesJohn-Mark Bell2019-03-101-2/+10
|
* Media Queries: datastructures and plumbing.John-Mark Bell2019-03-101-9/+6
| | | | | | | | | | | | | No parse implementation as yet. Selection hasn't been updated, either. One item of note in that area is that a client currently provides the media for top-level sheets being added to a selection context. This probably needs to change to providing a lwc_string containing the verbatim media query from the containing document's import mechanism. That way, the internal representation of media queries can remain opaque to clients.
* Strip trailing whitespace.Michael Drake2017-09-041-57/+57
|
* Various changes which modify API and ABI:Michael Drake2013-12-131-73/+55
| | | | | | | | | - 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.
* Clear up CLANG warnings in css__stylesheet_selector_append_specificDaniel Silverstone2012-07-011-4/+4
|
* @font-face support. Credit: James MontgomerieJohn Mark Bell2011-12-041-13/+13
| | | | | | Things missing: parser tests; the following descriptors: font-feature-settings, font-stretch, font-variant, unicode-range. svn path=/trunk/libcss/; revision=13244
* Extend lifetime of property stringsJohn Mark Bell2011-10-061-0/+14
| | | | svn path=/trunk/libcss/; revision=12974
* Make "params" argument to css_stylesheet_create const. Thanks to James ↵Michael Drake2011-09-021-1/+1
| | | | | | Montgomerie. svn path=/trunk/libcss/; revision=12697
* Add structure versioning for client inputJohn Mark Bell2011-03-131-1/+3
| | | | svn path=/trunk/libcss/; revision=12007
* CSS3 NamespacesJohn Mark Bell2011-03-121-13/+28
| | | | svn path=/trunk/libcss/; revision=11972
* add system font hookVincent Sanders2011-02-021-0/+3
| | | | svn path=/trunk/libcss/; revision=11599
* Fix specificity calculation for prefix, suffix, and substring attribute ↵John Mark Bell2011-01-311-0/+3
| | | | | | | | selectors. Fix dumping of these selectors when debugging selector chains svn path=/trunk/libcss/; revision=11569
* CSS3 SelectorsJohn Mark Bell2011-01-311-14/+24
| | | | svn path=/trunk/libcss/; revision=11557
* Provide hook for system colour name -> RGB conversionJohn Mark Bell2011-01-291-41/+34
| | | | svn path=/trunk/libcss/; revision=11522
* Rename all css_[^_] internal symbols to css__ so that they're nicely namespacedDaniel Silverstone2011-01-261-59/+59
| | | | svn path=/trunk/libcss/; revision=11492
* Fix renaming of css_parser_parse_chunk from css_parser_css__parse_chunk to ↵Daniel Silverstone2011-01-261-1/+1
| | | | | | css__parser_parse_chunk svn path=/trunk/libcss/; revision=11491
* 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
* Merge parser autogeneration and string handling refactor branch ↵Vincent Sanders2011-01-191-118/+170
| | | | | | r=jmb,kinnison,vince svn path=/trunk/libcss/; revision=11408
* Ensure that string vector exists before freeing itJohn Mark Bell2011-01-051-1/+3
| | | | svn path=/trunk/libcss/; revision=11210
* Add string vector capability to stylesheet (r=jmb)Vincent Sanders2010-12-051-0/+85
| | | | | | Move properties ready for split svn path=/trunk/libcss/; revision=11005
* Provide notification hook for imported stylesheets, to enable clients to ↵John Mark Bell2010-12-051-0/+6
| | | | | | parallelise their processing svn path=/trunk/libcss/; revision=10999
* Remove ownerNode and ownerRule fields from stylesheet objects.John Mark Bell2010-06-271-2/+0
| | | | | | | | | | | These prevent stylesheets being used in multiple contexts simultaneously. Their values can be inferred from the context in which the stylesheet is used. Replace use of ownerRule to backtrack in style selection with a (fixed-size) stack of rules to process. This prevents crashes when a sheet that was previously imported somewhere is reused as a top-level sheet. svn path=/trunk/libcss/; revision=10581
* Ownership of imported stylesheets is retained by the client.John Mark Bell2010-04-111-3/+2
| | | | svn path=/trunk/libcss/; revision=10367
* Fix RISC OS buildJohn Mark Bell2010-04-051-3/+3
| | | | svn path=/trunk/libcss/; revision=10247
* Do not unref strings referenced by bytecode we've just copied when appending ↵John Mark Bell2010-03-281-2/+2
| | | | | | to a rule's style. svn path=/trunk/libcss/; revision=10174
* Make libcss suitable for the new libwapcaplet behaviour.Daniel Silverstone2010-03-281-143/+157
| | | | svn path=/trunk/libcss/; revision=10168
* Fix libcss to use new libwapcaplet behaviour.Daniel Silverstone2010-03-271-22/+16
| | | | | | | TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
* Origin and media are not properties of the stylesheet. John Mark Bell2010-01-121-41/+1
| | | | | | | | | They are properties of the context in which the stylesheet is used. Therefore, for top-level sheets, this information must be provided at selection time. For child sheets, the origin is inherited from their parent and the applicable media types are specified on the linking mechanism. svn path=/trunk/libcss/; revision=9802
* 1) Allocate css_style bytecode in 16 byte chunksJohn Mark Bell2009-08-291-13/+66
| | | | | | | | | | | | | | | | | | 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
* Calculate the in-memory size of stylesheets and provide some API to access this.John Mark Bell2009-07-271-0/+137
| | | | svn path=/trunk/libcss/; revision=8830
* Fix selector hash some more. It turns out that I'd forgotten how it was ↵John Mark Bell2009-07-171-1/+2
| | | | | | meant to work. svn path=/trunk/libcss/; revision=8607
* Fix processing of rules after @import -- previously, they were completely ↵John Mark Bell2009-07-081-0/+2
| | | | | | ignored. svn path=/trunk/libcss/; revision=8386
* Len already includes the NUL, so stop trying to manually terminate url/title.John Mark Bell2009-07-011-2/+0
| | | | svn path=/trunk/libcss/; revision=8231
* Make all URIs absoluteJohn Mark Bell2009-07-011-1/+10
| | | | svn path=/trunk/libcss/; revision=8228
* Support for parsing inline stylesJohn Mark Bell2009-06-261-7/+22
| | | | svn path=/trunk/libcss/; revision=8024
* Nested block support.John Mark Bell2009-06-261-71/+114
| | | | svn path=/trunk/libcss/; revision=8014
* Most of the interned string lifetimes are at least no shorter than we think ↵Daniel Silverstone2009-02-151-6/+41
| | | | | | they ought to be. svn path=/trunk/libcss/; revision=6532
* Quirks mode parsingJohn Mark Bell2009-02-151-2/+53
| | | | svn path=/trunk/libcss/; revision=6519
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-26/+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-15/+139
| | | | | | 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
* Discard selectors that contain pseudo elements in non-terminal simple selectors.John Mark Bell2009-02-141-2/+10
| | | | | | More test data for selectors with pseudo elements svn path=/trunk/libcss/; revision=6473
* Synchronise media type bitfield with reality -- it's 64bits wide.John Mark Bell2009-02-121-2/+2
| | | | svn path=/trunk/libcss/; revision=6453
* Distinguish between pseudo classes and pseudo elementsJohn Mark Bell2009-02-101-5/+2
| | | | svn path=/trunk/libcss/; revision=6406
* Use a chaining hash for selectors -- permits easy sorting of hash entries by ↵John Mark Bell2009-01-261-4/+6
| | | | | | specificity/rule index. svn path=/trunk/libcss/; revision=6280