Remove all RDEPUBBackgroundTrace.log and bare print diagnostic calls

Keep only the evaluateFullPageMapTakeover: fullReplace diagnostic log
in RDEPUBPageMapReconciliationCoordinator.swift for future debugging.

Simplified RDEPUBBackgroundTrace to just the log method (removed measure
and debug gating). Removed all [EPUB][...], [ReadViewDemo], and
[EPUB][Pagination] print statements across the project.

Also includes earlier bug fixes:
- Fix stale currentPageNumber in extendPartial commit
- Fix pageCurl rebindVisiblePage during transition
- Fix keepCurrentWindow not removing pending update from queue
- Fix right-aligned text (巫鸿 bug) via avoidPageBreakInside,
  tail merger, and continuation paragraph normalization
- Add text-indent reset for aligned blocks in CSS compatibility layer

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-06-25 18:25:22 +08:00
co-authored by Claude
parent 8c5059e72f
commit 15b15d0e11
23 changed files with 95 additions and 492 deletions
@@ -97,10 +97,6 @@ extension RDReaderView: UIPageViewControllerDataSource, UIPageViewControllerDele
public func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) {
let resolvedPage = (pageViewController.viewControllers?.first as? RDReaderPageChildViewController)?.pageNum ?? -1
RDEPUBBackgroundTrace.log(
"PageCurl",
"didFinishAnimating finished=\(finished) completed=\(completed) resolvedPage=\(resolvedPage + 1) currentPageBeforeFinish=\(currentPage + 1)"
)
if completed, let firstVC = pageViewController.viewControllers?.first as? RDReaderPageChildViewController {
let pn = firstVC.pageNum
if pn != RDReaderView.blankPageNum && pn != RDReaderView.blankEndPageNum {
@@ -119,17 +115,9 @@ extension RDReaderView: UIPageViewControllerDataSource, UIPageViewControllerDele
if let target = pendingViewControllers.first as? RDReaderPageChildViewController,
target.pageNum != RDReaderView.blankPageNum,
target.pageNum != RDReaderView.blankEndPageNum {
RDEPUBBackgroundTrace.log(
"PageCurl",
"willTransitionTo targetPage=\(target.pageNum + 1) currentPage=\(currentPage + 1)"
)
predictedPageDirection = target.pageNum >= currentPage
primePageCache(around: target.pageNum, preferredForward: predictedPageDirection)
} else {
RDEPUBBackgroundTrace.log(
"PageCurl",
"willTransitionTo blank target currentPage=\(currentPage + 1)"
)
}
}
}