realloc() may move the array before the duplicate check returns
early, leaving *strlist pointing at freed memory. Assign the new
pointer before inspecting entries.
Refs GHSA-v42w-m2h7-fm23.
- Cap the token buffer position across chunked input so a selector
spanning 511-byte reads cannot write past css_parser_t::buffer.
- Reject selector names longer than MAX_NAME_LEN in
css_selector_create() instead of writing past name[].
- Bound selector name composition in css_selector_collect_name()
with explicit length checks.
- Fix trim-left in css_parser_commit() reading buffer[pos] instead
of buffer[i] and moving the wrong number of bytes.
Fixes GHSA-v42w-m2h7-fm23.
- track rules by the source name passed to the loader
- add css_remove_style_rules() and ui_unload_css_string()
- refresh computed styles after removal and cover it with a test
Tailwind-generated doc-viewer CSS contains standard values LCUI does not implement (fixed, sticky, grid, table, ...). Skipping them is expected fallback behavior, so log the property or value at debug level instead of error.
The shorthand and default-inheritance checks reused one fixed description inside loops, so the log showed identical lines with no property context. Include the selector and property name in each assertion name.
versions.json is now the single source of truth; scripts/sync-versions.mjs keeps xmake descriptors, tracked version headers and package.json in sync. Sub-library versions are aligned with the published 1.0.0 packages. C11 is set at the project level, and _GNU_SOURCE is defined on POSIX so strict C11 still exposes clock_gettime, strdup and recursive pthread mutexes.
Use Linux-specific expected heights for Ubuntu Mono wrapping, relax the auto-size width bound, and fix selector/style leaks in the CSS text decoration tests.
Drop ad_count_children and count_by_type, which no longer have any callers, and initialize footer to NULL before scanning dialog children to silence GCC's -Wmaybe-uninitialized in release builds.
GCC reports -Werror=enum-compare because CSS_PROP_TABLE_COUNT is an anonymous enum while STYLE_KEY_TOTAL belongs to css_prop_key_t. Cast both operands to int so the compile-time coverage check also builds with GCC.
Initialize the fit-content width during CSS cascade instead of leaving a
stack-garbage value, and apply tooltip visibility in the reveal frame so the
behavior no longer depends on an extra layout pass.
- register align-self and resolve auto against the container align-items
- apply per-item alignment to measuring, cross-axis layout and static positions
- align item media icons with the first title line
- restore intrinsic sizes before measuring flex and block children
- resolve percentage widths against indefinite parents as auto
- reflow parents when child content changes and refresh background geometry
- ignore hidden flex items in gap insertion and use spec static positions
- keep text paint size in sync with the current capture scale
- merge own sizehint with child layout extent; keep sizehint callable
- support cross-axis auto margins and flex-basis content/percentage
- fix space-evenly gap, canvas destroy, breadcrumb intrinsic width and dynamic text intrinsic refresh
- add flex contract, sizehint, empty layout and field layout suites
- move empty/field scenarios to theme-independent test fixtures
- document layout coverage and known gaps
Register the `cursor` property (36 standard keywords, no url() images),
add css_cursor_t, a 6-bit type_bits field and the 34 new keywords, and
implement css_cascade_cursor(). Defaults to `auto`.
Add the CSS gap shorthand and its row-gap/column-gap longhands for flex
containers.
- Register row-gap/column-gap as longhand properties and gap as a
shorthand accepting [ normal | <length-percentage> ]{1,2}.
- Add css_gap_t (CSS_GAP_INHERIT/SET/NORMAL) and corresponding
type/unit/value fields on css_computed_style_t.
- Implement cascade logic in lib/css/src/properties/gap.c, resolving
normal to zero and rejecting auto.
- Apply gaps in ui_flexbox_layout: main-axis gap participates in line
size, wrap detection, justify-content space and per-item positioning;
cross-axis gap participates in cross-size accumulation and line
positioning. The last item/line never gets a trailing gap. Percentage
gaps resolve against the container content-box on the corresponding
axis.
- Cover gap parsing/cascading in lib/css/tests (single/two values,
axis-only, normal, percentage) and add a flex layout integration test
exercising column-gap, row-gap, wrapped two-value gap and normal.
When parsing a value-less declaration that ended with '}' (e.g. inside
`.gap-2 { gap: 8px }` where `gap` is not yet a supported property),
the parser stayed in CSS_PARSER_TARGET_VALUE state. The next rule was
then fed into the value parser with style_parser.property already
cleared, producing misleading "unsupported property" errors and
corrupting subsequent parsing.
Switch target to CSS_PARSER_TARGET_NONE on '}' and to
CSS_PARSER_TARGET_KEY on ';' inside the switch, mirroring the
end-of-block / end-of-declaration semantics. Add an assert to catch any
future regression where css_parser_commit is reached without a
property name.
- Remove per-lib set_project() calls that overrode the global lcui
project name; xmake show now correctly reports the project as lcui.
- Move per-lib set_version() into the corresponding target() block so
each sub-library keeps an independent version usable for standalone
packaging.
- Add set_default(false) and set_group(examples) to all pandagl
examples so they are no longer picked up by xmake package.
- Rename targets to use dashes for consistency:
pandagl_cairo_example -> pandagl-cairo-example
preview_block_layout -> preview-block-layout
preview_flex_layout -> preview-flex-layout
preview_scrollbar -> preview-scrollbar
preview_widget_opacity -> preview-widget-opacity
- Bump yutil submodule to drop its set_project() call as well.
Restructure the test infrastructure with these changes:
* Extend libctest with ctest_suite_t, ctest_parse_args, ctest_run_suites and CTEST_MAIN macro to standardize test entry points; support --grep / --grep= / --list / --interactive flags; add ctest-tests for self-tests.
* Regroup tests by lib boundary: sink unit tests into lib/<name>/tests/ with <lib>_<topic> entry function names, move fixtures into lib/<name>/tests/fixtures/, rename top-level tests/cases/ to tests/integration/ for cross-lib integration tests.
* Add tests/scenes/ for reusable widget tree builders shared by integration cases and visual preview binaries; add tests/previews/ with 4 diagnostic binaries (flex_layout, block_layout, widget_opacity, scrollbar).
* Rewrite all describe/equal description strings using 'should ...' style or noun topic names; drop redundant lcui_quit/lcui_main calls from integration cases.
* Integrate xmake test via add_tests(\default\) and a shared tests.runnable rule defined in the root xmake.lua; the rule wraps the test binary with drmemory (Windows) or valgrind (Linux) when option memcheck=y.
* Drop the lcui-tests aggregation: lcui-tests now contains only integration cases and scenes, not the union of lib tests. Use xmake test to run everything across libs.
* Fix .clang-format: InsertNewlineAtEndOfFile -> InsertNewlineAtEOF (correct key for clang-format 16+).
* Update AGENTS.md with the new test layout, naming rules, description style and run commands.
* Update CI to use xmake test and xmake f --memcheck=y instead of per-lib runs.