MantisBT - LibCSS | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0002818 | LibCSS | LibCSS | public | 2021-05-07 06:32 | 2021-05-10 10:40 |
Reporter | Ralf Junker | ||||
---|---|---|---|---|---|
Assigned To | Michael Drake | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | feedback | Resolution | reopened | ||
Platform | OS | OS Version | |||
Fixed in CI build # | |||||
Reported in CI build # | |||||
Summary | 0002818: Regresssion in css_font_resolution_fn: Unit values no longer passed to computed values | ||||
Description | Unit values specified in a css_font_resolution_fn() callback are no longer passed on to the computed style result values. | ||||
Steps To Reproduce | Example css_font_resolution_fn() implementation: css_error css_font_resolution_func(void *pw, lwc_string *name, css_system_font *system_font) { system_font->style = CSS_FONT_STYLE_NORMAL; system_font->variant = CSS_FONT_VARIANT_NORMAL; system_font->weight = CSS_FONT_WEIGHT_NORMAL; system_font->size.size = INTTOFIX(22); system_font->size.unit = CSS_UNIT_PT; // + (1u << 8); system_font->line_height.size = INTTOFIX(33); system_font->line_height.unit = CSS_UNIT_EM; // + (1u << 8); lwc_intern_string("abcde", 5, &system_font->family); return CSS_OK; } Attached is the complete source of the modified select.c test, with expected result data. The pt and em units do not show up in the result. The result unit is always px for all unit types set in the callback. | ||||
Additional Information | The bug dates back to GIT 0b84fa9cc67593667002d7e7953d90400a66ac09, 2020-11-15 which changes the values of the UNIT_XX values so that CSS_UNIT_PT no longer matches UNIT_PT. Function css__to_css_unit() in helpers.h relied on this in the past. Now it no longer matches and always returns 0, which equals CSS_UNIT_PX. Units are recognized if the new length bit is set. Remove comments from the example above to see the effects. Suggestion: Assert that only valid values are passed to css__to_css_unit(), or return an error instead of 0 == CSS_UNIT_PX. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | select.c.modified.zip (7,972) 2021-05-07 06:32 https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=703&type=bug |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2021-05-07 06:32 | Ralf Junker | New Issue | |||
2021-05-07 06:32 | Ralf Junker | File Added: select.c.modified.zip | |||
2021-05-07 09:39 | Michael Drake | Note Added: 0002334 | |||
2021-05-07 09:39 | Michael Drake | Status | new => acknowledged | ||
2021-05-08 17:05 | Michael Drake | Assigned To | => Michael Drake | ||
2021-05-08 17:05 | Michael Drake | Status | acknowledged => resolved | ||
2021-05-08 17:05 | Michael Drake | Resolution | open => fixed | ||
2021-05-08 17:05 | Michael Drake | Note Added: 0002335 | |||
2021-05-10 10:40 | Ralf Junker | Status | resolved => feedback | ||
2021-05-10 10:40 | Ralf Junker | Resolution | fixed => reopened | ||
2021-05-10 10:40 | Ralf Junker | Note Added: 0002336 |