# Merge upstream master (CSS perf #779) into mod/master-img **Date**: 2026-02-15 ## Task Merge the latest changes from `master` (upstream) into `mod/master-img`. ## Changes Merged One upstream commit: `46c2109 perf: Improve large CSS files handling (#779)` This commit significantly refactored the CSS subsystem: - Streaming CSS parser with `StackBuffer` for zero-heap parsing - Extracted `parseDeclarationIntoStyle()` from inline logic - Rule limits and selector validation - `CssParser` now owns its `cachePath` and manages caching internally - CSS loading skipped when "Book's Embedded Style" is off ## Conflicts Resolved ### Section.cpp (2 regions) - Combined mod's image support variables (`contentBase`, `imageBasePath`) with master's new CSS parser loading pattern (`cssParser->loadFromCache()`) - Merged constructor call: kept mod's `epub`, `contentBase`, `imageBasePath` params while adopting master's `cssParser` local variable pattern - Added master's `cssParser->clear()` calls on error/success paths ### CssParser.cpp (1 region) - Accepted master's complete rewrite of the CSS parser - Ported mod's `width` CSS property handler into the new `parseDeclarationIntoStyle()` function ## Auto-merged Files Verified - `CssStyle.h`: `width` property and supporting code preserved - `platformio.ini`: `PNGdec` library and `PNG_MAX_BUFFERED_PIXELS` preserved; `[env:mod]` section intact; master's `gnu++2a` and `build_unflags` applied - `ChapterHtmlSlimParser.h`: image/table support members preserved - `RecentBooksStore.cpp`: `removeBook()` method preserved - `Epub.cpp`, `Epub.h`, `CssParser.h`, `ReaderActivity.cpp`: auto-merged cleanly ## Build Result - `pio run -e mod` succeeded with zero errors ## Commit - `744d616 Merge branch 'master' into mod/master-img`