summaryrefslogtreecommitdiff
path: root/src/parse/language.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid integer types with platform dependent sizeDeltaVonNeumann2023-06-171-27/+27
|
* Add end-block-content parse eventDaniel Silverstone2019-12-011-0/+38
| | | | | | | | | | | | | | | In order to cope with a situation where a block ends with a selector which has no ruleset, add an end-block-content event and in handling it, pop any intermediate states off the language stack so that we're in block mode by the time the event is completed. This fixes an assert situation caused by a ruleset such as: @media screen { dodgy } .outer { top: 10px; } Which has been encountered in the wild (likely a typo). Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Media queries: Imported sheets: Media type falls back to "all".Michael Drake2019-05-051-1/+9
|
* HACKS for testing Media Queries parsing.Michael Drake2019-03-101-1/+0
| | | | | | | | | | | 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: Parse only needs propstrings out of css_language.Michael Drake2019-03-101-2/+4
|
* Media Queries: sort out object lifetimesJohn-Mark Bell2019-03-101-13/+7
|
* Media Queries: datastructures and plumbing.John-Mark Bell2019-03-101-92/+23
| | | | | | | | | | | | | 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-122/+122
|
* Update for new lpu API.Michael Drake2013-12-141-1/+1
|
* Various changes which modify API and ABI:Michael Drake2013-12-131-17/+10
| | | | | | | | | - 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.
* Fixup for insensitive hash utilisation.Michael Drake2013-12-021-4/+10
|
* Ensure that element/class/id names in selector details always get their ↵Michael Drake2013-12-021-0/+18
| | | | caseless string.
* Early return after processing @namespace.John-Mark Bell2013-04-291-0/+3
|
* Cleanup: Remove unused UNUSED()Daniel Silverstone2012-07-191-2/+0
|
* @font-face support. Credit: James MontgomerieJohn Mark Bell2011-12-041-6/+36
| | | | | | 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-9/+1
| | | | svn path=/trunk/libcss/; revision=12974
* Tidy upJohn Mark Bell2011-10-061-1/+0
| | | | svn path=/trunk/libcss/; revision=12973
* Avoid interning propstrings table for every stylesheet, style tag and style ↵Michael Drake2011-10-061-14/+6
| | | | | | attribute. svn path=/trunk/libcss/; revision=12972
* CSS3 NamespacesJohn Mark Bell2011-03-121-35/+299
| | | | svn path=/trunk/libcss/; revision=11972
* Pedantic whitespace insertionJohn Mark Bell2011-01-311-0/+1
| | | | svn path=/trunk/libcss/; revision=11574
* C89.François Revel2011-01-311-1/+2
| | | | svn path=/trunk/libcss/; revision=11573
* CSS3 SelectorsJohn Mark Bell2011-01-311-75/+401
| | | | svn path=/trunk/libcss/; revision=11557
* Rename all css_[^_] internal symbols to css__ so that they're nicely namespacedDaniel Silverstone2011-01-261-55/+55
| | | | svn path=/trunk/libcss/; revision=11492
* Ensure there are zero global symbols without css_ or css__ in front of them. ↵Daniel Silverstone2011-01-201-2/+2
| | | | | | 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-6/+13
| | | | | | r=jmb,kinnison,vince svn path=/trunk/libcss/; revision=11408
* Hack around platform headers doing the likes of typedef float FLOAT;John Mark Bell2010-12-291-2/+3
| | | | svn path=/trunk/libcss/; revision=11138
* Provide notification hook for imported stylesheets, to enable clients to ↵John Mark Bell2010-12-051-0/+12
| | | | | | parallelise their processing svn path=/trunk/libcss/; revision=10999
* Make libcss suitable for the new libwapcaplet behaviour.Daniel Silverstone2010-03-281-37/+39
| | | | svn path=/trunk/libcss/; revision=10168
* Fix libcss to use new libwapcaplet behaviour.Daniel Silverstone2010-03-271-69/+38
| | | | | | | TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
* 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-271-30/+117
| | | | | | lwc_context_string_caseless_isequal, instead. svn path=/trunk/libcss/; revision=8815
* Change mechanism for handling case sensitivity of element names. Now has ↵John Mark Bell2009-07-171-4/+1
| | | | | | | | another selection handler callback for this. Change selector hash to use an ASCII case-insensitive hash function. svn path=/trunk/libcss/; revision=8602
* 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
* It probably helps to remember that @import also contains URL data.John Mark Bell2009-07-011-1/+19
| | | | svn path=/trunk/libcss/; revision=8229
* Less pointless inliningJohn Mark Bell2009-06-271-21/+21
| | | | svn path=/trunk/libcss/; revision=8033
* Support for parsing inline stylesJohn Mark Bell2009-06-261-4/+7
| | | | svn path=/trunk/libcss/; revision=8024
* Nested block support.John Mark Bell2009-06-261-75/+207
| | | | svn path=/trunk/libcss/; revision=8014
* Any declaration with non-whitespace tokens unconsumed after parsing the ↵John Mark Bell2009-06-251-1/+11
| | | | | | property value and potential !important is invalid. svn path=/trunk/libcss/; revision=7970
* Centralise !important handling.John Mark Bell2009-06-181-0/+14
| | | | | | Document background-attachment parser and make it behave correctly. svn path=/trunk/libcss/; revision=7856
* Lose redundant assignmentJohn Mark Bell2009-05-271-1/+1
| | | | svn path=/trunk/libcss/; revision=7585
* More refactoring groundwork. This actually compiles and passes the testsuite.John Mark Bell2009-05-261-62/+0
| | | | svn path=/trunk/libcss/; revision=7556
* Groundwork for property parser refactoring.John Mark Bell2009-05-261-2/+1
| | | | svn path=/trunk/libcss/; revision=7555
* Pedantic line wrappingJohn Mark Bell2009-05-261-1/+2
| | | | svn path=/trunk/libcss/; revision=7554
* A bunch of c89.John Mark Bell2009-04-151-6/+7
| | | | | | | Lose trailing commas. GCC 2.95 compatibility. svn path=/trunk/libcss/; revision=7099
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-7/+16
| | | | | | | | | 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-37/+2
| | | | | | 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
* Parse media type list in @import ruleJohn Mark Bell2009-02-141-6/+50
| | | | svn path=/trunk/libcss/; revision=6490
* I guess it helps if you actually flag that you've had a valid statement, so ↵John Mark Bell2009-02-141-0/+6
| | | | | | @import/@charset cease to take effect. svn path=/trunk/libcss/; revision=6484
* Drop css_error_handler and rename css_alloc to css_allocator_fnDaniel Silverstone2009-02-141-2/+2
| | | | svn path=/trunk/libcss/; revision=6482
* Assert that we've got a style once the property handler's returned CSS_OK.John Mark Bell2009-02-141-9/+7
| | | | svn path=/trunk/libcss/; revision=6479