summaryrefslogtreecommitdiff
path: root/src/parse
Commit message (Collapse)AuthorAgeFilesLines
* Add support for SVG stroke-opacity propertyMichael Orlitzky2023-10-017-4/+99
| | | | | | | | https://www.w3.org/TR/SVGTiny12/painting.html#StrokeOpacityProperty This property is unique to SVG documents, but is otherwise analogous to the usual CSS "opacity" property (and the recently-added SVG fill-opacity property).
* Add support for SVG fill-opacity propertyMichael Orlitzky2023-10-017-16/+112
| | | | | | | https://www.w3.org/TR/SVGTiny12/painting.html#FillOpacityProperty This property is unique to SVG documents, but is otherwise analogous to the usual CSS "opacity" property.
* Avoid integer types with platform dependent sizeDeltaVonNeumann2023-06-1744-295/+295
|
* properties: position: Add support for 'sticky' valueMichael Drake2022-11-033-2/+3
|
* properties: display: Add grid valuesMichael Drake2022-10-293-1/+4
|
* Parse: Nongenerated properties: Explicit defaultsMichael Drake2022-08-2931-135/+363
|
* Parse: Important: Handle new explicit defaulting valuesMichael Drake2022-08-291-1/+1
|
* Parse: Explicit default support for generated propertiesMichael Drake2022-08-291-93/+93
|
* Parse: Update code generator to support new valuesMichael Drake2022-08-291-4/+42
|
* Parse: Utils: Helper to get any value from flagsMichael Drake2022-08-291-0/+29
|
* Parse: Propstrings: Add unset and revertMichael Drake2022-08-292-2/+4
|
* Parse/MQ: unknown media-types do not matchJohn-Mark Bell2022-05-241-4/+1
| | | | | | | | Per https://www.w3.org/TR/mediaqueries-4/#error-handling, "An unknown <media-type> must be treated as not matching" Ensure, however, that a rule with a condition and no type behaves as if type was all.
* Parse/MQ: reject forbidden media-type identifiersJohn-Mark Bell2022-05-241-15/+40
| | | | | | "and" / "not" / "only" / "or" are forbidden, so must be rejected Add tests for these scenarios
* Units: Remove units that nobody supports.Michael Drake2021-05-192-9/+0
|
* parse: Squash leak of system font names.Michael Drake2021-05-191-0/+3
|
* parse: Perform client to parse unit conversion for system fonts.Michael Drake2021-05-191-2/+45
|
* add css 3.1 complex predefined counter styles for addative systemsVincent Sanders2021-02-153-3/+14
|
* Initialise the string map with a better macroVincent Sanders2021-02-121-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 stylesVincent Sanders2021-02-123-3/+42
|
* implement the firt half of the css 3.1 simple predefined counter stylesVincent Sanders2021-02-093-67/+66
|
* parse: properties: Add property-specific unit class masks.Michael Drake2020-11-154-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 Drake2020-11-151-21/+21
|
* Parse: Add missing error checks for outline shorthand.Michael Drake2020-02-241-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 Drake2020-02-241-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 Drake2020-02-241-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 Drake2020-02-241-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 eventDaniel Silverstone2019-12-013-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>
* Media queries: Tweak mq_parse_media_in_parens return style.Michael Drake2019-06-121-3/+4
|
* resolve use of uninitialised pointer in media query initialisationVincent Sanders2019-06-121-0/+3
|
* Media queries: Simplify parsed mq data structure slightly.Michael Drake2019-06-112-33/+15
|
* Media queries: Squash an invalid warning from certain compilers.Michael Drake2019-06-091-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 Drake2019-06-091-8/+39
|
* Media queries: Squash error-path leaks of feature names.Michael Drake2019-06-051-3/+3
|
* Media queries: <ratio> isn't allowed to have 0 numerator or denominator.Michael Drake2019-06-051-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
* Media queries: Pass the right tokens to mq_populate_value.Michael Drake2019-05-061-2/+2
|
* Media queries: A query without a type defaults to type: all.Michael Drake2019-05-061-2/+6
|
* 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`.
* 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
|
* 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>
* Media queries: Move css_parse_media_query to parse/mq.c file.Michael Drake2019-03-102-0/+107
| | | | It's now exposed in the mq.h header too.
* 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
|
* 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
|