Repository navigation
Commit 4360e0c
committed
R7: table content already benefits from R1-R6 fixes; one known limitation documented
Investigated before writing any new table-fragmentation code (same
approach as R2/R5/R6): table cells route their own content through the
same CssBox.PerformLayoutImp/CreateLineBoxes/ApplyLineBreaking machinery
as any other box, so a cell's own paragraphs already correctly benefit
from every R1-R6 fix for free. Confirmed via direct testing: a table
cell whose own content spans several pages by itself preserves all
content correctly, and subsequent rows correctly continue after it -
no TableBreakToken/TableRowCursor machinery needed for this, matching
the R2/R5/R6 pattern of this architecture rarely needing what it looks
like it needs at first glance.
The same investigation found one real, confirmed remaining gap:
CssLayoutEngineTable.LayoutCells's repeated-<thead> check runs once per
ROW (checking the layout cursor's page slot only at that row's own
start) - so a row whose own cell content spans MULTIPLE pages by itself
only gets a header repeat inserted for the first page it crosses onto,
not further intermediate pages that same row continues to span. Not
data loss or a crash, just a missing header repeat on some pages of a
fairly exotic table shape (one cell vastly longer than its siblings, in
a table with a repeating header). A real fix needs to know how many
pages a row spans before deciding how much room to reserve for it,
which requires relaying the row out a second time once its true span is
known - tractable, but deliberately left as a documented, out-of-scope
limitation given how rare the shape is versus the far more common case
(many ordinary rows, table spans many pages), which already repeats
correctly per the existing ThreadRepeatsOnEveryPageTheTableSpans test.
New test confirms the working case (no data loss for a multi-page-
spanning cell); the known-limitation comment lives directly beside the
code it describes rather than a test asserting broken behavior as
correct. Full regression suite (43 IntegrationTest + 16 PdfSharp tests)
passes.1 parent 03aa597 commit 4360e0c
2 files changed
Lines changed: 99 additions & 0 deletions
File tree
- Source
- HtmlRenderer/Core/Dom
- Test/HtmlRenderer.IntegrationTest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
633 | 646 | | |
634 | 647 | | |
635 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments