summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Media queries: Convert to level 4 range in the correct place.Michael Drake2019-05-061-6/+6
| | | | | In mq_parse_range we already have a level 4 range. We need to convert <mf-plain> in mq_parse_media_feature.
* Media queries: Reverse operator for level 4 range conversion.Michael Drake2019-05-061-2/+2
| | | | First op/value are encoded as `value op name`.
* Fix typo in assertion.Michael Drake2019-05-051-1/+1
|
* Media queries: Selection: Start implementing mq matching.Michael Drake2019-05-051-8/+60
|
* Media queries: Parse: Convert level 3 style ranges to level 4.Michael Drake2019-05-051-0/+57
| | | | This will make the selection code's life easier.
* Media queries: Intern the query descriptor name as lower case.Michael Drake2019-05-051-1/+4
|
* Media queries: Imported sheets: Media type falls back to "all".Michael Drake2019-05-051-1/+9
|
* Merge branch 'tlsa/jmb/mq2'Michael Drake2019-05-0426-244/+1698
|\
| * Example: Update for new API for media queries.Michael Drake2019-05-041-2/+5
| |
| * Tests: Update for new API for media queries.Michael Drake2019-05-041-13/+14
| | | | | | | | Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org>
| * Media queries: Update selection API to support media queries.Michael Drake2019-05-046-26/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API changes are: 1. When building a selection context, stylesheets added with `css_select_ctx_{append|insert}_sheet()` now have to have media strings associcated with them. Previously they took a simple bitfield for CSS media type. 2. When selecting for an element, the client needs to specify the current media requirements. Previously it only had to provide the bitfield for CSS media type. 3. Same for the css_select_font_faces API. The selection handling has been updated to handle the new API, however it is currently only looking at the media type when performing selection. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
| * Media queries: Fix documentation typo.Michael Drake2019-05-041-1/+1
| | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
| * Media queries: Selection: For now, we just say the condition matches.Michael Drake2019-05-041-1/+2
| | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
| * Media queries: Validate the query string parameters.Michael Drake2019-05-041-0/+4
| | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
| * Media queries: Squash cond_parts parts leak.Michael Drake2019-05-041-0/+1
| | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
| * Stylesheet: Drop temporary code to test media query parsing.Michael Drake2019-03-101-7/+0
| |
| * Media queries: Add media type member to struct css_media.Michael Drake2019-03-101-0/+3
| |
| * Media queries: Move css_parse_media_query to parse/mq.c file.Michael Drake2019-03-103-106/+107
| | | | | | | | 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
| |
| * Parse: simplify token vector cleanup.John-Mark Bell2019-03-101-48/+28
| | | | | | | | | | | | There's not much point having every call site have to call two functions every time they want to clean the token vector. Instead, have a single function call to do both parts of the cleanup.
| * Parse: use an explicit state for media queries.John-Mark Bell2019-03-101-3/+31
| | | | | | | | | | This simply wraps the existing at-rule parser but is able to clean up afterwards.
| * Media queries: Ensure values get destroyed.Michael Drake2019-03-101-5/+16
| |
| * Media Queries: fix parsing of media-conditionJohn-Mark Bell2019-03-101-5/+6
| |
| * Tests: fix illegal display value test.John-Mark Bell2019-03-101-1/+1
| | | | | | | | | | | | | | | | | | Recovery from malformed property values involves matching the various nesting mechanisms. Thanks to the bug in the parseAny state machine, this code was never run. The test data contained mismatched open parentheses, causing the recovery logic to continue reading until EOF. Fix the test input to match the expectations of the test assertions.
| * Parse: only emit start ruleset if there's a braceJohn-Mark Bell2019-03-101-11/+20
| |
| * Parse: fix handling of EOFJohn-Mark Bell2019-03-101-8/+20
| |
| * Parse: maintain stack of brackets in parseAnyJohn-Mark Bell2019-03-101-7/+7
| |
| * Parse: fix broken state transition in parseAnyJohn-Mark Bell2019-03-101-2/+2
| |
| * Parse: fix dump of tokens with interned stringsJohn-Mark Bell2019-03-101-1/+5
| |
| * HACKS for testing Media Queries parsing.Michael Drake2019-03-104-1/+131
| | | | | | | | | | | | | | | | | | | | | | 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-103-54/+62
| |
| * Media Queries: API for stylesheet import doesn't take media now.Michael Drake2019-03-102-6/+2
| |
| * Media Queries: Update stylesheet import for media query lists.Michael Drake2019-03-101-2/+4
| |
| * Media Queries: Update rule_good_for_media for new mq struct.Michael Drake2019-03-101-6/+44
| | | | | | | | | | Doesn't currently match media query conditions, only the media type.
| * Media Queries: Store type as value, rather than lwc_string.Michael Drake2019-03-102-4/+60
| | | | | | | | | | | | Otherwise we need to convert it in selection, and select/ doesn't have access to the css_language interned strings table.
| * Media Queries: Fix range parsing.Michael Drake2019-03-101-1/+1
| |
| * Media Queries: Client media specification structure.Michael Drake2019-03-101-0/+126
| |
| * Code style: Use spaces for alignment.Michael Drake2019-03-101-4/+4
| |
| * Media Queries: Add error-path resource cleanup.Michael Drake2019-03-101-28/+16
| |
| * Media Queries: Add destruction functions.Michael Drake2019-03-102-1/+58
| |
| * Documentation: Add new units to bytecode docs.Michael Drake2019-03-101-0/+9
| |
| * Media Queries: Implement parsing <general-enclosed>.Michael Drake2019-03-101-1/+98
| |
| * Media Queries: Squash invalid use of unused variable warning.Michael Drake2019-03-101-1/+2
| | | | | | | | error: ‘last’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
| * Media Queries: Add forward declaration of mq_parse_condition.Michael Drake2019-03-101-0/+4
| |
| * Media Queries: mq_parse_ratio doesn't need language object.Michael Drake2019-03-101-5/+5
| |
| * Media Queries: Minor fixes.Michael Drake2019-03-101-4/+5
| |
| * Strings: Add 'infinite'.Michael Drake2019-03-102-1/+2
| |
| * Media Queries: Include string.h for memset.Michael Drake2019-03-101-0/+2
| |
| * Media Queries: Include stylesheet.h for css_style.Michael Drake2019-03-101-0/+1
| |