You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3914ffc
Browse filesBrowse the repository at this point in the historyBrowse files
Fix multi-page PDF text/image invisibility, delete CssBox.Paint/PaintImp
Found while giving FragmentPainter a page-origin translate so
HtmlContainerInt.PerformPaint(RGraphics)'s multi-fragmentainer fallback
could stop depending on CssBox.Paint: FragmentPainter.PaintFragmentContent
painted line backgrounds/borders from the fragment tree's already
page-local rects (FragmentEmitter subtracts each band's top at build
time), but painted the actual text via CssBox.PaintWords, which reads
CssRect.Rectangle straight off the live box tree - still absolute
document-Y - offset only by ScrollOffset (always zero for PDF
generation). Confirmed via a raw PDF content-stream inspection: every
page after the first had zero text-draw (Tj) operators, since a fresh
per-page XGraphics's origin is that page's own band top, not the
document's. No existing test caught this because none checked page
content beyond page count. The same absolute-vs-fragment-local mixup
existed in this session's own image/frame content painters and in the
overflow-clip helper.
FragmentPainter now distinguishes the two coordinate spaces explicitly:
FragmentLocalOffset for geometry already sourced from the fragment tree,
LiveTreeOffset (and RenderUtils.ClipGraphicsByOverflow's new extraOffset
parameter) for geometry read straight off the live CssBox tree, which
additionally undoes the current fragmentainer's band top. Added a
regression test that asserts every page of a genuinely multi-page PDF
has real text operators, not just a page count.
With that fixed, HtmlContainerInt.PerformPaint(RGraphics)'s multi-
fragmentainer branch now paints every fragmentainer through
FragmentPainter (translated back to its real document-Y band top),
making CssBox.Paint/PaintImp and their three subclass overrides
genuinely unreachable - confirmed via grep and deleted, along with
CssBox's now-dead IsRectVisible helper.
Full regression suite (35 image-diff tests) and PDF suite (16 tests,
including the new one) pass; whole solution builds clean across all TFMs.
0 commit comments