Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix list style formatting with negative values | Vincent Sanders | 2021-02-13 | 1 | -158/+161 |
| | |||||
* | Initialise the string map with a better macro | Vincent Sanders | 2021-02-12 | 1 | -594/+598 |
| | | | | | To avoid duplicating the string for every string map entry use a simple macro. | ||||
* | implement the remaining css 3.1 simple predefined counter styles | Vincent Sanders | 2021-02-12 | 6 | -4/+370 |
| | |||||
* | implement the firt half of the css 3.1 simple predefined counter styles | Vincent Sanders | 2021-02-09 | 6 | -98/+321 |
| | |||||
* | Use two more bits, six total, for the list style property | Vincent Sanders | 2021-02-09 | 4 | -526/+526 |
| | | | | | | Adding the two bits that were previously reserved (Must Be Zero) for use in the list style property gives space for sixty four styles instead of sixteen. | ||||
* | add cyclic system to list style formatting | Vincent Sanders | 2021-02-08 | 1 | -2/+75 |
| | |||||
* | make roman numeral list style obey range limit and fix decimal fallback | Vincent Sanders | 2021-02-06 | 1 | -15/+31 |
| | |||||
* | make list stle structures const and fix initialisation for older compilers | Vincent Sanders | 2021-02-06 | 1 | -22/+25 |
| | |||||
* | add text formatting of values with list styles | Vincent Sanders | 2021-02-05 | 2 | -1/+543 |
| | |||||
* | select: Split out bytecode to unit conversion helper. | Michael Drake | 2020-12-04 | 4 | -43/+54 |
| | |||||
* | select: mq: Fix to convert parse unit types to public unit types. | Michael Drake | 2020-12-01 | 1 | -4/+9 |
| | |||||
* | parse: properties: Add property-specific unit class masks. | Michael Drake | 2020-11-15 | 4 | -22/+270 |
| | | | | | | | | | There's a table we can index into for calc(): const uint32_t property_unit_mask[CSS_N_PROPERTIES] And there are #defines for where the code is already property-specific, avoiding the lookup. | ||||
* | parse: properties.gen: Convert to using unit allow masks. | Michael Drake | 2020-11-15 | 1 | -21/+21 |
| | |||||
* | bytecode: Change unit representation, so that length has a bit set. | Michael Drake | 2020-11-15 | 1 | -42/+44 |
| | | | | This means that we can use a mask to check the unit class. | ||||
* | select: computed: Squash use of uninitialised variable warning. | Michael Drake | 2020-11-13 | 1 | -1/+1 |
| | |||||
* | Computed styles: Check length pair getter type before using result. | Michael Drake | 2020-02-24 | 1 | -0/+4 |
| | | | | Fixes use of garbage value scan-build issue. | ||||
* | Computed styles: Handle invalid width types. | Michael Drake | 2020-02-24 | 1 | -0/+2 |
| | | | | Fixes scan-build use of garbage value. | ||||
* | Parse: Add missing error checks for outline shorthand. | Michael Drake | 2020-02-24 | 1 | -3/+12 |
| | | | | | | Fixes scan-build: Value stored to 'error' is never read. Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org> | ||||
* | Parse: Add missing error checks for list-style shorthand. | Michael Drake | 2020-02-24 | 1 | -3/+12 |
| | | | | | | Fixes scan-build: Value stored to 'error' is never read. Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org> | ||||
* | Parse: Add missing error checks for flex-flow shorthand. | Michael Drake | 2020-02-24 | 1 | -2/+8 |
| | | | | | | Fixes scan-build: Value stored to 'error' is never read. Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org> | ||||
* | Media queries: Don't set parts before allocation has failed. | Michael Drake | 2020-02-24 | 1 | -1/+1 |
| | | | | | | | Squashes scan-build error about dereference of parts if the allocation fails. Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org> | ||||
* | Add end-block-content parse event | Daniel Silverstone | 2019-12-01 | 3 | -1/+40 |
| | | | | | | | | | | | | | | | 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> | ||||
* | Select hash: Simplify insertion at start of non-empty list. | Michael Drake | 2019-08-01 | 1 | -11/+10 |
| | | | | This might help Coverity understand what's going on. | ||||
* | 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 |
| | |||||
* | 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 | 1 | -39/+141 |
| | | | | | | | | 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 |
| | |||||
* | Media queries: Update selection API to support media queries. | Michael Drake | 2019-05-04 | 5 | -22/+44 |
| | | | | | | | | | | | | | | | | | | | | | 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> |