30 lines
1.7 KiB
Markdown
30 lines
1.7 KiB
Markdown
# Phase 4: 接回现有 reader 能力链路 - Validation
|
|
|
|
## Required Checks
|
|
|
|
- `RDEPUBReaderController` 仍是 native text / web reader 的统一入口
|
|
- `RDReaderView` 不需要新增 native page metadata 感知逻辑
|
|
- native text 的高亮、搜索、TOC、恢复位置仍通过 `RDEPUBLocation` 与绝对 offset 兼容语义工作
|
|
- 字号、行高、主题、viewport 变化后的 repagination 不会把阅读状态重置为错误位置
|
|
|
|
## Verification Anchors
|
|
|
|
### Source-level
|
|
- `rg -n "paginatePublication|applyTextBook|restoreReadingLocation|currentVisibleLocation|finishPagination|pageContentView" Sources/RDReaderView/EPUBUI/RDEPUBReaderController.swift`
|
|
- `rg -n "RDEPUBTextOffsetRangeInfo|normalizedTextSelection|search\\(|pageNumber\\(for: searchMatch\\)" Sources/RDReaderView/EPUBUI/RDEPUBReaderController.swift Sources/RDReaderView/EPUBCore Sources/RDReaderView/EPUBTextRendering`
|
|
- `rg -n "requiresRepagination|refreshVisibleContentPreservingLocation|handleViewportChangeIfNeeded|rebuildExternalTextBook" Sources/RDReaderView/EPUBUI/RDEPUBReaderController.swift Sources/RDReaderView/RDURLReaderController.swift`
|
|
|
|
### Runtime / demo
|
|
- open a reflowable EPUB in `ReadViewDemo`
|
|
- navigate via TOC and ensure the target page remains correct on the native text path
|
|
- create or load a highlight, then verify it still paints after page refresh / repagination
|
|
- run a search and verify current match navigation lands on the right page
|
|
- change font size, line height, and theme; confirm the reader restores to the same semantic location
|
|
|
|
## Completion Standard
|
|
|
|
Phase 4 planning is only good enough if each executable plan names both:
|
|
|
|
1. the code seam it will modify
|
|
2. the reader behavior it must preserve or prove
|