Files
crosspoint-reader-mod/chat-summaries/2026-02-20_22-30-summary.md

52 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

# Port Upstream 1.1.0 RC Commits to mod/master
## Task Description
Audited all 11 commits from upstream PR #992 (1.1.0 Release Candidate) and ported the remaining unported/partially-ported ones to `mod/master`.
## Commit Audit Results
### Already Fully Ported (no changes needed)
- **402e887** - Bump version to 1.1.0 (skip, not relevant)
- **3e2c518** (#997) - Glyph null-safety (ported in c1b8e53)
- **b8e743e** (#995) - PNGdec buffer size (ported in c1b8e53)
- **588984e** (#1010) - Dangling pointer (ported in 18be265)
- **87d9d1d** (#978) - Font drawing performance (ported in 3a06418)
- **2cc497c** (#957) - Double FAST_REFRESH (ported in ad282ca)
### Already Effectively Present
- **8db3542** (#1017) - Cover outlines for Lyra themes (mod's LyraTheme.cpp already draws outlines unconditionally; Lyra3CoversTheme.cpp doesn't exist in mod)
### Ported in This Session
#### 1. Aligned #1002 + Ported #1018 (CSS cache invalidation)
**Files:** `CssParser.h`, `CssParser.cpp`, `Epub.cpp`, `ChapterHtmlSlimParser.cpp`
- Added `tryInterpretLength()` (bool return + out-param) to properly skip non-length CSS values like `auto`, `inherit`
- Added `deleteCache()` method to CssParser
- Moved `CSS_CACHE_VERSION` to static class member
- Added stale cache file removal in `loadFromCache()` on version mismatch
- Added "both CSS width and height set" branch in image sizing logic
- Refactored `parseCssFiles()` to early-return when cache exists
- Refactored `load()` to call `loadFromCache()` and invalidate sections on stale cache
#### 2. Ported #1014 (Strip unused CSS rules)
**File:** `CssParser.cpp`
- Added selector filtering in `processRuleBlockWithStyle` to skip `+`, `>`, `[`, `:`, `#`, `~`, `*`, and whitespace selectors
- Fixed `normalized()` trailing whitespace to use `while` loop and also strip `\n`
- Added TODO comments for multi-class selector support
#### 3. Ported #990 (Continue reading card classic theme)
**Files:** `BaseTheme.h`, `BaseTheme.cpp`
- Changed `homeTopPadding` from 20 to 40
- Computed `bookWidth` from cover BMP aspect ratio (clamped to 90% screen width, fallback to half-width)
- Fixed centering: added `rect.x` offset to `bookX`, `boxX`, and `continueBoxX`
- Simplified cover drawing (removed scaling/centering math since bookWidth now matches aspect ratio)
## Build Status
All changes compile successfully (0 errors, 0 warnings in modified files).
## Follow-up Items
- Test on device to verify CSS cache invalidation works correctly (books with stale caches should auto-rebuild)
- Test classic theme continue reading card with various cover aspect ratios
- Test image sizing with EPUBs that specify both CSS width and height on images