Repository navigation
Commit 679760c
Track the stack of open elements while HTML is written
WriteHTML() keeps a frame for each element open in the HTML it reads:
its tag, id, classes, language and attributes, its position among its
siblings and among those of its tag, and a record of the siblings
closed before it. Selectors that look at ancestors and siblings will
read it through Mpdf::getOpenElements().
It follows real tokens only, so forced page breaks leave it alone. It
is put back with the rest of the state when a page-break-inside: avoid
block unwinds. Headers, footers and the index set the flow's stack aside,
and a positioned block's content is written against the stack as it
stood inside the block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 07af517 commit 679760c
5 files changed
Lines changed: 732 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| |||
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| 754 | + | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
| |||
0 commit comments