1.7 KiB
1.7 KiB
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.swiftrg -n "RDEPUBTextOffsetRangeInfo|normalizedTextSelection|search\\(|pageNumber\\(for: searchMatch\\)" Sources/RDReaderView/EPUBUI/RDEPUBReaderController.swift Sources/RDReaderView/EPUBCore Sources/RDReaderView/EPUBTextRenderingrg -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:
- the code seam it will modify
- the reader behavior it must preserve or prove