The Mechanics of Inline Block and Fragmentation
Blink28613 Helmi

The Mechanics of Inline Block and Fragmentation

These technical documents describe how Blink’s modern LayoutNG engine manages inline-block elements through a specialized physical fragment tree. Within this system, an inline-block is classified as an atomic inline, meaning it is treated as a single, indivisible unit during line layout while maintaining its own internal formatting context. The engine uses FragmentItems to provide a memory-efficient, flat representation of these elements for faster traversal and rendering. To handle complex scenarios like multi-column layouts or page breaks, Blink employs break tokens to track content continuation across different fragments. This architectural shift ensures that fragmentation is a natural part of the layout process rather than a secondary post-processing step. Ultimately, these resources offer deep insights into the internal C++ classes and data structures that govern modern web rendering.