Repository navigation
Commit dbe33fe
committed
Fix RelocateIfNeeded off-by-one: a box exactly one page tall can be moved
RelocateIfNeeded's own fits-nowhere guard read
'if (height >= container.PageSize.Height) return;' - treating a box exactly
as tall as one page's content band the same as one too tall for ANY page.
A box exactly that tall genuinely does fit a page exactly when started
flush at that page's own top, so it was being left in place (straddling a
boundary) rather than relocated to the fresh page it would fit perfectly.
Changed >= to >.
Full suite: HtmlRenderer.Test 2427 passed/128 skipped/0 failed (unchanged),
HtmlRenderer.IntegrationTest 334 passed/92 skipped/0 failed (+1 unignored,
0 regressions elsewhere - this guard is exercised throughout the existing
break-inside:avoid/monolithic relocation suite), HtmlRenderer.PdfSharp.Test
39 passed/0 failed (unchanged).1 parent 267c3e0 commit dbe33fe
2 files changed
Lines changed: 1 addition & 6 deletions
File tree
- Source
- HtmlRenderer/Core/Fragmentation
- Test/HtmlRenderer.IntegrationTest/Fragmentation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 217 | | |
223 | 218 | | |
224 | 219 | | |
| |||
0 commit comments