Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch: Activities (migrated to new ActivityManager pattern): - Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity - Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity, DictionaryWordSelectActivity, LookedUpWordsActivity - Bookmark: EpubReaderBookmarkSelectionActivity - Book management: BookManageMenuActivity, EndOfBookMenuActivity - OPDS: OpdsServerListActivity, OpdsSettingsActivity - Utility: DirectoryPickerActivity, NumericStepperActivity Utilities (unchanged): - BookManager, BookSettings, BookmarkStore, BootNtpSync - Dictionary, LookupHistory, TimeSync, OpdsServerStore Libraries: PlaceholderCover, TableData, ChapterXPathIndexer Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover Docs: KOReader sync XPath mapping Migration changes: - ActivityWithSubactivity -> Activity base class - Callback constructors -> finish()/setResult() pattern - enterNewActivity() -> startActivityForResult() - Activity::RenderLock&& -> RenderLock&& These files won't compile yet - they reference mod settings and I18n strings that will be added in subsequent phases. Made-with: Cursor
2.6 KiB
2.6 KiB
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 inc1b8e53)b8e743e(#995) - PNGdec buffer size (ported inc1b8e53)588984e(#1010) - Dangling pointer (ported in18be265)87d9d1d(#978) - Font drawing performance (ported in3a06418)2cc497c(#957) - Double FAST_REFRESH (ported inad282ca)
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 likeauto,inherit - Added
deleteCache()method to CssParser - Moved
CSS_CACHE_VERSIONto 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 callloadFromCache()and invalidate sections on stale cache
2. Ported #1014 (Strip unused CSS rules)
File: CssParser.cpp
- Added selector filtering in
processRuleBlockWithStyleto skip+,>,[,:,#,~,*, and whitespace selectors - Fixed
normalized()trailing whitespace to usewhileloop 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
homeTopPaddingfrom 20 to 40 - Computed
bookWidthfrom cover BMP aspect ratio (clamped to 90% screen width, fallback to half-width) - Fixed centering: added
rect.xoffset tobookX,boxX, andcontinueBoxX - 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