Repository navigation
Commit b056b6c
committed
Remove the crude per-word/per-box BreakPage nudge (F3, partial)
CssBox.BreakPage and CssRect.BreakPage - the old modulo-arithmetic
"does this straddle a page, nudge it down" mechanism - are now fully
superseded: BlockFragmentation (D2), InlineFragmentation (D3), and
CssLayoutEngineTable's row-avoidance correction (D4) all replace their
call sites with page-grid-aware corrections. CssRect.BreakPage had
exactly one remaining caller (CssLayoutEngine.FlowBox's per-word
nudge, dead since D3 - a line box is monolithic, so lines move as a
whole via InlineFragmentation.ApplyLineBreaking, not word by word);
CssBox.BreakPage had none. Both deleted along with that call site.
This is a *narrower* cleanup than the plan's original F3 scope
("delete CssBox.Paint/PaintImp"), by design: FragmentPainter turns
out to still genuinely depend on CssBox.Paint/PaintImp, not just as a
temporary fallback - it delegates to them for CssBoxImage/CssBoxHr/
CssBoxFrame's own PaintImp overrides (E1's deliberate scope
reduction: real per-type content painters are follow-on work), and
the base PaintImp is what actually paints CssBox.ListItemBox and
CssBox.RepeatedHeaderRows (D4), neither of which override it. Deleting
CssBox.Paint/PaintImp now would break list markers and repeated table
headers, not just remove dead code - confirmed by grep before touching
anything: FragmentPainter.cs has three live call sites into it, plus
CssBox.PaintImp's own body still calls it for RepeatedHeaderRows.
Full existing suite (35 image-diff/fragment tests + 15 PDF/PdfSharp
tests) green - this change touches every paginated document's inline
flow, verified rather than assumed safe.1 parent dc2099e commit b056b6c
3 files changed
Lines changed: 0 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | 1316 | | |
1337 | 1317 | | |
1338 | 1318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | 508 | | |
514 | 509 | | |
515 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 272 | | |
291 | 273 | | |
0 commit comments