summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Select test runner: Avoid forward declarations.HEADmasterMichael Drake2021-06-161-900/+802
|
* Squash warning on apple darwin CI.Michael Drake2021-06-141-7/+9
|
* Selection: Don't duplicate unit conversion members in media descriptor.tlsa/unitsMichael Drake2021-05-1915-79/+109
|
* Selection: Remove client callback for unit conversion.Michael Drake2021-05-1912-443/+390
| | | | | | | Now clients provide a unit conversion context and libcss provides code to perform unit conversion. This reduces the amount of common code that clients have to write.
* Units: Add support for length unit conversion to libcss.Michael Drake2021-05-195-97/+677
| | | | Currently only used for unit conversion.
* Units: Remove units that nobody supports.Michael Drake2021-05-1911-111/+37
|
* Add regression test for system font callback units.Michael Drake2021-05-192-1/+143
| | | | Thanks to Ralf Junker.
* 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-157-6/+155
|
* Improve list style fallback styling and range processingVincent Sanders2021-02-141-176/+231
|
* fix list style formatting with negative valuesVincent Sanders2021-02-131-158/+161
|
* 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-127-6/+389
|
* implement the firt half of the css 3.1 simple predefined counter stylesVincent Sanders2021-02-097-99/+337
|
* Use two more bits, six total, for the list style propertyVincent Sanders2021-02-095-546/+546
| | | | | | 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 formattingVincent Sanders2021-02-081-2/+75
|
* make roman numeral list style obey range limit and fix decimal fallbackVincent Sanders2021-02-061-15/+31
|
* make list stle structures const and fix initialisation for older compilersVincent Sanders2021-02-061-22/+25
|
* add text formatting of values with list stylesVincent Sanders2021-02-053-2/+567
|
* select: Split out bytecode to unit conversion helper.Michael Drake2020-12-044-43/+54
|
* select: mq: Fix to convert parse unit types to public unit types.Michael Drake2020-12-011-4/+9
|
* 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
|
* bytecode: Change unit representation, so that length has a bit set.Michael Drake2020-11-153-148/+150
| | | | This means that we can use a mask to check the unit class.
* select: computed: Squash use of uninitialised variable warning.Michael Drake2020-11-131-1/+1
|
* Update component version to 0.9.1 for releaserelease/0.9.1Vincent Sanders2020-05-241-2/+2
| | | | Signed-off-by: Vincent Sanders <vince@kyllikki.org>
* Computed styles: Check length pair getter type before using result.Michael Drake2020-02-241-0/+4
| | | | Fixes use of garbage value scan-build issue.
* Computed styles: Handle invalid width types.Michael Drake2020-02-241-0/+2
| | | | Fixes scan-build use of garbage value.
* 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>
* tests: Add test for dodgy media blockDaniel Silverstone2019-12-012-0/+10
| | | | | | | To ensure we don't regress and fail on media blocks which end with selectors with no ruleset, add a test to that effect. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.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>
* Select hash: Simplify insertion at start of non-empty list.Michael Drake2019-08-011-11/+10
| | | | This might help Coverity understand what's going on.
* Update Component version for releaserelease/0.9.0Vincent Sanders2019-06-261-1/+1
|
* 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-113-40/+20
|
* Stylesheet: Increase size of storage for selector count for rules.Michael Drake2019-06-091-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 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
* Computed styles: Remove last traces of extension blocks.Michael Drake2019-05-128-722/+548
|
* Tests: Add test for non-inherited properties.Michael Drake2019-05-121-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 Drake2019-05-1224-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 Drake2019-05-072-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 Drake2019-05-061-5/+85
| | | | | | | | | | | | Currently we just look at: - width - height TODO: - Unit conversion - Use interned string comparison