Skip to content

Prevent unplaceable node loops

Boris Budini requested to merge loop into master

Prevents infinite looping when laying out a node fails and can't be fit onto a page, or when an element always overflows and triggers continuous overflow events.

  • Adds a BreakToken class, with comparisons methods. This will still need to evolve a bit to handle more complex breaking.
  • Adds a check based on to stop creating new pages if the breakToken equals the previous one.
  • use displayedElementBefore to find previous nodes with breaks

Should be a good first step towards overhauling the Chunker fragmentation.

Merge request reports