Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update Component version for releaserelease/0.9.0 | Vincent Sanders | 2019-06-26 | 1 | -1/+1 |
| | |||||
* | Media queries: Tweak mq_parse_media_in_parens return style. | Michael Drake | 2019-06-12 | 1 | -3/+4 |
| | |||||
* | resolve use of uninitialised pointer in media query initialisation | Vincent Sanders | 2019-06-12 | 1 | -0/+3 |
| | |||||
* | Media queries: Simplify parsed mq data structure slightly. | Michael Drake | 2019-06-11 | 3 | -40/+20 |
| | |||||
* | Stylesheet: Increase size of storage for selector count for rules. | Michael Drake | 2019-06-09 | 1 | -4/+4 |
| | | | | | | We've found instances of well over 256 selectors for a rule in the wild. `for N in $(seq 0 254); do echo ".selector-$N,"; done; echo ".selector-255 {}"` | ||||
* | Media queries: Squash an invalid warning from certain compilers. | Michael Drake | 2019-06-09 | 1 | -1/+1 |
| | | | | src/parse/mq.c:1125:15: error: 'query' may be used uninitialized in this function [-Werror=uninitialized] | ||||
* | Media queries: Handle errors in a media query list correctly. | Michael Drake | 2019-06-09 | 1 | -8/+39 |
| | |||||
* | Media queries: Squash error-path leaks of feature names. | Michael Drake | 2019-06-05 | 1 | -3/+3 |
| | |||||
* | Media queries: <ratio> isn't allowed to have 0 numerator or denominator. | Michael Drake | 2019-06-05 | 1 | -0/+4 |
| | | | | | | | | | | The <ratio> value type is a positive (not zero or negative) <integer> followed by optional whitespace, followed by a solidus ('/'), followed by optional whitespace, followed by a positive <integer>. <ratio>s can be ordered or compared by transforming them into the number obtained by dividing their first <integer> by their second <integer>. -- https://www.w3.org/TR/mediaqueries-4/#aspect-ratio | ||||
* | Computed styles: Remove last traces of extension blocks. | Michael Drake | 2019-05-12 | 8 | -722/+548 |
| | |||||
* | Tests: Add test for non-inherited properties. | Michael Drake | 2019-05-12 | 1 | -0/+128 |
| | | | | | | | These were broken before the uncommon extension block was dropped. Based on test provided by: https://bugs.netsurf-browser.org/mantis/view.php?id=2641 | ||||
* | Computed styles: Drop uncommon extension blocks. | Michael Drake | 2019-05-12 | 24 | -2732/+2059 |
| | | | | | | | | | | | | | | They were a space saving feature, but they became largely redundant with computed style sharing. They also made the code complex and buggy in many places. E.g. the cascade, inheritance / composition, and intial values all needed to behave corretly when they, or their parent, had or didn't have an uncommon block. Also, only the uncommon block was really used. Fixes: https://bugs.netsurf-browser.org/mantis/view.php?id=2641 | ||||
* | Media queries: Feature matching: Compare lengths in pixels. | Michael Drake | 2019-05-07 | 2 | -47/+148 |
| | | | | | | | | Clients now provide viewport dimensions in pixels. LibCSS can now convert the units from the stylesheet to pixels. Client must also provide default font size and line height for handling viewport and root element relative sizes. | ||||
* | Media queries: Start implementing feature matching. | Michael Drake | 2019-05-06 | 1 | -5/+85 |
| | | | | | | | | | | | | Currently we just look at: - width - height TODO: - Unit conversion - Use interned string comparison | ||||
* | lexer: Emit ">=" tokens. | Michael Drake | 2019-05-06 | 1 | -0/+18 |
| | |||||
* | Media queries: Pass the right tokens to mq_populate_value. | Michael Drake | 2019-05-06 | 1 | -2/+2 |
| | |||||
* | lexer: Emit "<=" as a CSS_TOKEN_CHAR. | Michael Drake | 2019-05-06 | 1 | -0/+5 |
| | | | | | | | Previously the "<" was output as a CSS_TOKEN_CHAR, and the "=" was in the next token. CSS media queries adds "<=". | ||||
* | Media queries: A query without a type defaults to type: all. | Michael Drake | 2019-05-06 | 1 | -2/+6 |
| | |||||
* | Media queries: Convert to level 4 range in the correct place. | Michael Drake | 2019-05-06 | 1 | -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 Drake | 2019-05-06 | 1 | -2/+2 |
| | | | | First op/value are encoded as `value op name`. | ||||
* | Fix typo in assertion. | Michael Drake | 2019-05-05 | 1 | -1/+1 |
| | |||||
* | Media queries: Selection: Start implementing mq matching. | Michael Drake | 2019-05-05 | 1 | -8/+60 |
| | |||||
* | Media queries: Parse: Convert level 3 style ranges to level 4. | Michael Drake | 2019-05-05 | 1 | -0/+57 |
| | | | | This will make the selection code's life easier. | ||||
* | Media queries: Intern the query descriptor name as lower case. | Michael Drake | 2019-05-05 | 1 | -1/+4 |
| | |||||
* | Media queries: Imported sheets: Media type falls back to "all". | Michael Drake | 2019-05-05 | 1 | -1/+9 |
| | |||||
* | Merge branch 'tlsa/jmb/mq2' | Michael Drake | 2019-05-04 | 26 | -244/+1698 |
|\ | |||||
| * | Example: Update for new API for media queries. | Michael Drake | 2019-05-04 | 1 | -2/+5 |
| | | |||||
| * | Tests: Update for new API for media queries. | Michael Drake | 2019-05-04 | 1 | -13/+14 |
| | | | | | | | | Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org> | ||||
| * | Media queries: Update selection API to support media queries. | Michael Drake | 2019-05-04 | 6 | -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 Drake | 2019-05-04 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk> | ||||
| * | Media queries: Selection: For now, we just say the condition matches. | Michael Drake | 2019-05-04 | 1 | -1/+2 |
| | | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk> | ||||
| * | Media queries: Validate the query string parameters. | Michael Drake | 2019-05-04 | 1 | -0/+4 |
| | | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk> | ||||
| * | Media queries: Squash cond_parts parts leak. | Michael Drake | 2019-05-04 | 1 | -0/+1 |
| | | | | | | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk> | ||||
| * | Stylesheet: Drop temporary code to test media query parsing. | Michael Drake | 2019-03-10 | 1 | -7/+0 |
| | | |||||
| * | Media queries: Add media type member to struct css_media. | Michael Drake | 2019-03-10 | 1 | -0/+3 |
| | | |||||
| * | Media queries: Move css_parse_media_query to parse/mq.c file. | Michael Drake | 2019-03-10 | 3 | -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 Drake | 2019-03-10 | 1 | -9/+28 |
| | | | | | | | | | | This converts the experimental code to test the media query parsing into a useful function. | ||||
| * | Media queries: Drop parse debug output. | Michael Drake | 2019-03-10 | 1 | -17/+1 |
| | | |||||
| * | Parse: simplify token vector cleanup. | John-Mark Bell | 2019-03-10 | 1 | -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 Bell | 2019-03-10 | 1 | -3/+31 |
| | | | | | | | | | | This simply wraps the existing at-rule parser but is able to clean up afterwards. | ||||
| * | Media queries: Ensure values get destroyed. | Michael Drake | 2019-03-10 | 1 | -5/+16 |
| | | |||||
| * | Media Queries: fix parsing of media-condition | John-Mark Bell | 2019-03-10 | 1 | -5/+6 |
| | | |||||
| * | Tests: fix illegal display value test. | John-Mark Bell | 2019-03-10 | 1 | -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 brace | John-Mark Bell | 2019-03-10 | 1 | -11/+20 |
| | | |||||
| * | Parse: fix handling of EOF | John-Mark Bell | 2019-03-10 | 1 | -8/+20 |
| | | |||||
| * | Parse: maintain stack of brackets in parseAny | John-Mark Bell | 2019-03-10 | 1 | -7/+7 |
| | | |||||
| * | Parse: fix broken state transition in parseAny | John-Mark Bell | 2019-03-10 | 1 | -2/+2 |
| | | |||||
| * | Parse: fix dump of tokens with interned strings | John-Mark Bell | 2019-03-10 | 1 | -1/+5 |
| | | |||||
| * | HACKS for testing Media Queries parsing. | Michael Drake | 2019-03-10 | 4 | -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 Drake | 2019-03-10 | 3 | -54/+62 |
| | |